mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-27 17:04:47 +00:00
Update landed_cost_voucher.js
This commit is contained in:
@@ -94,8 +94,6 @@ erpnext.stock.LandedCostVoucher = erpnext.stock.StockController.extend({
|
|||||||
set_applicable_charges_for_item: function() {
|
set_applicable_charges_for_item: function() {
|
||||||
var me = this;
|
var me = this;
|
||||||
|
|
||||||
|
|
||||||
console.log(this.frm)
|
|
||||||
if(this.frm.doc.taxes.length) {
|
if(this.frm.doc.taxes.length) {
|
||||||
|
|
||||||
var total_item_cost = 0.0;
|
var total_item_cost = 0.0;
|
||||||
@@ -105,10 +103,7 @@ erpnext.stock.LandedCostVoucher = erpnext.stock.StockController.extend({
|
|||||||
});
|
});
|
||||||
|
|
||||||
$.each(this.frm.doc.items || [], function(i, item) {
|
$.each(this.frm.doc.items || [], function(i, item) {
|
||||||
|
item.applicable_charges = flt(item[based_on]) * flt(me.frm.doc.total_taxes_and_charges) / flt(total_item_cost)
|
||||||
item.applicable_charges = flt(item[based_on]) * flt(me.frm.doc.total_taxes_and_charges) / flt(total_item_cost)
|
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
refresh_field("items");
|
refresh_field("items");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user