Merge branch 'version-13-hotfix' of https://github.com/frappe/erpnext into bootstraped_gst_setup

This commit is contained in:
Deepesh Garg
2021-07-02 20:30:18 +05:30
176 changed files with 5156 additions and 2227 deletions

View File

@@ -270,11 +270,14 @@ erpnext.taxes_and_totals = erpnext.payments.extend({
let me = this;
let item_codes = [];
let item_rates = {};
let item_tax_templates = {};
$.each(this.frm.doc.items || [], function(i, item) {
if (item.item_code) {
// Use combination of name and item code in case same item is added multiple times
item_codes.push([item.item_code, item.name]);
item_rates[item.name] = item.net_rate;
item_tax_templates[item.name] = item.item_tax_template;
}
});
@@ -285,18 +288,16 @@ erpnext.taxes_and_totals = erpnext.payments.extend({
company: me.frm.doc.company,
tax_category: cstr(me.frm.doc.tax_category),
item_codes: item_codes,
item_rates: item_rates
item_rates: item_rates,
item_tax_templates: item_tax_templates
},
callback: function(r) {
if (!r.exc) {
$.each(me.frm.doc.items || [], function(i, item) {
if (item.name && r.message.hasOwnProperty(item.name)) {
if (item.name && r.message.hasOwnProperty(item.name) && r.message[item.name].item_tax_template) {
item.item_tax_template = r.message[item.name].item_tax_template;
item.item_tax_rate = r.message[item.name].item_tax_rate;
me.add_taxes_from_item_tax_template(item.item_tax_rate);
} else {
item.item_tax_template = "";
item.item_tax_rate = "{}";
}
});
}

View File

@@ -868,9 +868,6 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({
}
if (this.frm.doc.posting_date) var date = this.frm.doc.posting_date;
else var date = this.frm.doc.transaction_date;
if (frappe.meta.get_docfield(this.frm.doctype, "shipping_address") &&
in_list(['Purchase Order', 'Purchase Receipt', 'Purchase Invoice'], this.frm.doctype)) {
erpnext.utils.get_shipping_address(this.frm, function(){

View File

@@ -274,9 +274,9 @@ erpnext.utils.validate_mandatory = function(frm, label, value, trigger_on) {
return true;
}
erpnext.utils.get_shipping_address = function(frm, callback){
erpnext.utils.get_shipping_address = function(frm, callback) {
if (frm.doc.company) {
if (!(frm.doc.inter_com_order_reference || frm.doc.internal_invoice_reference ||
if ((frm.doc.inter_company_order_reference || frm.doc.internal_invoice_reference ||
frm.doc.internal_order_reference)) {
if (callback) {
return callback();

View File

@@ -467,11 +467,15 @@ body.product-page {
.btn-change-address {
color: var(--blue-500);
box-shadow: none;
border: 1px solid var(--blue-500);
}
}
.btn-new-address:hover, .btn-change-address:hover {
box-shadow: none;
color: var(--blue-500) !important;
border: 1px solid var(--blue-500);
}
.modal .address-card {
.card-body {
padding: var(--padding-sm);