Merge pull request #3622 from rmehta/minor-fixes
[fix] cart and general leger report
This commit is contained in:
commit
c37484c8da
@ -53,13 +53,9 @@ frappe.query_reports["General Ledger"] = {
|
||||
{
|
||||
"fieldname":"party_type",
|
||||
"label": __("Party Type"),
|
||||
"fieldtype": "Link",
|
||||
"options": "DocType",
|
||||
"get_query": function() {
|
||||
return {
|
||||
filters: {"name": ["in", ["Customer", "Supplier"]]}
|
||||
}
|
||||
}
|
||||
"fieldtype": "Select",
|
||||
"options": ["Customer", "Supplier"],
|
||||
"default": "Customer"
|
||||
},
|
||||
{
|
||||
"fieldname":"party",
|
||||
|
@ -8,7 +8,8 @@ frappe.provide("shopping_cart");
|
||||
|
||||
$.extend(shopping_cart, {
|
||||
show_error: function(title, text) {
|
||||
$("#cart-container").html('<div class="msg-box"><h4>' + title + '</h4> ' + text + '</div>');
|
||||
$("#cart-container").html('<div class="msg-box"><h4>' +
|
||||
title + '</h4><p class="text-muted">' + text + '</p></div>');
|
||||
},
|
||||
|
||||
bind_events: function() {
|
||||
@ -56,7 +57,7 @@ $.extend(shopping_cart, {
|
||||
var no_items = $.map(doc.items || [],
|
||||
function(d) { return d.item_code || null;}).length===0;
|
||||
if(no_items) {
|
||||
shopping_cart.show_error("Empty :-(", frappe._("Go ahead and add something to your cart."));
|
||||
shopping_cart.show_error("Cart Empty", frappe._("Go ahead and add something to your cart."));
|
||||
$("#cart-addresses").toggle(false);
|
||||
return;
|
||||
}
|
||||
@ -281,11 +282,11 @@ $(document).ready(function() {
|
||||
$(".progress").remove();
|
||||
if(r.exc) {
|
||||
if(r.exc.indexOf("WebsitePriceListMissingError")!==-1) {
|
||||
shopping_cart.show_error("Oops!", frappe._("Price List not configured."));
|
||||
shopping_cart.show_error("Configuration Error", frappe._("Price List not configured."));
|
||||
} else if(r["403"]) {
|
||||
shopping_cart.show_error("Hey!", frappe._("You need to be logged in to view your cart."));
|
||||
shopping_cart.show_error("Not Allowed", frappe._("You need to be logged in to view your cart."));
|
||||
} else {
|
||||
shopping_cart.show_error("Oops!", frappe._("Something went wrong."));
|
||||
shopping_cart.show_error("Error", frappe._("Something went wrong."));
|
||||
}
|
||||
} else {
|
||||
shopping_cart.set_cart_count();
|
||||
|
@ -1,6 +1,6 @@
|
||||
{% block title %} {{ "Shopping Cart" }} {% endblock %}
|
||||
|
||||
{% block header %}<h2><i class="icon-shopping-cart"></i> Shopping Cart</h2>{% endblock %}
|
||||
{% block header %}<h2>{{ _("My Cart") }}</h2>{% endblock %}
|
||||
|
||||
{% block script %}{% include "templates/includes/cart.js" %}{% endblock %}
|
||||
|
||||
@ -8,17 +8,18 @@
|
||||
<div class="cart-content">
|
||||
<div class="text-muted progress">{{ _("Loading") }}...</div>
|
||||
<div id="cart-container" class="hide">
|
||||
<p class="pull-right"><button class="btn btn-success btn-place-order" type="button">Place Order</button></p>
|
||||
<p class="pull-right"><button class="btn btn-success btn-place-order" type="button">
|
||||
{{ _("Place Order") }}</button></p>
|
||||
<div class="clearfix"></div>
|
||||
<div id="cart-error" class="alert alert-danger" style="display: none;"></div>
|
||||
<hr>
|
||||
<div class="row">
|
||||
<div class="col-md-9 col-sm-9">
|
||||
<div class="row">
|
||||
<div class="col-md-9 col-md-offset-3"><h4>Item Details</h4></div>
|
||||
<div class="col-md-9 col-md-offset-3"><h4>{{ _("Item Details") }}</h4></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3 col-sm-3 text-right"><h4>Qty, Amount</h4></div>
|
||||
<div class="col-md-3 col-sm-3 text-right"><h4>{{ _("Qty, Amount") }}</h4></div>
|
||||
</div><hr>
|
||||
<div id="cart-items">
|
||||
</div>
|
||||
@ -30,26 +31,26 @@
|
||||
<div id="cart-addresses">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<h4>Shipping Address</h4>
|
||||
<h4>{{ _("Shipping Address") }}</h4>
|
||||
<div id="cart-shipping-address" class="panel-group"
|
||||
data-fieldname="shipping_address_name"></div>
|
||||
<button class="btn btn-default" type="button" id="cart-add-shipping-address">
|
||||
<span class="icon icon-plus"></span> New Shipping Address</button>
|
||||
<span class="icon icon-plus"></span> {{ _("New Shipping Address") }}</button>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<h4>Billing Address</h4>
|
||||
<div id="cart-billing-address" class="panel-group"
|
||||
data-fieldname="customer_address"></div>
|
||||
<button class="btn btn-default" type="button" id="cart-add-billing-address">
|
||||
<span class="icon icon-plus"></span> New Billing Address</button>
|
||||
<span class="icon icon-plus"></span> {{ _("New Billing Address") }}</button>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
</div>
|
||||
<p class="pull-right"><button class="btn btn-success btn-place-order" type="button">Place Order</button></p>
|
||||
<p class="pull-right"><button class="btn btn-success btn-place-order" type="button">
|
||||
{{ _("Place Order") }}</button></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- no-sidebar -->
|
||||
{% endblock %}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user