Merge branch 'master' of github.com:webnotes/erpnext

This commit is contained in:
Anand Doshi
2013-07-18 13:26:53 +05:30
14 changed files with 88 additions and 38 deletions

View File

@@ -412,9 +412,9 @@ def make_delivery_note(source_name, target_doclist=None):
@webnotes.whitelist()
def make_sales_invoice(source_name, target_doclist=None):
def update_item(obj, target, source_parent):
target.export_amount = flt(obj.amount) - flt(obj.billed_amt)
target.amount = target.export_amount / flt(source_parent.conversion_rate)
target.qty = obj.basic_rate and target.amount / flt(obj.basic_rate) or obj.qty
target.export_amount = flt(obj.export_amount) - flt(obj.billed_amt)
target.amount = target.export_amount * flt(source_parent.conversion_rate)
target.qty = obj.export_rate and target.export_amount / flt(obj.export_rate) or obj.qty
doclist = get_mapped_doclist("Sales Order", source_name, {
"Sales Order": {

View File

@@ -8,5 +8,5 @@ class DocType:
self.doc, self.doclist = d, dl
def validate(self):
for key in ["cust_master_name", "customer_group", "territory"]:
for key in ["cust_master_name", "customer_group", "territory", "allow_same_sales_rate"]:
webnotes.conn.set_default(key, self.doc.fields.get(key, ""))

View File

@@ -2,7 +2,7 @@
{
"creation": "2013-06-25 10:25:16",
"docstatus": 0,
"modified": "2013-07-05 14:54:47",
"modified": "2013-07-18 12:03:39",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -88,6 +88,12 @@
"label": "Delivery Note Required",
"options": "No\nYes"
},
{
"doctype": "DocField",
"fieldname": "maintain_same_sales_rate",
"fieldtype": "Check",
"label": "Maintain Same Rate Throughout Sales Cycle"
},
{
"doctype": "DocPerm"
}