mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-29 18:04:46 +00:00
[mapper-pull] for sales / purchae
This commit is contained in:
@@ -94,8 +94,12 @@ erpnext.buying.PurchaseOrderController = erpnext.buying.BuyingController.extend(
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
tc_name: function() {
|
||||
this.get_terms();
|
||||
},
|
||||
|
||||
});
|
||||
|
||||
// for backward compatibility: combine new and previous states
|
||||
|
||||
@@ -243,7 +243,8 @@ def make_purchase_invoice(source_name, target_doclist=None):
|
||||
target.conversion_factor = 1
|
||||
target.import_amount = flt(obj.import_amount) - flt(obj.billed_amt)
|
||||
target.amount = target.import_amount / flt(source_parent.conversion_rate)
|
||||
target.qty = target.amount / flt(obj.purchase_rate)
|
||||
if flt(obj.purchase_rate):
|
||||
target.qty = target.amount / flt(obj.purchase_rate)
|
||||
|
||||
doclist = get_mapped_doclist("Purchase Order", source_name, {
|
||||
"Purchase Order": {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
{
|
||||
"creation": "2013-05-21 16:16:39",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-07-08 15:12:46",
|
||||
"modified": "2013-07-08 17:49:29",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
@@ -488,13 +488,6 @@
|
||||
"options": "Terms and Conditions",
|
||||
"print_hide": 1
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "get_terms",
|
||||
"fieldtype": "Button",
|
||||
"label": "Get Terms and Conditions",
|
||||
"oldfieldtype": "Button"
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "terms",
|
||||
|
||||
@@ -85,7 +85,8 @@ def _get_basic_details(args, item_bean):
|
||||
"item_tax_rate": json.dumps(dict(([d.tax_type, d.tax_rate] for d in
|
||||
item_bean.doclist.get({"parentfield": "item_tax"})))),
|
||||
"batch_no": None,
|
||||
"expense_head": item.purchase_account,
|
||||
"expense_head": item.purchase_account \
|
||||
or webnotes.conn.get_value("Company", args.company, "default_expense_account"),
|
||||
"cost_center": item.cost_center
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user