mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-06 05:39:12 +00:00
[get_query] to server side
This commit is contained in:
@@ -34,7 +34,9 @@ erpnext.stock.DeliveryNoteController = erpnext.selling.SellingController.extend(
|
||||
if(flt(doc.per_installed, 2) < 100 && doc.docstatus==1)
|
||||
cur_frm.add_custom_button('Make Installation Note', this.make_installation_note);
|
||||
|
||||
if (doc.docstatus==1) cur_frm.add_custom_button('Send SMS', cur_frm.cscript.send_sms);
|
||||
if (doc.docstatus==1) {
|
||||
cur_frm.add_custom_button('Send SMS', cur_frm.cscript.send_sms);
|
||||
}
|
||||
|
||||
if(doc.docstatus==0 && !doc.__islocal) {
|
||||
cur_frm.add_custom_button('Make Packing Slip', cur_frm.cscript['Make Packing Slip']);
|
||||
@@ -248,6 +250,7 @@ if (sys_defaults.auto_inventory_accounting) {
|
||||
|
||||
cur_frm.fields_dict.delivery_note_details.grid.get_field("cost_center").get_query = function(doc) {
|
||||
return {
|
||||
|
||||
filters: {
|
||||
'company_name': doc.company,
|
||||
'group_or_ledger': "Ledger"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
{
|
||||
"creation": "2013-05-24 19:29:09",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-07-08 17:46:45",
|
||||
"modified": "2013-07-09 12:48:27",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
@@ -212,34 +212,12 @@
|
||||
"search_index": 1,
|
||||
"width": "100px"
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "challan_no",
|
||||
"fieldtype": "Data",
|
||||
"hidden": 1,
|
||||
"label": "Challan No",
|
||||
"oldfieldname": "challan_no",
|
||||
"oldfieldtype": "Data",
|
||||
"print_hide": 1,
|
||||
"read_only": 0
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "challan_date",
|
||||
"fieldtype": "Date",
|
||||
"hidden": 1,
|
||||
"label": "Challan Date",
|
||||
"oldfieldname": "challan_date",
|
||||
"oldfieldtype": "Date",
|
||||
"print_hide": 1,
|
||||
"read_only": 0
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "po_no",
|
||||
"fieldtype": "Data",
|
||||
"hidden": 1,
|
||||
"label": "P.O. No",
|
||||
"label": "Customer's Purchase Order No",
|
||||
"no_copy": 0,
|
||||
"oldfieldname": "po_no",
|
||||
"oldfieldtype": "Data",
|
||||
@@ -254,7 +232,7 @@
|
||||
"fieldname": "po_date",
|
||||
"fieldtype": "Data",
|
||||
"hidden": 1,
|
||||
"label": "P.O. Date",
|
||||
"label": "Customer's Purchase Order Date",
|
||||
"no_copy": 0,
|
||||
"oldfieldname": "po_date",
|
||||
"oldfieldtype": "Data",
|
||||
@@ -267,7 +245,7 @@
|
||||
"doctype": "DocField",
|
||||
"fieldname": "sec_break25",
|
||||
"fieldtype": "Section Break",
|
||||
"label": "Price List and Currency",
|
||||
"label": "Currency and Price List",
|
||||
"options": "icon-tag",
|
||||
"read_only": 0
|
||||
},
|
||||
@@ -390,19 +368,29 @@
|
||||
"print_hide": 1,
|
||||
"read_only": 0
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "section_break_31",
|
||||
"fieldtype": "Section Break"
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "net_total_export",
|
||||
"fieldtype": "Currency",
|
||||
"label": "Net Total (Export)",
|
||||
"label": "Net Total",
|
||||
"options": "currency",
|
||||
"read_only": 1
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "column_break_33",
|
||||
"fieldtype": "Column Break"
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "net_total",
|
||||
"fieldtype": "Currency",
|
||||
"label": "Net Total*",
|
||||
"label": "Net Total (Company Currency)",
|
||||
"no_copy": 0,
|
||||
"oldfieldname": "net_total",
|
||||
"oldfieldtype": "Currency",
|
||||
@@ -413,14 +401,6 @@
|
||||
"reqd": 0,
|
||||
"width": "150px"
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "recalculate_values",
|
||||
"fieldtype": "Button",
|
||||
"label": "Re-Calculate Values",
|
||||
"oldfieldtype": "Button",
|
||||
"read_only": 0
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "taxes",
|
||||
@@ -490,24 +470,11 @@
|
||||
"doctype": "DocField",
|
||||
"fieldname": "other_charges_total_export",
|
||||
"fieldtype": "Currency",
|
||||
"label": "Taxes and Charges Total (Export)",
|
||||
"label": "Taxes and Charges Total",
|
||||
"options": "company",
|
||||
"print_hide": 1,
|
||||
"read_only": 1
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "other_charges_total",
|
||||
"fieldtype": "Currency",
|
||||
"label": "Taxes and Charges Total",
|
||||
"oldfieldname": "other_charges_total",
|
||||
"oldfieldtype": "Currency",
|
||||
"options": "Company:company:default_currency",
|
||||
"print_hide": 1,
|
||||
"print_width": "150px",
|
||||
"read_only": 1,
|
||||
"width": "150px"
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "column_break_47",
|
||||
@@ -515,12 +482,16 @@
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "calculate_charges",
|
||||
"fieldtype": "Button",
|
||||
"label": "Calculate Charges",
|
||||
"oldfieldtype": "Button",
|
||||
"fieldname": "other_charges_total",
|
||||
"fieldtype": "Currency",
|
||||
"label": "Taxes and Charges Total (Company Currency)",
|
||||
"oldfieldname": "other_charges_total",
|
||||
"oldfieldtype": "Currency",
|
||||
"options": "Company:company:default_currency",
|
||||
"print_hide": 1,
|
||||
"read_only": 0
|
||||
"print_width": "150px",
|
||||
"read_only": 1,
|
||||
"width": "150px"
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
@@ -536,7 +507,7 @@
|
||||
"doctype": "DocField",
|
||||
"fieldname": "grand_total_export",
|
||||
"fieldtype": "Currency",
|
||||
"label": "Grand Total (Export)",
|
||||
"label": "Grand Total",
|
||||
"no_copy": 0,
|
||||
"oldfieldname": "grand_total_export",
|
||||
"oldfieldtype": "Currency",
|
||||
@@ -551,7 +522,7 @@
|
||||
"doctype": "DocField",
|
||||
"fieldname": "rounded_total_export",
|
||||
"fieldtype": "Currency",
|
||||
"label": "Rounded Total (Export)",
|
||||
"label": "Rounded Total",
|
||||
"no_copy": 0,
|
||||
"oldfieldname": "rounded_total_export",
|
||||
"oldfieldtype": "Currency",
|
||||
@@ -566,7 +537,7 @@
|
||||
"doctype": "DocField",
|
||||
"fieldname": "in_words_export",
|
||||
"fieldtype": "Data",
|
||||
"label": "In Words (Export)",
|
||||
"label": "In Words",
|
||||
"no_copy": 0,
|
||||
"oldfieldname": "in_words_export",
|
||||
"oldfieldtype": "Data",
|
||||
@@ -586,7 +557,7 @@
|
||||
"doctype": "DocField",
|
||||
"fieldname": "grand_total",
|
||||
"fieldtype": "Currency",
|
||||
"label": "Grand Total",
|
||||
"label": "Grand Total (Company Currency)",
|
||||
"no_copy": 0,
|
||||
"oldfieldname": "grand_total",
|
||||
"oldfieldtype": "Currency",
|
||||
@@ -601,7 +572,7 @@
|
||||
"doctype": "DocField",
|
||||
"fieldname": "rounded_total",
|
||||
"fieldtype": "Currency",
|
||||
"label": "Rounded Total",
|
||||
"label": "Rounded Total (Company Currency)",
|
||||
"no_copy": 0,
|
||||
"oldfieldname": "rounded_total",
|
||||
"oldfieldtype": "Currency",
|
||||
@@ -616,7 +587,7 @@
|
||||
"doctype": "DocField",
|
||||
"fieldname": "in_words",
|
||||
"fieldtype": "Data",
|
||||
"label": "In Words",
|
||||
"label": "In Words (Company Currency)",
|
||||
"no_copy": 0,
|
||||
"oldfieldname": "in_words",
|
||||
"oldfieldtype": "Data",
|
||||
@@ -690,7 +661,7 @@
|
||||
"doctype": "DocField",
|
||||
"fieldname": "lr_no",
|
||||
"fieldtype": "Data",
|
||||
"label": "LR No",
|
||||
"label": "Vehicle No",
|
||||
"no_copy": 0,
|
||||
"oldfieldname": "lr_no",
|
||||
"oldfieldtype": "Data",
|
||||
@@ -706,7 +677,7 @@
|
||||
"doctype": "DocField",
|
||||
"fieldname": "lr_date",
|
||||
"fieldtype": "Date",
|
||||
"label": "LR Date",
|
||||
"label": "Vehicle Dispatch Date",
|
||||
"no_copy": 0,
|
||||
"oldfieldname": "lr_date",
|
||||
"oldfieldtype": "Date",
|
||||
|
||||
@@ -28,6 +28,25 @@ class TestDeliveryNote(unittest.TestCase):
|
||||
pr.run_method("calculate_taxes_and_totals")
|
||||
pr.insert()
|
||||
pr.submit()
|
||||
|
||||
def test_over_billing_against_dn(self):
|
||||
from stock.doctype.delivery_note.delivery_note import make_sales_invoice
|
||||
|
||||
dn = webnotes.bean(copy=test_records[0]).insert()
|
||||
|
||||
self.assertRaises(webnotes.ValidationError, make_sales_invoice,
|
||||
dn.doc.name)
|
||||
|
||||
dn = webnotes.bean("Delivery Note", dn.doc.name)
|
||||
dn.submit()
|
||||
si = make_sales_invoice(dn.doc.name)
|
||||
|
||||
self.assertEquals(len(si), len(dn.doclist))
|
||||
|
||||
# modify export_amount
|
||||
si[1].export_rate = 200
|
||||
self.assertRaises(webnotes.ValidationError, webnotes.bean(si).submit)
|
||||
|
||||
|
||||
def test_delivery_note_no_gl_entry(self):
|
||||
webnotes.conn.sql("""delete from `tabBin`""")
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
{
|
||||
"creation": "2013-04-22 13:15:44",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-07-08 17:46:21",
|
||||
"modified": "2013-07-09 12:42:09",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
@@ -169,7 +169,7 @@
|
||||
"doctype": "DocField",
|
||||
"fieldname": "base_ref_rate",
|
||||
"fieldtype": "Currency",
|
||||
"label": "Price List Rate*",
|
||||
"label": "Price List Rate (Company Currency)",
|
||||
"oldfieldname": "base_ref_rate",
|
||||
"oldfieldtype": "Currency",
|
||||
"options": "Company:company:default_currency",
|
||||
@@ -183,7 +183,7 @@
|
||||
"doctype": "DocField",
|
||||
"fieldname": "basic_rate",
|
||||
"fieldtype": "Currency",
|
||||
"label": "Rate*",
|
||||
"label": "Rate (Company Currency)",
|
||||
"oldfieldname": "basic_rate",
|
||||
"oldfieldtype": "Currency",
|
||||
"options": "Company:company:default_currency",
|
||||
@@ -197,7 +197,7 @@
|
||||
"doctype": "DocField",
|
||||
"fieldname": "amount",
|
||||
"fieldtype": "Currency",
|
||||
"label": "Amount*",
|
||||
"label": "Amount (Company Currency)",
|
||||
"oldfieldname": "amount",
|
||||
"oldfieldtype": "Currency",
|
||||
"options": "Company:company:default_currency",
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
{
|
||||
"creation": "2013-03-07 14:48:38",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-07-08 16:18:00",
|
||||
"modified": "2013-07-09 11:39:32",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
@@ -79,6 +79,35 @@
|
||||
"print_hide": 1,
|
||||
"reqd": 1
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "amended_from",
|
||||
"fieldtype": "Data",
|
||||
"label": "Amended From",
|
||||
"no_copy": 1,
|
||||
"oldfieldname": "amended_from",
|
||||
"oldfieldtype": "Data",
|
||||
"print_hide": 1,
|
||||
"print_width": "150px",
|
||||
"read_only": 1,
|
||||
"width": "150px"
|
||||
},
|
||||
{
|
||||
"description": "Select the relevant company name if you have multiple companies",
|
||||
"doctype": "DocField",
|
||||
"fieldname": "company",
|
||||
"fieldtype": "Link",
|
||||
"in_filter": 1,
|
||||
"label": "Company",
|
||||
"oldfieldname": "company",
|
||||
"oldfieldtype": "Link",
|
||||
"options": "Company",
|
||||
"print_hide": 1,
|
||||
"print_width": "150px",
|
||||
"reqd": 1,
|
||||
"search_index": 1,
|
||||
"width": "150px"
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "items",
|
||||
@@ -130,22 +159,6 @@
|
||||
"search_index": 1,
|
||||
"width": "100px"
|
||||
},
|
||||
{
|
||||
"description": "Select the relevant company name if you have multiple companies",
|
||||
"doctype": "DocField",
|
||||
"fieldname": "company",
|
||||
"fieldtype": "Link",
|
||||
"in_filter": 1,
|
||||
"label": "Company",
|
||||
"oldfieldname": "company",
|
||||
"oldfieldtype": "Link",
|
||||
"options": "Company",
|
||||
"print_hide": 1,
|
||||
"print_width": "150px",
|
||||
"reqd": 1,
|
||||
"search_index": 1,
|
||||
"width": "150px"
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "fiscal_year",
|
||||
@@ -224,19 +237,6 @@
|
||||
"print_hide": 1,
|
||||
"read_only": 1
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "amended_from",
|
||||
"fieldtype": "Data",
|
||||
"label": "Amended From",
|
||||
"no_copy": 1,
|
||||
"oldfieldname": "amended_from",
|
||||
"oldfieldtype": "Data",
|
||||
"print_hide": 1,
|
||||
"print_width": "150px",
|
||||
"read_only": 1,
|
||||
"width": "150px"
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "remark",
|
||||
|
||||
@@ -124,6 +124,9 @@ class TestMaterialRequest(unittest.TestCase):
|
||||
po_doclist[0].supplier = "_Test Supplier"
|
||||
po_doclist[1].qty = 27.0
|
||||
po_doclist[2].qty = 1.5
|
||||
po_doclist[1].schedule_date = "2013-07-09"
|
||||
po_doclist[2].schedule_date = "2013-07-09"
|
||||
|
||||
|
||||
# check for stopped status of Material Request
|
||||
po = webnotes.bean(copy=po_doclist)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
{
|
||||
"creation": "2013-02-22 01:28:02",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-03-07 07:03:25",
|
||||
"modified": "2013-07-09 11:37:12",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
@@ -25,20 +25,6 @@
|
||||
"doctype": "DocType",
|
||||
"name": "Material Request Item"
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"doctype": "DocField",
|
||||
"fieldname": "schedule_date",
|
||||
"fieldtype": "Date",
|
||||
"label": "Required Date",
|
||||
"no_copy": 1,
|
||||
"oldfieldname": "schedule_date",
|
||||
"oldfieldtype": "Date",
|
||||
"print_hide": 0,
|
||||
"print_width": "100px",
|
||||
"reqd": 1,
|
||||
"width": "100px"
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "item_code",
|
||||
@@ -53,6 +39,20 @@
|
||||
"search_index": 1,
|
||||
"width": "100px"
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"doctype": "DocField",
|
||||
"fieldname": "schedule_date",
|
||||
"fieldtype": "Date",
|
||||
"label": "Required Date",
|
||||
"no_copy": 1,
|
||||
"oldfieldname": "schedule_date",
|
||||
"oldfieldtype": "Date",
|
||||
"print_hide": 0,
|
||||
"print_width": "100px",
|
||||
"reqd": 1,
|
||||
"width": "100px"
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "description",
|
||||
|
||||
@@ -103,7 +103,7 @@ class DocType(BuyingController):
|
||||
},
|
||||
"Purchase Order Item": {
|
||||
"ref_dn_field": "prevdoc_detail_docname",
|
||||
"compare_fields": [["export_rate", "="], ["project_name", "="], ["warehouse", "="],
|
||||
"compare_fields": [["import_rate", "="], ["project_name", "="], ["warehouse", "="],
|
||||
["uom", "="], ["item_code", "="]],
|
||||
"is_child_table": True
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
{
|
||||
"creation": "2013-05-21 16:16:39",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-07-08 17:46:13",
|
||||
"modified": "2013-07-09 12:50:25",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
@@ -172,7 +172,7 @@
|
||||
"fieldname": "challan_no",
|
||||
"fieldtype": "Data",
|
||||
"hidden": 1,
|
||||
"label": "Challan No",
|
||||
"label": "Supplier Shipment No",
|
||||
"no_copy": 1,
|
||||
"oldfieldname": "challan_no",
|
||||
"oldfieldtype": "Data",
|
||||
@@ -186,7 +186,7 @@
|
||||
"fieldname": "challan_date",
|
||||
"fieldtype": "Date",
|
||||
"hidden": 1,
|
||||
"label": "Challan Date",
|
||||
"label": "Supplier Shipment Date",
|
||||
"no_copy": 1,
|
||||
"oldfieldname": "challan_date",
|
||||
"oldfieldtype": "Date",
|
||||
@@ -195,58 +195,11 @@
|
||||
"reqd": 0,
|
||||
"width": "100px"
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "items",
|
||||
"fieldtype": "Section Break",
|
||||
"label": "Items",
|
||||
"oldfieldtype": "Section Break",
|
||||
"options": "icon-shopping-cart"
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 1,
|
||||
"doctype": "DocField",
|
||||
"fieldname": "purchase_receipt_details",
|
||||
"fieldtype": "Table",
|
||||
"label": "Purchase Receipt Items",
|
||||
"oldfieldname": "purchase_receipt_details",
|
||||
"oldfieldtype": "Table",
|
||||
"options": "Purchase Receipt Item",
|
||||
"print_hide": 0,
|
||||
"reqd": 0
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "section_break0",
|
||||
"fieldtype": "Section Break",
|
||||
"oldfieldtype": "Section Break"
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "get_current_stock",
|
||||
"fieldtype": "Button",
|
||||
"label": "Get Current Stock",
|
||||
"oldfieldtype": "Button",
|
||||
"options": "get_current_stock",
|
||||
"print_hide": 1
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "column_break_18",
|
||||
"fieldtype": "Column Break"
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "recalculate_values",
|
||||
"fieldtype": "Button",
|
||||
"label": "Re-Calculate Values",
|
||||
"oldfieldtype": "Button"
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "currency_price_list",
|
||||
"fieldtype": "Section Break",
|
||||
"label": "Currency & Price List",
|
||||
"label": "Currency and Price List",
|
||||
"options": "icon-tag"
|
||||
},
|
||||
{
|
||||
@@ -308,6 +261,71 @@
|
||||
"label": "Price List Exchange Rate",
|
||||
"print_hide": 1
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "items",
|
||||
"fieldtype": "Section Break",
|
||||
"label": "Items",
|
||||
"oldfieldtype": "Section Break",
|
||||
"options": "icon-shopping-cart"
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 1,
|
||||
"doctype": "DocField",
|
||||
"fieldname": "purchase_receipt_details",
|
||||
"fieldtype": "Table",
|
||||
"label": "Purchase Receipt Items",
|
||||
"oldfieldname": "purchase_receipt_details",
|
||||
"oldfieldtype": "Table",
|
||||
"options": "Purchase Receipt Item",
|
||||
"print_hide": 0,
|
||||
"reqd": 0
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "section_break0",
|
||||
"fieldtype": "Section Break",
|
||||
"oldfieldtype": "Section Break"
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "net_total_import",
|
||||
"fieldtype": "Currency",
|
||||
"label": "Net Total",
|
||||
"oldfieldname": "net_total_import",
|
||||
"oldfieldtype": "Currency",
|
||||
"options": "currency",
|
||||
"print_hide": 1,
|
||||
"read_only": 1
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "get_current_stock",
|
||||
"fieldtype": "Button",
|
||||
"label": "Get Current Stock",
|
||||
"oldfieldtype": "Button",
|
||||
"options": "get_current_stock",
|
||||
"print_hide": 1
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "column_break_27",
|
||||
"fieldtype": "Column Break"
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "net_total",
|
||||
"fieldtype": "Currency",
|
||||
"label": "Net Total (Company Currency)",
|
||||
"oldfieldname": "net_total",
|
||||
"oldfieldtype": "Currency",
|
||||
"options": "Company:company:default_currency",
|
||||
"print_hide": 1,
|
||||
"print_width": "150px",
|
||||
"read_only": 1,
|
||||
"reqd": 1,
|
||||
"width": "150px"
|
||||
},
|
||||
{
|
||||
"description": "Add / Edit Taxes and Charges",
|
||||
"doctype": "DocField",
|
||||
@@ -328,15 +346,6 @@
|
||||
"options": "Purchase Taxes and Charges Master",
|
||||
"print_hide": 1
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "get_tax_detail",
|
||||
"fieldtype": "Button",
|
||||
"label": "Get Tax Detail",
|
||||
"oldfieldtype": "Button",
|
||||
"options": "get_purchase_tax_details",
|
||||
"print_hide": 1
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "purchase_tax_details",
|
||||
@@ -346,14 +355,6 @@
|
||||
"oldfieldtype": "Table",
|
||||
"options": "Purchase Taxes and Charges"
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "calculate_tax",
|
||||
"fieldtype": "Button",
|
||||
"label": "Calculate Tax",
|
||||
"oldfieldtype": "Button",
|
||||
"print_hide": 1
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "tax_calculation",
|
||||
@@ -371,22 +372,11 @@
|
||||
"oldfieldtype": "Section Break",
|
||||
"options": "icon-money"
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "net_total_import",
|
||||
"fieldtype": "Currency",
|
||||
"label": "Net Total (Import)",
|
||||
"oldfieldname": "net_total_import",
|
||||
"oldfieldtype": "Currency",
|
||||
"options": "currency",
|
||||
"print_hide": 1,
|
||||
"read_only": 1
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "other_charges_added_import",
|
||||
"fieldtype": "Currency",
|
||||
"label": "Taxes and Charges Added (Import)",
|
||||
"label": "Taxes and Charges Added",
|
||||
"oldfieldname": "other_charges_added_import",
|
||||
"oldfieldtype": "Currency",
|
||||
"options": "currency",
|
||||
@@ -397,7 +387,7 @@
|
||||
"doctype": "DocField",
|
||||
"fieldname": "other_charges_deducted_import",
|
||||
"fieldtype": "Currency",
|
||||
"label": "Taxes and Charges Deducted (Import)",
|
||||
"label": "Taxes and Charges Deducted",
|
||||
"oldfieldname": "other_charges_deducted_import",
|
||||
"oldfieldtype": "Currency",
|
||||
"options": "currency",
|
||||
@@ -408,7 +398,7 @@
|
||||
"doctype": "DocField",
|
||||
"fieldname": "grand_total_import",
|
||||
"fieldtype": "Currency",
|
||||
"label": "Grand Total (Import)",
|
||||
"label": "Grand Total",
|
||||
"oldfieldname": "grand_total_import",
|
||||
"oldfieldtype": "Currency",
|
||||
"options": "currency",
|
||||
@@ -419,7 +409,7 @@
|
||||
"doctype": "DocField",
|
||||
"fieldname": "in_words_import",
|
||||
"fieldtype": "Data",
|
||||
"label": "In Words (Import)",
|
||||
"label": "In Words",
|
||||
"oldfieldname": "in_words_import",
|
||||
"oldfieldtype": "Data",
|
||||
"print_hide": 1,
|
||||
@@ -432,25 +422,11 @@
|
||||
"print_width": "50%",
|
||||
"width": "50%"
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "net_total",
|
||||
"fieldtype": "Currency",
|
||||
"label": "Net Total",
|
||||
"oldfieldname": "net_total",
|
||||
"oldfieldtype": "Currency",
|
||||
"options": "Company:company:default_currency",
|
||||
"print_hide": 1,
|
||||
"print_width": "150px",
|
||||
"read_only": 1,
|
||||
"reqd": 1,
|
||||
"width": "150px"
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "other_charges_added",
|
||||
"fieldtype": "Currency",
|
||||
"label": "Taxes and Charges Added",
|
||||
"label": "Taxes and Charges Added (Company Currency)",
|
||||
"oldfieldname": "other_charges_added",
|
||||
"oldfieldtype": "Currency",
|
||||
"options": "Company:company:default_currency",
|
||||
@@ -461,7 +437,7 @@
|
||||
"doctype": "DocField",
|
||||
"fieldname": "other_charges_deducted",
|
||||
"fieldtype": "Currency",
|
||||
"label": "Taxes and Charges Deducted",
|
||||
"label": "Taxes and Charges Deducted (Company Currency)",
|
||||
"oldfieldname": "other_charges_deducted",
|
||||
"oldfieldtype": "Currency",
|
||||
"options": "Company:company:default_currency",
|
||||
@@ -472,7 +448,7 @@
|
||||
"doctype": "DocField",
|
||||
"fieldname": "total_tax",
|
||||
"fieldtype": "Currency",
|
||||
"label": "Total Tax",
|
||||
"label": "Total Tax (Company Currency)",
|
||||
"oldfieldname": "total_tax",
|
||||
"oldfieldtype": "Currency",
|
||||
"options": "Company:company:default_currency",
|
||||
@@ -483,7 +459,7 @@
|
||||
"doctype": "DocField",
|
||||
"fieldname": "grand_total",
|
||||
"fieldtype": "Currency",
|
||||
"label": "Grand Total",
|
||||
"label": "Grand Total (Company Currency)",
|
||||
"oldfieldname": "grand_total",
|
||||
"oldfieldtype": "Currency",
|
||||
"options": "Company:company:default_currency",
|
||||
@@ -494,7 +470,7 @@
|
||||
"doctype": "DocField",
|
||||
"fieldname": "rounded_total",
|
||||
"fieldtype": "Currency",
|
||||
"label": "Rounded Total",
|
||||
"label": "Rounded Total (Company Currency)",
|
||||
"oldfieldname": "rounded_total",
|
||||
"oldfieldtype": "Currency",
|
||||
"options": "Company:company:default_currency",
|
||||
@@ -506,7 +482,7 @@
|
||||
"doctype": "DocField",
|
||||
"fieldname": "in_words",
|
||||
"fieldtype": "Data",
|
||||
"label": "In Words",
|
||||
"label": "In Words (Company Currency)",
|
||||
"oldfieldname": "in_words",
|
||||
"oldfieldtype": "Data",
|
||||
"print_hide": 1,
|
||||
|
||||
@@ -22,7 +22,7 @@ import webnotes.defaults
|
||||
from webnotes.utils import cint
|
||||
|
||||
class TestPurchaseReceipt(unittest.TestCase):
|
||||
def test_make_purchase_invocie(self):
|
||||
def test_make_purchase_invoice(self):
|
||||
from stock.doctype.purchase_receipt.purchase_receipt import make_purchase_invoice
|
||||
|
||||
pr = webnotes.bean(copy=test_records[0]).insert()
|
||||
@@ -37,6 +37,10 @@ class TestPurchaseReceipt(unittest.TestCase):
|
||||
self.assertEquals(pi[0]["doctype"], "Purchase Invoice")
|
||||
self.assertEquals(len(pi), len(pr.doclist))
|
||||
|
||||
# modify import_rate
|
||||
pi[1].import_rate = 200
|
||||
self.assertRaises(webnotes.ValidationError, webnotes.bean(pi).submit)
|
||||
|
||||
def test_purchase_receipt_no_gl_entry(self):
|
||||
pr = webnotes.bean(copy=test_records[0])
|
||||
pr.run_method("calculate_taxes_and_totals")
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
{
|
||||
"creation": "2013-05-24 19:29:10",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-07-08 17:46:17",
|
||||
"modified": "2013-07-09 12:20:50",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
@@ -124,7 +124,7 @@
|
||||
"doctype": "DocField",
|
||||
"fieldname": "import_ref_rate",
|
||||
"fieldtype": "Currency",
|
||||
"label": "Ref Rate ",
|
||||
"label": "Price List Rate",
|
||||
"options": "currency",
|
||||
"print_hide": 1,
|
||||
"read_only": 0
|
||||
@@ -165,7 +165,7 @@
|
||||
"doctype": "DocField",
|
||||
"fieldname": "purchase_ref_rate",
|
||||
"fieldtype": "Currency",
|
||||
"label": "Price List Rate*",
|
||||
"label": "Price List Rate (Company Currency)",
|
||||
"options": "Company:company:default_currency",
|
||||
"print_hide": 1,
|
||||
"read_only": 0
|
||||
@@ -175,7 +175,7 @@
|
||||
"doctype": "DocField",
|
||||
"fieldname": "purchase_rate",
|
||||
"fieldtype": "Currency",
|
||||
"label": "Rate*",
|
||||
"label": "Rate (Company Currency)",
|
||||
"oldfieldname": "purchase_rate",
|
||||
"oldfieldtype": "Currency",
|
||||
"options": "Company:company:default_currency",
|
||||
@@ -190,7 +190,7 @@
|
||||
"doctype": "DocField",
|
||||
"fieldname": "amount",
|
||||
"fieldtype": "Currency",
|
||||
"label": "Amount*",
|
||||
"label": "Amount (Company Currency)",
|
||||
"oldfieldname": "amount",
|
||||
"oldfieldtype": "Currency",
|
||||
"options": "Company:company:default_currency",
|
||||
@@ -314,7 +314,7 @@
|
||||
"doctype": "DocField",
|
||||
"fieldname": "qa_no",
|
||||
"fieldtype": "Link",
|
||||
"label": "QA No",
|
||||
"label": "Quality Inspection",
|
||||
"no_copy": 1,
|
||||
"oldfieldname": "qa_no",
|
||||
"oldfieldtype": "Link",
|
||||
@@ -378,7 +378,7 @@
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"in_filter": 1,
|
||||
"label": "PO No",
|
||||
"label": "Purchase Order",
|
||||
"no_copy": 1,
|
||||
"oldfieldname": "prevdoc_docname",
|
||||
"oldfieldtype": "Link",
|
||||
@@ -396,7 +396,7 @@
|
||||
"fieldtype": "Date",
|
||||
"hidden": 1,
|
||||
"in_filter": 1,
|
||||
"label": "PO Date",
|
||||
"label": "Purchase Order Date",
|
||||
"no_copy": 1,
|
||||
"oldfieldname": "prevdoc_date",
|
||||
"oldfieldtype": "Date",
|
||||
|
||||
@@ -107,6 +107,8 @@ erpnext.stock.StockEntry = erpnext.stock.StockController.extend({
|
||||
this.toggle_enable_bom();
|
||||
if (this.frm.doc.docstatus==1) {
|
||||
this.show_stock_ledger();
|
||||
if(wn.boot.auto_inventory_accounting)
|
||||
this.show_general_ledger();
|
||||
}
|
||||
|
||||
if(this.frm.doc.docstatus === 1 &&
|
||||
@@ -387,4 +389,4 @@ cur_frm.fields_dict.customer.get_query = function(doc,cdt,cdn) {
|
||||
return{ query:"controllers.queries.customer_query" } }
|
||||
|
||||
cur_frm.fields_dict.supplier.get_query = function(doc,cdt,cdn) {
|
||||
return{ query:"controllers.queries.supplier_query" } }
|
||||
return{ query:"controllers.queries.supplier_query" } }
|
||||
|
||||
Reference in New Issue
Block a user