Rename fields: amount related fields

This commit is contained in:
Nabin Hait
2014-02-10 19:20:15 +05:30
parent 7979f7ed21
commit 1eb560130a
32 changed files with 140 additions and 140 deletions

View File

@@ -137,14 +137,14 @@ var set_print_hide= function(doc, cdt, cdn){
dn_item_fields['rate'].print_hide = 1;
dn_item_fields['discount_percentage'].print_hide = 1;
dn_item_fields['price_list_rate'].print_hide = 1;
dn_item_fields['export_amount'].print_hide = 1;
dn_item_fields['amount'].print_hide = 1;
} else {
if (dn_fields_copy['currency'].print_hide != 1)
dn_fields['currency'].print_hide = 0;
if (dn_item_fields_copy['rate'].print_hide != 1)
dn_item_fields['rate'].print_hide = 0;
if (dn_item_fields_copy['export_amount'].print_hide != 1)
dn_item_fields['export_amount'].print_hide = 0;
if (dn_item_fields_copy['amount'].print_hide != 1)
dn_item_fields['amount'].print_hide = 0;
}
}

View File

@@ -261,7 +261,7 @@ class DocType(SellingController):
amount, total = 0, 0
for d in getlist(self.doclist, 'delivery_note_details'):
if not (d.against_sales_order or d.against_sales_invoice):
amount += d.amount
amount += d.base_amount
if amount != 0:
total = (amount/self.doc.net_total)*self.doc.grand_total
self.check_credit(total)

View File

@@ -36,7 +36,7 @@ class TestDeliveryNote(unittest.TestCase):
self.assertEquals(len(si), len(dn.doclist))
# modify export_amount
# modify amount
si[1].rate = 200
self.assertRaises(webnotes.ValidationError, webnotes.bean(si).insert)
@@ -98,7 +98,7 @@ class TestDeliveryNote(unittest.TestCase):
pr = webnotes.bean(copy=pr_test_records[0])
pr.doc.posting_date = "2013-01-01"
pr.doclist[1].rate = 100
pr.doclist[1].amount = 100
pr.doclist[1].base_amount = 100
pr.insert()
pr.submit()
@@ -245,7 +245,7 @@ test_records = [
"qty": 5.0,
"base_rate": 100.0,
"rate": 100.0,
"amount": 500.0,
"base_amount": 500.0,
"warehouse": "_Test Warehouse - _TC",
"stock_uom": "_Test UOM",
"expense_account": "Cost of Goods Sold - _TC",

View File

@@ -156,7 +156,7 @@ test_records = [
"qty": 5.0,
"rejected_qty": 0.0,
"rate": 50.0,
"amount": 250.0,
"base_amount": 250.0,
"warehouse": "_Test Warehouse - _TC",
"stock_uom": "Nos",
"uom": "_Test UOM",
@@ -172,7 +172,7 @@ test_records = [
"qty": 5.0,
"rejected_qty": 0.0,
"rate": 50.0,
"amount": 250.0,
"base_amount": 250.0,
"warehouse": "_Test Warehouse 1 - _TC",
"stock_uom": "Nos",
"uom": "_Test UOM",
@@ -237,7 +237,7 @@ test_records = [
"qty": 10.0,
"rejected_qty": 0.0,
"rate": 500.0,
"amount": 5000.0,
"base_amount": 5000.0,
"warehouse": "_Test Warehouse - _TC",
"stock_uom": "Nos",
"uom": "_Test UOM",