diff --git a/cypress/integration/opportunity/lost_reason_detail.js b/cypress/integration/opportunity/lost_reason_detail.js index 31569a9d6e..9cf204889d 100644 --- a/cypress/integration/opportunity/lost_reason_detail.js +++ b/cypress/integration/opportunity/lost_reason_detail.js @@ -7,8 +7,8 @@ context('Form', () => { it('create a new opportunity', () => { cy.visit('/desk#Form/Opportunity/New Opportunity 1'); cy.get('.page-title').should('contain', 'Not Saved'); - cy.fill_field('enquiry_from', 'Customer', 'Select'); - cy.fill_field('customer', 'Test Customer', 'Link').blur(); + cy.fill_field('opportunity_from', 'Customer', 'Select'); + cy.fill_field('party_name', 'Test Customer', 'Link').blur(); cy.get('.primary-action').click(); cy.get('.page-title').should('contain', 'Open'); cy.get('.form-inner-toolbar button:contains("Lost")').click({ force: true }); @@ -29,4 +29,3 @@ context('Form', () => { cy.get('.page-title').should('contain', 'Lost'); }); }); - diff --git a/erpnext/__init__.py b/erpnext/__init__.py index b67d2bd28c..cb88a1122e 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -5,7 +5,7 @@ import frappe from erpnext.hooks import regional_overrides from frappe.utils import getdate -__version__ = '11.1.20' +__version__ = '11.1.39' def get_default_company(user=None): '''Get default company for user''' diff --git a/erpnext/accounts/doctype/account/chart_of_accounts/verified/de_kontenplan_SKR04.json b/erpnext/accounts/doctype/account/chart_of_accounts/verified/de_kontenplan_SKR04.json index e29ad827bf..7fa6708134 100644 --- a/erpnext/accounts/doctype/account/chart_of_accounts/verified/de_kontenplan_SKR04.json +++ b/erpnext/accounts/doctype/account/chart_of_accounts/verified/de_kontenplan_SKR04.json @@ -1,6 +1,6 @@ { "country_code": "de", - "name": "Germany - Kontenplan SKR04", + "name": "SKR04 ohne Kontonummern", "tree": { "Bilanz - Aktiva": { "Anlageverm\u00f6gen": { @@ -1383,8 +1383,7 @@ "Sonstige Zinsen und \u00e4hnliche Ertr\u00e4ge 1": { "Diskontertr\u00e4ge": {}, "Diskontertr\u00e4ge aus verbundenen Unternehmen": {}, - "Laufende Ertr\u00e4ge aus Anteilen an Kapitalgesellschaften 100% / 50% steuerfrei": {}, - "Laufende Ertr\u00e4ge aus Anteilen an Kapitalgesellschaften 100% / 50% steuerfrei": {}, + "Laufende Ertr\u00e4ge aus Anteilen an Kapitalgesellschaften 100% / 50% steuerfrei": {}, "Sonstige Zinsen und \u00e4hnliche Ertr\u00e4ge 2": {}, "Sonstige Zinsen und \u00e4hnliche Ertr\u00e4ge aus verbundenen Unternehmen": {}, "Sonstige Zinsertr\u00e4ge": {}, @@ -1703,4 +1702,4 @@ "root_type": "Asset" } } -} \ No newline at end of file +} diff --git a/erpnext/accounts/doctype/account/chart_of_accounts/verified/de_kontenplan_SKR04_with_account_number.json b/erpnext/accounts/doctype/account/chart_of_accounts/verified/de_kontenplan_SKR04_with_account_number.json new file mode 100644 index 0000000000..b042bcc420 --- /dev/null +++ b/erpnext/accounts/doctype/account/chart_of_accounts/verified/de_kontenplan_SKR04_with_account_number.json @@ -0,0 +1,3626 @@ +{ + "country_code": "de", + "name": "SKR04 mit Kontonummern", + "tree": { + "Aktiva": { + "root_type": "Asset", + "A - Anlageverm\u00f6gen": { + "account_type": "Fixed Asset", + "is_group": 1, + "I - Immaterielle VG": { + "is_group": 1, + "1 - Selbst geschaffene gewerbliche Schutzrechte und \u00e4hnliche Rechte und Werte": { + "is_group": 1 + }, + "2 - entgeltlich erworbene Konzessionen, gewerbl. Schutzrechte und \u00e4hnl. Rechte und Werte sowie Lizenzen an solchen": { + "is_group": 1, + "Entgeltlich erworbene Konzessionen, gewerbl. Schutzrechte und \u00e4hnl. Rechte und Werte sowie Lizenzen an solchen": { + "account_number": "0100" + }, + "Konzessionen ": { + "account_number": "0110" + }, + "Gewerbliche Schutzrechte ": { + "account_number": "0120" + }, + "\u00c4hnliche Rechte und Werte": { + "account_number": "0130" + }, + "EDV-Software": { + "account_number": "0135" + }, + "Lizenzen an gewerblichen Schutzrechten und \u00e4hnl. Rechten und Werten": { + "account_number": "0140" + }, + "Selbst geschaffene immaterielle VG": { + "account_number": "0143", + "account_type": "Fixed Asset" + }, + "Lizenzen und Franchisevertr\u00e4ge": { + "account_number": "0145" + }, + "Konzessionen und gewerbliche Schutzrechte": { + "account_number": "0146" + }, + "Rezepte, Verfahren, Prototypen": { + "account_number": "0147" + }, + "Immaterielle VG in Entwicklung": { + "account_number": "0148" + }, + "Geleistete Anz. auf immaterielle VG": { + "account_number": "0170" + } + }, + "3 - Gesch\u00e4fts- oder Firmenwert": { + "is_group": 1, + "Gesch\u00e4fts- oder Firmenwert ": { + "account_number": "0150" + }, + "Anz. auf Gesch\u00e4fts- oder Firmenwert": { + "account_number": "0179" + } + }, + "4 - geleistete Anz.": { + "is_group": 1, + "Geleistete Anz. auf Vorr\u00e4te": { + "account_number": "1180" + }, + "Geleistete Anz., 7 % Vorsteuer": { + "account_number": "1181" + }, + "Geleistete Anz., 16 % Vorsteuer": { + "account_number": "1184" + }, + "Geleistete Anz., 15 % Vorsteuer": { + "account_number": "1185" + }, + "Geleistete Anz., 19 % Vorsteuer": { + "account_number": "1186" + } + } + }, + "II - Sachanlagen": { + "1 - Grundst\u00fccke, grundst\u00fccksgleiche Rechte und Bauten einschl. der Bauten auf fremden Grundst\u00fccken": { + "is_group": 1, + "Grundst\u00fccke, grundst\u00fccksgleiche Rechte und Bauten einschl. der Bauten auf fremden Grundst\u00fccken": { + "account_number": "0200", + "account_type": "Fixed Asset" + }, + "Grundst\u00fccksgleiche Rechte ohne Bauten": { + "account_number": "0210" + }, + "Unbebaute Grundst\u00fccke": { + "account_number": "0215" + }, + "Grundst\u00fccksgleiche Rechte (Erbbaurecht, Dauerwohnrecht)": { + "account_number": "0220" + }, + "Grundst\u00fccke mit Substanzverzehr": { + "account_number": "0225" + }, + "Grundst\u00fccksanteil h\u00e4usliches Arbeitszimmer": { + "account_number": "0229" + }, + "Bauten auf eigenen Grundst\u00fccken und grundst\u00fccksgleichen Rechten": { + "account_number": "0230" + }, + "Grundst\u00fcckswerte eigener bebauter Grundst\u00fccke": { + "account_number": "0235" + }, + "Gesch\u00e4ftsbauten": { + "account_number": "0240" + }, + "Fabrikbauten ": { + "account_number": "0250" + }, + "Andere Bauten": { + "account_number": "0260" + }, + "Garagen": { + "account_number": "0270" + }, + "Au\u00dfenanlagen f. Gesch\u00e4fts-, Fabrik- und andere Bauten": { + "account_number": "0280" + }, + "Hof- und Wegebefestigungen": { + "account_number": "0285" + }, + "Einrichtungen f. Gesch\u00e4fts-, Fabrik- und andere Bauten": { + "account_number": "0290" + }, + "Wohnbauten ": { + "account_number": "0300" + }, + "Au\u00dfenanlagen ": { + "account_number": "0310" + }, + "Einrichtungen f. Wohnbauten ": { + "account_number": "0320" + }, + "Geb\u00e4udeanteil h\u00e4usliches Arbeitszimmer": { + "account_number": "0329" + }, + "Bauten auf fremden Grundst\u00fccken": { + "account_number": "0330" + }, + "Einrichtungen f. Gesch\u00e4fts-, Fabrik-, Wohn- und andere Bauten": { + "account_number": "0398" + } + }, + "2 - technische Anlagen und Maschinen": { + "is_group": 1, + "Technische Anlagen und Maschinen": { + "account_number": "0400", + "account_type": "Fixed Asset" + }, + "Technische Anlagen": { + "account_number": "0420" + }, + "Maschinen": { + "account_number": "0440" + }, + "Transportanlagen und \u00c4hnliches ": { + "account_number": "0450" + }, + "Betriebsvorrichtungen": { + "account_number": "0470" + }, + "Wertberichtigung Technische Anlagen und Maschinen": { + "account_number": "0409", + "account_type": "Accumulated Depreciation" + } + }, + "3 - andere Anlagen, Betriebs- und Gesch\u00e4ftsausstattung": { + "is_group": 1, + "Andere Anlagen, Betriebs- und Gesch\u00e4ftsausstattung": { + "account_number": "0500", + "account_type": "Fixed Asset" + }, + "Andere Anlagen": { + "account_number": "0510" + }, + "Pkw": { + "account_number": "0520" + }, + "Lkw": { + "account_number": "0540" + }, + "Sonstige Transportmittel": { + "account_number": "0560" + }, + "Werkzeuge": { + "account_number": "0620" + }, + "Betriebsausstattung": { + "account_number": "0630" + }, + "Gesch\u00e4ftsausstattung": { + "account_number": "0635" + }, + "Ladeneinrichtung": { + "account_number": "0640" + }, + "B\u00fcroeinrichtung": { + "account_number": "0650" + }, + "Ger\u00fcst- und Schalungsmaterial": { + "account_number": "0660" + }, + "Geringwertige Wirtschaftsg\u00fcter": { + "account_number": "0670" + }, + "Wirtschaftsg\u00fcter gr\u00f6\u00dfer 150 bis 1000 Euro (Sammelposten)": { + "account_number": "0675" + }, + "Einbauten in fremde Grundst\u00fccke": { + "account_number": "0680" + }, + "Sonstige Betriebs- und Gesch\u00e4ftsausstattung": { + "account_number": "0690" + } + }, + "4 - geleistete Anz. und Anlagen im Bau": { + "is_group": 1, + "Geleistete Anz. und Anlagen im Bau": { + "account_number": "0700", + "account_type": "Capital Work in Progress" + }, + "Anz. auf Grundst\u00fcckeund grundst\u00fccksgleiche Rechte ohne Bauten ": { + "account_number": "0705" + }, + "Gesch\u00e4fts-, Fabrik- und andere Bauten im Bau auf eigenen Grundst\u00fccken": { + "account_number": "0710" + }, + "Anz. auf Gesch\u00e4fts-, Fabrik- und andere Bauten auf eigenen Grundst. und grundst\u00fccksgleichen Rechten ": { + "account_number": "0720" + }, + "Wohnbauten im Bau": { + "account_number": "0725" + }, + "Anz. auf Wohnbauten auf eigenen Grundst\u00fccken und grundst\u00fccksgleichen Rechten": { + "account_number": "0735" + }, + "Gesch\u00e4fts-, Fabrik- und andere Bauten im Bau auf fremden Grundst\u00fccken": { + "account_number": "0740" + }, + "Anz. auf Gesch\u00e4fts-, Fabrik- und andere Bauten auf fremden Grundst\u00fccken ": { + "account_number": "0750" + }, + "Anz. auf Wohnbauten auf fremden Grundst\u00fccken": { + "account_number": "0765" + }, + "Technische Anlagen und Maschinen im Bau": { + "account_number": "0770" + }, + "Anz. auf technische Anlagen und Maschinen": { + "account_number": "0780" + }, + "Andere Anlagen, Betriebs- und Gesch\u00e4ftsausstattung im Bau": { + "account_number": "0785" + }, + "Andere Anlagen, Betriebs- und Gesch\u00e4ftsausstattung": { + "account_number": "0795" + } + }, + "is_group": 1 + }, + "III - Finanzanlagen": { + "1 - Anteile an verbundenen Unternehmen": { + "is_group": 1, + "Anteile an verbundenen Unternehmen": { + "account_number": "0800" + }, + "Anteile an verbundenen Unternehmen, Personengesellschaften": { + "account_number": "0803" + }, + "Anteile an verbundenen Unternehmen, Kapitalgesellschaften": { + "account_number": "0804" + }, + "Anteile an herrschender oder mehrheitlich beteiligter Gesellschaft, Personengesellschaft": { + "account_number": "0805" + }, + "Anteile an herrschender oder mehrheitlich beteiligter Gesellschaft, Kapitalgesellschaften": { + "account_number": "0808" + }, + "Anteile an herrschender oder mit Mehrheit beteiligter Gesellschaft": { + "account_number": "0809" + } + }, + "2 - Ausleihungen an verb. Unternehmen": { + "is_group": 1, + "Ausleihungen an verb. Unternehmen": { + "account_number": "0880" + }, + "Ausleihungen an Unternehmen, mit denen ein Beteiligungsverh. besteht, Personengesellschaften": { + "account_number": "0883" + }, + "Ausleihungen an Unternehmen, mit denen ein Beteiligungsverh. besteht, Kapitalgesellschaften": { + "account_number": "0885" + } + }, + "3 - Beteiligungen": { + "is_group": 1, + "Beteiligungen": { + "account_number": "0820" + }, + "Typisch stille Beteiligungen": { + "account_number": "0830" + }, + "Atypisch stille Beteiligungen": { + "account_number": "0840" + }, + "Beteiligungen an Kapitalgesellschaften": { + "account_number": "0850" + }, + "Beteiligungen an Personengesellschaften": { + "account_number": "0860" + } + }, + "4 - Ausleihungen an Unternehmen, mit denen ein Beteiligungsverh. besteht": { + "is_group": 1 + }, + "5 - Wertpapiere des Anlageverm\u00f6gens": { + "is_group": 1, + "Wertpapiere des Anlageverm\u00f6gens": { + "account_number": "0900" + }, + "Wertpapiere mit Gewinnbeteiligungsanspr\u00fcchen, die dem Teileink\u00fcnfteverfahren unterliegen": { + "account_number": "0910" + }, + "Festverzinsliche Wertpapiere": { + "account_number": "0920" + }, + "Genossenschaftsanteile zum langfristigen Verbleib": { + "account_number": "0980" + }, + "R\u00fcckdeckungsanspr\u00fcche aus Lebensversicherungen zum langfristigen Verbleib": { + "account_number": "0990" + } + }, + "6 - sonstige Ausleihungen": { + "is_group": 1, + "Sonstige Ausleihungen": { + "account_number": "0930" + }, + "Darlehen": { + "account_number": "0940" + }, + "Ausleihungen an stille Gesellschafter": { + "account_number": "0964" + } + }, + "is_group": 1 + } + }, + "B - Umlaufverm\u00f6gen": { + "I - Vorr\u00e4te": { + "1 - Roh-, Hilfs- und Betriebsstoffe": { + "is_group": 1, + "Roh-, Hilfs- und Betriebsstoffe (Bestand)": { + "account_number": "1000", + "account_type": "Stock" + } + }, + "2 - unfertige Erzeugnisse, unfertige Leistungen": { + "is_group": 1, + "Unfertige Erzeugnisse, unfertige Leistungen (Bestand)": { + "account_number": "1040", + "account_type": "Stock" + }, + "Unfertige Erzeugnisse (Bestand)": { + "account_number": "1050" + }, + "Unfertige Leistungen": { + "account_number": "1080" + }, + "In Ausf\u00fchrung befindliche Bauauftr\u00e4ge": { + "account_number": "1090" + }, + "In Arbeit befindliche Auftr\u00e4ge": { + "account_number": "1095" + } + }, + "3 - fertige Erzeugnisse und Waren": { + "is_group": 1, + "Fertige Erzeugnisse und Waren (Bestand)": { + "account_number": "1100", + "account_type": "Stock" + }, + "Fertige Erzeugnisse (Bestand)": { + "account_number": "1110" + }, + "Waren (Bestand)": { + "account_number": "1140" + }, + "Erhaltene Anz. auf Bestellungen (von Vorr\u00e4ten offen abgesetzt)": { + "account_number": "1190" + } + }, + "is_group": 1 + }, + "II - Forderungen und sonstige VG": { + "account_type": "Receivable", + "1 - Forderungen aus Lieferungen und Leistungen": { + "account_type": "Receivable", + "is_group": 1, + "Bewertungskorrektur zu Forderungen aus Lieferungen und Leistungen": { + "account_number": "9960" + }, + "Forderungen aus Lieferungen und Leistungen": { + "account_number": "1200", + "account_type": "Receivable" + }, + "Forderungen aus Lieferungen und Leistungen ohne Kontokorrent": { + "account_number": "1210" + }, + "Forderungen aus Lieferungen und Leistungen ohne Kontokorrent(b. 1 J.)": { + "account_number": "1221" + }, + "Forderungen aus Lieferungen und Leistungen ohne Kontokorrent (gr\u00f6\u00dfer 1 J.)": { + "account_number": "1225" + }, + "Wechsel aus Lieferungen und Leistungen, bundesbankf\u00e4hig": { + "account_number": "1235" + }, + "Zweifelhafte Forderungen (Gruppe)": { + "is_group": 1, + "Zweifelhafte Forderungen": { + "account_number": "1240" + }, + "Zweifelhafte Forderungen (b. 1 J.)": { + "account_number": "1241" + }, + "Zweifelhafte Forderungen (gr\u00f6\u00dfer 1 J.)": { + "account_number": "1245" + }, + "Einzelwertberichtigungen auf Forderungen mit einer (b. 1 J.)": { + "account_number": "1248" + }, + "Einzelwertberichtigung auf Forderungen mit einer (mehr als 1 J.)": { + "account_number": "1247" + }, + "Pauschalwertberichtigung auf Forderungen mit einer (mehr als 1 J.)": { + "account_number": "1249" + } + }, + "Gegenkonto zu sonstigen VGn bei Buchung \u00fcber Debitorenkonto": { + "account_number": "1258" + }, + "Gegenkonto 1221-1229,1240-1245,1250-1257, 1270-1279, 1290-1297 bei Aufteilung Debitorenkonto": { + "account_number": "1259" + } + }, + "2 - Forderungen gg. verb. Unternehmen": { + "account_type": "Receivable", + "is_group": 1, + "Forderungen gg. verb. Unternehmen": { + "account_number": "1260" + }, + "Forderungen gg. verb. Unternehmen (b. 1 J.)": { + "account_number": "1261" + }, + "Forderungen gg. verb. Unternehmen (gr\u00f6\u00dfer 1 J.)": { + "account_number": "1265" + }, + "Besitzwechsel gg. verb. Unternehmen": { + "account_number": "1266" + }, + "Besitzwechsel gg. verb. Unternehmen (b. 1 J.)": { + "account_number": "1267" + }, + "Besitzwechsel gg. verb. Unternehmen (gr\u00f6\u00dfer 1 J.)": { + "account_number": "1268" + }, + "Besitzwechsel gg. verb. Unternehmen, bundesbankf\u00e4hig": { + "account_number": "1269" + }, + "Forderungen aus Lieferungen und Leistungen gg. verb. Unternehmen (Gruppe)": { + "is_group": 1, + "Forderungen aus Lieferungen und Leistungen gg. verb. Unternehmen": { + "account_number": "1270" + }, + "Forderungen aus Lieferungen und Leistungen gg. verb. Unternehmen (b. 1 J.)": { + "account_number": "1271" + }, + "Forderungen aus Lieferungen und Leistungen gg. verb. Unternehmen (gr\u00f6\u00dfer 1 J.)": { + "account_number": "1275" + }, + "Wertberichtigungen auf Forderungen mit einer (b. 1 J.) gg. verb. Unternehmen": { + "account_number": "1276" + }, + "Wertberichtigungen auf Forderungen mit einer (mehr als 1 J.) gg. verbundene Unternehmen": { + "account_number": "1277" + } + } + }, + "3 - Forderungen gg. Unt., mit denen ein Beteiligungsverh. besteht": { + "account_type": "Receivable", + "is_group": 1, + "Forderungen gg. Unt., mit denen ein Beteiligungsverh. besteht": { + "account_number": "1280" + }, + "Forderungen gg. Unt., mit denen ein Beteiligungsverh. besteht (b. 1 J.)": { + "account_number": "1281" + }, + "Forderungen gg. Unt., mit denen ein Beteiligungsverh. besteht (gr\u00f6\u00dfer 1 J.)": { + "account_number": "1285" + }, + "Besitzwechsel gg. Unt., mit denen ein Beteiligungsverh. besteht": { + "account_number": "1286" + }, + "Besitzwechsel gg. Unt., mit denen ein Beteiligungsverh. besteht (b. 1 J.)": { + "account_number": "1287" + }, + "Besitzwechsel gg. Unt., mit denen ein Beteiligungsverh. besteht (gr\u00f6\u00dfer 1 J.)": { + "account_number": "1288" + }, + "Besitzwechsel gg. Unt., mit denen ein Beteiligungsverh. besteht, bundesbankf\u00e4hig": { + "account_number": "1289" + }, + "Forderungen aus LuL gg. Unt., mit denen ein Beteiligungsverh. besteht": { + "account_number": "1290" + }, + "Forderungen aus LuL gg. Unt., mit denen ein Beteiligungsverh. besteht (b. 1 J.)": { + "account_number": "1291" + }, + "Forderungen aus LuL gg. Unt., mit denen ein Beteiligungsverh. besteht (gr\u00f6\u00dfer 1 J.)": { + "account_number": "1295" + }, + "Wertberichtigungen auf Ford. (b. 1 J.) gg. Unt., mit denen ein Beteiligungsverh. besteht": { + "account_number": "1296" + }, + "Wertberichtigungen auf Ford. (mehr als 1 J.) gg. Unt., mit denen ein Beteiligungsverh. besteht": { + "account_number": "1297" + } + }, + "4 - sonstige VG": { + "account_type": "Receivable", + "is_group": 1, + "Bewertungskorrektur zu sonstigen VGn": { + "account_number": "9965" + }, + "Verrechnungskonto geleistete Anz. bei Buchung \u00fcber Kreditorenkonto": { + "account_number": "3695" + }, + "Sonstige VG": { + "account_number": "1300" + }, + "Sonstige VG (b. 1 J.)": { + "account_number": "1301" + }, + "Sonstige VG (gr\u00f6\u00dfer 1 J.)": { + "account_number": "1305" + }, + "Forderungen gg. typisch stille Gesellschafter": { + "account_number": "1337" + }, + "Forderungen gg. typisch stille Gesellschafter - Restlaufzeit bis1 Jahr": { + "account_number": "1338" + }, + "Forderungen gg. typisch stille Gesellschafter (gr\u00f6\u00dfer 1 J.)": { + "account_number": "1339" + }, + "Forderungen gg. Personal aus Lohn- und Gehaltsabrechnung (Gruppe)": { + "is_group": 1, + "Forderungen gg. Personal aus Lohn- und Gehaltsabrechnung": { + "account_number": "1340" + }, + "Forderungen gg. Personal aus Lohn- und Gehaltsabrechnung (b. 1 J.)": { + "account_number": "1341" + }, + "Forderungen gg. Personal aus Lohn- und Gehaltsabrechnung (gr\u00f6\u00dfer 1 J.)": { + "account_number": "1345" + } + }, + "Kautionen (Gruppe)": { + "is_group": 1, + "Kautionen": { + "account_number": "1350" + }, + "Kautionen (b. 1 J.)": { + "account_number": "1351" + }, + "Kautionen (gr\u00f6\u00dfer 1 J.)": { + "account_number": "1355" + } + }, + "Darlehen (Gruppe)": { + "Darlehen": { + "account_number": "1360" + }, + "Darlehen (b. 1 J.)": { + "account_number": "1361" + }, + "Darlehen (gr\u00f6\u00dfer 1 J.)": { + "account_number": "1365" + } + }, + "Forderungen gg. Krankenkassen aus Aufwendungsausgleichsgesetz": { + "account_number": "1369" + }, + "Durchlaufende Posten": { + "account_number": "1370" + }, + "Fremdgeld": { + "account_number": "1374" + }, + "Agenturwarenabrechnung": { + "account_number": "1375" + }, + "Nachtr\u00e4glich abziehbare Vorsteuer, \u00a7 15a Abs. 2 UStG": { + "account_number": "1376" + }, + "Zur\u00fcckzuzahlende Vorsteuer, \u00a7 15a Abs. 2 UStG": { + "account_number": "1377" + }, + "Anspr\u00fcche aus R\u00fcckdeckungsversicherungen": { + "account_number": "1378" + }, + "Verm\u00f6gensgegenst. zur Saldierung mit Pensionsr\u00fcckst. und \u00e4hnl. Verplicht. zum langfristigen Verbleib": { + "account_number": "1381" + }, + "Verm\u00f6gensgegenst. zur Erf\u00fcllung von mit der Altersvers. vergleichb. langfristigen Verplicht.": { + "account_number": "1382" + }, + "Verm\u00f6gensgegenst. zur Saldierung mit der Altersvers. vergleichb. langfristigen Verplicht.": { + "account_number": "1383" + }, + "GmbH-Anteile zum kurzfr. Verbleib": { + "account_number": "1390" + }, + "Forderungen gg. Arbeitsgemeinschaften": { + "account_number": "1391" + }, + "Genussrechte": { + "account_number": "1393" + }, + "Einzahlungsanspr\u00fcche zu Nebenleistungen oder Zuzahlungen": { + "account_number": "1394" + }, + "Genossenschaftsanteile zum kurzfr. Verbleib": { + "account_number": "1395" + }, + "Nachtr\u00e4glich abziehbare Vorsteuer, \u00a7 15a Abs. 1 UStG, bewegliche Wirtschaftsg\u00fcter": { + "account_number": "1396" + }, + "Zur\u00fcckzuzahlende Vorsteuer, \u00a7 15a Abs. 1 UStG, bewegliche Wirtschaftsg\u00fcter": { + "account_number": "1397" + }, + "Nachtr\u00e4glich abziehbare Vorsteuer gem. \u00a7 15a Abs. 1 UStG, unbewegliche Wirtschaftsg\u00fcter": { + "account_number": "1398" + }, + "Zur\u00fcckzuzahlende Vorsteuer gem. \u00a7 15a Abs. 1 UStG, unbewegliche Wirtschaftsg\u00fcter": { + "account_number": "1399" + }, + "Abziehbare Vorsteuer (Gruppe)": { + "is_group": 1, + "Abziehbare Vorsteuer": { + "account_number": "1400" + }, + "Abziehbare Vorsteuer 7 %": { + "account_number": "1401" + }, + "Abziehbare Vorsteuer aus innergem. Erwerb": { + "account_number": "1402" + }, + "Abziehbare Vorsteuer aus innergem. Erwerb 19%": { + "account_number": "1404" + }, + "Abziehbare Vorsteuer 19 %": { + "account_number": "1406" + }, + "Abziehbare Vorsteuer nach \u00a7 13b UStG 19 %": { + "account_number": "1407" + }, + "Abziehbare Vorsteuer nach \u00a7 13b UStG": { + "account_number": "1408" + }, + "Abziehbare Vorsteuer aus der Auslagerung von Gegenst\u00e4nden aus dem Umsatzsteuerlager": { + "account_number": "1431" + }, + "Abziehbare Vorsteuer aus innergem. Erwerb von Neufahrzeugen von Lieferanten ohne Ust-ID": { + "account_number": "1432" + } + }, + "Aufzuteilende Vorsteuer (Gruppe)": { + "is_group": 1, + "Aufzuteilende Vorsteuer": { + "account_number": "1410" + }, + "Aufzuteilende Vorsteuer 7 %": { + "account_number": "1411" + }, + "Aufzuteilende Vorsteuer aus innergem. Erwerb": { + "account_number": "1412" + }, + "Aufzuteilende Vorsteuer aus innergem. Erwerb 19 %": { + "account_number": "1413" + }, + "Aufzuteilende Vorsteuer 19 %": { + "account_number": "1416" + }, + "Aufzuteilende Vorsteuer nach \u00a7\u00a7 13a/13b UStG": { + "account_number": "1417" + }, + "Aufzuteilende Vorsteuer nach \u00a7\u00a7 13a/13b UStG 19 %": { + "account_number": "1419" + } + }, + "Umsatzsteuerforderungen (Gruppe)": { + "is_group": 1, + "Umsatzsteuerforderungen": { + "account_number": "1420" + }, + "Umsatzsteuerforderungen laufendes Jahr": { + "account_number": "1421" + }, + "Umsatzsteuerforderungen Vorjahr": { + "account_number": "1422" + }, + "Umsatzsteuerforderungen fr\u00fchere Jahre": { + "account_number": "1425" + }, + "Forderungen aus entrichteten Verbrauchsteuern": { + "account_number": "1427" + } + }, + "Bezahlte Einfuhrumsatzsteuer": { + "account_number": "1433" + }, + "Vorsteuer im Folgejahr abziehbar": { + "account_number": "1434" + }, + "Forderungen aus Gewerbesteuer\u00fcberzahlungen": { + "account_number": "1435" + }, + "Vorsteuer aus Erwerb als letzter Abnehmer innerh. eines Dreiecksgesch.s": { + "account_number": "1436" + }, + "Steuererstattungsanspr\u00fcche gg. anderen L\u00e4ndern": { + "account_number": "1440" + }, + "Forderungen an das Finanzamt aus abgef\u00fchrtem Bauabzugsbetrag": { + "account_number": "1456" + }, + "Forderungen gg. Bundesagentur f. Arbeit": { + "account_number": "1457" + }, + "Geldtransit": { + "account_number": "1460" + }, + "Vorsteuer nach allgemeinen Durchschnittss\u00e4tzen UStVA Kz. 63": { + "account_number": "1484" + }, + "Verrechnungskonto Ist-Versteuerung": { + "account_number": "1490" + }, + "Verrechnungskonto erhaltene Anz. bei Buchung \u00fcber Debitorenkonto": { + "account_number": "1495" + }, + "\u00dcberleitungskonto Kostenstellen": { + "account_number": "1498" + } + }, + "is_group": 1 + }, + "III - Wertpapiere": { + "is_group": 1, + "2 - sonstige Wertpapiere": { + "is_group": 1, + "Sonstige Wertpapiere": { + "account_number": "1510" + } + }, + "Finanzwechsel": { + "account_number": "1520" + }, + "Andere Wertpapiere mit unwesentlichen Wertschwankungen im Sinne Textziffer 18 DRS 2": { + "account_number": "1525" + }, + "Wertpapieranlagen i. R. d. kurzfr. Finanzdisposition": { + "account_number": "1530" + }, + "Schecks": { + "account_number": "1550" + }, + "Anteile an verbundenen Unternehmen (Umlaufverm\u00f6gen)": { + "account_number": "1500" + } + }, + "IV - Kassenbestand, Bundesbankguthaben, Guthaben bei Kreditinstituten und Schecks": { + "is_group": 1, + "Bewertungskorrektur zu Guthaben bei Kreditinstituten": { + "account_number": "9962" + }, + "Kasse (Gruppe)": { + "is_group": 1, + "account_type": "Cash", + "Kasse": { + "account_number": "1600", + "account_type": "Cash" + }, + "Nebenkasse 1": { + "account_number": "1610", + "account_type": "Cash" + }, + "Nebenkasse 2": { + "account_number": "1620", + "account_type": "Cash" + } + }, + "Postbank (Gruppe)": { + "is_group": 1, + "Postbank": { + "account_number": "1700" + }, + "Postbank 1 (Gruppe)": { + "is_group": 1, + "Postbank 1": { + "account_number": "1710" + } + }, + "Postbank 2 (Gruppe)": { + "is_group": 1, + "Postbank 2": { + "account_number": "1720" + } + }, + "Postbank 3 (Gruppe)": { + "is_group": 1, + "Postbank 3": { + "account_number": "1730" + } + } + }, + "LZB-Guthaben": { + "account_number": "1780" + }, + "Bundesbankguthaben": { + "account_number": "1790" + }, + "Bank (Gruppe)": { + "is_group": 1, + "account_type": "Bank", + "Bank": { + "account_number": "1800", + "account_type": "Bank" + }, + "Bank 1": { + "account_number": "1810", + "account_type": "Bank" + }, + "Bank 2": { + "account_number": "1820", + "account_type": "Bank" + }, + "Bank 3": { + "account_number": "1830" + }, + "Bank 4": { + "account_number": "1840" + }, + "Bank 5": { + "account_number": "1850" + }, + "Finanzmittelanlagen i. R. d. kurzfr. Finanzdisposition (nicht im Finanzmittelfonds enthalten)": { + "account_number": "1890" + }, + "Verb. gg. Kreditinstituten (nicht im Finanzmittelfonds enthalten)": { + "account_number": "1895" + } + } + }, + "is_group": 1 + }, + "C - Rechnungsabgrenzungsposten": { + "is_group": 1, + "Aktive Rechnungsabgrenzung": { + "account_number": "1900" + }, + "Als Aufwand ber\u00fccksichtigte Z\u00f6lle und Verbrauchsteuern auf Vorr\u00e4te": { + "account_number": "1920" + }, + "Als Aufwand ber\u00fccksichtigte Umsatzsteuer auf Anz.": { + "account_number": "1930" + }, + "Damnum/Disagio": { + "account_number": "1940" + } + }, + "D - Aktive latente Steuern": { + "is_group": 1, + "Aktive latente Steuern": { + "account_type": "Tax", + "account_number": "1950" + } + }, + "E - Aktiver Unterschiedsbetrag aus der Verm\u00f6gensverrechnung": { + "is_group": 1 + }, + "is_group": 1 + }, + "Passiva": { + "root_type": "Liability", + "A - Eigenkapital": { + "account_type": "Equity", + "is_group": 1, + "I - Gezeichnetes Kapital": { + "account_type": "Equity", + "is_group": 1 + }, + "II - Kapitalr\u00fccklage": { + "account_type": "Equity", + "is_group": 1 + }, + "III - Gewinnr\u00fccklagen": { + "account_type": "Equity", + "1 - gesetzliche R\u00fccklage": { + "account_type": "Equity", + "is_group": 1 + }, + "2 - R\u00fccklage f. Anteile an einem herrschenden oder mehrheitlich beteiligten Unternehmen": { + "account_type": "Equity", + "is_group": 1 + }, + "3 - satzungsm\u00e4\u00dfige R\u00fccklagen": { + "account_type": "Equity", + "is_group": 1 + }, + "4 - andere Gewinnr\u00fccklagen": { + "account_type": "Equity", + "is_group": 1, + "Gewinnr\u00fccklagen aus den \u00dcbergangsvorschriften BilMoG": { + "is_group": 1, + "Gewinnr\u00fccklagen (BilMoG)": { + "account_number": "2963" + }, + "Gewinnr\u00fccklagen aus Zuschreibung Sachanlageverm\u00f6gen (BilMoG)": { + "account_number": "2964" + }, + "Gewinnr\u00fccklagen aus Zuschreibung Finanzanlageverm\u00f6gen (BilMoG)": { + "account_number": "2965" + }, + "Gewinnr\u00fccklagen aus Aufl\u00f6sung der Sonderposten mit R\u00fccklageanteil (BilMoG)": { + "account_number": "2966" + } + }, + "Latente Steuern (Gewinnr\u00fccklage Haben) aus erfolgsneutralen Verrechnungen": { + "account_number": "2967" + }, + "Latente Steuern (Gewinnr\u00fccklage Soll) aus erfolgsneutralen Verrechnungen": { + "account_number": "2968" + }, + "Rechnungsabgrenzungsposten (Gewinnr\u00fccklage Soll) aus erfolgsneutralen Verrechnungen": { + "account_number": "2969" + } + }, + "is_group": 1 + }, + "IV - Gewinnvortrag/Verlustvortrag": { + "account_type": "Equity", + "is_group": 1 + }, + "V - Jahres\u00fcberschu\u00df/Jahresfehlbetrag": { + "account_type": "Equity", + "is_group": 1 + }, + "Einlagen stiller Gesellschafter": { + "account_number": "9295" + } + }, + "B - R\u00fcckstellungen": { + "is_group": 1, + "1 - R\u00fcckstellungen f. Pensionen und \u00e4hnliche Verplicht.": { + "is_group": 1, + "R\u00fcckstellungen f. Pensionen und \u00e4hnliche Verplicht.": { + "account_number": "3000" + }, + "R\u00fcckstellungen f. Pensionen und \u00e4hnliche Verplicht. (Saldierung mit langfristigen VG)": { + "account_number": "3009" + }, + "R\u00fcckstellungen f. Direktzusagen": { + "account_number": "3010" + }, + "R\u00fcckstellungen f. ZuschussVerplicht. f. Pensionskassen und Lebensversicherungen": { + "account_number": "3011" + } + }, + "2 - Steuerr\u00fcckstellungen": { + "is_group": 1, + "Steuerr\u00fcckstellungen": { + "account_number": "3020" + }, + "Gewerbesteuerr\u00fcckstellung": { + "account_number": "3030" + }, + "Gewerbesteuerr\u00fcckstellung, \u00a7 4 Abs. 5b EStG": { + "account_number": "3035" + }, + "R\u00fcckstellung f. latente Steuern": { + "account_number": "3060" + }, + "Sonstige R\u00fcckstellungen": { + "account_number": "3070" + }, + "R\u00fcckstellungen f. Personalkosten": { + "account_number": "3074" + }, + "R\u00fcckstellungen f. unterlassene Aufwendungen f. Instandhaltung, Nachholung in den ersten drei Monaten": { + "account_number": "3075" + }, + "R\u00fcckstellungen f. mit der Altersvers. vergleichb. langfr. Verplicht. zum langfr. Verbleib": { + "account_number": "3076" + }, + "R\u00fcckst. f. mit der Altersvers. vergleichb. langfr. Verplicht. (Saldierung mit langfristigen VG)": { + "account_number": "3077" + } + }, + "3 - sonstige R\u00fcckstellungen": { + "is_group": 1, + "Sonderposten mit R\u00fccklageanteil, steuerfreie R\u00fccklagen (Gruppe)": { + "is_group": 1, + "Sonderposten mit R\u00fccklageanteil, steuerfreie R\u00fccklagen": { + "account_number": "2980" + }, + "Sonderposten mit R\u00fccklageanteil nach \u00a7 6b EStG": { + "account_number": "2981" + }, + "Sonderposten mit R\u00fccklageanteil nach EStR R 6.6": { + "account_number": "2982" + }, + "R\u00fccklage f. Zusch\u00fcsse": { + "account_number": "2988" + }, + "Sonderposten mit R\u00fccklageanteil nach \u00a7 52 Abs.16 EStG": { + "account_number": "2989" + }, + "Sonderposten mit R\u00fccklageanteil, Sonderabschreibungen": { + "account_number": "2990" + }, + "Sonderposten mit R\u00fccklageanteil nach \u00a7 7g Abs. 2 EStG n. F.": { + "account_number": "2993" + }, + "Ausgleichsposten bei Entnahmen \u00a7 4g EStG": { + "account_number": "2995" + }, + "Sonderposten mit R\u00fccklageanteil nach \u00a7 7g Abs. 1 EStG a. F. / \u00a7 7g Abs. 5 EStG n. F.": { + "account_number": "2997" + }, + "Sonderposten mit R\u00fccklageanteil nach \u00a7 7g Abs. 3 und 7 EStG a. F.": { + "account_number": "2998" + }, + "Sonderposten f. Zusch\u00fcsse und Zulagen": { + "account_number": "2999" + }, + "R\u00fcckstellungen f. Abraum- und Abfallbeseitigung": { + "account_number": "3085" + }, + "R\u00fcckstellungen f. Gew\u00e4hrleistungen": { + "account_number": "3090" + }, + "R\u00fcckstellungen f. drohende Verluste aus schwebenden Gesch\u00e4ften": { + "account_number": "3092" + }, + "R\u00fcckstellungen f. Abschluss- und Pr\u00fcfungskosten": { + "account_number": "3095" + }, + "R\u00fcckstellungen zur Erf\u00fcllung der Aufbewahrungspflichten": { + "account_number": "3096" + }, + "Aufwandsr\u00fcckstellungen gem\u00e4\u00df \u00a7 249 Abs. 2 HGB a. F.": { + "account_number": "3098" + }, + "R\u00fcckstellungen f. Umweltschutz": { + "account_number": "3099" + } + } + } + }, + "C - Verb.": { + "account_type": "Payable", + "1 - Anleihen": { + "is_group": 1, + "account_type": "Payable", + "davon konvertibel": { + "account_type": "Payable", + "is_group": 1, + "Anleihen, konvertibel": { + "account_number": "3120" + }, + "Anleihen, konvertibel (b. 1 J.)": { + "account_number": "3121" + }, + "Anleihen, konvertibel (1-5 J.)": { + "account_number": "3125" + }, + "Anleihen, konvertibel (gr\u00f6\u00dfer 5 J.)": { + "account_number": "3130" + } + }, + "Anleihen, nicht konvertibel": { + "account_number": "3100" + }, + "Anleihen, nicht konvertibel (b. 1 J.)": { + "account_number": "3101" + }, + "Anleihen, nicht konvertibel (1-5 J.)": { + "account_number": "3105" + }, + "Anleihen, nicht konvertibel (gr\u00f6\u00dfer 5 J.) (Gruppe)": { + "is_group": 1, + "Anleihen, nicht konvertibel (gr\u00f6\u00dfer 5 J.)": { + "account_number": "3110" + } + } + }, + "2 - Verb. gg. Kreditinstituten": { + "account_type": "Payable", + "is_group": 1, + "Bewertungskorrektur zu Verb. gg. Kreditinstituten": { + "account_number": "9963" + }, + "Verb. gg. Kreditinstituten (Gruppe)": { + "is_group": 1, + "Verb. gg. Kreditinstituten": { + "account_number": "3150" + }, + "Verb. gg. Kreditinstituten (b. 1 J.)": { + "account_number": "3151" + }, + "Verb. gg. Kreditinstituten (1-5 J.)": { + "account_number": "3160" + }, + "Verb. gg. Kreditinstituten (gr\u00f6\u00dfer 5 J.)": { + "account_number": "3170" + } + }, + "Verb. gg. Kreditinstituten aus Teilzahlungsvertr\u00e4gen (Gruppe)": { + "is_group": 1, + "Verb. gg. Kreditinstituten aus Teilzahlungsvertr\u00e4gen": { + "account_number": "3180" + }, + "Verb. gg. Kreditinstituten aus Teilzahlungsvertr\u00e4gen (b. 1 J.)": { + "account_number": "3181" + }, + "Verb. gg. Kreditinstituten aus Teilzahlungsvertr\u00e4gen (1-5 J.)": { + "account_number": "3190" + }, + "Verb. gg. Kreditinstituten aus Teilzahlungsvertr\u00e4gen (gr\u00f6\u00dfer 5 J.)": { + "account_number": "3200" + } + } + }, + "3 - erhaltene Anz. auf Bestellungen": { + "account_type": "Payable", + "is_group": 1, + "Erhaltene, versteuerte Anz. 7 % USt (Verb.)": { + "account_number": "3260", + "account_type": "Receivable" + }, + "Erhaltene, versteuerte Anz. 16 % USt (Verb.)": { + "account_number": "3270" + }, + "Erhaltene, versteuerte Anz. 15 % USt (Verb.)": { + "account_number": "3271" + }, + "Erhaltene, versteuerte Anz. 19 % USt (Verb.)": { + "account_number": "3272", + "account_type": "Receivable" + }, + "Erhaltene Anz. (Gruppe)": { + "is_group": 1, + "Erhaltene Anz. (b. 1 J.)": { + "account_number": "3280", + "account_type": "Receivable" + }, + "Erhaltene Anz. (1-5 J.)": { + "account_number": "3284", + "account_type": "Receivable" + }, + "Erhaltene Anz. (gr\u00f6\u00dfer 5 J.)": { + "account_number": "3285", + "account_type": "Receivable" + } + }, + "Erhaltene Anz. auf Bestellungen (Verb.)": { + "account_number": "3250", + "account_type": "Receivable" + } + }, + "4 - Verb. aus Lieferungen und Leistungen": { + "account_type": "Payable", + "is_group": 1, + "Bewertungskorrektur zu Verb. aus Lieferungen und Leistungen": { + "account_number": "9964" + }, + "Verb. aus Lieferungen und Leistungen": { + "account_number": "3300", + "account_type": "Payable" + }, + "Verb. aus Lieferungen und Leistungen ohne Kontokorrent": { + "account_number": "3310" + }, + "Verb. aus Lieferungen und Leistungen ohne Kontokorrent (b. 1 J.)": { + "account_number": "3335" + }, + "Verb. aus Lieferungen und Leistungen ohne Kontokorrent (1-5 J.)": { + "account_number": "3337" + }, + "Verb. aus Lieferungen und Leistungen ohne Kontokorrent (gr\u00f6\u00dfer 5 J.)": { + "account_number": "3338" + } + }, + "5 - Verb. aus der Annahme gezogener Wechsel und der Ausstellung eigener Wechsel": { + "account_type": "Payable", + "is_group": 1, + "Verb. aus der Annahme gezogener Wechsel und aus der Ausstellung eigener Wechsel": { + "account_number": "3350" + }, + "Verb. aus der Annahme gezogener Wechsel und aus der Ausstellung eigener Wechsel (b. 1 J.)": { + "account_number": "3351" + }, + "Verb. aus der Annahme gezogener Wechsel und aus der Ausstellung eigner Wechsel (1-5 J.)": { + "account_number": "3380" + }, + "Verb. aus der Annahme gezogener Wechsel und der Ausstellung eigener Wechsel (gr\u00f6\u00dfer 5 J.)": { + "account_number": "3390" + } + }, + "6 - Verb. gg. verbundenen Unternehmen": { + "account_type": "Payable", + "is_group": 1, + "Verb. gg. verbundenen Unternehmen": { + "account_number": "3400" + }, + "Verb. gg. verbundenen Unternehmen (b. 1 J.)": { + "account_number": "3401" + }, + "Verb. gg. verbundenen Unternehmen (1-5 J.)": { + "account_number": "3405" + }, + "Verb. gg. verbundenen Unternehmen (gr\u00f6\u00dfer 5 J.)": { + "account_number": "3410" + }, + "Verb. aus LuL gg. verbundenen Unternehmen": { + "account_number": "3420" + }, + "Verb. aus LuL gg. verbundenen Unternehmen (b. 1 J.)": { + "account_number": "3421" + }, + "Verb. aus LuL gg. verbundenen Unternehmen (1-5 J.)": { + "account_number": "3425" + }, + "Verb. aus LuL gg. verbundenen Unternehmen (gr\u00f6\u00dfer 5 J.)": { + "account_number": "3430" + } + }, + "7 - Verb. gg. Unternehmen, mit denen ein Beteiligungsverh. besteht": { + "account_type": "Payable", + "is_group": 1, + "Verb. gg. Unternehmen, mit denen ein Beteiligungsverh. besteht": { + "account_number": "3450" + }, + "Verb. gg. Unternehmen, mit denen ein Beteiligungsverh. besteht (b. 1 J.)": { + "account_number": "3451" + }, + "Verb. gg. Unternehmen, mit denen ein Beteiligungsverh. besteht (1-5 J.)": { + "account_number": "3455" + }, + "Verb. gg. Unternehmen, mit denen ein Beteiligungsverh. besteht (gr\u00f6\u00dfer 5 J.)": { + "account_number": "3460" + }, + "Verb. aus LuL gg. Unternehmen, mit denen ein Beteiligungsverh. besteht": { + "account_number": "3470" + }, + "Verb. aus LuL gg. Unternehmen, mit denen ein Beteiligungsverh. besteht (b. 1 J.)": { + "account_number": "3471" + }, + "Verb. aus LuL gg. Unternehmen, mit denen ein Beteiligungsverh. besteht (1-5 J.)": { + "account_number": "3475" + }, + "Verb. aus LuL gg. Unternehmen, mit denen ein Beteiligungsverh. besteht (gr\u00f6\u00dfer 5 J.)": { + "account_number": "3480" + } + }, + "8 - sonstige Verb.": { + "account_type": "Payable", + "is_group": 1, + "davon aus Steuern": { + "account_type": "Payable", + "is_group": 1, + "Verb. aus Steuern und Abgaben": { + "account_number": "3700", + "account_type": "Payable" + }, + "Verb. aus Steuern und Abgaben (b. 1 J.)": { + "account_number": "3701" + }, + "Verb. aus Steuern und Abgaben (1-5 J.)": { + "account_number": "3710" + }, + "Verb. aus Steuern und Abgaben (gr\u00f6\u00dfer 5 J.)": { + "account_number": "3715" + }, + "Verb. aus Lohn- und Kirchensteuer": { + "account_number": "3730" + }, + "Verb. aus Einbehaltungen (KapESt und Solz auf KapESt) f. offene Aussch\u00fcttungen": { + "account_number": "3760" + }, + "Verb. f. Verbrauchsteuern": { + "account_number": "3761" + } + }, + "Gewinnverf\u00fcgungskonto stille Gesellschafter": { + "account_number": "3620" + }, + "Sonstige Verrechnungskonten (Interimskonten)": { + "account_number": "3630" + }, + "Kreditkartenabrechnung": { + "account_number": "3610" + }, + "Verb. gg. Arbeitsgemeinschaften": { + "account_number": "3611" + }, + "Bewertungskorrektur zu sonstigen Verb.": { + "account_number": "9961" + }, + "Verb. gg. stillen Gesellschaftern": { + "account_number": "3655" + }, + "Verb. gg. stillen Gesellschaftern (b. 1 J.)": { + "account_number": "3656" + }, + "Verb. gg. stillen Gesellschaftern (1-5 J.)": { + "account_number": "3657" + }, + "Verb. gg. stillen Gesellschaftern (gr\u00f6\u00dfer 5 J.)": { + "account_number": "3658" + }, + "davon i. R. d. sozialen Sicherheit": { + "account_type": "Payable", + "is_group": 1, + "Verb. i. R. d. sozialen Sicherheit": { + "account_number": "3740" + }, + "Verb. i. R. d. sozialen Sicherheit (b. 1 J.)": { + "account_number": "3741" + }, + "Verb. i. R. d. sozialen Sicherheit (1-5 J.)": { + "account_number": "3750" + }, + "Verb. i. R. d. sozialen Sicherheit (gr\u00f6\u00dfer 5 J.)": { + "account_number": "3755" + }, + "Voraussichtliche Beitragsschuld gg. den Sozialversicherungstr\u00e4gern": { + "account_number": "3759" + } + }, + "Verb. aus Lohn und Gehalt (Gruppe)": { + "is_group": 1, + "Verb. aus Lohn und Gehalt": { + "account_number": "3720" + }, + "Verb. f. Einbehaltungen von Arbeitnehmern": { + "account_number": "3725" + }, + "Verb. an das Finanzamt aus abzuf\u00fchrendem Bauabzugsbetrag": { + "account_number": "3726" + } + }, + "Verb. aus Verm\u00f6gensbildung": { + "account_number": "3770" + }, + "Verb. aus Verm\u00f6gensbildung (b. 1 J.)": { + "account_number": "3771" + }, + "Verb. aus Verm\u00f6gensbildung (1-5 J.)": { + "account_number": "3780" + }, + "Verb. aus Verm\u00f6gensbildung (gr\u00f6\u00dfer 5 J.)": { + "account_number": "3785" + }, + "Ausgegebene Geschenkgutscheine": { + "account_number": "3786" + }, + "Sonstige Verb.": { + "account_number": "3500", + "account_type": "Payable" + }, + "Sonstige Verb. (b. 1 J.)": { + "account_number": "3501" + }, + "Sonstige Verb. (1-5 J.)": { + "account_number": "3504" + }, + "Sonstige Verb. (gr\u00f6\u00dfer 5 J.)": { + "account_number": "3507" + }, + "Darlehen typisch stiller Gesellschafter (Gruppe)": { + "is_group": 1, + "Darlehen typisch stiller Gesellschafter": { + "account_number": "3520" + }, + "Darlehen typisch stiller Gesellschafter (b. 1 J.)": { + "account_number": "3521" + }, + "Darlehen typisch stiller Gesellschafter (1-5 J.)": { + "account_number": "3524" + }, + "Darlehen typisch stiller Gesellschafter (gr\u00f6\u00dfer 5 J.)": { + "account_number": "3527" + } + }, + "Darlehen atypisch stiller Gesellschafter (Gruppe)": { + "is_group": 1, + "Darlehen atypisch stiller Gesellschafter": { + "account_number": "3530" + }, + "Darlehen atypisch stiller Gesellschafter (b. 1 J.)": { + "account_number": "3531" + }, + "Darlehen atypisch stiller Gesellschafter (1-5 J.)": { + "account_number": "3534" + }, + "Darlehen atypisch stiller Gesellschafter (gr\u00f6\u00dfer 5 J.)": { + "account_number": "3537" + } + }, + "Partiarische Darlehen (Gruppe)": { + "is_group": 1, + "Partiarische Darlehen": { + "account_number": "3540" + }, + "Partiarische Darlehen (b. 1 J.)": { + "account_number": "3541" + }, + "Partiarische Darlehen (1-5 J.)": { + "account_number": "3544" + }, + "Partiarische Darlehen (gr\u00f6\u00dfer 5 J.)": { + "account_number": "3547" + } + }, + "Erhaltene Kautionen (Gruppe)": { + "is_group": 1, + "Erhaltene Kautionen": { + "account_number": "3550" + }, + "Erhaltene Kautionen (b. 1 J.)": { + "account_number": "3551" + }, + "Erhaltene Kautionen (1-5 J.)": { + "account_number": "3554" + }, + "Erhaltene Kautionen (gr\u00f6\u00dfer 5 J.)": { + "account_number": "3557" + } + }, + "Darlehen (1-5 J.)": { + "account_number": "3564" + }, + "Darlehen (gr\u00f6\u00dfer 5 J.)": { + "account_number": "3567" + }, + "Lohn- und Gehaltsverrechnungskonto": { + "account_number": "3790" + }, + "Umsatzsteuer (Gruppe)": { + "account_type": "Tax", + "is_group": 1, + "Umsatzsteuer": { + "account_number": "3800", + "account_type": "Tax" + }, + "Umsatzsteuer 7 %": { + "account_number": "3801", + "account_type": "Tax" + }, + "Umsatzsteuer aus innergem. Erwerb": { + "account_number": "3802" + }, + "Umsatzsteuer aus innergem. Erwerb 19 %": { + "account_number": "3804" + }, + "Umsatzsteuer 19 %": { + "account_number": "3806", + "account_type": "Tax" + }, + "Umsatzsteuer aus im Inland steuerpfl. EU-Lieferungen": { + "account_number": "3807" + }, + "Umsatzsteuer aus im Inland steuerpfl. EU-Lieferungen 19 %": { + "account_number": "3808" + }, + "Umsatzsteuer aus innergem. Erwerb ohne Vorsteuerabzug": { + "account_number": "3809" + }, + "Umsatzsteuer nicht f\u00e4llig (Gruppe)": { + "is_group": 1, + "Umsatzsteuer nicht f\u00e4llig": { + "account_number": "3810" + }, + "Umsatzsteuer nicht f\u00e4llig 7 %": { + "account_number": "3811" + }, + "Umsatzsteuer nicht f\u00e4llig aus im Inland steuerpfl. EU-Lieferungen": { + "account_number": "3812" + }, + "Umsatzsteuer nicht f\u00e4llig aus im Inland steuerpfl. EU-Lieferungen 19 %": { + "account_number": "3814" + }, + "Umsatzsteuer nicht f\u00e4llig 19 %": { + "account_number": "3816" + }, + "Umsatzsteuer aus im anderen EU-Land steuerpfl. Lieferungen": { + "account_number": "3817" + }, + "Umsatzsteuer aus im anderen EU-Land steuerpfl. sonstigen Leistungen/Werklieferungen": { + "account_number": "3818" + }, + "Umsatzsteuer aus Erwerb als letzter Abnehmer innerh. eines Dreiecksgesch.s": { + "account_number": "3819" + } + }, + "Umsatzsteuer-Vorauszahlungen": { + "account_number": "3820", + "account_type": "Tax" + }, + "Umsatzsteuer-Vorauszahlung 1/11": { + "account_number": "3830" + }, + "Nachsteuer, UStVA Kz. 65": { + "account_number": "3832" + }, + "Umsatzsteuer aus innergem. Erwerb von Neufahrzeugen von Lieferanten ohne Ust-ID": { + "account_number": "3834" + }, + "Umsatzsteuer nach \u00a7 13b UStG": { + "account_number": "3835" + }, + "Umsatzsteuer nach \u00a7 13b UStG 19 %": { + "account_number": "3837" + }, + "Umsatzsteuer aus der Auslagerung von Gegenst\u00e4nden aus einem Umsatzsteuerlager": { + "account_number": "3839" + }, + "Einfuhrumsatzsteuer aufgeschoben bis": { + "account_number": "3850" + }, + "In Rechnung unrichtig oder unberechtigtausgewiesene Steuerbetr\u00e4ge, UStVA Kz. 69": { + "account_number": "3852" + }, + "Steuerzahlungen an andere L\u00e4nder": { + "account_number": "3854" + } + } + }, + "is_group": 1 + }, + "E - Passive latente Steuern": { + "is_group": 1, + "Passive latente Steuern": { + "account_number": "3065" + } + }, + "D - Rechnungsabgrenzungsposten": { + "is_group": 1, + "Passive Rechnungsabgrenzung": { + "account_number": "3900" + } + }, + "is_group": 1 + }, + "1 - Umsatzerl\u00f6se": { + "root_type": "Income", + "is_group": 1, + "Steuerfreie Ums\u00e4tze \u00a7 4 Nr. 8 ff UStG (Gruppe)": { + "is_group": 1, + "Steuerfreie Ums\u00e4tze \u00a7 4 Nr. 8 ff UStG": { + "account_number": "4100" + }, + "Steuerfreie Ums\u00e4tze nach \u00a7 4 Nr. 12 UStG (Vermietung und Verpachtung)": { + "account_number": "4105" + }, + "Sonstige steuerfreie Ums\u00e4tze Inland": { + "account_number": "4110" + }, + "Steuerfreie Ums\u00e4tze \u00a7 4 Nr. 1a UStG (Gruppe)": { + "is_group": 1, + "Steuerfreie Ums\u00e4tze \u00a7 4 Nr. 1a UStG": { + "account_number": "4120" + }, + "Steuerfreie Innergemeinschaftliche Lieferungen \u00a7 4 Nr. 1b UStG": { + "account_number": "4125" + } + }, + "Lieferungen des ersten Abnehmers bei innergem. Dreiecksgesch.en \u00a7 25b Abs. 2 UStG (Gruppe)": { + "is_group": 1, + "Lieferungen des ersten Abnehmers bei innergem. Dreiecksgesch.en \u00a7 25b Abs. 2 UStG": { + "account_number": "4130" + }, + "Steuerfreie innergem. Lieferungen von Neufahrzeugen an Abnehmer ohne Ust-ID": { + "account_number": "4135" + }, + "Umsatzerl\u00f6se nach \u00a7\u00a7 25 und 25a UStG 19% USt": { + "account_number": "4136" + }, + "Umsatzerl\u00f6se nach \u00a7\u00a7 25 und 25a UStG ohne USt": { + "account_number": "4138" + }, + "Umsatzerl\u00f6se aus Reiseleistungen \u00a7 25 Abs. 2 UStG, steuerfrei": { + "account_number": "4139" + } + }, + "Steuerfreie Ums\u00e4tze Offshore usw.": { + "account_number": "4140" + }, + "Sonstige steuerfreie Ums\u00e4tze (z. B. \u00a7 4 Nr. 2-7 UStG)": { + "account_number": "4150" + }, + "Steuerfreie Ums\u00e4tze ohne Vorsteuerabzug zum Gesamtumsatz geh\u00f6rend": { + "account_number": "4160" + }, + "Erl\u00f6se, die mit den Durchschnittss\u00e4tzen des \u00a7 24 UStG versteuert werden": { + "account_number": "4180" + }, + "Erl\u00f6se aus Kleinunternehmer i. S. d. \u00a7 19 Abs. 1 UStG": { + "account_number": "4185", + "account_type": "Income Account" + }, + "Erl\u00f6se aus Geldspielautomaten 19 % USt": { + "account_number": "4186" + } + }, + "Erl\u00f6se": { + "account_number": "4200", + "account_type": "Income Account" + }, + "Erl\u00f6se 7 % USt": { + "account_number": "4300", + "account_type": "Income Account" + }, + "Erl\u00f6se aus im Inland steuerpfl. EU-Lieferungen 7 % USt": { + "account_number": "4310" + }, + "Erl\u00f6se aus im Inland steuerpfl. EU-Lieferungen 19 % USt": { + "account_number": "4315" + }, + "Erl\u00f6se aus im anderen EU-Land steuerpfl. Lieferungen": { + "account_number": "4320" + }, + "Erl\u00f6se aus im Inland steuerpfl. EU-Lieferungen 16 % USt": { + "account_number": "4330" + }, + "Erl\u00f6se aus Lieferungen von Mobilfunkger./Schaltkr., f. die der Leistungsempf. die Ust. schuldet": { + "account_number": "4335" + }, + "Erl\u00f6se aus im anderen EU-Land steuerpfl. sonst. Leistungen, f. die der Leistungsempf. die Ust. schuldet": { + "account_number": "4336" + }, + "Erl\u00f6se aus Leistungen, f. die der Leistungsempf. die Ust. nach \u00a7 13b UStG schuldet": { + "account_number": "4337" + }, + "Erl\u00f6se aus im Drittland steuerbaren Leistungen, im Inland nicht steuerbare Ums\u00e4tze": { + "account_number": "4338" + }, + "Erl\u00f6se aus im anderen EU-Land steuerbaren Leistungen, im Inland nicht steuerbare Ums\u00e4tze": { + "account_number": "4339" + }, + "Erl\u00f6se 16 % USt (Gruppe)": { + "is_group": 1, + "Erl\u00f6se 16 % USt": { + "account_number": "4340" + } + }, + "Erl\u00f6se 19 % USt (Gruppe)": { + "is_group": 1, + "Erl\u00f6se 19 % USt": { + "account_number": "4400", + "account_type": "Income Account" + } + }, + "Erl\u00f6sschm\u00e4lerungen (Gruppe)": { + "is_group": 1, + "Erl\u00f6sschm\u00e4lerungen": { + "account_number": "4700" + }, + "Erl\u00f6sschm\u00e4lerungen aus steuerfreien Ums\u00e4tzen \u00a7 4 Nr. 1a UStG": { + "account_number": "4705" + }, + "Erl\u00f6sschm\u00e4lerungen 7 % USt": { + "account_number": "4710" + }, + "Erl\u00f6sschm\u00e4lerungen 19 % USt": { + "account_number": "4720" + }, + "Erl\u00f6sschm\u00e4lerungen 16 % USt": { + "account_number": "4723" + }, + "Erl\u00f6sschm\u00e4lerungen aus steuerfreien innergem. Lieferungen": { + "account_number": "4724" + }, + "Erl\u00f6sschm\u00e4lerungen aus im Inland steuerpfl. EU-Lieferungen 7 % USt": { + "account_number": "4725" + }, + "Erl\u00f6sschm\u00e4lerungen aus im Inland steuerpfl. EU-Lieferungen 19 % USt": { + "account_number": "4726" + }, + "Erl\u00f6sschm\u00e4lerungen aus im anderen EU-Land steuerpfl. Lieferungen": { + "account_number": "4727" + }, + "Erl\u00f6sschm\u00e4lerungen aus im Inland steuerpfl. EU-Lieferungen 16 % USt": { + "account_number": "4729" + }, + "Gew\u00e4hrte Skonti (Gruppe)": { + "is_group": 1, + "Gew. Skonti": { + "account_number": "4730" + }, + "Gew. Skonti 7 % USt": { + "account_number": "4731" + }, + "Gew. Skonti 19 % USt": { + "account_number": "4736" + }, + "Gew. Skonti aus Lieferungen von Mobilfunkger./Schaltkr., f. die der Leistungsempf. die Ust. schuldet": { + "account_number": "4738" + }, + "Gew. Skonti aus Leistungen, f. die der Leistungsempf. die Umsatzsteuer nach \u00a7 13b UStG schuldet": { + "account_number": "4741" + }, + "Gew. Skonti aus Erl\u00f6sen aus im anderen EU-Land steuerpfl. Leistungen, f. die der Leistungsempf. die Ust. schuldet": { + "account_number": "4742" + }, + "Gew. Skonti aus steuerfreien innergem. Lieferungen \u00a7 4 Nr. 1b UStG": { + "account_number": "4743" + }, + "Gew. Skonti aus im Inland steuerpfl. EU-Lieferungen": { + "account_number": "4745" + }, + "Gew. Skonti aus im Inland steuerpfl. EU-Lieferungen 7% USt": { + "account_number": "4746" + }, + "Gew. Skonti aus im Inland steuerpfl. EU-Lieferungen 19% USt": { + "account_number": "4748" + } + }, + "Gew\u00e4hrte Boni 7 % USt": { + "account_number": "4750" + }, + "Gew\u00e4hrte Boni 19 % USt": { + "account_number": "4760" + }, + "Gew\u00e4hrte Boni": { + "account_number": "4769" + }, + "Gew\u00e4hrte Rabatte": { + "account_number": "4770" + }, + "Gew\u00e4hrte Rabatte 7 % USt": { + "account_number": "4780" + }, + "Gew\u00e4hrte Rabatte 19 % USt": { + "account_number": "4790" + } + }, + "Grundst\u00fccksertr\u00e4ge (Gruppe)": { + "is_group": 1, + "Grundst\u00fccksertr\u00e4ge": { + "account_number": "4860" + }, + "Erl\u00f6se aus Vermietung und Verpachtung, umsatzsteuerfrei \u00a7 4 Nr. 12 UStG": { + "account_number": "4861" + }, + "Erl\u00f6se aus Vermietung und Verpachtung 19% USt": { + "account_number": "4862" + } + }, + "Sonstige Ertr\u00e4ge aus Provisionen, Lizenzen und Patenten (Gruppe)": { + "is_group": 1, + "Sonstige Ertr\u00e4ge aus Provisionen, Lizenzen und Patenten": { + "account_number": "4570" + }, + "Sonstige Ertr\u00e4ge aus Provisionen, Lizenzen und Patenten, steuerfrei \u00a7 4 Nr. 8ff UStG": { + "account_number": "4574" + }, + "Sonstige Ertr\u00e4ge aus Provisionen, Lizenzen und Patenten, steuerfrei \u00a7 4 Nr. 5 UStG": { + "account_number": "4575" + }, + "Sonstige Ertr\u00e4ge aus Provisionen, Lizenzen und Patenten 7% USt": { + "account_number": "4576" + }, + "Sonstige Ertr\u00e4ge aus Provisionen, Lizenzen und Patenten 19% USt": { + "account_number": "4579" + } + }, + "Provisionsums\u00e4tze (Gruppe)": { + "is_group": 1, + "Provisionsums\u00e4tze": { + "account_number": "4560" + }, + "Provisionsums\u00e4tze, steuerfrei \u00a7 4Nr. 8ff UStG": { + "account_number": "4564" + }, + "Provisionsums\u00e4tze, steuerfrei \u00a7 4 Nr. 5 UStG": { + "account_number": "4565" + }, + "Provisionsums\u00e4tze 7% USt": { + "account_number": "4566" + }, + "Provisionsums\u00e4tze 19 % Ust": { + "account_number": "4569" + } + }, + "Erl\u00f6se Abfallverwertung": { + "account_number": "4510" + }, + "Erl\u00f6se Leergut": { + "account_number": "4520" + } + }, + "2 - Herstellungskosten der zur Erzielung der Umsatzerl\u00f6se erbrachten Leistungen": { + "root_type": "Expense", + "is_group": 1, + "Herstellungskosten (Gruppe)": { + "Herstellungskosten": { + "account_number": "6990", + "account_type": "Cost of Goods Sold" + }, + "Herstellungskosten: Schwund": { + "account_type": "Stock Adjustment" + } + }, + "Aufwendungen f. Roh-, Hilfs- und Betriebsstoffe und f. bezogene Waren": { + "account_number": "5000", + "account_type": "Expense Account" + }, + "Einkauf Roh-, Hilfs- und Betriebsstoffe (Gruppe)": { + "is_group": 1, + "Einkauf Roh-, Hilfs- und Betriebsstoffe": { + "account_number": "5100", + "account_type": "Expense Account" + }, + "Einkauf Roh-, Hilfs- und Betriebsstoffe 7% Vorsteuer": { + "account_number": "5110" + }, + "Einkauf Roh-, Hilfs- und Betriebsstoffe 19% Vorsteuer": { + "account_number": "5130" + }, + "Einkauf Roh-, Hilfs- und Betriebsstoffe, innergem. Erwerb 7% Vorst. u. 7% Ust.": { + "account_number": "5160" + }, + "Einkauf Roh-, Hilfs- und Betriebsstoffe, innergem. Erwerb 19% Vorst. u. 19% Ust.": { + "account_number": "5162" + }, + "Einkauf Roh-, Hilfs- und Betriebsstoffe, innergem. Erwerb ohne Vorsteuer und 7% Umsatzsteuer": { + "account_number": "5166" + }, + "Einkauf Roh-, Hilfs- und Betriebsstoffe, innergem. Erwerb ohne Vorsteuer und 19% Umsatzsteuer": { + "account_number": "5167" + }, + "Einkauf Roh-, Hilfs- und Betriebsstoffe 5,5% Vorsteuer": { + "account_number": "5170" + }, + "Einkauf Roh-, Hilfs- und Betriebsstoffe 10,7% Vorsteuer": { + "account_number": "5171" + }, + "Einkauf Roh-, Hilfs- und Betriebsstoffe aus einem USt-Lager \u00a7 13a UStG 7% Vorst. und 7% Ust.": { + "account_number": "5175" + }, + "Einkauf Roh-, Hilfs- und Betriebsstoffe aus einem USt-Lager \u00a7 13a UStG 19% Vorst. und 19% Ust.": { + "account_number": "5176" + }, + "Erwerb Roh-, Hilfs- und Betriebsstoffe als letzter Abnehmer innerh. Dreiecksgesch. 19% Vorst. und 19% Ust.": { + "account_number": "5189" + }, + "Energiestoffe (Fertigung) (Gruppe)": { + "is_group": 1, + "Energiestoffe (Fertigung)": { + "account_number": "5190" + }, + "Energiestoffe (Fertigung)7% Vorsteuer": { + "account_number": "5191" + }, + "Energiestoffe (Fertigung)19% Vorsteuer": { + "account_number": "5192" + } + } + }, + "Wareneingang (Gruppe)": { + "is_group": 1, + "Wareneingang": { + "account_number": "5200" + }, + "Wareneingang 7 % Vorsteuer": { + "account_number": "5300" + }, + "Wareneingang 19 % Vorsteuer": { + "account_number": "5400" + }, + "Wareneingang 5,5 % Vorsteuer": { + "account_number": "5505" + }, + "Wareneingang 10,7 % Vorsteuer": { + "account_number": "5540" + }, + "Steuerfreier innergem. Erwerb": { + "account_number": "5550" + }, + "Wareneingang im Drittland steuerbar": { + "account_number": "5551" + }, + "Erwerb 1. Abnehmer innerh. eines Dreieckgesch\u00e4ftes": { + "account_number": "5552" + }, + "Erwerb Waren als letzter Abnehmer innerh. Dreiecksgesch. 19% Vorst. u. 19% Ust.": { + "account_number": "5553" + }, + "Wareneingang im anderen EU-Land steuerbar": { + "account_number": "5558" + }, + "Steuerfreie Einfuhren": { + "account_number": "5559" + }, + "Waren aus einem Umsatzsteuerlager, \u00a7 13a UStG 7% Vorst. u. 7% Ust.": { + "account_number": "5560" + }, + "Waren aus einem Umsatzsteuerlager, \u00a7 13a UStG 19% Vorst. u. 19% Ust.": { + "account_number": "5565" + } + }, + "innergem. Erwerb 7% Vorst. u. 7% Ust.": { + "account_number": "5420" + }, + "innergem. Erwerb 19 % Vorsteuer 19 % Umsatzsteuer": { + "account_number": "5425" + }, + "innergem. Erwerb ohne Vorst. und 7% Ust.": { + "account_number": "5430" + }, + "innergem. Erwerb ohne Vorsteuer und 19 % Umsatzsteuer": { + "account_number": "5435" + }, + "innergem. Erwerb von Neufahrzeugen von Lieferanten ohne Ust-ID 19 % Vorst. und 19 % Ust.": { + "account_number": "5440" + }, + "Nicht abziehbare Vorsteuer (Gruppe)": { + "is_group": 1, + "Nicht abziehbare Vorsteuer": { + "account_number": "5600" + }, + "Nicht abziehbare Vorsteuer 7 % (Gruppe)": { + "is_group": 1, + "Nicht abziehbare Vorsteuer 7 %": { + "account_number": "5610" + } + }, + "Nicht abziehbare Vorsteuer 19 % (Gruppe)": { + "is_group": 1, + "Nicht abziehbare Vorsteuer 19 %": { + "account_number": "5660" + } + } + }, + "Nachl\u00e4sse (Gruppe)": { + "is_group": 1, + "Nachl\u00e4sse": { + "account_number": "5700" + }, + "Nachl\u00e4sse aus Einkauf Roh-, Hilfs- und Betriebsstoffe": { + "account_number": "5701" + }, + "Nachl\u00e4sse 7 % Vorsteuer": { + "account_number": "5710" + }, + "Nachl\u00e4sse aus Einkauf Roh-, Hilfs- und Betriebsstoffe 7% Vorsteuer": { + "account_number": "5714" + }, + "Nachl\u00e4sse aus Einkauf Roh-, Hilfs- und Betriebsstoffe 19% Vorsteuer": { + "account_number": "5715" + }, + "Nachl\u00e4sse aus Einkauf Roh-, Hilfs- und Betriebsstoffe, innergem. Erwerb 7% Vorst. u. 7% Ust.": { + "account_number": "5717" + }, + "Nachl\u00e4sse aus Einkauf Roh-, Hilfs- und Betriebsstoffe, innergem. Erwerb 19% Vorst. u. 19% Ust.": { + "account_number": "5718" + }, + "Nachl\u00e4sse 19 % Vorsteuer": { + "account_number": "5720" + }, + "Nachl\u00e4sse 16 % Vorsteuer": { + "account_number": "5722" + }, + "Nachl\u00e4sse 15 % Vorsteuer": { + "account_number": "5723" + }, + "Nachl\u00e4sse aus innergem. Erwerb 7% Vorst. u. 7% Ust.": { + "account_number": "5724" + }, + "Nachl\u00e4sse aus innergem. Erwerb 19% Vorst. u. 19% Ust.": { + "account_number": "5725" + }, + "Nachl\u00e4sse aus innergem. Erwerb 16 % Vorsteuer und 16 % Umsatzsteuer": { + "account_number": "5726" + }, + "Nachl\u00e4sse aus innergem. Erwerb 15 % Vorsteuer und 15 % Umsatzsteuer": { + "account_number": "5727" + }, + "Erhaltene Skonti (Gruppe)": { + "is_group": 1, + "Erh. Skonti": { + "account_number": "5730" + }, + "Erh. Skonti 7 % Vorsteuer": { + "account_number": "5731" + }, + "Erh. Skonti aus Einkauf Roh-, Hilfs- und Betriebsstoffe": { + "account_number": "5733" + }, + "Erh. Skonti aus Einkauf Roh-, Hilfs- und Betriebsstoffe 7% Vorsteuer": { + "account_number": "5734" + }, + "Erh. Skonti 19 % Vorsteuer": { + "account_number": "5736" + }, + "Erh. Skonti aus Einkauf Roh-, Hilfs- und Betriebsstoffe 19% Vorsteuer": { + "account_number": "5738" + }, + "Erh. Skonti aus Einkauf Roh-, Hilfs- und Betriebsstoffe aus steuerpfl. innergem. Erwerb 19% Vorst. u. 19% Ust.": { + "account_number": "5741" + }, + "Erh. Skonti aus Einkauf Roh-, Hilfs- und Betriebsstoffe aus steuerpfl. innergem. Erwerb 7% Vorst. u. 7% Ust.": { + "account_number": "5743" + }, + "Erh. Skonti aus steuerpflichtigem innergem. Erwerb": { + "account_number": "5745" + }, + "Erh. Skonti aus steuerpflichtigem innergem. Erwerb 7% Vorst. u. 7% Ust.": { + "account_number": "5746" + }, + "Erh. Skonti aus steuerpflichtigem innergem. Erwerb 19% Vorst. u. 19% Ust.": { + "account_number": "5748" + }, + "Erh. Skonti aus Erwerb Roh-,Hilfs-,Betriebsstoff letzter Abn.innerh.Dreiecksg. 19% Vorst. und 19% Ust.": { + "account_number": "5792" + }, + "Erh. Skonti aus Erwerb Waren als letzter Abnehmer innerh. Dreiecksgesch. 19% Vorst. u. 19% Ust.": { + "account_number": "5793" + } + }, + "Erhaltene Boni (Gruppe)": { + "is_group": 1, + "Erhaltene Boni 7 % Vorsteuer": { + "account_number": "5750" + }, + "Erhaltene Boni aus Einkauf Roh-, Hilfs- und Betriebsstoffe": { + "account_number": "5753" + }, + "Erhaltene Boni aus Einkauf Roh-, Hilfs- und Betriebsstoffe 7% Vorsteuer": { + "account_number": "5754" + }, + "Erhaltene Boni aus Einkauf Roh-, Hilfs- und Betriebsstoffe 19% Vorsteuer": { + "account_number": "5755" + }, + "Erhaltene Boni 19 % Vorsteuer": { + "account_number": "5760" + }, + "Erhaltene Boni": { + "account_number": "5769" + } + }, + "Erhaltene Rabatte (Gruppe)": { + "is_group": 1, + "Erhaltene Rabatte": { + "account_number": "5770" + }, + "Erhaltene Rabatte 7 % Vorsteuer": { + "account_number": "5780" + }, + "Erhaltene Rabatte aus Einkauf Roh-, Hilfs- und Betriebsstoffe": { + "account_number": "5783" + }, + "Erhaltene Rabatte aus Einkauf Roh-, Hilfs- und Betriebsstoffe 7% Vorsteuer": { + "account_number": "5784" + }, + "Erhaltene Rabatte aus Einkauf Roh-, Hilfs- und Betriebsstoffe 19% Vorsteuer": { + "account_number": "5785" + }, + "Erhaltene Rabatte 19 % Vorsteuer": { + "account_number": "5790" + } + } + }, + "Bezugsnebenkosten (Gruppe)": { + "is_group": 1, + "Bezugsnebenkosten": { + "account_number": "5800" + }, + "Leergut": { + "account_number": "5820" + }, + "Z\u00f6lle und Einfuhrabgaben": { + "account_number": "5840" + }, + "Verrechnete Stoffkosten (Gegenkonto 5000-99) oder (4000-99)": { + "account_number": "5860" + } + }, + "Fremdleistungen (Gruppe)": { + "is_group": 1, + "Fremdleistungen": { + "account_number": "5900", + "account_type": "Expense Account" + }, + "Fremdleistungen 19% Vorsteuer": { + "account_number": "5906" + }, + "Fremdleistungen ohne Vorsteuer": { + "account_number": "5909" + }, + "Bauleistungen eines im Inland ans\u00e4ssigen Unternehmers 7% Vorst. u. 7% Ust.": { + "account_number": "5910" + }, + "Sonstige Leistungen eines im anderen EU-Land ans\u00e4ssigen Unternehmers 7% Vorst. u. 7% Ust.": { + "account_number": "5913" + }, + "Leistungen eines im Ausland ans\u00e4ssigen Unternehmers 7% Vorst. u. 7% Ust.": { + "account_number": "5915" + }, + "Bauleistungen eines im Inland ans\u00e4ssigen Unternehmers 19% Vorst. u. 19% Ust.": { + "account_number": "5920" + }, + "Sonstige Leistungen eines im anderen EU-Land ans\u00e4ssigen Unternehmers 19% Vorst. u. 19% Ust.": { + "account_number": "5923" + }, + "Leistungen eines im Ausland ans\u00e4ssigen Unternehmers 19% Vorst. u. 19% Ust.": { + "account_number": "5925" + }, + "Bauleistungen eines im Inland ans\u00e4ssigen Unternehmers ohne Vorst. und 7% Ust.": { + "account_number": "5930" + }, + "Sonstige Leistungen eines im anderen EU-Land ans\u00e4ssigen Unternehmers ohne Vorst. und 7% Ust.": { + "account_number": "5933" + }, + "Leistungen eines im Ausland ans\u00e4ssigen Unternehmers ohne Vorst. und 7% Ust.": { + "account_number": "5935" + }, + "Bauleistungen eines im Inland ans\u00e4ssigen Unternehmers ohne Vorsteuer und 19 % Umsatzsteuer": { + "account_number": "5940" + }, + "Sonstige Leistungen eines im anderen EU-Land ans\u00e4ssigen Unternehmers ohne Vorsteuer und 19 % Umsatzsteuer": { + "account_number": "5943" + }, + "Leistungen eines im Ausland ans\u00e4ssigen Unternehmers ohne Vorsteuer und 19 % Umsatzsteuer": { + "account_number": "5945" + }, + "Erhaltene Skonti aus Leistungen, f. die als Leistungsempf. die Steuer geschuldet wird (Gruppe)": { + "is_group": 1, + "Erh. Skonti aus Leistungen, f. die als Leistungsempf. die Steuer nach \u00a7 13b UStG geschuldet wird": { + "account_number": "5950" + }, + "Erh. Skonti aus Leistungen,f. die als Leistungsempf. die Steuer geschuldet wird 19 % Vorst. und 19 % Ust.": { + "account_number": "5951" + }, + "Erh. Skonti aus Leistungen, f. die als Leistungsempf. die Steuer geschuldet wird ohne Vorst. aber mit Uts.": { + "account_number": "5953" + }, + "Erh. Skonti aus Leistungen, f. die als Leistungsempf. die Steuer geschuldet wird ohne Vorst., mit 19 % Ust.": { + "account_number": "5954" + } + }, + "Leistungen nach \u00a7 13b UStG mit Vorsteuerabzug": { + "account_number": "5960" + }, + "Leistungen nach \u00a7 13b UStG ohne Vorsteuerabzug": { + "account_number": "5965" + } + }, + "L\u00f6hne und Geh\u00e4lter (Gruppe)": { + "is_group": 1, + "L\u00f6hne und Geh\u00e4lter": { + "account_number": "6000", + "account_type": "Expense Account" + }, + "L\u00f6hne": { + "account_number": "6010" + }, + "Geh\u00e4lter": { + "account_number": "6020" + }, + "Tantiemen": { + "account_number": "6026" + }, + "Aushilfsl\u00f6hne": { + "account_number": "6030" + }, + "L\u00f6hne f. Minijobs": { + "account_number": "6035" + }, + "Pauschale Steuern und Abgaben f. Sachzuwendungen und Dienstleistungen an Arbeitnehmer": { + "account_number": "6039" + }, + "Pauschale Steuer f. Aushilfen": { + "account_number": "6040" + }, + "Bedienungsgelder": { + "account_number": "6045" + }, + "Ehegattengehalt": { + "account_number": "6050" + }, + "Freiwillige soziale Aufwendungen lohnsteuerpflichtig": { + "account_number": "6060" + }, + "Pauschale Steuer auf sonstige Bez\u00fcge (z. B. Fahrtkostenzusch\u00fcsse)": { + "account_number": "6069" + }, + "Krankengeldzusch\u00fcsse": { + "account_number": "6070" + }, + "Sachzuwendungen und Dienstleistungen an Arbeitnehmer": { + "account_number": "6072" + }, + "Zusch\u00fcsse der Agenturen f. Arbeit (Haben)": { + "account_number": "6075" + }, + "Verm\u00f6genswirksame Leistungen": { + "account_number": "6080" + }, + "Fahrtkostenerstattung - Wohnung/Arbeitsst\u00e4tte": { + "account_number": "6090" + } + }, + "Soziale Abgaben und Aufwendungen f. Altersvers. und f. Unterst\u00fctzung (Gruppe)": { + "is_group": 1, + "Soziale Abgaben und Aufwendungen f. Altersvers. und f. Unterst\u00fctzung": { + "account_number": "6100", + "account_type": "Expense Account" + }, + "Gesetzliche soziale Aufwendungen": { + "account_number": "6110", + "account_type": "Expense Account" + }, + "Beitr\u00e4ge zur Berufsgenossenschaft": { + "account_number": "6120", + "account_type": "Expense Account" + }, + "Freiwillige soziale Aufwendungen lohnsteuerfrei": { + "account_number": "6130" + }, + "Aufwendungen f. Altersvers.": { + "account_number": "6150" + }, + "Aufwendungen f. Unterst\u00fctzung": { + "account_number": "6160" + }, + "Sonstige soziale Abgaben": { + "account_number": "6170" + } + }, + "Abschreibungen auf Sachanlagen (Gruppe)": { + "is_group": 1, + "Abschreibungen auf Sachanlagen (ohne AfA auf Kfz und Geb\u00e4ude)": { + "account_number": "6220", + "account_type": "Depreciation" + }, + "Abschreibungen auf Geb\u00e4ude": { + "account_number": "6221", + "account_type": "Depreciation" + }, + "Abschreibungen auf Kfz": { + "account_number": "6222", + "account_type": "Depreciation" + }, + "Abschreibungen auf Geb\u00e4udeanteil des h\u00e4uslichen Arbeitszimmers": { + "account_number": "6223" + } + }, + "Au\u00dferplanm\u00e4\u00dfige Abschreibungen auf Sachanlagen (Gruppe)": { + "is_group": 1, + "Au\u00dferplanm\u00e4\u00dfige Abschreibungen auf Sachanlagen": { + "account_number": "6230" + }, + "Absetzung f. au\u00dfergew\u00f6hnliche technische und wirtschaftliche Abnutzung der Geb\u00e4ude": { + "account_number": "6231" + }, + "Absetzung f. au\u00dfergew\u00f6hnliche technische und wirtschaftliche Abnutzung des Kfz": { + "account_number": "6232" + }, + "Absetzung f. au\u00dfergew\u00f6hnliche technische und wirtschaftliche Abnutzung sonstiger Wirtschaftsg\u00fcter": { + "account_number": "6233" + } + }, + "Abschreibungen auf Sachanlagen auf Grund steuerlicher Sondervorschriften (Gruppe)": { + "is_group": 1, + "Abschreibungen auf Sachanlagen auf Grund steuerlicher Sondervorschriften": { + "account_number": "6240" + }, + "Sonderabschreibungen nach \u00a7 7g Abs. 1 und 2 EStG a. F./\u00a7 7g Abs. 5 EStG n. F.(ohne Kfz)": { + "account_number": "6241" + }, + "Sonderabschreibungen nach \u00a7 7g Abs. 1 und 2 EStG a. F./\u00a7 7g Abs. 5 EStG n. F.(f. Kfz)": { + "account_number": "6242" + }, + "K\u00fcrzung der Anschaffungs- oder Herstellungskosten gem\u00e4\u00df \u00a7 7g Abs. 2 EStG n.F. (ohne Kfz)": { + "account_number": "6243" + }, + "K\u00fcrzung der Anschaffungs- oder Herstellungskosten gem\u00e4\u00df \u00a7 7g Abs. 2 EStG n.F. (f. Kfz)": { + "account_number": "6244" + } + }, + "Kaufleasing": { + "account_number": "6250" + }, + "Sofortabschreibung geringwertiger Wirtschaftsg\u00fcter": { + "account_number": "6260", + "account_type": "Depreciation" + }, + "Abschreibungen auf aktivierte, geringwertige Wirtschaftsg\u00fcter": { + "account_number": "6262" + }, + "Abschreibungen auf den Sammelposten Wirtschaftsg\u00fcter": { + "account_number": "6264" + }, + "Au\u00dferplanm\u00e4\u00dfige Abschreibungen auf aktivierte, geringwertige Wirtschaftsg\u00fcter": { + "account_number": "6266" + }, + "Abschreibungen auf Aufwendungen f. die Ingangsetzung und Erweiterung des Gesch\u00e4ftsbetriebs": { + "account_number": "6268" + }, + "Abschreibungen auf immaterielle VG (Gruppe)": { + "is_group": 1, + "Abschreibungen auf immaterielle VG": { + "account_number": "6200", + "account_type": "Depreciation" + }, + "Abschreibungen auf selbst geschaffene immaterielle VG": { + "account_number": "6201" + }, + "Abschreibungen auf den Gesch\u00e4fts- oder Firmenwert": { + "account_number": "6205" + }, + "Au\u00dferplanm\u00e4\u00dfige Abschreibungen auf den Gesch\u00e4fts- oder Firmenwert": { + "account_number": "6209" + }, + "Au\u00dferplanm\u00e4\u00dfige Abschreibungen auf immaterielle VG": { + "account_number": "6210" + }, + "Au\u00dferplanm\u00e4\u00dfige Abschreibungen auf selbst geschaffene immaterielle VG": { + "account_number": "6211" + }, + "Abschreibungen auf Forderungen gg. Kapitalges., an denen eine Beteiligung besteht (soweit un\u00fcblich hoch)": { + "account_number": "6290" + } + }, + "Abschreibungen auf sonstige VG des Umlaufverm. (soweit un\u00fcbliche H\u00f6he) (Gruppe)": { + "is_group": 1, + "Abschreibungen auf sonstige VG des Umlaufverm. (soweit un\u00fcbliche H\u00f6he)": { + "account_number": "6270" + }, + "Abschreibungen auf Umlaufverm\u00f6gen, steuerrechtlich bedingt (soweit un\u00fcbliche H\u00f6he)": { + "account_number": "6272" + }, + "Abschreibungen auf Roh-, Hilfs- und Betriebsstoffe/Waren (soweit un\u00fcblich hoch)": { + "account_number": "6278" + }, + "Abschreibungen auf fertige und unfertige Erzeugnisse (soweit un\u00fcblich hoch)": { + "account_number": "6279" + }, + "Forderungsverluste, un\u00fcblich hoch (Gruppe)": { + "is_group": 1, + "Forderungsverluste, un\u00fcblich hoch": { + "account_number": "6280" + }, + "Forderungsverluste 7% USt (soweit un\u00fcblich hoch)": { + "account_number": "6281" + }, + "Forderungsverluste 16% USt (soweit un\u00fcblich hoch)": { + "account_number": "6285" + }, + "Forderungsverluste 19% USt (soweit un\u00fcblich hoch)": { + "account_number": "6286" + }, + "Forderungsverluste 15% USt (soweit un\u00fcblich hoch)": { + "account_number": "6287" + } + } + } + }, + "4 - Vertriebskosten": { + "root_type": "Expense", + "is_group": 1, + "Personalaufwand (Vertrieb)": { + "is_group": 1 + } + }, + "5 - allgemeine Verwaltungskosten": { + "root_type": "Expense", + "is_group": 1, + "Verwaltungskosten": { + "account_number": "6992", + "account_type": "Expenses Included In Valuation" + }, + "Personalaufwand (Verwaltung)": { + "is_group": 1 + } + }, + "6 - sonstige betriebliche Ertr\u00e4ge": { + "root_type": "Income", + "is_group": 1, + "Andere aktivierte Eigenleistungen": { + "account_number": "4820" + }, + "Aktivierte Eigenleistungen zur Erstellung von selbst geschaffenen immateriellen VGn": { + "account_number": "4825" + }, + "Sonstige betriebliche Ertr\u00e4ge": { + "account_number": "4830" + }, + "Sonstige betriebliche Ertr\u00e4ge von verbundenen Unternehmen": { + "account_number": "4832" + }, + "Andere Nebenerl\u00f6se": { + "account_number": "4833" + }, + "Sonstige Ertr\u00e4ge betrieblich und regelm\u00e4\u00dfig 16 % USt": { + "account_number": "4834" + }, + "Sonstige Ertr\u00e4ge betrieblich und regelm\u00e4\u00dfig": { + "account_number": "4835" + }, + "Sonstige Ertr\u00e4ge betrieblich und regelm\u00e4\u00dfig 19 % USt": { + "account_number": "4836" + }, + "Sonstige Ertr\u00e4ge betriebsfremd und regelm\u00e4\u00dfig": { + "account_number": "4837" + }, + "Erstattete Vorsteuer anderer L\u00e4nder": { + "account_number": "4838" + }, + "Sonstige Ertr\u00e4ge unregelm\u00e4\u00dfig": { + "account_number": "4839" + }, + "Ertr\u00e4ge aus Abgang von Gegenst\u00e4nden des Anlageverm\u00f6gens": { + "account_number": "4900" + }, + "Ertr\u00e4ge aus der Ver\u00e4u\u00dferung von Anteilen an Kap.Ges. (Finanzanlageverm., inl\u00e4nd. Kap.Ges.)": { + "account_number": "4901" + }, + "Ertr\u00e4ge aus Abgang von Gegenst\u00e4nden des Umlaufverm. (au\u00dfer Vorr\u00e4te)": { + "account_number": "4905" + }, + "Ertr\u00e4ge aus Abgang von Gegenst\u00e4nden des Umlaufverm. (au\u00dfer Vorr\u00e4te, inl\u00e4nd. Kap.Ges.)": { + "account_number": "4906" + }, + "Ertr\u00e4ge aus der W\u00e4hrungsumrechnung": { + "account_number": "4840" + }, + "Sonstige Erl\u00f6se betrieblich und regelm\u00e4\u00dfig, steuerfrei \u00a7 4 Nr. 8 ff UStG": { + "account_number": "4841" + }, + "Sonstige Erl\u00f6se betrieblich und regelm\u00e4\u00dfig, steuerfrei z. B. \u00a7 4 Nr. 2-7 UStG": { + "account_number": "4842" + }, + "Ertr\u00e4ge aus Bewertung Finanzmittelfonds": { + "account_number": "4843" + }, + "Erl\u00f6se aus Verk\u00e4ufen Sachanlageverm\u00f6gen steuerfrei \u00a7 4 Nr. 1a UStG (bei Buchgewinn)": { + "account_number": "4844" + }, + "Erl\u00f6se aus Verk\u00e4ufen Sachanlageverm\u00f6gen 19 % USt (bei Buchgewinn)": { + "account_number": "4845" + }, + "Erl\u00f6se aus Verk\u00e4ufen Sachanlageverm\u00f6gen steuerfrei \u00a7 4 Nr. 1b UStG (bei Buchgewinn)": { + "account_number": "4848" + }, + "Erl\u00f6se aus Verk\u00e4ufen Sachanlageverm\u00f6gen (bei Buchgewinn)": { + "account_number": "4849" + }, + "Erl\u00f6se aus Verk\u00e4ufen immaterieller VG (bei Buchgewinn) (Gruppe)": { + "is_group": 1, + "Erl\u00f6se aus Verk\u00e4ufen immaterieller VG (bei Buchgewinn)": { + "account_number": "4850" + }, + "Erl\u00f6se aus Verk\u00e4ufen Finanzanlagen (bei Buchgewinn)": { + "account_number": "4851" + }, + "Erl\u00f6se aus Verk\u00e4ufen Finanzanlagen (inl\u00e4ndische Kap.Ges., bei Buchgewinn)": { + "account_number": "4852" + }, + "Anlagenabg\u00e4nge Sachanlagen (Restbuchwert bei Buchvergewinn)": { + "account_number": "4855" + }, + "Anlagenabg\u00e4nge immaterielle VG (Restbuchwert bei Buchgewinn)": { + "account_number": "4856" + }, + "Anlagenabg\u00e4nge Finanzanlagen (Restbuchwert bei Buchgewinn)": { + "account_number": "4857" + }, + "Anlagenabg\u00e4nge Finanzanlagen (inl\u00e4ndische Kap.Ges., Restbuchwert bei Buchgewinn)": { + "account_number": "4858" + } + }, + "Ertr\u00e4ge aus Zuschreibungen des Sachanlageverm\u00f6gens": { + "account_number": "4910", + "account_type": "Round Off" + }, + "Ertr\u00e4ge aus Zuschreibungen des immateriellen Anlageverm\u00f6gens": { + "account_number": "4911" + }, + "Ertr\u00e4ge aus Zuschreibungen des Finanzanlageverm\u00f6gens": { + "account_number": "4912" + }, + "Ertr\u00e4ge aus Zuschreibungen des Finanzanlageverm\u00f6gens (inl\u00e4ndische Kap.Ges.)": { + "account_number": "4913" + }, + "Ertr\u00e4ge aus Zuschreibungen \u00a7 3 Nr. 40 EStG/\u00a7 8b Abs. 2 KStG (inl\u00e4ndische Kap.Ges.)": { + "account_number": "4914" + }, + "Ertr\u00e4ge aus Zuschreibungen des Umlaufverm. au\u00dfer Vorr\u00e4te": { + "account_number": "4915" + }, + "Ertr\u00e4ge aus Zuschreibungen des Umlaufverm. (inl\u00e4ndische Kap.Ges.)": { + "account_number": "4916" + }, + "Ertr\u00e4ge aus Herabsetzung der Pauschalwertberichtigung auf Forderungen": { + "account_number": "4920" + }, + "Ertr\u00e4ge aus Herabsetzung der Einzelwertberichtigung auf Forderungen": { + "account_number": "4923" + }, + "Ertr\u00e4ge aus abgeschriebenen Forderungen": { + "account_number": "4925" + }, + "Ertr\u00e4ge aus der Aufl\u00f6sung einer steuerlichen R\u00fccklage nach \u00a7 6b Abs. 3 EStG": { + "account_number": "4927" + }, + "Ertr\u00e4ge aus der Aufl\u00f6sung einer steuerlichen R\u00fccklage nach \u00a7 6b Abs. 10 EStG": { + "account_number": "4928" + }, + "Ertr\u00e4ge aus der Aufl\u00f6sung der R\u00fccklage f. Ersatzbeschaffung R 6.6 EStR": { + "account_number": "4929" + }, + "Ertr\u00e4ge aus der Aufl\u00f6sung von R\u00fcckstellungen": { + "account_number": "4930" + }, + "Ertr\u00e4ge aus der Aufl\u00f6sung einer steuerlichen R\u00fccklage (Existenzgr\u00fcnderr\u00fccklage)": { + "account_number": "4934" + }, + "Ertr\u00e4ge aus der Aufl\u00f6sung einer steuerlichen R\u00fccklage": { + "account_number": "4935" + }, + "Ertr\u00e4ge aus der Aufl\u00f6sung von steuerlichen R\u00fccklagen (Ansparabschreibungen)": { + "account_number": "4936" + }, + "Ertr\u00e4ge aus der Aufl\u00f6sung steuerrechtlicher Sonderabschreibungen": { + "account_number": "4937" + }, + "Ertr\u00e4ge aus der Aufl\u00f6sung einer steuerlichen R\u00fccklage nach \u00a7 4g EStG": { + "account_number": "4938" + }, + "Ertr\u00e4ge aus der Aufl\u00f6sung von steuerlichen R\u00fccklagen nach \u00a7 52 Abs. 16 EStG": { + "account_number": "4939" + }, + "Verrechnete sonstige Sachbez\u00fcge (Gruppe)": { + "is_group": 1, + "Verrechnete sonstige Sachbez\u00fcge (keine Waren)": { + "account_number": "4940" + }, + "Sachbez\u00fcge 7 % USt (Waren)": { + "account_number": "4941" + }, + "Sachbez\u00fcge 19 % USt (Waren)": { + "account_number": "4945" + }, + "Verrechnete sonstige Sachbez\u00fcge": { + "account_number": "4946" + }, + "Verrechnete sonstige Sachbez\u00fcge aus Kfz-Gestellung 19% USt": { + "account_number": "4947" + }, + "Verrechnete sonstige Sachbez\u00fcge 19% USt": { + "account_number": "4948" + }, + "Verrechnete sonstige Sachbez\u00fcge ohne Umsatzsteuer": { + "account_number": "4949" + } + }, + "Periodenfremde Ertr\u00e4ge (soweit nicht au\u00dferordentlich)": { + "account_number": "4960" + }, + "Versicherungsentsch\u00e4digungen und Schadenersatzleistungen": { + "account_number": "4970" + }, + "Erstattungen Aufwendungsausgleichsgesetz": { + "account_number": "4972" + }, + "Investitionszusch\u00fcsse (steuerpflichtig)": { + "account_number": "4975" + }, + "Investitionszulagen (steuerfrei)": { + "account_number": "4980" + }, + "Steuerfreie Ertr\u00e4ge aus der Aufl\u00f6sung von steuerlichen R\u00fccklagen": { + "account_number": "4981" + }, + "Sonstige steuerfreie Betriebseinnahmen": { + "account_number": "4982" + }, + "Ertr\u00e4ge aus der Aktivierung unentgeltlich erworbener VG": { + "account_number": "4987" + }, + "Kostenerstattungen, R\u00fcckverg\u00fctungen und Gutschriften f. fr\u00fchere Jahre": { + "account_number": "4989" + }, + "Ertr\u00e4ge aus Verwaltungskostenumlagen": { + "account_number": "4992" + }, + "Unentgeltliche Wertabgaben": { + "account_number": "4600" + }, + "Entnahme von Gegenst\u00e4nden ohne USt": { + "account_number": "4605" + }, + "Verwendung von Gegenst\u00e4nden f. Zwecke au\u00dferhalb des Unternehmens 7 % USt (Gruppe)": { + "is_group": 1, + "Verwendung von Gegenst\u00e4nden f. Zwecke au\u00dferhalb des Unternehmens 7 % USt": { + "account_number": "4630" + }, + "Verwendung von Gegenst\u00e4nden f. Zwecke au\u00dferhalb des Unternehmens ohne USt": { + "account_number": "4637" + }, + "Verwendung von Gegenst\u00e4nden f. Zwecke au\u00dferhalb des Unternnehmens ohne USt (Telefon-Nutzung)": { + "account_number": "4638" + }, + "Verwendung von Gegenst\u00e4nden f. Zwecke au\u00dferhalb des Unternehmens ohne USt (Kfz-Nutzung)": { + "account_number": "4639" + } + }, + "Verwendung von Gegenst\u00e4nden f. Zwecke au\u00dferhalb des Unternehmens 19 % USt (Gruppe)": { + "is_group": 1, + "Verwendung von Gegenst\u00e4nden f. Zwecke au\u00dferhalb des Unternehmens 19 % USt": { + "account_number": "4640" + }, + "Verwendung von Gegenst\u00e4nden f. Zwecke au\u00dferhalb des Unternehmens 19 % USt (Kfz-Nutzung)": { + "account_number": "4645" + }, + "Verwendung von Gegenst\u00e4nden f. Zwecke au\u00dferhalb des Unternehmens 19 % USt (Telefon-Nutzung)": { + "account_number": "4646" + } + }, + "Unentgeltliche Erbringung einer sonstigen Leistung 7 % USt": { + "account_number": "4650" + }, + "Unentgeltliche Erbringung einer sonstigen Leistung ohne USt": { + "account_number": "4659" + }, + "Unentgeltliche Erbringung einer sonstigen Leistung 19 % USt": { + "account_number": "4660" + }, + "Unentgeltliche Zuwendung von Waren 7 % USt": { + "account_number": "4670" + }, + "Unentgeltliche Zuwendung von Waren ohne USt": { + "account_number": "4679" + }, + "Unentgeltliche Zuwendung von Waren 19 % USt": { + "account_number": "4680" + }, + "Unentgeltliche Zuwendung von Gegenst\u00e4nden 19 % USt": { + "account_number": "4686" + }, + "Unentgeltliche Zuwendung von Gegenst\u00e4nden ohne USt": { + "account_number": "4689" + }, + "Nicht steuerbare Ums\u00e4tze (Innenums\u00e4tze) (Gruppe)": { + "is_group": 1, + "Nicht steuerbare Ums\u00e4tze (Innenums\u00e4tze)": { + "account_number": "4690" + }, + "Umsatzsteuerverg\u00fctungen, z.B. nach \u00a7 24 UStG": { + "account_number": "4695" + } + }, + "Au\u00dferordentliche Ertr\u00e4ge (Gruppe)": { + "is_group": 1, + "Au\u00dferordentliche Ertr\u00e4ge": { + "account_number": "7400" + }, + "Au\u00dferordentliche Ertr\u00e4ge finanzwirksam": { + "account_number": "7401" + }, + "Au\u00dferordentliche Ertr\u00e4ge nicht finanzwirksam (Gruppe)": { + "is_group": 1, + "Au\u00dferordentliche Ertr\u00e4ge nicht finanzwirksam": { + "account_number": "7450" + }, + "Ertr\u00e4ge durch Verschmelzung und Umwandlung": { + "account_number": "7451" + }, + "Ertr\u00e4ge durch den Verkauf von bedeutenden Beteiligungen": { + "account_number": "7452" + }, + "Ert\u00e4ge durch den Verkauf von bedeutenden Grundst\u00fccken": { + "account_number": "7453" + }, + "Gewinn aus der Ver\u00e4u\u00dferung oder der Aufgabe von Gesch\u00e4ftsaktivit\u00e4ten nach Steuern": { + "account_number": "7454" + } + }, + "Au\u00dferordentliche Ertr\u00e4ge aus der Anwendung von \u00dcbergangsvorschriften (Gruppe)": { + "is_group": 1, + "Au\u00dferordentliche Ertr\u00e4ge aus der Anwendung von \u00dcbergangsvorschriften": { + "account_number": "7460" + }, + "Au\u00dferordentliche Ertr\u00e4ge: Zuschreibung f. Sachanlageverm\u00f6gen": { + "account_number": "7461" + }, + "Au\u00dferordentliche Ertr\u00e4ge: Zuschreibung f. Finanzanlageverm\u00f6gen": { + "account_number": "7462" + }, + "Au\u00dferordentliche Ertr\u00e4ge: Wertpapiere im Umlaufverm\u00f6gen": { + "account_number": "7463" + }, + "Au\u00dferordentliche Ertr\u00e4ge: latente Steuern": { + "account_number": "7464" + } + } + } + }, + "7 - sonstige betriebliche Aufwendungen": { + "root_type": "Expense", + "is_group": 1, + "Sonstige betriebliche Aufwendungen": { + "account_number": "6300" + }, + "Interimskonto f. Aufw. in einem anderen Land (Vorst.verg. m\u00f6glich)": { + "account_number": "6302" + }, + "Fremdleistungen/Fremdarbeiten": { + "account_number": "6303" + }, + "Sonstige Aufwendungen betrieblich und regelm\u00e4\u00dfig": { + "account_number": "6304" + }, + "Raumkosten": { + "account_number": "6305" + }, + "Miete (unbewegliche Wirtschaftsg\u00fcter)": { + "account_number": "6310" + }, + "Miete/Aufwendungen f. doppelte Haushaltsf\u00fchrung": { + "account_number": "6312" + }, + "Pacht (unbewegliche Wirtschaftsg\u00fcter)": { + "account_number": "6315" + }, + "Leasing (unbewegliche Wirtschaftsg\u00fcter)": { + "account_number": "6316" + }, + "Aufwendungen f. gemietete oder gepachtete unbewegliche Wirtschaftsg., die GewSt hinzuzurechnen sind": { + "account_number": "6317" + }, + "Miet- und Pachtnebenkosten (GewSt nicht zu ber\u00fccksichtigen)": { + "account_number": "6318" + }, + "Heizung": { + "account_number": "6320" + }, + "Gas, Strom, Wasser": { + "account_number": "6325" + }, + "Reinigung": { + "account_number": "6330" + }, + "Instandhaltung betrieblicher R\u00e4ume": { + "account_number": "6335" + }, + "Abgaben f. betrieblich genutzten Grundbesitz": { + "account_number": "6340" + }, + "Sonstige Raumkosten": { + "account_number": "6345" + }, + "Aufwendungen f. ein h\u00e4usliches Arbeitszimmer (abziehbarer Anteil)": { + "account_number": "6348" + }, + "Aufwendungen f. ein h\u00e4usliches Arbeitszimmer (nicht abziehbarer Anteil)": { + "account_number": "6349" + }, + "Grundst\u00fccksaufwendungen betrieblich": { + "account_number": "6350" + }, + "Grundst\u00fccksaufwendungen neutral": { + "account_number": "6352" + }, + "Zuwendungen, Spenden (Gruppe)": { + "is_group": 1, + "Zuwendungen, Spenden, steuerlich nicht abziehbar": { + "account_number": "6390" + }, + "Zuwendungen, Spenden f. wissenschaftliche und kulturelle Zwecke": { + "account_number": "6391" + }, + "Zuwendungen, Spenden f. mildt\u00e4tige Zwecke": { + "account_number": "6392" + }, + "Zuwendungen, Spenden f. kirchliche, religi\u00f6se und gemeinn\u00fctzige Zwecke": { + "account_number": "6393" + }, + "Zuwendungen, Spenden an politische Parteien": { + "account_number": "6394" + }, + "Zuwendungen, Spenden an Stiftungen f. gemeinn\u00fctzige Zwecke i. S. d. \u00a7 52 Abs. 2 Nr. 1-3 AO": { + "account_number": "6395" + }, + "Zuwendungen, Spenden an Stiftungen f. gemeinn\u00fctzige Zwecke i. S. d. \u00a7 52 Abs. 2 Nr. 4 AO": { + "account_number": "6396" + }, + "Zuwendungen, Spenden an Stiftungen f. kirchliche, religi\u00f6se und gemeinn\u00fctzige Zwecke": { + "account_number": "6397" + }, + "Zuwendungen, Spenden an Stiftungen f.wissenschaftliche, mildt\u00e4tige und kulturelle Zwecke": { + "account_number": "6398" + } + }, + "Versicherungen (Gruppe)": { + "is_group": 1, + "Versicherungen": { + "account_number": "6400" + }, + "Versicherungen f. Geb\u00e4ude, die zum Betriebsverm\u00f6gen geh\u00f6ren": { + "account_number": "6405" + }, + "Netto-Pr\u00e4mie f. R\u00fcckdeckung k\u00fcnftiger Versorgungsleistungen": { + "account_number": "6410" + }, + "Beitr\u00e4ge": { + "account_number": "6420" + }, + "Sonstige Abgaben": { + "account_number": "6430" + }, + "Steuerlich abzugsf\u00e4hige Versp\u00e4tungszuschl\u00e4ge und Zwangsgelder": { + "account_number": "6436" + }, + "Steuerlich nicht abzugsf\u00e4hige Versp\u00e4tungszuschl\u00e4ge und Zwangsgelder": { + "account_number": "6437" + }, + "Ausgleichsabgabe i. S. d. Schwerbehindertengesetzes": { + "account_number": "6440" + }, + "Reparaturen und Instandhaltung von Bauten": { + "account_number": "6450" + }, + "Reparaturen und Instandhaltung von technischenAnlagen und Maschinen": { + "account_number": "6460" + }, + "Reparaturen und Instandhaltung von anderen Anlagen und Betriebs- und Gesch\u00e4ftsausstattung": { + "account_number": "6470" + }, + "Zuf\u00fchrung zu Aufwandsr\u00fcckstellungen": { + "account_number": "6475" + }, + "Reparaturen und Instandhaltung von anderen Anlagen": { + "account_number": "6485" + }, + "Sonstige Reparaturen und Instandhaltungen": { + "account_number": "6490" + }, + "Wartungskosten f. Hard- und Software": { + "account_number": "6495" + }, + "Mietleasing (bewegliche Wirtschaftsg\u00fcter)": { + "account_number": "6498" + } + }, + "Fahrzeugkosten (Gruppe)": { + "is_group": 1, + "Fahrzeugkosten": { + "account_number": "6500" + }, + "Kfz-Versicherungen (Gruppe)": { + "is_group": 1, + "Kfz-Versicherungen": { + "account_number": "6520" + } + }, + "Laufende Kfz-Betriebskosten (Gruppe)": { + "is_group": 1, + "Laufende Kfz-Betriebskosten": { + "account_number": "6530" + } + }, + "Kfz-Reparaturen (Gruppe)": { + "is_group": 1, + "Kfz-Reparaturen": { + "account_number": "6540" + } + }, + "Garagenmiete (Gruppe)": { + "is_group": 1, + "Garagenmiete": { + "account_number": "6550" + } + }, + "Mietleasing Kfz (Gruppe)": { + "is_group": 1, + "Mietleasing Kfz": { + "account_number": "6560" + } + }, + "Sonstige Kfz-Kosten (Gruppe)": { + "is_group": 1, + "Sonstige Kfz-Kosten": { + "account_number": "6570" + } + }, + "Mautgeb\u00fchren (Gruppe)": { + "is_group": 1, + "Mautgeb\u00fchren": { + "account_number": "6580" + } + }, + "Kfz-Kosten f. betrieblich genutzte zum Privatverm\u00f6gen geh\u00f6rende Kraftfahrzeuge": { + "account_number": "6590" + }, + "Fremdfahrzeugkosten": { + "account_number": "6595" + } + }, + "Werbekosten (Gruppe)": { + "is_group": 1, + "Werbekosten": { + "account_number": "6600" + }, + "Streuartikel": { + "account_number": "6605" + }, + "Geschenke abzugsf\u00e4hig ohne \u00a7 37b EStG": { + "account_number": "6610" + }, + "Geschenke abzugsf\u00e4hig mit \u00a7 37b EStG": { + "account_number": "6611" + }, + "Pauschale Steuern f. Geschenke und Zugaben abzugsf\u00e4hig": { + "account_number": "6612" + }, + "Geschenke nicht abzugsf\u00e4hig ohne \u00a7 37b EStG": { + "account_number": "6620" + }, + "Geschenke nicht abzugsf\u00e4hig mit \u00a7 37b EStG": { + "account_number": "6621" + }, + "Pauschale Steuern f. Geschenke und Zuwendungen nicht abzugsf\u00e4hig": { + "account_number": "6622" + }, + "Geschenke ausschlie\u00dflich betrieblich genutzt": { + "account_number": "6625" + }, + "Zugaben mit \u00a7 37b EStG": { + "account_number": "6629" + }, + "Repr\u00e4sentationskosten": { + "account_number": "6630" + }, + "Bewirtungskosten": { + "account_number": "6640" + }, + "Sonstige eingeschr\u00e4nkt abziehbare Betriebsausgaben (abziehbarer Anteil)": { + "account_number": "6641" + }, + "Sonstige eingeschr\u00e4nkt abziehbare Betriebsausgaben (nicht abziehbarer Anteil)": { + "account_number": "6642" + }, + "Aufmerksamkeiten": { + "account_number": "6643" + }, + "Nicht abzugsf\u00e4hige Bewirtungskosten": { + "account_number": "6644" + }, + "Nicht abzugsf\u00e4hige Betriebsausgaben aus Werbe- und Repr\u00e4sentationskosten": { + "account_number": "6645" + }, + "Reisekosten Arbeitnehmer": { + "account_number": "6650" + }, + "Reisekosten Arbeitnehmer \u00dcbernachtungsaufwand": { + "account_number": "6660" + }, + "Reisekosten Arbeitnehmer Fahrtkosten": { + "account_number": "6663" + }, + "Reisekosten Arbeitnehmer Verpflegungsmehraufwand": { + "account_number": "6664" + }, + "Kilometergelderstattung Arbeitnehmer": { + "account_number": "6668" + }, + "Reisekosten Unternehmer (Gruppe)": { + "is_group": 1, + "Reisekosten Unternehmer": { + "account_number": "6670" + }, + "Reisekosten Unternehmer (nicht abziehbarer Anteil)": { + "account_number": "6672" + }, + "Reisekosten Unternehmer Fahrtkosten": { + "account_number": "6673" + }, + "Reisekosten Unternehmer Verpflegungsmehraufwand": { + "account_number": "6674" + }, + "Reisekosten Unternehmer \u00dcbernachtungsaufwand": { + "account_number": "6680" + } + }, + "Fahrten zwischen Wohnung und Betriebsst\u00e4tte und Familienheimfahrten (abziehbarer Anteil)": { + "account_number": "6688" + }, + "Fahrten zwischen Wohnung und Betriebsst\u00e4tte und Familienheimfahrten (nicht abziehbarer Anteil)": { + "account_number": "6689" + }, + "Fahrten zwischen Wohnung und Betriebsst\u00e4tte und Familienheimfahrten (Haben)": { + "account_number": "6690" + }, + "Verpflegungsmehraufwendungen i. R. d. doppelten Haushaltsf\u00fchrung (abziehbarer Anteil)": { + "account_number": "6691" + } + }, + "Kosten Warenabgabe (Gruppe)": { + "is_group": 1, + "Kosten Warenabgabe": { + "account_number": "6700" + }, + "Verpackungsmaterial": { + "account_number": "6710" + }, + "Ausgangsfrachten": { + "account_number": "6740" + }, + "Transportversicherungen": { + "account_number": "6760" + }, + "Verkaufsprovisionen": { + "account_number": "6770" + }, + "Fremdarbeiten (Vertrieb)": { + "account_number": "6780" + }, + "Aufwand f. Gew\u00e4hrleistungen": { + "account_number": "6790" + } + }, + "Porto": { + "account_number": "6800" + }, + "Telefon": { + "account_number": "6805" + }, + "Telefax und Internetkosten": { + "account_number": "6810" + }, + "B\u00fcrobedarf": { + "account_number": "6815" + }, + "Zeitschriften, B\u00fccher": { + "account_number": "6820" + }, + "Fortbildungskosten": { + "account_number": "6821" + }, + "Freiwillige Sozialleistungen": { + "account_number": "6822" + }, + "Rechts- und Beratungskosten": { + "account_number": "6825" + }, + "Abschluss- und Pr\u00fcfungskosten": { + "account_number": "6827" + }, + "Buchf\u00fchrungskosten": { + "account_number": "6830" + }, + "Mieten f. Einrichtungen (bewegliche Wirtschaftsg\u00fcter)": { + "account_number": "6835" + }, + "Pacht (bewegliche Wirtschaftsg\u00fcter)": { + "account_number": "6836" + }, + "Aufwendungen f. die zeitlich befristete \u00dcberlassung von Rechten (Lizenzen, Konzessionen)": { + "account_number": "6837" + }, + "Aufwendungen f. gemietete oder gepachtete bewegliche Wirtschaftsg., die gewerbest. hinzuzurechnen sind": { + "account_number": "6838" + }, + "Werkzeuge und Kleinger\u00e4te": { + "account_number": "6845" + }, + "Betriebsbedarf": { + "account_number": "6850" + }, + "Nebenkosten des Geldverkehrs": { + "account_number": "6855" + }, + "Aufwendungen aus Anteilen an inl\u00e4ndischen Kap.Ges.": { + "account_number": "6856" + }, + "Ver\u00e4u\u00dferungskosten \u00a7 3 Nr. 40 EStG/\u00a7 8b Abs. 2 KStG (inl. Kap.Ges.)": { + "account_number": "6857" + }, + "Aufwendungen f. Abraum- und Abfallbeseitigung": { + "account_number": "6859" + }, + "Nicht abziehbare Vorsteuer 19 %": { + "account_number": "6871" + }, + "Aufwendungen aus der W\u00e4hrungsumrechnung": { + "account_number": "6880" + }, + "Aufwendungen aus Bewertung Finanzmittelfonds": { + "account_number": "6883" + }, + "Erl\u00f6se aus Verk\u00e4ufen Sachanlageverm\u00f6gen steuerfrei \u00a7 4 Nr. 1a UStG (bei Buchverlust)": { + "account_number": "6884" + }, + "Erl\u00f6se aus Verk\u00e4ufen Sachanlageverm\u00f6gen 19 % USt (bei Buchverlust)": { + "account_number": "6885" + }, + "Erl\u00f6se aus Verk\u00e4ufen Sachanlageverm\u00f6gen steuerfrei \u00a7 4 Nr. 1b UStG (bei Buchverlust)": { + "account_number": "6888" + }, + "Erl\u00f6se aus Verk\u00e4ufen Sachanlageverm\u00f6gen (bei Buchverlust)": { + "account_number": "6889" + }, + "Erl\u00f6se aus Verk\u00e4ufen immaterieller VG (bei Buchverlust)": { + "account_number": "6890" + }, + "Erl\u00f6se aus Verk\u00e4ufen Finanzanlagen (bei Buchverlust)": { + "account_number": "6891" + }, + "Erl\u00f6se aus Verk\u00e4ufen Finanzanlagen (inl. Kap.Ges., bei Buchverlust)": { + "account_number": "6892" + }, + "Anlagenabg\u00e4nge Sachanlagen (Restbuchwert bei Buchverlust)": { + "account_number": "6895" + }, + "Anlagenabg\u00e4nge immaterielle VG (Restbuchwert bei Buchverlust)": { + "account_number": "6896" + }, + "Anlagenabg\u00e4nge Finanzanlagen (Restbuchwert bei Buchverlust)": { + "account_number": "6897" + }, + "Anlagenabg\u00e4nge Finanzanlagen (inl. Kap.Ges., Restbuchwert bei Buchverlust)": { + "account_number": "6898" + }, + "Verluste aus dem Abgang von Gegenst\u00e4nden des Anlageverm\u00f6gens": { + "account_number": "6900" + }, + "Verluste aus der Ver\u00e4u\u00dferung von Anteilen an Kap.Ges. (Finanzanlageverm\u00f6gen, inl. Kap.Ges.)": { + "account_number": "6903" + }, + "Verluste aus dem Abgang von Ggenst\u00e4nden des Umlaufverm. (au\u00dfer Vorr\u00e4te)": { + "account_number": "6905" + }, + "Verluste aus dem Abgang von Gegenst\u00e4nden des Umlaufverm. (au\u00dfer Vorr\u00e4te, inl. Kap.Ges.)": { + "account_number": "6906" + }, + "Abschreibungen auf Umlaufverm\u00f6gen au\u00dfer Vorr\u00e4te und Wertpapiere (\u00fcbliche H\u00f6he)": { + "account_number": "6910", + "account_type": "Round Off" + }, + "Abschreibungen auf Umlaufverm\u00f6gen, steuerrechtlich bedingt (\u00fcbliche H\u00f6he)": { + "account_number": "6912" + }, + "Einstellung in die Pauschalwertberichtigung auf Forderungen": { + "account_number": "6920" + }, + "Einstellungen in die steuerliche R\u00fccklage nach \u00a7 6b Abs. 3 EStG": { + "account_number": "6922" + }, + "Einstellung in die Einzelwertberichtigung auf Forderungen": { + "account_number": "6923" + }, + "Einstellungen in die steuerliche R\u00fccklage nach \u00a7 6b Abs. 10 EStG": { + "account_number": "6924" + }, + "Einstellungen in steuerliche R\u00fccklagen": { + "account_number": "6927" + }, + "Einstellungen in die R\u00fccklage f. Ersatzbeschaffung nach R 6.6 EStR": { + "account_number": "6928" + }, + "Einstellungen in die steuerliche R\u00fccklage nach \u00a7 4g EStG": { + "account_number": "6929" + }, + "Forderungsverluste (\u00fcbliche H\u00f6he) (Gruppe)": { + "is_group": 1, + "Forderungsverluste (\u00fcbliche H\u00f6he)": { + "account_number": "6930" + }, + "Forderungsverluste 7 % USt (\u00fcbliche H\u00f6he)": { + "account_number": "6931" + }, + "Forderungsverluste aus steuerfreien EU-Lieferungen (\u00fcbliche H\u00f6he)": { + "account_number": "6932" + }, + "Forderungsverluste aus im Inland steuerpfl. EU-Lieferungen 7 % USt (\u00fcbliche H\u00f6he)": { + "account_number": "6933" + }, + "Forderungsverluste aus im Inland steuerpfl. EU-Lieferungen 16 % USt (\u00fcbliche H\u00f6he)": { + "account_number": "6934" + }, + "Forderungsverluste 16% USt (\u00fcbliche H\u00f6he)": { + "account_number": "6935" + }, + "Forderungsverluste 19 % USt (\u00fcbliche H\u00f6he)": { + "account_number": "6936" + }, + "Forderungsverluste 15% USt (\u00fcbliche H\u00f6he)": { + "account_number": "6937" + }, + "Forderungsverluste aus im Inland steuerpfl. EU-Lieferungen 19 % USt (\u00fcbliche H\u00f6he)": { + "account_number": "6938" + }, + "Forderungsverluste aus im Inland steuerpfl. EU-Lieferungen 15% USt (\u00fcbliche H\u00f6he)": { + "account_number": "6939" + } + }, + "Periodenfremde Aufwendungen (soweit nicht au\u00dferordentlich)": { + "account_number": "6960" + }, + "Sonstige Aufwendungen betriebsfremd und regelm\u00e4\u00dfig": { + "account_number": "6967" + }, + "Sonstige Aufwendungen unregelm\u00e4\u00dfig": { + "account_number": "6969" + }, + "Au\u00dferordentliche Aufwendungen (Gruppe)": { + "is_group": 1, + "Au\u00dferordentliche Aufwendungen": { + "account_number": "7500" + }, + "Au\u00dferordentliche Aufwendungen finanzwirksam": { + "account_number": "7501" + }, + "Au\u00dferordentliche Aufwendungen nicht finanzwirksam": { + "account_number": "7550" + }, + "Verluste durch Verschmelzung und Umwandlung": { + "account_number": "7551" + }, + "Verluste durch au\u00dfergew\u00f6hnliche Schadensf\u00e4lle": { + "account_number": "7552" + }, + "Aufwendungen f. Restrukturierungs- und Sanierungsma\u00dfnahmen": { + "account_number": "7553" + }, + "Verluste aus Gesch\u00e4ftsaufgabe oder -ver\u00e4u\u00dferung nach Steuern": { + "account_number": "7554" + }, + "Au\u00dferordentliche Aufwendungen aus der Anwendung von \u00dcbergangsvorschriften (Gruppe)": { + "is_group": 1, + "Au\u00dferordentliche Aufwendungen aus der Anwendung von \u00dcbergangsvorschriften": { + "account_number": "7560" + }, + "Au\u00dferordentliche Aufwendungen aus der Anwendung von \u00dcbergangsvorschriften (Pensionsr\u00fcckst.)": { + "account_number": "7561" + }, + "Au\u00dferordentliche Aufwendungen aus der Anwendung von \u00dcbergangsvorschriften (Bilanzierungshilfen)": { + "account_number": "7562" + }, + "Au\u00dferordentliche Aufwendungen aus der Anwendung von \u00dcbergangsvorschriften (Latente Steuern)": { + "account_number": "7563" + } + } + } + }, + "8 - Ertr\u00e4ge aus Beteiligungen": { + "root_type": "Income", + "is_group": 1, + "Ertr\u00e4ge aus Beteiligungen": { + "account_number": "7000", + "account_type": "Income Account" + }, + "Ertr\u00e4ge aus Beteiligungen an Personengesellschaften (verb. Unternehmen), \u00a7 9 GewStG": { + "account_number": "7004" + }, + "Ertr\u00e4ge aus Anteilen an Kap.Ges. (inl\u00e4ndische Beteiligung)": { + "account_number": "7005" + }, + "Ertr\u00e4ge aus Anteilen an Kap.Ges. (inl\u00e4ndische verb. Unternehmen)": { + "account_number": "7006" + }, + "Sonstige GewSt-freie Gewinne aus Anteilen an einer Kap.Ges. (K\u00fcrzung gem. \u00a7 9 Nr. 2a GewStG)": { + "account_number": "7007" + }, + "Gewinnanteile aus Mitunternehmerschaften \u00a7 9 GewStG": { + "account_number": "7008" + }, + "Ertr\u00e4ge aus Beteiligungen an verbundenen Unternehmen": { + "account_number": "7009" + }, + "Zins- und Dividendenertr\u00e4ge": { + "account_number": "7020" + }, + "Erhaltene Ausgleichszahlungen (als au\u00dfenstehender Aktion\u00e4r)": { + "account_number": "7030" + } + }, + "9 - Ertr\u00e4ge aus anderen Wertpapieren und Ausleihungen des Finanzanlageverm\u00f6gens": { + "root_type": "Income", + "is_group": 1, + "Ertr\u00e4ge aus anderen Wertpapieren und Ausleihungen des Finanzanlageverm\u00f6gens": { + "account_number": "7010", + "account_type": "Income Account" + }, + "Ertr\u00e4ge aus Ausleihungen des Finanzanlageverm\u00f6gens": { + "account_number": "7011" + }, + "Ertr\u00e4ge aus Ausleihungen des Finanzanlageverm\u00f6gens an verbundenen Unternehmen": { + "account_number": "7012" + }, + "Ertr\u00e4ge aus Anteilen an Personengesellschaften (Finanzanlageverm\u00f6gen)": { + "account_number": "7013" + }, + "Ertr\u00e4ge aus Anteilen an Kap.Ges. (Finanzanlageverm\u00f6gen, inl\u00e4ndische Kap.Ges.)": { + "account_number": "7014" + }, + "Ertr\u00e4ge aus Anteilen an Personengesellschaften (verb. Unternehmen)": { + "account_number": "7016" + }, + "Ertr\u00e4ge aus anderen Wertpapieren des Finanzanlageverm. an Kap.Ges. (verb. Unternehmen)": { + "account_number": "7017" + }, + "Ertr\u00e4ge aus anderen Wertpapieren des Finanzanlageverm. an Pers.Ges. (verb. Unternehmen)": { + "account_number": "7018" + }, + "Ertr\u00e4ge aus anderen Wertpapieren und Ausleihungen des Finanzanlageverm. aus verbundenen Unternehmen": { + "account_number": "7019" + } + }, + "10 - sonstige Zinsen und \u00e4hnliche Ertr\u00e4ge": { + "root_type": "Income", + "is_group": 1, + "davon aus verbundenen Unternehmen": { + "is_group": 1, + "Diskontertr\u00e4ge aus verbundenen Unternehmen": { + "account_number": "7139" + }, + "Sonstige Zinsen und \u00e4hnliche Ertr\u00e4ge aus verbundenen Unternehmen": { + "account_number": "7109" + }, + "Sonstige Zinsertr\u00e4ge aus verbundenen Unternehmen": { + "account_number": "7119", + "account_type": "Income Account" + }, + "Zins\u00e4hnliche Ertr\u00e4ge aus verbundenen Unternehmen": { + "account_number": "7129" + } + }, + "Sonstige Zinsen und \u00e4hnliche Ertr\u00e4ge": { + "account_number": "7100", + "account_type": "Income Account" + }, + "Ertr\u00e4ge aus Anteilen an Kap.Ges. (Umlaufverm\u00f6gen, inl\u00e4ndische Kap.Ges.)": { + "account_number": "7103" + }, + "Zinsertr\u00e4ge \u00a7 233a AO steuerpflichtig": { + "account_number": "7105" + }, + "Zinsertr\u00e4ge \u00a7 233a AO, \u00a7 4 Abs. 5b EStG, steuerfrei": { + "account_number": "7107" + }, + "Sonstige Zinsertr\u00e4ge": { + "account_number": "7110" + }, + "Ertr\u00e4ge aus anderen Wertpapieren und Ausleihungen des Umlaufverm.": { + "account_number": "7115" + }, + "Zins\u00e4hnliche Ertr\u00e4ge": { + "account_number": "7120" + }, + "Diskontertr\u00e4ge": { + "account_number": "7130" + }, + "Zinsertr\u00e4ge aus der Abzinsung von Verb.": { + "account_number": "7141" + }, + "Zinsertr\u00e4ge aus der Abzinsung von R\u00fcckstellungen": { + "account_number": "7142" + }, + "Zinsertr\u00e4ge aus der Abzinsung von Pensionsr\u00fcckst. und \u00e4hnl./vergleichb. Verplicht.": { + "account_number": "7143" + }, + "Zinsertr\u00e4ge aus der Abzinsung von Pensionsr\u00fcckst. und \u00e4hnl. Verplicht. zur Verrechnung": { + "account_number": "7144" + }, + "Erhaltene Gewinne auf Grund einer Gewinngemeinschaft": { + "account_number": "7192" + }, + "Erhaltene Gewinne auf Grund einer Gewinn- oder Teilgewinnabf\u00fchrungsvertrags": { + "account_number": "7194" + } + }, + "11 - Abschreibungen auf Finanzanlagen und auf Wertpapiere des Umlaufverm.": { + "root_type": "Expense", + "is_group": 1, + "Abschreibungen auf Finanzanlagen (dauerhaft)": { + "account_number": "7200", + "account_type": "Depreciation" + }, + "Abschreibungen auf Finanzanlagen (nicht dauerhaft)": { + "account_number": "7201" + }, + "Abschreibungen auf Finanzanlagen \u00a7 3 Nr. 40 EStG / \u00a7 8b Abs. 3 KStG (inl. Kap.Ges., dauerh.)": { + "account_number": "7204" + }, + "Abschreibungen auf Finanzanlagen - verb. Unternehmen": { + "account_number": "7207" + }, + "Aufwendungen auf Grund von Verlustanteilen an Mitunternehmerschaften \u00a7 8 GewStG": { + "account_number": "7208" + }, + "Abschreibungen auf Wertpapiere des Umlaufverm. (Gruppe)": { + "is_group": 1, + "Abschreibungen auf Wertpapiere des Umlaufverm.": { + "account_number": "7210" + }, + "Abschreibungen auf Wertpapiere des Umlaufverm. \u00a73Nr.40EStG/\u00a78bAbs.3KStG (inl. Kap.Ges.)": { + "account_number": "7214" + }, + "Abschreibungen auf Wertpapiere des Umlaufverm. - verb. Unternehmen": { + "account_number": "7217" + } + }, + "Abschreibungen auf Finanzanlagen auf Grund \u00a7 6b EStG-R\u00fccklage": { + "account_number": "7250" + }, + "Abschreibungen auf Finanzanlagen auf Grund \u00a7 3Nr.40EStG/\u00a78bAbs.3KStG (inl. Kap.Ges.)": { + "account_number": "7255" + } + }, + "12- Zinsen und \u00e4hnliche Aufwendungen": { + "root_type": "Expense", + "is_group": 1, + "davon an verb. Unternehmen": { + "is_group": 1, + "Zinsen und \u00e4hnliche Aufwendungen an verb. Unternehmen (inl. Kap.Ges.)": { + "account_number": "7351" + }, + "Zinsen und \u00e4hnliche Aufwendungen an verb. Unternehmen": { + "account_number": "7309" + }, + "Zinsaufwendungen f. kurzfistige Verb. an verb. Unternehmen": { + "account_number": "7319" + }, + "Zinsaufwendungen f. langfristigeVerb. an verb. Unternehmen": { + "account_number": "7329" + }, + "Diskontaufwendungen an verb. Unternehmen": { + "account_number": "7349" + } + }, + "Zinsen und \u00e4hnliche Aufwendungen": { + "account_number": "7300" + }, + "Steuerlich nicht abzugsf\u00e4hige andere Nebenleistungen zu Steuern \u00a7 4 Abs. 5b EStG": { + "account_number": "7302" + }, + "Steuerlich abzugsf\u00e4hige, andere Nebenleistungen zu Steuern": { + "account_number": "7303" + }, + "Steuerlich nicht abzugsf\u00e4hige, andere Nebenleistungen zu Steuern": { + "account_number": "7304" + }, + "Zinsaufwendungen \u00a7 233a AO betriebliche Steuern": { + "account_number": "7305" + }, + "Zinsaufwendungen \u00a7\u00a7 233a bis 237 AO Personensteuern": { + "account_number": "7306" + }, + "Zinsaufwendungen \u00a7 233a AO, \u00a7 4 Abs. 5b EStG": { + "account_number": "7308" + }, + "Zinsaufwendungen f. kurzfristige Verb.": { + "account_number": "7310" + }, + "Nicht abzugsf\u00e4hige Schuldzinsen gem\u00e4\u00df \u00a7 4 Abs. 4a EStG (Hinzurechnungsbetrag)": { + "account_number": "7313" + }, + "Zinsen auf Kontokorrentkonten": { + "account_number": "7318" + }, + "Zinsaufwendungen f. langfristige Verb.": { + "account_number": "7320" + }, + "Abschreibungen auf Disagio/Damnum zur Finanzierung": { + "account_number": "7323" + }, + "Abschreibungen auf Disagio/Damnum zur Finanzierung des Anlageverm\u00f6gens": { + "account_number": "7324" + }, + "Zinsaufwendungen f. Geb\u00e4ude, die zum Betriebsverm\u00f6gen geh\u00f6ren": { + "account_number": "7325" + }, + "Zinsen zur Finanzierung des Anlageverm\u00f6gens": { + "account_number": "7326" + }, + "Renten und dauernde Lasten": { + "account_number": "7327" + }, + "Zins\u00e4hnliche Aufwendungen": { + "account_number": "7330" + }, + "Diskontaufwendungen": { + "account_number": "7340" + }, + "Zinsen und \u00e4hnl. Aufwendungen \u00a7\u00a73Nr.40,3cEStG/\u00a78bAbs.1KStG (inl. Kap.Ges.)": { + "account_number": "7350" + }, + "Kreditprovisionen und Verwaltungskostenbeitr\u00e4ge": { + "account_number": "7355" + }, + "Zinsanteil der Zuf\u00fchrungen zu Pensionsr\u00fcckst.": { + "account_number": "7360" + }, + "Zinsaufwendungen aus der Abzinsung von Verb.": { + "account_number": "7361" + }, + "Zinsaufwendungen aus der Abzinsung von R\u00fcckstellungen": { + "account_number": "7362" + }, + "Zinsaufwendungen aus der Abzinsung von Pensionsr\u00fcckst. und \u00e4hnl. Verplicht.": { + "account_number": "7363" + }, + "Zinsaufwendungen aus der Abzinsung von Pensionsr\u00fcckst. und \u00e4hnl. Verplicht. zur Verrechnung": { + "account_number": "7364" + }, + "Aufwendungen aus Verlust\u00fcbernahme": { + "account_number": "7390" + } + }, + "13 - Steuern vom Einkommen und vom Ertrag": { + "root_type": "Expense", + "is_group": 1, + "K\u00f6rperschaftsteuer": { + "account_number": "7600", + "account_type": "Tax" + }, + "Gewerbesteuer": { + "account_number": "7610", + "account_type": "Tax" + }, + "Kapitalertragsteuer 25 %": { + "account_number": "7630" + }, + "Anrechenbarer Solidarit\u00e4tszuschlag auf Kapitalertragsteuer 25 %": { + "account_number": "7633" + }, + "Anzurechnende ausl\u00e4ndische Quellensteuer": { + "account_number": "7639" + }, + "Gewerbesteuernachzahlungen Vorjahre": { + "account_number": "7640" + }, + "Gewerbesteuernachzahlungen und Gewerbesteuererstattungen f. Vorjahre, \u00a7 4 Abs. 5b EStG": { + "account_number": "7641" + }, + "Gewerbesteuererstattungen Vorjahre": { + "account_number": "7642" + }, + "Ertr\u00e4ge aus der Aufl\u00f6sung von Gewerbesteuerr\u00fcckstellungen, \u00a7 4 Abs. 5b EStG": { + "account_number": "7643" + }, + "Ertr\u00e4ge aus der Aufl\u00f6sung von Gewerbesteuerr\u00fcckstellungen": { + "account_number": "7644" + }, + "Aufwendungen aus der Zuf\u00fchrung und Aufl\u00f6sung von latenten Steuern": { + "account_number": "7645" + }, + "Ertr\u00e4ge aus der Zuf\u00fchrung und Aufl\u00f6sung von latenten Steuern": { + "account_number": "7649" + } + }, + "15 - sonstige Steuern": { + "root_type": "Expense", + "is_group": 1, + "Verbrauchsteuer": { + "account_number": "7675" + }, + "\u00d6kosteuer": { + "account_number": "7678" + }, + "Grundsteuer": { + "account_number": "7680" + }, + "Kfz-Steuer": { + "account_number": "7685" + }, + "Steuernachzahlungen Vorjahre f. sonstige Steuern": { + "account_number": "7690" + }, + "Steuererstattungen Vorjahre f. sonstige Steuern": { + "account_number": "7692" + }, + "Ertr\u00e4ge aus der Aufl\u00f6sung von R\u00fcckstellungen f. sonstige Steuern": { + "account_number": "7694" + } + }, + "Debitoren": { + "root_type": "Asset", + "is_group": 1 + }, + "Kreditoren": { + "root_type": "Liability", + "is_group": 1, + "Wareneingangs-­Verrechnungskonto" : { + "account_number": "70001", + "account_type": "Stock Received But Not Billed" + } + } + } +} diff --git a/erpnext/accounts/doctype/account/chart_of_accounts/verified/id_chart_of_accounts.json b/erpnext/accounts/doctype/account/chart_of_accounts/verified/id_chart_of_accounts.json index 37f57ec1ad..d1a0defba9 100644 --- a/erpnext/accounts/doctype/account/chart_of_accounts/verified/id_chart_of_accounts.json +++ b/erpnext/accounts/doctype/account/chart_of_accounts/verified/id_chart_of_accounts.json @@ -38,24 +38,24 @@ "Kas": { "Kas Mata Uang Lain": { "Kas USD": { - "account_number": "1112.0010", + "account_number": "1112.001", "account_type": "Cash" }, "account_number": "1112.000" }, "Kas Rupiah": { "Kas Besar": { - "account_number": "1111.0020", + "account_number": "1111.002", "account_type": "Cash" }, "Kas Kecil": { - "account_number": "1111.0010", + "account_number": "1111.001", "account_type": "Cash" }, "account_number": "1111.000", "account_type": "Cash" }, - "account_number": "1110.0000" + "account_number": "1110.000" }, "Pendapatan Yang Akan di Terima": { "Pendapatan Yang di Terima": { @@ -98,7 +98,7 @@ }, "account_number": "1130.000" }, - "account_number": "1100.0000" + "account_number": "1100.000" }, "Aktiva Tetap": { "Aktiva": { @@ -121,20 +121,20 @@ "Investasi": { "Investasi": { "Deposito": { - "account_number": "1231.003", + "account_number": "1231.300", "is_group": 1 }, - "Investai Saham": { + "Investasi Saham": { "Investasi Saham": { - "account_number": "1231.0011" + "account_number": "1231.101" }, - "account_number": "1231.001" + "account_number": "1231.100" }, "Investasi Perumahan": { "Investasi Perumahan": { - "account_number": "1231.0021" + "account_number": "1231.201" }, - "account_number": "1231.002" + "account_number": "1231.200" }, "account_number": "1231.000" }, @@ -142,7 +142,7 @@ }, "account_number": "1200.000" }, - "account_number": "1000.0000", + "account_number": "1000.000", "root_type": "Asset" }, "Beban": { @@ -684,4 +684,4 @@ "root_type": "Income" } } -} \ No newline at end of file +} diff --git a/erpnext/accounts/doctype/account_subtype/__init__.py b/erpnext/accounts/doctype/account_subtype/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/erpnext/accounts/doctype/account_subtype/account_subtype.js b/erpnext/accounts/doctype/account_subtype/account_subtype.js new file mode 100644 index 0000000000..30144adeea --- /dev/null +++ b/erpnext/accounts/doctype/account_subtype/account_subtype.js @@ -0,0 +1,8 @@ +// Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors +// For license information, please see license.txt + +frappe.ui.form.on('Account Subtype', { + refresh: function() { + + } +}); diff --git a/erpnext/accounts/doctype/account_subtype/account_subtype.json b/erpnext/accounts/doctype/account_subtype/account_subtype.json new file mode 100644 index 0000000000..6b1f2a2526 --- /dev/null +++ b/erpnext/accounts/doctype/account_subtype/account_subtype.json @@ -0,0 +1,134 @@ +{ + "allow_copy": 0, + "allow_events_in_timeline": 0, + "allow_guest_to_view": 0, + "allow_import": 1, + "allow_rename": 1, + "autoname": "field:account_subtype", + "beta": 0, + "creation": "2018-10-25 15:46:08.054586", + "custom": 0, + "docstatus": 0, + "doctype": "DocType", + "document_type": "", + "editable_grid": 1, + "engine": "InnoDB", + "fields": [ + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "account_subtype", + "fieldtype": "Data", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Account Subtype", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 1 + } + ], + "has_web_view": 0, + "hide_heading": 0, + "hide_toolbar": 0, + "idx": 0, + "image_view": 0, + "in_create": 0, + "is_submittable": 0, + "issingle": 0, + "istable": 0, + "max_attachments": 0, + "modified": "2018-10-25 15:47:03.841390", + "modified_by": "Administrator", + "module": "Accounts", + "name": "Account Subtype", + "name_case": "", + "owner": "Administrator", + "permissions": [ + { + "amend": 0, + "cancel": 0, + "create": 1, + "delete": 1, + "email": 1, + "export": 1, + "if_owner": 0, + "import": 0, + "permlevel": 0, + "print": 1, + "read": 1, + "report": 1, + "role": "System Manager", + "set_user_permissions": 0, + "share": 1, + "submit": 0, + "write": 1 + }, + { + "amend": 0, + "cancel": 0, + "create": 1, + "delete": 1, + "email": 1, + "export": 1, + "if_owner": 0, + "import": 0, + "permlevel": 0, + "print": 1, + "read": 1, + "report": 1, + "role": "Accounts Manager", + "set_user_permissions": 0, + "share": 1, + "submit": 0, + "write": 1 + }, + { + "amend": 0, + "cancel": 0, + "create": 1, + "delete": 1, + "email": 1, + "export": 1, + "if_owner": 0, + "import": 0, + "permlevel": 0, + "print": 1, + "read": 1, + "report": 1, + "role": "Accounts User", + "set_user_permissions": 0, + "share": 1, + "submit": 0, + "write": 1 + } + ], + "quick_entry": 1, + "read_only": 0, + "read_only_onload": 0, + "show_name_in_global_search": 0, + "sort_field": "modified", + "sort_order": "DESC", + "track_changes": 0, + "track_seen": 0, + "track_views": 0 +} \ No newline at end of file diff --git a/erpnext/accounts/doctype/account_subtype/account_subtype.py b/erpnext/accounts/doctype/account_subtype/account_subtype.py new file mode 100644 index 0000000000..46c45cc733 --- /dev/null +++ b/erpnext/accounts/doctype/account_subtype/account_subtype.py @@ -0,0 +1,9 @@ +# -*- coding: utf-8 -*- +# Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors +# For license information, please see license.txt + +from __future__ import unicode_literals +from frappe.model.document import Document + +class AccountSubtype(Document): + pass diff --git a/erpnext/accounts/doctype/account_subtype/test_account_subtype.js b/erpnext/accounts/doctype/account_subtype/test_account_subtype.js new file mode 100644 index 0000000000..5646763bbd --- /dev/null +++ b/erpnext/accounts/doctype/account_subtype/test_account_subtype.js @@ -0,0 +1,23 @@ +/* eslint-disable */ +// rename this file from _test_[name] to test_[name] to activate +// and remove above this line + +QUnit.test("test: Account Subtype", function (assert) { + let done = assert.async(); + + // number of asserts + assert.expect(1); + + frappe.run_serially([ + // insert a new Account Subtype + () => frappe.tests.make('Account Subtype', [ + // values to be set + {key: 'value'} + ]), + () => { + assert.equal(cur_frm.doc.key, 'value'); + }, + () => done() + ]); + +}); diff --git a/erpnext/accounts/doctype/account_subtype/test_account_subtype.py b/erpnext/accounts/doctype/account_subtype/test_account_subtype.py new file mode 100644 index 0000000000..c37b5b9db7 --- /dev/null +++ b/erpnext/accounts/doctype/account_subtype/test_account_subtype.py @@ -0,0 +1,9 @@ +# -*- coding: utf-8 -*- +# Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors +# See license.txt +from __future__ import unicode_literals + +import unittest + +class TestAccountSubtype(unittest.TestCase): + pass diff --git a/erpnext/accounts/doctype/account_type/__init__.py b/erpnext/accounts/doctype/account_type/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/erpnext/accounts/doctype/account_type/account_type.js b/erpnext/accounts/doctype/account_type/account_type.js new file mode 100644 index 0000000000..858b56c077 --- /dev/null +++ b/erpnext/accounts/doctype/account_type/account_type.js @@ -0,0 +1,8 @@ +// Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors +// For license information, please see license.txt + +frappe.ui.form.on('Account Type', { + refresh: function() { + + } +}); diff --git a/erpnext/accounts/doctype/account_type/account_type.json b/erpnext/accounts/doctype/account_type/account_type.json new file mode 100644 index 0000000000..6b8f724b40 --- /dev/null +++ b/erpnext/accounts/doctype/account_type/account_type.json @@ -0,0 +1,134 @@ +{ + "allow_copy": 0, + "allow_events_in_timeline": 0, + "allow_guest_to_view": 0, + "allow_import": 1, + "allow_rename": 1, + "autoname": "field:account_type", + "beta": 0, + "creation": "2018-10-25 15:45:45.789963", + "custom": 0, + "docstatus": 0, + "doctype": "DocType", + "document_type": "", + "editable_grid": 1, + "engine": "InnoDB", + "fields": [ + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "account_type", + "fieldtype": "Data", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Account Type", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 1 + } + ], + "has_web_view": 0, + "hide_heading": 0, + "hide_toolbar": 0, + "idx": 0, + "image_view": 0, + "in_create": 0, + "is_submittable": 0, + "issingle": 0, + "istable": 0, + "max_attachments": 0, + "modified": "2018-10-25 15:46:51.042604", + "modified_by": "Administrator", + "module": "Accounts", + "name": "Account Type", + "name_case": "", + "owner": "Administrator", + "permissions": [ + { + "amend": 0, + "cancel": 0, + "create": 1, + "delete": 1, + "email": 1, + "export": 1, + "if_owner": 0, + "import": 0, + "permlevel": 0, + "print": 1, + "read": 1, + "report": 1, + "role": "System Manager", + "set_user_permissions": 0, + "share": 1, + "submit": 0, + "write": 1 + }, + { + "amend": 0, + "cancel": 0, + "create": 1, + "delete": 1, + "email": 1, + "export": 1, + "if_owner": 0, + "import": 0, + "permlevel": 0, + "print": 1, + "read": 1, + "report": 1, + "role": "Accounts Manager", + "set_user_permissions": 0, + "share": 1, + "submit": 0, + "write": 1 + }, + { + "amend": 0, + "cancel": 0, + "create": 1, + "delete": 1, + "email": 1, + "export": 1, + "if_owner": 0, + "import": 0, + "permlevel": 0, + "print": 1, + "read": 1, + "report": 1, + "role": "Accounts User", + "set_user_permissions": 0, + "share": 1, + "submit": 0, + "write": 1 + } + ], + "quick_entry": 1, + "read_only": 0, + "read_only_onload": 0, + "show_name_in_global_search": 0, + "sort_field": "modified", + "sort_order": "DESC", + "track_changes": 0, + "track_seen": 0, + "track_views": 0 +} \ No newline at end of file diff --git a/erpnext/accounts/doctype/account_type/account_type.py b/erpnext/accounts/doctype/account_type/account_type.py new file mode 100644 index 0000000000..3e6429318b --- /dev/null +++ b/erpnext/accounts/doctype/account_type/account_type.py @@ -0,0 +1,9 @@ +# -*- coding: utf-8 -*- +# Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors +# For license information, please see license.txt + +from __future__ import unicode_literals +from frappe.model.document import Document + +class AccountType(Document): + pass diff --git a/erpnext/accounts/doctype/account_type/test_account_type.js b/erpnext/accounts/doctype/account_type/test_account_type.js new file mode 100644 index 0000000000..76e434f4ab --- /dev/null +++ b/erpnext/accounts/doctype/account_type/test_account_type.js @@ -0,0 +1,23 @@ +/* eslint-disable */ +// rename this file from _test_[name] to test_[name] to activate +// and remove above this line + +QUnit.test("test: Account Type", function (assert) { + let done = assert.async(); + + // number of asserts + assert.expect(1); + + frappe.run_serially([ + // insert a new Account Type + () => frappe.tests.make('Account Type', [ + // values to be set + {key: 'value'} + ]), + () => { + assert.equal(cur_frm.doc.key, 'value'); + }, + () => done() + ]); + +}); diff --git a/erpnext/accounts/doctype/account_type/test_account_type.py b/erpnext/accounts/doctype/account_type/test_account_type.py new file mode 100644 index 0000000000..824c2f66ae --- /dev/null +++ b/erpnext/accounts/doctype/account_type/test_account_type.py @@ -0,0 +1,9 @@ +# -*- coding: utf-8 -*- +# Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors +# See license.txt +from __future__ import unicode_literals + +import unittest + +class TestAccountType(unittest.TestCase): + pass diff --git a/erpnext/accounts/doctype/accounting_period/accounting_period.py b/erpnext/accounts/doctype/accounting_period/accounting_period.py index f7190b75e2..de45f3a252 100644 --- a/erpnext/accounts/doctype/accounting_period/accounting_period.py +++ b/erpnext/accounts/doctype/accounting_period/accounting_period.py @@ -5,6 +5,7 @@ from __future__ import unicode_literals import frappe from frappe.model.document import Document +from frappe import _ class AccountingPeriod(Document): def validate(self): @@ -16,7 +17,7 @@ class AccountingPeriod(Document): def autoname(self): company_abbr = frappe.get_cached_value('Company', self.company, "abbr") self.name = " - ".join([self.period_name, company_abbr]) - + def validate_overlap(self): existing_accounting_period = frappe.db.sql("""select name from `tabAccounting Period` where ( @@ -33,7 +34,7 @@ class AccountingPeriod(Document): }, as_dict=True) if len(existing_accounting_period) > 0: - frappe.throw("Accounting Period overlaps with {0}".format(existing_accounting_period[0].get("name"))) + frappe.throw(_("Accounting Period overlaps with {0}".format(existing_accounting_period[0].get("name")))) def get_doctypes_for_closing(self): docs_for_closing = [] diff --git a/erpnext/accounts/doctype/accounts_settings/accounts_settings.json b/erpnext/accounts/doctype/accounts_settings/accounts_settings.json index 64a5951f94..c2372bd111 100644 --- a/erpnext/accounts/doctype/accounts_settings/accounts_settings.json +++ b/erpnext/accounts/doctype/accounts_settings/accounts_settings.json @@ -1,203 +1,203 @@ { - "creation": "2013-06-24 15:49:57", - "description": "Settings for Accounts", - "doctype": "DocType", - "document_type": "Other", - "editable_grid": 1, - "engine": "InnoDB", - "field_order": [ - "auto_accounting_for_stock", - "acc_frozen_upto", - "frozen_accounts_modifier", - "determine_address_tax_category_from", - "column_break_4", - "credit_controller", - "check_supplier_invoice_uniqueness", - "make_payment_via_journal_entry", - "unlink_payment_on_cancellation_of_invoice", - "unlink_advance_payment_on_cancelation_of_order", - "book_asset_depreciation_entry_automatically", - "allow_cost_center_in_entry_of_bs_account", - "add_taxes_from_item_tax_template", - "automatically_fetch_payment_terms", - "print_settings", - "show_inclusive_tax_in_print", - "column_break_12", - "show_payment_schedule_in_print", - "currency_exchange_section", - "allow_stale", - "stale_days", - "report_settings_sb", - "use_custom_cash_flow" - ], - "fields": [ - { - "default": "1", - "description": "If enabled, the system will post accounting entries for inventory automatically.", - "fieldname": "auto_accounting_for_stock", - "fieldtype": "Check", - "hidden": 1, - "in_list_view": 1, - "label": "Make Accounting Entry For Every Stock Movement" - }, - { - "description": "Accounting entry frozen up to this date, nobody can do / modify entry except role specified below.", - "fieldname": "acc_frozen_upto", - "fieldtype": "Date", - "in_list_view": 1, - "label": "Accounts Frozen Upto" - }, - { - "description": "Users with this role are allowed to set frozen accounts and create / modify accounting entries against frozen accounts", - "fieldname": "frozen_accounts_modifier", - "fieldtype": "Link", - "in_list_view": 1, - "label": "Role Allowed to Set Frozen Accounts & Edit Frozen Entries", - "options": "Role" - }, - { - "default": "Billing Address", - "description": "Address used to determine Tax Category in transactions.", - "fieldname": "determine_address_tax_category_from", - "fieldtype": "Select", - "label": "Determine Address Tax Category From", - "options": "Billing Address\nShipping Address" - }, - { - "fieldname": "column_break_4", - "fieldtype": "Column Break" - }, - { - "description": "Role that is allowed to submit transactions that exceed credit limits set.", - "fieldname": "credit_controller", - "fieldtype": "Link", - "in_list_view": 1, - "label": "Credit Controller", - "options": "Role" - }, - { - "fieldname": "check_supplier_invoice_uniqueness", - "fieldtype": "Check", - "label": "Check Supplier Invoice Number Uniqueness" - }, - { - "fieldname": "make_payment_via_journal_entry", - "fieldtype": "Check", - "label": "Make Payment via Journal Entry" - }, - { - "default": "1", - "fieldname": "unlink_payment_on_cancellation_of_invoice", - "fieldtype": "Check", - "label": "Unlink Payment on Cancellation of Invoice" - }, - { - "default": "1", - "fieldname": "unlink_advance_payment_on_cancelation_of_order", - "fieldtype": "Check", - "label": "Unlink Advance Payment on Cancelation of Order" - }, - { - "default": "1", - "fieldname": "book_asset_depreciation_entry_automatically", - "fieldtype": "Check", - "label": "Book Asset Depreciation Entry Automatically" - }, - { - "fieldname": "allow_cost_center_in_entry_of_bs_account", - "fieldtype": "Check", - "label": "Allow Cost Center In Entry of Balance Sheet Account" - }, - { - "default": "1", - "fieldname": "add_taxes_from_item_tax_template", - "fieldtype": "Check", - "label": "Automatically Add Taxes and Charges from Item Tax Template" - }, - { - "fieldname": "print_settings", - "fieldtype": "Section Break", - "label": "Print Settings" - }, - { - "fieldname": "show_inclusive_tax_in_print", - "fieldtype": "Check", - "label": "Show Inclusive Tax In Print" - }, - { - "fieldname": "column_break_12", - "fieldtype": "Column Break" - }, - { - "fieldname": "show_payment_schedule_in_print", - "fieldtype": "Check", - "label": "Show Payment Schedule in Print" - }, - { - "fieldname": "currency_exchange_section", - "fieldtype": "Section Break", - "label": "Currency Exchange Settings" - }, - { - "default": "1", - "fieldname": "allow_stale", - "fieldtype": "Check", - "in_list_view": 1, - "label": "Allow Stale Exchange Rates" - }, - { - "default": "1", - "depends_on": "eval:doc.allow_stale==0", - "fieldname": "stale_days", - "fieldtype": "Int", - "label": "Stale Days" - }, - { - "fieldname": "report_settings_sb", - "fieldtype": "Section Break", - "label": "Report Settings" - }, - { - "default": "0", - "description": "Only select if you have setup Cash Flow Mapper documents", - "fieldname": "use_custom_cash_flow", - "fieldtype": "Check", - "label": "Use Custom Cash Flow Format" - }, - { - "fieldname": "automatically_fetch_payment_terms", - "fieldtype": "Check", - "label": "Automatically Fetch Payment Terms" - } - ], - "icon": "icon-cog", - "idx": 1, - "issingle": 1, - "modified": "2019-04-28 18:20:55.789946", - "modified_by": "Administrator", - "module": "Accounts", - "name": "Accounts Settings", - "owner": "Administrator", - "permissions": [ - { - "create": 1, - "email": 1, - "print": 1, - "read": 1, - "role": "Accounts Manager", - "share": 1, - "write": 1 - }, - { - "read": 1, - "role": "Sales User" - }, - { - "read": 1, - "role": "Purchase User" - } - ], - "quick_entry": 1, - "sort_order": "ASC", - "track_changes": 1 -} \ No newline at end of file + "creation": "2013-06-24 15:49:57", + "description": "Settings for Accounts", + "doctype": "DocType", + "document_type": "Other", + "editable_grid": 1, + "engine": "InnoDB", + "field_order": [ + "auto_accounting_for_stock", + "acc_frozen_upto", + "frozen_accounts_modifier", + "determine_address_tax_category_from", + "column_break_4", + "credit_controller", + "check_supplier_invoice_uniqueness", + "make_payment_via_journal_entry", + "unlink_payment_on_cancellation_of_invoice", + "unlink_advance_payment_on_cancelation_of_order", + "book_asset_depreciation_entry_automatically", + "allow_cost_center_in_entry_of_bs_account", + "add_taxes_from_item_tax_template", + "automatically_fetch_payment_terms", + "print_settings", + "show_inclusive_tax_in_print", + "column_break_12", + "show_payment_schedule_in_print", + "currency_exchange_section", + "allow_stale", + "stale_days", + "report_settings_sb", + "use_custom_cash_flow" + ], + "fields": [ + { + "default": "1", + "description": "If enabled, the system will post accounting entries for inventory automatically.", + "fieldname": "auto_accounting_for_stock", + "fieldtype": "Check", + "hidden": 1, + "in_list_view": 1, + "label": "Make Accounting Entry For Every Stock Movement" + }, + { + "description": "Accounting entry frozen up to this date, nobody can do / modify entry except role specified below.", + "fieldname": "acc_frozen_upto", + "fieldtype": "Date", + "in_list_view": 1, + "label": "Accounts Frozen Upto" + }, + { + "description": "Users with this role are allowed to set frozen accounts and create / modify accounting entries against frozen accounts", + "fieldname": "frozen_accounts_modifier", + "fieldtype": "Link", + "in_list_view": 1, + "label": "Role Allowed to Set Frozen Accounts & Edit Frozen Entries", + "options": "Role" + }, + { + "default": "Billing Address", + "description": "Address used to determine Tax Category in transactions.", + "fieldname": "determine_address_tax_category_from", + "fieldtype": "Select", + "label": "Determine Address Tax Category From", + "options": "Billing Address\nShipping Address" + }, + { + "fieldname": "column_break_4", + "fieldtype": "Column Break" + }, + { + "description": "Role that is allowed to submit transactions that exceed credit limits set.", + "fieldname": "credit_controller", + "fieldtype": "Link", + "in_list_view": 1, + "label": "Credit Controller", + "options": "Role" + }, + { + "fieldname": "check_supplier_invoice_uniqueness", + "fieldtype": "Check", + "label": "Check Supplier Invoice Number Uniqueness" + }, + { + "fieldname": "make_payment_via_journal_entry", + "fieldtype": "Check", + "label": "Make Payment via Journal Entry" + }, + { + "default": "1", + "fieldname": "unlink_payment_on_cancellation_of_invoice", + "fieldtype": "Check", + "label": "Unlink Payment on Cancellation of Invoice" + }, + { + "default": "1", + "fieldname": "unlink_advance_payment_on_cancelation_of_order", + "fieldtype": "Check", + "label": "Unlink Advance Payment on Cancelation of Order" + }, + { + "default": "1", + "fieldname": "book_asset_depreciation_entry_automatically", + "fieldtype": "Check", + "label": "Book Asset Depreciation Entry Automatically" + }, + { + "fieldname": "allow_cost_center_in_entry_of_bs_account", + "fieldtype": "Check", + "label": "Allow Cost Center In Entry of Balance Sheet Account" + }, + { + "default": "1", + "fieldname": "add_taxes_from_item_tax_template", + "fieldtype": "Check", + "label": "Automatically Add Taxes and Charges from Item Tax Template" + }, + { + "fieldname": "print_settings", + "fieldtype": "Section Break", + "label": "Print Settings" + }, + { + "fieldname": "show_inclusive_tax_in_print", + "fieldtype": "Check", + "label": "Show Inclusive Tax In Print" + }, + { + "fieldname": "column_break_12", + "fieldtype": "Column Break" + }, + { + "fieldname": "show_payment_schedule_in_print", + "fieldtype": "Check", + "label": "Show Payment Schedule in Print" + }, + { + "fieldname": "currency_exchange_section", + "fieldtype": "Section Break", + "label": "Currency Exchange Settings" + }, + { + "default": "1", + "fieldname": "allow_stale", + "fieldtype": "Check", + "in_list_view": 1, + "label": "Allow Stale Exchange Rates" + }, + { + "default": "1", + "depends_on": "eval:doc.allow_stale==0", + "fieldname": "stale_days", + "fieldtype": "Int", + "label": "Stale Days" + }, + { + "fieldname": "report_settings_sb", + "fieldtype": "Section Break", + "label": "Report Settings" + }, + { + "default": "0", + "description": "Only select if you have setup Cash Flow Mapper documents", + "fieldname": "use_custom_cash_flow", + "fieldtype": "Check", + "label": "Use Custom Cash Flow Format" + }, + { + "fieldname": "automatically_fetch_payment_terms", + "fieldtype": "Check", + "label": "Automatically Fetch Payment Terms" + } + ], + "icon": "icon-cog", + "idx": 1, + "issingle": 1, + "modified": "2019-04-28 18:20:55.789946", + "modified_by": "Administrator", + "module": "Accounts", + "name": "Accounts Settings", + "owner": "Administrator", + "permissions": [ + { + "create": 1, + "email": 1, + "print": 1, + "read": 1, + "role": "Accounts Manager", + "share": 1, + "write": 1 + }, + { + "read": 1, + "role": "Sales User" + }, + { + "read": 1, + "role": "Purchase User" + } + ], + "quick_entry": 1, + "sort_order": "ASC", + "track_changes": 1 + } \ No newline at end of file diff --git a/erpnext/accounts/doctype/bank/bank.js b/erpnext/accounts/doctype/bank/bank.js index 1063a07b82..463d29c9f8 100644 --- a/erpnext/accounts/doctype/bank/bank.js +++ b/erpnext/accounts/doctype/bank/bank.js @@ -2,7 +2,29 @@ // For license information, please see license.txt frappe.ui.form.on('Bank', { + onload: function(frm) { + add_fields_to_mapping_table(frm); + }, refresh: function(frm) { - + add_fields_to_mapping_table(frm); } }); + + +let add_fields_to_mapping_table = function (frm) { + let options = []; + + frappe.model.with_doctype("Bank Transaction", function() { + let meta = frappe.get_meta("Bank Transaction"); + meta.fields.forEach(value => { + if (!["Section Break", "Column Break"].includes(value.fieldtype)) { + options.push(value.fieldname); + } + }); + }); + + frappe.meta.get_docfield("Bank Transaction Mapping", "bank_transaction_field", + frm.doc.name).options = options; + + frm.fields_dict.bank_transaction_mapping.grid.refresh(); +}; \ No newline at end of file diff --git a/erpnext/accounts/doctype/bank/bank.json b/erpnext/accounts/doctype/bank/bank.json index 0a24726f36..4fa0e4f29b 100644 --- a/erpnext/accounts/doctype/bank/bank.json +++ b/erpnext/accounts/doctype/bank/bank.json @@ -1,5 +1,6 @@ { "allow_copy": 0, + "allow_events_in_timeline": 0, "allow_guest_to_view": 0, "allow_import": 0, "allow_rename": 0, @@ -15,6 +16,7 @@ "fields": [ { "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -42,6 +44,134 @@ "search_index": 0, "set_only_once": 0, "translatable": 0, + "unique": 1 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 1, + "columns": 0, + "fieldname": "data_import_configuration_section", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Data Import Configuration", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "bank_transaction_mapping", + "fieldtype": "Table", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Bank Transaction Mapping", + "length": 0, + "no_copy": 0, + "options": "Bank Transaction Mapping", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "section_break_4", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "plaid_access_token", + "fieldtype": "Data", + "hidden": 1, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Plaid Access Token", + "length": 0, + "no_copy": 1, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, "unique": 0 } ], @@ -55,7 +185,7 @@ "issingle": 0, "istable": 0, "max_attachments": 0, - "modified": "2018-04-07 17:00:21.246202", + "modified": "2018-11-27 16:12:13.938776", "modified_by": "Administrator", "module": "Accounts", "name": "Bank", @@ -64,7 +194,6 @@ "permissions": [ { "amend": 0, - "apply_user_permissions": 0, "cancel": 0, "create": 1, "delete": 1, @@ -90,5 +219,6 @@ "sort_field": "modified", "sort_order": "DESC", "track_changes": 1, - "track_seen": 0 + "track_seen": 0, + "track_views": 0 } \ No newline at end of file diff --git a/erpnext/accounts/doctype/bank_account/bank_account.js b/erpnext/accounts/doctype/bank_account/bank_account.js index a7b5891cff..f22dd81b04 100644 --- a/erpnext/accounts/doctype/bank_account/bank_account.js +++ b/erpnext/accounts/doctype/bank_account/bank_account.js @@ -1,4 +1,4 @@ -// Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors +// Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors // For license information, please see license.txt frappe.ui.form.on('Bank Account', { @@ -29,5 +29,13 @@ frappe.ui.form.on('Bank Account', { else { frappe.contacts.render_address_and_contact(frm); } + + if (frm.doc.integration_id) { + frm.add_custom_button(__("Unlink external integrations"), function() { + frappe.confirm(__("This action will unlink this account from any external service integrating ERPNext with your bank accounts. It cannot be undone. Are you certain ?"), function() { + frm.set_value("integration_id", ""); + }); + }); + } } }); diff --git a/erpnext/accounts/doctype/bank_account/bank_account.json b/erpnext/accounts/doctype/bank_account/bank_account.json index 10db0d77a0..076b320c74 100644 --- a/erpnext/accounts/doctype/bank_account/bank_account.json +++ b/erpnext/accounts/doctype/bank_account/bank_account.json @@ -1,189 +1,1019 @@ { - "allow_import": 1, - "allow_rename": 1, - "autoname": "field:account_name", - "creation": "2017-05-29 21:35:13.136357", - "doctype": "DocType", - "document_type": "Setup", - "engine": "InnoDB", - "field_order": [ - "account_name", - "account", - "bank", - "is_company_account", - "company", - "column_break_7", - "is_default", - "bank_account_no", - "iban", - "branch_code", - "swift_number", - "section_break_11", - "party_type", - "column_break_14", - "party", - "address_and_contact", - "address_html", - "website", - "column_break_12", - "contact_html" - ], - "fields": [ - { - "fieldname": "account_name", - "fieldtype": "Data", - "in_global_search": 1, - "in_list_view": 1, - "in_standard_filter": 1, - "label": "Account Name", - "reqd": 1, - "unique": 1 - }, - { - "fieldname": "account", - "fieldtype": "Link", - "in_list_view": 1, - "label": "Account", - "options": "Account", - "reqd": 1 - }, - { - "fieldname": "bank", - "fieldtype": "Link", - "label": "Bank", - "options": "Bank", - "reqd": 1 - }, - { - "fieldname": "is_company_account", - "fieldtype": "Check", - "label": "Is Company Account" - }, - { - "depends_on": "is_company_account", - "fieldname": "company", - "fieldtype": "Link", - "in_list_view": 1, - "in_standard_filter": 1, - "label": "Company", - "options": "Company" - }, - { - "fieldname": "column_break_7", - "fieldtype": "Column Break", - "search_index": 1 - }, - { - "fieldname": "is_default", - "fieldtype": "Check", - "label": "Is Default" - }, - { - "fieldname": "bank_account_no", - "fieldtype": "Data", - "in_list_view": 1, - "label": "Bank Account No", - "length": 30 - }, - { - "fieldname": "iban", - "fieldtype": "Data", - "in_list_view": 1, - "label": "IBAN", - "length": 30 - }, - { - "fieldname": "branch_code", - "fieldtype": "Data", - "in_list_view": 1, - "label": "Branch Code" - }, - { - "fieldname": "swift_number", - "fieldtype": "Data", - "label": "SWIFT number" - }, - { - "depends_on": "eval:!doc.is_company_account", - "fieldname": "section_break_11", - "fieldtype": "Section Break" - }, - { - "fieldname": "party_type", - "fieldtype": "Link", - "label": "Party Type", - "options": "DocType" - }, - { - "fieldname": "column_break_14", - "fieldtype": "Column Break" - }, - { - "fieldname": "party", - "fieldtype": "Dynamic Link", - "label": "Party", - "options": "party_type" - }, - { - "fieldname": "address_and_contact", - "fieldtype": "Section Break", - "label": "Address and Contact", - "options": "fa fa-map-marker" - }, - { - "fieldname": "address_html", - "fieldtype": "HTML", - "label": "Address HTML" - }, - { - "fieldname": "website", - "fieldtype": "Data", - "label": "Website" - }, - { - "fieldname": "column_break_12", - "fieldtype": "Column Break" - }, - { - "fieldname": "contact_html", - "fieldtype": "HTML", - "label": "Contact HTML" - } - ], - "modified": "2019-04-25 22:10:07.951351", - "modified_by": "Administrator", - "module": "Accounts", - "name": "Bank Account", - "owner": "Administrator", - "permissions": [ - { - "create": 1, - "delete": 1, - "email": 1, - "export": 1, - "import": 1, - "print": 1, - "read": 1, - "report": 1, - "role": "Accounts Manager", - "share": 1, - "write": 1 - }, - { - "create": 1, - "delete": 1, - "email": 1, - "export": 1, - "print": 1, - "read": 1, - "report": 1, - "role": "Accounts User", - "share": 1, - "write": 1 - } - ], - "search_fields": "bank,account", - "sort_field": "modified", - "sort_order": "DESC", - "track_changes": 1 -} \ No newline at end of file + "allow_copy": 0, + "allow_events_in_timeline": 0, + "allow_guest_to_view": 0, + "allow_import": 1, + "allow_rename": 1, + "autoname": "", + "beta": 0, + "creation": "2017-05-29 21:35:13.136357", + "custom": 0, + "docstatus": 0, + "doctype": "DocType", + "document_type": "Setup", + "editable_grid": 0, + "engine": "InnoDB", + "fields": [ + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "account_name", + "fieldtype": "Data", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 1, + "in_list_view": 1, + "in_standard_filter": 1, + "label": "Account Name", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 1, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "account", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 1, + "in_standard_filter": 0, + "label": "GL Account", + "length": 0, + "no_copy": 0, + "options": "Account", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 1, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "bank", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Bank", + "length": 0, + "no_copy": 0, + "options": "Bank", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 1, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "account_type", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Account Type", + "length": 0, + "no_copy": 0, + "options": "Account Type", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "account_subtype", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Account Subtype", + "length": 0, + "no_copy": 0, + "options": "Account Subtype", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "column_break_7", + "fieldtype": "Column Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 1, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "is_default", + "fieldtype": "Check", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Is the Default Account", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "is_company_account", + "fieldtype": "Check", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Is Company Account", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "is_company_account", + "fieldname": "company", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 1, + "in_standard_filter": 1, + "label": "Company", + "length": 0, + "no_copy": 0, + "options": "Company", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "eval:!doc.is_company_account", + "fieldname": "section_break_11", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Party Details", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "party_type", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Party Type", + "length": 0, + "no_copy": 0, + "options": "DocType", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "column_break_14", + "fieldtype": "Column Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "party", + "fieldtype": "Dynamic Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Party", + "length": 0, + "no_copy": 0, + "options": "party_type", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "account_details_section", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Account Details", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "iban", + "fieldtype": "Data", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 1, + "in_standard_filter": 0, + "label": "IBAN", + "length": 30, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "column_break_12", + "fieldtype": "Column Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "bank_account_no", + "fieldtype": "Data", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 1, + "in_standard_filter": 0, + "label": "Bank Account No", + "length": 30, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "branch_code", + "fieldtype": "Data", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 1, + "in_standard_filter": 0, + "label": "Branch Code", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "swift_number", + "fieldtype": "Data", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "SWIFT number", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "address_and_contact", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Address and Contact", + "length": 0, + "no_copy": 0, + "options": "fa fa-map-marker", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "address_html", + "fieldtype": "HTML", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Address HTML", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "website", + "fieldtype": "Data", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Website", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "column_break_13", + "fieldtype": "Column Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "contact_html", + "fieldtype": "HTML", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Contact HTML", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "integration_details_section", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Integration Details", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "integration_id", + "fieldtype": "Data", + "hidden": 1, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Integration ID", + "length": 0, + "no_copy": 1, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 1 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "description": "Change this date manually to setup the next synchronization start date", + "fieldname": "last_integration_date", + "fieldtype": "Date", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Last Integration Date", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "column_break_27", + "fieldtype": "Column Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "mask", + "fieldtype": "Data", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Mask", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + } + ], + "has_web_view": 0, + "hide_heading": 0, + "hide_toolbar": 0, + "idx": 0, + "image_view": 0, + "in_create": 0, + "is_submittable": 0, + "issingle": 0, + "istable": 0, + "max_attachments": 0, + "modified": "2019-03-06 17:56:05.103238", + "modified_by": "Administrator", + "module": "Accounts", + "name": "Bank Account", + "name_case": "", + "owner": "Administrator", + "permissions": [ + { + "amend": 0, + "cancel": 0, + "create": 1, + "delete": 1, + "email": 1, + "export": 1, + "if_owner": 0, + "import": 1, + "permlevel": 0, + "print": 1, + "read": 1, + "report": 1, + "role": "Accounts Manager", + "set_user_permissions": 0, + "share": 1, + "submit": 0, + "write": 1 + }, + { + "amend": 0, + "cancel": 0, + "create": 1, + "delete": 1, + "email": 1, + "export": 1, + "if_owner": 0, + "import": 0, + "permlevel": 0, + "print": 1, + "read": 1, + "report": 1, + "role": "Accounts User", + "set_user_permissions": 0, + "share": 1, + "submit": 0, + "write": 1 + } + ], + "quick_entry": 0, + "read_only": 0, + "read_only_onload": 0, + "search_fields": "bank,account", + "show_name_in_global_search": 0, + "sort_field": "modified", + "sort_order": "DESC", + "track_changes": 1, + "track_seen": 0, + "track_views": 0 + } \ No newline at end of file diff --git a/erpnext/accounts/doctype/bank_account/bank_account.py b/erpnext/accounts/doctype/bank_account/bank_account.py index b13259b55d..20ce7ca9a4 100644 --- a/erpnext/accounts/doctype/bank_account/bank_account.py +++ b/erpnext/accounts/doctype/bank_account/bank_account.py @@ -13,16 +13,47 @@ class BankAccount(Document): """Load address and contacts in `__onload`""" load_address_and_contact(self) + def autoname(self): + self.name = self.account_name + " - " + self.bank + def on_trash(self): delete_contact_and_address('BankAccount', self.name) def validate(self): self.validate_company() + self.validate_iban() def validate_company(self): if self.is_company_account and not self.company: frappe.throw(_("Company is manadatory for company account")) + def validate_iban(self): + ''' + Algorithm: https://en.wikipedia.org/wiki/International_Bank_Account_Number#Validating_the_IBAN + ''' + # IBAN field is optional + if not self.iban: + return + + def encode_char(c): + # Position in the alphabet (A=1, B=2, ...) plus nine + return str(9 + ord(c) - 64) + + # remove whitespaces, upper case to get the right number from ord() + iban = ''.join(self.iban.split(' ')).upper() + + # Move country code and checksum from the start to the end + flipped = iban[4:] + iban[:4] + + # Encode characters as numbers + encoded = [encode_char(c) if ord(c) >= 65 and ord(c) <= 90 else c for c in flipped] + + to_check = int(''.join(encoded)) + + if to_check % 97 != 1: + frappe.throw(_('IBAN is not valid')) + + @frappe.whitelist() def make_bank_account(doctype, docname): doc = frappe.new_doc("Bank Account") diff --git a/erpnext/accounts/doctype/bank_account/test_bank_account.py b/erpnext/accounts/doctype/bank_account/test_bank_account.py index 43a3298ec4..f3bb086fa9 100644 --- a/erpnext/accounts/doctype/bank_account/test_bank_account.py +++ b/erpnext/accounts/doctype/bank_account/test_bank_account.py @@ -4,9 +4,46 @@ from __future__ import unicode_literals import frappe +from frappe import _ +from frappe import ValidationError import unittest # test_records = frappe.get_test_records('Bank Account') class TestBankAccount(unittest.TestCase): - pass + + def test_validate_iban(self): + valid_ibans = [ + 'GB82 WEST 1234 5698 7654 32', + 'DE91 1000 0000 0123 4567 89', + 'FR76 3000 6000 0112 3456 7890 189' + ] + + invalid_ibans = [ + # wrong checksum (3rd place) + 'GB72 WEST 1234 5698 7654 32', + 'DE81 1000 0000 0123 4567 89', + 'FR66 3000 6000 0112 3456 7890 189' + ] + + bank_account = frappe.get_doc({'doctype':'Bank Account'}) + + try: + bank_account.validate_iban() + except AttributeError: + msg = _('BankAccount.validate_iban() failed for empty IBAN') + self.fail(msg=msg) + + for iban in valid_ibans: + bank_account.iban = iban + try: + bank_account.validate_iban() + except ValidationError: + msg = _('BankAccount.validate_iban() failed for valid IBAN {}'.format(iban)) + self.fail(msg=msg) + + for not_iban in invalid_ibans: + bank_account.iban = not_iban + msg = _('BankAccount.validate_iban() accepted invalid IBAN {}'.format(not_iban)) + with self.assertRaises(ValidationError, msg=msg): + bank_account.validate_iban() diff --git a/erpnext/accounts/doctype/bank_statement_transaction_entry/bank_statement_transaction_entry.py b/erpnext/accounts/doctype/bank_statement_transaction_entry/bank_statement_transaction_entry.py index 101b9f2194..1318cf18d7 100644 --- a/erpnext/accounts/doctype/bank_statement_transaction_entry/bank_statement_transaction_entry.py +++ b/erpnext/accounts/doctype/bank_statement_transaction_entry/bank_statement_transaction_entry.py @@ -48,7 +48,7 @@ class BankStatementTransactionEntry(Document): def get_statement_headers(self): if not self.bank_settings: - frappe.throw("Bank Data mapper doesn't exist") + frappe.throw(_("Bank Data mapper doesn't exist")) mapper_doc = frappe.get_doc("Bank Statement Settings", self.bank_settings) headers = {entry.mapped_header:entry.stmt_header for entry in mapper_doc.header_items} return headers @@ -57,7 +57,7 @@ class BankStatementTransactionEntry(Document): if self.bank_statement is None: return filename = self.bank_statement.split("/")[-1] if (len(self.new_transaction_items + self.reconciled_transaction_items) > 0): - frappe.throw("Transactions already retreived from the statement") + frappe.throw(_("Transactions already retreived from the statement")) date_format = frappe.get_value("Bank Statement Settings", self.bank_settings, "date_format") if (date_format is None): @@ -314,7 +314,7 @@ class BankStatementTransactionEntry(Document): try: reconcile_against_document(lst) except: - frappe.throw("Exception occurred while reconciling {0}".format(payment.reference_name)) + frappe.throw(_("Exception occurred while reconciling {0}".format(payment.reference_name))) def submit_payment_entries(self): for payment in self.new_transaction_items: @@ -414,7 +414,7 @@ def get_transaction_entries(filename, headers): elif (filename.lower().endswith("xls")): rows = get_rows_from_xls_file(filename) else: - frappe.throw("Only .csv and .xlsx files are supported currently") + frappe.throw(_("Only .csv and .xlsx files are supported currently")) stmt_headers = headers.values() for row in rows: diff --git a/erpnext/accounts/doctype/bank_transaction/__init__.py b/erpnext/accounts/doctype/bank_transaction/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/erpnext/accounts/doctype/bank_transaction/bank_transaction.js b/erpnext/accounts/doctype/bank_transaction/bank_transaction.js new file mode 100644 index 0000000000..8b1bab1618 --- /dev/null +++ b/erpnext/accounts/doctype/bank_transaction/bank_transaction.js @@ -0,0 +1,32 @@ +// Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors +// For license information, please see license.txt + +frappe.ui.form.on('Bank Transaction', { + onload(frm) { + frm.set_query('payment_document', 'payment_entries', function() { + return { + "filters": { + "name": ["in", ["Payment Entry", "Journal Entry", "Sales Invoice", "Purchase Invoice", "Expense Claim"]] + } + }; + }); + } +}); + +frappe.ui.form.on('Bank Transaction Payments', { + payment_entries_remove: function(frm, cdt, cdn) { + update_clearance_date(frm, cdt, cdn); + } +}); + +const update_clearance_date = (frm, cdt, cdn) => { + if (frm.doc.docstatus === 1) { + frappe.xcall('erpnext.accounts.doctype.bank_transaction.bank_transaction.unclear_reference_payment', + {doctype: cdt, docname: cdn}) + .then(e => { + if (e == "success") { + frappe.show_alert({message:__("Document {0} successfully uncleared", [e]), indicator:'green'}); + } + }); + } +}; \ No newline at end of file diff --git a/erpnext/accounts/doctype/bank_transaction/bank_transaction.json b/erpnext/accounts/doctype/bank_transaction/bank_transaction.json new file mode 100644 index 0000000000..39937bb364 --- /dev/null +++ b/erpnext/accounts/doctype/bank_transaction/bank_transaction.json @@ -0,0 +1,833 @@ +{ + "allow_copy": 0, + "allow_events_in_timeline": 0, + "allow_guest_to_view": 0, + "allow_import": 1, + "allow_rename": 0, + "autoname": "naming_series:", + "beta": 0, + "creation": "2018-10-22 18:19:02.784533", + "custom": 0, + "docstatus": 0, + "doctype": "DocType", + "document_type": "", + "editable_grid": 1, + "engine": "InnoDB", + "fields": [ + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "default": "ACC-BTN-.YYYY.-", + "fetch_if_empty": 0, + "fieldname": "naming_series", + "fieldtype": "Select", + "hidden": 1, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Series", + "length": 0, + "no_copy": 1, + "options": "ACC-BTN-.YYYY.-", + "permlevel": 0, + "precision": "", + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 1, + "search_index": 0, + "set_only_once": 1, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "date", + "fieldtype": "Date", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Date", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "column_break_2", + "fieldtype": "Column Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "default": "Pending", + "fetch_if_empty": 0, + "fieldname": "status", + "fieldtype": "Select", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 1, + "label": "Status", + "length": 0, + "no_copy": 0, + "options": "\nPending\nSettled\nUnreconciled\nReconciled", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "bank_account", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 1, + "label": "Bank Account", + "length": 0, + "no_copy": 0, + "options": "Bank Account", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "default": "", + "fetch_from": "bank_account.company", + "fetch_if_empty": 0, + "fieldname": "company", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 1, + "label": "Company", + "length": 0, + "no_copy": 0, + "options": "Company", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "section_break_4", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "debit", + "fieldtype": "Currency", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 1, + "in_standard_filter": 0, + "label": "Debit", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "credit", + "fieldtype": "Currency", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 1, + "in_standard_filter": 0, + "label": "Credit", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "column_break_7", + "fieldtype": "Column Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "currency", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Currency", + "length": 0, + "no_copy": 0, + "options": "Currency", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "section_break_10", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "description", + "fieldtype": "Small Text", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 1, + "in_standard_filter": 0, + "label": "Description", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "section_break_14", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "reference_number", + "fieldtype": "Data", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Reference Number", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "transaction_id", + "fieldtype": "Data", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Transaction ID", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 1 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 1, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "payment_entries", + "fieldtype": "Table", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Payment Entries", + "length": 0, + "no_copy": 0, + "options": "Bank Transaction Payments", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "section_break_18", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "allocated_amount", + "fieldtype": "Currency", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Allocated Amount", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "amended_from", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Amended From", + "length": 0, + "no_copy": 1, + "options": "Bank Transaction", + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "column_break_17", + "fieldtype": "Column Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "", + "fetch_if_empty": 0, + "fieldname": "unallocated_amount", + "fieldtype": "Currency", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Unallocated Amount", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + } + ], + "has_web_view": 0, + "hide_heading": 0, + "hide_toolbar": 0, + "idx": 0, + "image_view": 0, + "in_create": 0, + "is_submittable": 1, + "issingle": 0, + "istable": 0, + "max_attachments": 0, + "modified": "2019-05-11 05:27:55.244721", + "modified_by": "Administrator", + "module": "Accounts", + "name": "Bank Transaction", + "name_case": "", + "owner": "Administrator", + "permissions": [ + { + "amend": 0, + "cancel": 1, + "create": 1, + "delete": 1, + "email": 1, + "export": 1, + "if_owner": 0, + "import": 0, + "permlevel": 0, + "print": 1, + "read": 1, + "report": 1, + "role": "System Manager", + "set_user_permissions": 0, + "share": 1, + "submit": 1, + "write": 1 + }, + { + "amend": 0, + "cancel": 1, + "create": 1, + "delete": 1, + "email": 1, + "export": 1, + "if_owner": 0, + "import": 0, + "permlevel": 0, + "print": 1, + "read": 1, + "report": 1, + "role": "Accounts Manager", + "set_user_permissions": 0, + "share": 1, + "submit": 1, + "write": 1 + }, + { + "amend": 0, + "cancel": 0, + "create": 1, + "delete": 1, + "email": 1, + "export": 1, + "if_owner": 0, + "import": 0, + "permlevel": 0, + "print": 1, + "read": 1, + "report": 1, + "role": "Accounts User", + "set_user_permissions": 0, + "share": 1, + "submit": 1, + "write": 1 + } + ], + "quick_entry": 0, + "read_only": 0, + "read_only_onload": 0, + "show_name_in_global_search": 0, + "sort_field": "date", + "sort_order": "DESC", + "title_field": "bank_account", + "track_changes": 0, + "track_seen": 0, + "track_views": 0 +} \ No newline at end of file diff --git a/erpnext/accounts/doctype/bank_transaction/bank_transaction.py b/erpnext/accounts/doctype/bank_transaction/bank_transaction.py new file mode 100644 index 0000000000..f943b34581 --- /dev/null +++ b/erpnext/accounts/doctype/bank_transaction/bank_transaction.py @@ -0,0 +1,106 @@ +# -*- coding: utf-8 -*- +# Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors +# For license information, please see license.txt + +from __future__ import unicode_literals +import frappe +from erpnext.controllers.status_updater import StatusUpdater +from frappe.utils import flt +from six.moves import reduce +from frappe import _ + +class BankTransaction(StatusUpdater): + def after_insert(self): + self.unallocated_amount = abs(flt(self.credit) - flt(self.debit)) + + def on_submit(self): + self.clear_linked_payment_entries() + self.set_status() + + def on_update_after_submit(self): + self.update_allocations() + self.clear_linked_payment_entries() + self.set_status(update=True) + + def update_allocations(self): + if self.payment_entries: + allocated_amount = reduce(lambda x, y: flt(x) + flt(y), [x.allocated_amount for x in self.payment_entries]) + else: + allocated_amount = 0 + + if allocated_amount: + frappe.db.set_value(self.doctype, self.name, "allocated_amount", flt(allocated_amount)) + frappe.db.set_value(self.doctype, self.name, "unallocated_amount", abs(flt(self.credit) - flt(self.debit)) - flt(allocated_amount)) + + else: + frappe.db.set_value(self.doctype, self.name, "allocated_amount", 0) + frappe.db.set_value(self.doctype, self.name, "unallocated_amount", abs(flt(self.credit) - flt(self.debit))) + + amount = self.debit or self.credit + if amount == self.allocated_amount: + frappe.db.set_value(self.doctype, self.name, "status", "Reconciled") + + self.reload() + + def clear_linked_payment_entries(self): + for payment_entry in self.payment_entries: + allocated_amount = get_total_allocated_amount(payment_entry) + paid_amount = get_paid_amount(payment_entry) + + if paid_amount and allocated_amount: + if flt(allocated_amount[0]["allocated_amount"]) > flt(paid_amount): + frappe.throw(_("The total allocated amount ({0}) is greated than the paid amount ({1}).".format(flt(allocated_amount[0]["allocated_amount"]), flt(paid_amount)))) + elif flt(allocated_amount[0]["allocated_amount"]) == flt(paid_amount): + if payment_entry.payment_document in ["Payment Entry", "Journal Entry", "Purchase Invoice", "Expense Claim"]: + self.clear_simple_entry(payment_entry) + + elif payment_entry.payment_document == "Sales Invoice": + self.clear_sales_invoice(payment_entry) + + def clear_simple_entry(self, payment_entry): + frappe.db.set_value(payment_entry.payment_document, payment_entry.payment_entry, "clearance_date", self.date) + + def clear_sales_invoice(self, payment_entry): + frappe.db.set_value("Sales Invoice Payment", dict(parenttype=payment_entry.payment_document, + parent=payment_entry.payment_entry), "clearance_date", self.date) + +def get_total_allocated_amount(payment_entry): + return frappe.db.sql(""" + SELECT + SUM(btp.allocated_amount) as allocated_amount, + bt.name + FROM + `tabBank Transaction Payments` as btp + LEFT JOIN + `tabBank Transaction` bt ON bt.name=btp.parent + WHERE + btp.payment_document = %s + AND + btp.payment_entry = %s + AND + bt.docstatus = 1""", (payment_entry.payment_document, payment_entry.payment_entry), as_dict=True) + +def get_paid_amount(payment_entry): + if payment_entry.payment_document in ["Payment Entry", "Sales Invoice", "Purchase Invoice"]: + return frappe.db.get_value(payment_entry.payment_document, payment_entry.payment_entry, "paid_amount") + + elif payment_entry.payment_document == "Journal Entry": + return frappe.db.get_value(payment_entry.payment_document, payment_entry.payment_entry, "total_credit") + + elif payment_entry.payment_document == "Expense Claim": + return frappe.db.get_value(payment_entry.payment_document, payment_entry.payment_entry, "total_amount_reimbursed") + + else: + frappe.throw("Please reconcile {0}: {1} manually".format(payment_entry.payment_document, payment_entry.payment_entry)) + +@frappe.whitelist() +def unclear_reference_payment(doctype, docname): + if frappe.db.exists(doctype, docname): + doc = frappe.get_doc(doctype, docname) + if doctype == "Sales Invoice": + frappe.db.set_value("Sales Invoice Payment", dict(parenttype=doc.payment_document, + parent=doc.payment_entry), "clearance_date", None) + else: + frappe.db.set_value(doc.payment_document, doc.payment_entry, "clearance_date", None) + + return doc.payment_entry diff --git a/erpnext/accounts/doctype/bank_transaction/bank_transaction_list.js b/erpnext/accounts/doctype/bank_transaction/bank_transaction_list.js new file mode 100644 index 0000000000..2ecc2b0cda --- /dev/null +++ b/erpnext/accounts/doctype/bank_transaction/bank_transaction_list.js @@ -0,0 +1,13 @@ +// Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors +// License: GNU General Public License v3. See license.txt + +frappe.listview_settings['Bank Transaction'] = { + add_fields: ["unallocated_amount"], + get_indicator: function(doc) { + if(flt(doc.unallocated_amount)>0) { + return [__("Unreconciled"), "orange", "unallocated_amount,>,0"]; + } else if(flt(doc.unallocated_amount)<=0) { + return [__("Reconciled"), "green", "unallocated_amount,=,0"]; + } + } +}; \ No newline at end of file diff --git a/erpnext/accounts/doctype/bank_transaction/bank_transaction_upload.py b/erpnext/accounts/doctype/bank_transaction/bank_transaction_upload.py new file mode 100644 index 0000000000..deedafdfb5 --- /dev/null +++ b/erpnext/accounts/doctype/bank_transaction/bank_transaction_upload.py @@ -0,0 +1,80 @@ +# -*- coding: utf-8 -*- +# Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors +# For license information, please see license.txt + +from __future__ import unicode_literals +import frappe +import json +from frappe.utils import getdate +from frappe.utils.dateutils import parse_date +from six import iteritems + +@frappe.whitelist() +def upload_bank_statement(): + if getattr(frappe, "uploaded_file", None): + with open(frappe.uploaded_file, "rb") as upfile: + fcontent = upfile.read() + else: + from frappe.utils.file_manager import get_uploaded_content + fname, fcontent = get_uploaded_content() + + if frappe.safe_encode(fname).lower().endswith("csv".encode('utf-8')): + from frappe.utils.csvutils import read_csv_content + rows = read_csv_content(fcontent, False) + + elif frappe.safe_encode(fname).lower().endswith("xlsx".encode('utf-8')): + from frappe.utils.xlsxutils import read_xlsx_file_from_attached_file + rows = read_xlsx_file_from_attached_file(fcontent=fcontent) + + columns = rows[0] + rows.pop(0) + data = rows + return {"columns": columns, "data": data} + + +@frappe.whitelist() +def create_bank_entries(columns, data, bank_account): + header_map = get_header_mapping(columns, bank_account) + + success = 0 + errors = 0 + for d in json.loads(data): + if all(item is None for item in d) is True: + continue + fields = {} + for key, value in iteritems(header_map): + fields.update({key: d[int(value)-1]}) + + try: + bank_transaction = frappe.get_doc({ + "doctype": "Bank Transaction" + }) + bank_transaction.update(fields) + bank_transaction.date = getdate(parse_date(bank_transaction.date)) + bank_transaction.bank_account = bank_account + bank_transaction.insert() + bank_transaction.submit() + success += 1 + except Exception: + frappe.log_error(frappe.get_traceback()) + errors += 1 + + return {"success": success, "errors": errors} + +def get_header_mapping(columns, bank_account): + mapping = get_bank_mapping(bank_account) + + header_map = {} + for column in json.loads(columns): + if column["content"] in mapping: + header_map.update({mapping[column["content"]]: column["colIndex"]}) + + return header_map + +def get_bank_mapping(bank_account): + bank_name = frappe.db.get_value("Bank Account", bank_account, "bank") + bank = frappe.get_doc("Bank", bank_name) + + mapping = {row.file_field:row.bank_transaction_field for row in bank.bank_transaction_mapping} + + return mapping \ No newline at end of file diff --git a/erpnext/accounts/doctype/bank_transaction/test_bank_transaction.js b/erpnext/accounts/doctype/bank_transaction/test_bank_transaction.js new file mode 100644 index 0000000000..305119e137 --- /dev/null +++ b/erpnext/accounts/doctype/bank_transaction/test_bank_transaction.js @@ -0,0 +1,23 @@ +/* eslint-disable */ +// rename this file from _test_[name] to test_[name] to activate +// and remove above this line + +QUnit.test("test: Bank Transaction", function (assert) { + let done = assert.async(); + + // number of asserts + assert.expect(1); + + frappe.run_serially([ + // insert a new Bank Transaction + () => frappe.tests.make('Bank Transaction', [ + // values to be set + {key: 'value'} + ]), + () => { + assert.equal(cur_frm.doc.key, 'value'); + }, + () => done() + ]); + +}); diff --git a/erpnext/accounts/doctype/bank_transaction/test_bank_transaction.py b/erpnext/accounts/doctype/bank_transaction/test_bank_transaction.py new file mode 100644 index 0000000000..0fe57c3239 --- /dev/null +++ b/erpnext/accounts/doctype/bank_transaction/test_bank_transaction.py @@ -0,0 +1,290 @@ +# -*- coding: utf-8 -*- +# Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors +# See license.txt +from __future__ import unicode_literals + +import frappe +import unittest +from erpnext.accounts.doctype.sales_invoice.test_sales_invoice import create_sales_invoice +from erpnext.accounts.doctype.purchase_invoice.test_purchase_invoice import make_purchase_invoice +from erpnext.accounts.doctype.payment_entry.test_payment_entry import get_payment_entry +from erpnext.accounts.page.bank_reconciliation.bank_reconciliation import reconcile, get_linked_payments + +test_dependencies = ["Item", "Cost Center"] + +class TestBankTransaction(unittest.TestCase): + def setUp(self): + add_transactions() + add_payments() + + def tearDown(self): + for bt in frappe.get_all("Bank Transaction"): + doc = frappe.get_doc("Bank Transaction", bt.name) + doc.cancel() + doc.delete() + + # Delete directly in DB to avoid validation errors for countries not allowing deletion + frappe.db.sql("""delete from `tabPayment Entry Reference`""") + frappe.db.sql("""delete from `tabPayment Entry`""") + + frappe.flags.test_bank_transactions_created = False + frappe.flags.test_payments_created = False + + # This test checks if ERPNext is able to provide a linked payment for a bank transaction based on the amount of the bank transaction. + def test_linked_payments(self): + bank_transaction = frappe.get_doc("Bank Transaction", dict(description="Re 95282925234 FE/000002917 AT171513000281183046 Conrad Electronic")) + linked_payments = get_linked_payments(bank_transaction.name) + self.assertTrue(linked_payments[0].party == "Conrad Electronic") + + # This test validates a simple reconciliation leading to the clearance of the bank transaction and the payment + def test_reconcile(self): + bank_transaction = frappe.get_doc("Bank Transaction", dict(description="1512567 BG/000002918 OPSKATTUZWXXX AT776000000098709837 Herr G")) + payment = frappe.get_doc("Payment Entry", dict(party="Mr G", paid_amount=1200)) + reconcile(bank_transaction.name, "Payment Entry", payment.name) + + unallocated_amount = frappe.db.get_value("Bank Transaction", bank_transaction.name, "unallocated_amount") + self.assertTrue(unallocated_amount == 0) + + clearance_date = frappe.db.get_value("Payment Entry", payment.name, "clearance_date") + self.assertTrue(clearance_date is not None) + + # Check if ERPNext can correctly fetch a linked payment based on the party + def test_linked_payments_based_on_party(self): + bank_transaction = frappe.get_doc("Bank Transaction", dict(description="1512567 BG/000003025 OPSKATTUZWXXX AT776000000098709849 Herr G")) + linked_payments = get_linked_payments(bank_transaction.name) + self.assertTrue(len(linked_payments)==1) + + # Check if ERPNext can correctly filter a linked payments based on the debit/credit amount + def test_debit_credit_output(self): + bank_transaction = frappe.get_doc("Bank Transaction", dict(description="Auszahlung Karte MC/000002916 AUTOMAT 698769 K002 27.10. 14:07")) + linked_payments = get_linked_payments(bank_transaction.name) + self.assertTrue(linked_payments[0].payment_type == "Pay") + + # Check error if already reconciled + def test_already_reconciled(self): + bank_transaction = frappe.get_doc("Bank Transaction", dict(description="1512567 BG/000002918 OPSKATTUZWXXX AT776000000098709837 Herr G")) + payment = frappe.get_doc("Payment Entry", dict(party="Mr G", paid_amount=1200)) + reconcile(bank_transaction.name, "Payment Entry", payment.name) + + bank_transaction = frappe.get_doc("Bank Transaction", dict(description="1512567 BG/000002918 OPSKATTUZWXXX AT776000000098709837 Herr G")) + payment = frappe.get_doc("Payment Entry", dict(party="Mr G", paid_amount=1200)) + self.assertRaises(frappe.ValidationError, reconcile, bank_transaction=bank_transaction.name, payment_doctype="Payment Entry", payment_name=payment.name) + + # Raise an error if creditor transaction vs creditor payment + def test_invalid_creditor_reconcilation(self): + bank_transaction = frappe.get_doc("Bank Transaction", dict(description="I2015000011 VD/000002514 ATWWXXX AT4701345000003510057 Bio")) + payment = frappe.get_doc("Payment Entry", dict(party="Conrad Electronic", paid_amount=690)) + self.assertRaises(frappe.ValidationError, reconcile, bank_transaction=bank_transaction.name, payment_doctype="Payment Entry", payment_name=payment.name) + + # Raise an error if debitor transaction vs debitor payment + def test_invalid_debitor_reconcilation(self): + bank_transaction = frappe.get_doc("Bank Transaction", dict(description="Auszahlung Karte MC/000002916 AUTOMAT 698769 K002 27.10. 14:07")) + payment = frappe.get_doc("Payment Entry", dict(party="Fayva", paid_amount=109080)) + self.assertRaises(frappe.ValidationError, reconcile, bank_transaction=bank_transaction.name, payment_doctype="Payment Entry", payment_name=payment.name) + + # Raise an error if debitor transaction vs debitor payment + def test_clear_sales_invoice(self): + bank_transaction = frappe.get_doc("Bank Transaction", dict(description="I2015000011 VD/000002514 ATWWXXX AT4701345000003510057 Bio")) + payment = frappe.get_doc("Sales Invoice", dict(customer="Fayva", status=["=", "Paid"])) + reconcile(bank_transaction.name, "Sales Invoice", payment.name) + + self.assertEqual(frappe.db.get_value("Bank Transaction", bank_transaction.name, "unallocated_amount"), 0) + self.assertTrue(frappe.db.get_value("Sales Invoice Payment", dict(parent=payment.name), "clearance_date") is not None) + +def add_transactions(): + if frappe.flags.test_bank_transactions_created: + return + + frappe.set_user("Administrator") + try: + frappe.get_doc({ + "doctype": "Bank", + "bank_name":"Citi Bank", + }).insert() + except frappe.DuplicateEntryError: + pass + + try: + frappe.get_doc({ + "doctype": "Bank Account", + "account_name":"Checking Account", + "bank": "Citi Bank", + "account": "_Test Bank - _TC" + }).insert() + except frappe.DuplicateEntryError: + pass + + doc = frappe.get_doc({ + "doctype": "Bank Transaction", + "description":"1512567 BG/000002918 OPSKATTUZWXXX AT776000000098709837 Herr G", + "date": "2018-10-23", + "debit": 1200, + "currency": "INR", + "bank_account": "Checking Account - Citi Bank" + }).insert() + doc.submit() + + doc = frappe.get_doc({ + "doctype": "Bank Transaction", + "description":"1512567 BG/000003025 OPSKATTUZWXXX AT776000000098709849 Herr G", + "date": "2018-10-23", + "debit": 1700, + "currency": "INR", + "bank_account": "Checking Account - Citi Bank" + }).insert() + doc.submit() + + doc = frappe.get_doc({ + "doctype": "Bank Transaction", + "description":"Re 95282925234 FE/000002917 AT171513000281183046 Conrad Electronic", + "date": "2018-10-26", + "debit": 690, + "currency": "INR", + "bank_account": "Checking Account - Citi Bank" + }).insert() + doc.submit() + + doc = frappe.get_doc({ + "doctype": "Bank Transaction", + "description":"Auszahlung Karte MC/000002916 AUTOMAT 698769 K002 27.10. 14:07", + "date": "2018-10-27", + "debit": 3900, + "currency": "INR", + "bank_account": "Checking Account - Citi Bank" + }).insert() + doc.submit() + + doc = frappe.get_doc({ + "doctype": "Bank Transaction", + "description":"I2015000011 VD/000002514 ATWWXXX AT4701345000003510057 Bio", + "date": "2018-10-27", + "credit": 109080, + "currency": "INR", + "bank_account": "Checking Account - Citi Bank" + }).insert() + doc.submit() + + frappe.flags.test_bank_transactions_created = True + +def add_payments(): + if frappe.flags.test_payments_created: + return + + frappe.set_user("Administrator") + + try: + frappe.get_doc({ + "doctype": "Supplier", + "supplier_group":"All Supplier Groups", + "supplier_type": "Company", + "supplier_name": "Conrad Electronic" + }).insert() + + except frappe.DuplicateEntryError: + pass + + pi = make_purchase_invoice(supplier="Conrad Electronic", qty=1, rate=690) + pe = get_payment_entry("Purchase Invoice", pi.name, bank_account="_Test Bank - _TC") + pe.reference_no = "Conrad Oct 18" + pe.reference_date = "2018-10-24" + pe.insert() + pe.submit() + + try: + frappe.get_doc({ + "doctype": "Supplier", + "supplier_group":"All Supplier Groups", + "supplier_type": "Company", + "supplier_name": "Mr G" + }).insert() + except frappe.DuplicateEntryError: + pass + + pi = make_purchase_invoice(supplier="Mr G", qty=1, rate=1200) + pe = get_payment_entry("Purchase Invoice", pi.name, bank_account="_Test Bank - _TC") + pe.reference_no = "Herr G Oct 18" + pe.reference_date = "2018-10-24" + pe.insert() + pe.submit() + + pi = make_purchase_invoice(supplier="Mr G", qty=1, rate=1700) + pe = get_payment_entry("Purchase Invoice", pi.name, bank_account="_Test Bank - _TC") + pe.reference_no = "Herr G Nov 18" + pe.reference_date = "2018-11-01" + pe.insert() + pe.submit() + + try: + frappe.get_doc({ + "doctype": "Supplier", + "supplier_group":"All Supplier Groups", + "supplier_type": "Company", + "supplier_name": "Poore Simon's" + }).insert() + except frappe.DuplicateEntryError: + pass + + try: + frappe.get_doc({ + "doctype": "Customer", + "customer_group":"All Customer Groups", + "customer_type": "Company", + "customer_name": "Poore Simon's" + }).insert() + except frappe.DuplicateEntryError: + pass + + pi = make_purchase_invoice(supplier="Poore Simon's", qty=1, rate=3900) + pe = get_payment_entry("Purchase Invoice", pi.name, bank_account="_Test Bank - _TC") + pe.reference_no = "Poore Simon's Oct 18" + pe.reference_date = "2018-10-28" + pe.insert() + pe.submit() + + si = create_sales_invoice(customer="Poore Simon's", qty=1, rate=3900) + pe = get_payment_entry("Sales Invoice", si.name, bank_account="_Test Bank - _TC") + pe.reference_no = "Poore Simon's Oct 18" + pe.reference_date = "2018-10-28" + pe.insert() + pe.submit() + + try: + frappe.get_doc({ + "doctype": "Customer", + "customer_group":"All Customer Groups", + "customer_type": "Company", + "customer_name": "Fayva" + }).insert() + except frappe.DuplicateEntryError: + pass + + si = create_sales_invoice(customer="Fayva", qty=1, rate=109080) + pe = get_payment_entry("Sales Invoice", si.name, bank_account="_Test Bank - _TC") + pe.reference_no = "Fayva Oct 18" + pe.reference_date = "2018-10-29" + pe.insert() + pe.submit() + + mode_of_payment = frappe.get_doc({ + "doctype": "Mode of Payment", + "name": "Cash" + }) + + if not frappe.db.get_value('Mode of Payment Account', {'company': "_Test Company", 'parent': "Cash"}): + mode_of_payment.append("accounts", { + "company": "_Test Company", + "default_account": "_Test Bank - _TC" + }) + mode_of_payment.save() + + si = create_sales_invoice(customer="Fayva", qty=1, rate=109080, do_not_submit=1) + si.is_pos = 1 + si.append("payments", { + "mode_of_payment": "Cash", + "account": "_Test Bank - _TC", + "amount": 109080 + }) + si.save() + si.submit() + + frappe.flags.test_payments_created = True \ No newline at end of file diff --git a/erpnext/accounts/doctype/bank_transaction_mapping/__init__.py b/erpnext/accounts/doctype/bank_transaction_mapping/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/erpnext/accounts/doctype/bank_transaction_mapping/bank_transaction_mapping.json b/erpnext/accounts/doctype/bank_transaction_mapping/bank_transaction_mapping.json new file mode 100644 index 0000000000..ace554b244 --- /dev/null +++ b/erpnext/accounts/doctype/bank_transaction_mapping/bank_transaction_mapping.json @@ -0,0 +1,107 @@ +{ + "allow_copy": 0, + "allow_events_in_timeline": 0, + "allow_guest_to_view": 0, + "allow_import": 0, + "allow_rename": 0, + "beta": 0, + "creation": "2018-10-24 15:24:56.713277", + "custom": 0, + "docstatus": 0, + "doctype": "DocType", + "document_type": "", + "editable_grid": 1, + "engine": "InnoDB", + "fields": [ + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "bank_transaction_field", + "fieldtype": "Select", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 1, + "in_standard_filter": 0, + "label": "Field in Bank Transaction", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 1, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "file_field", + "fieldtype": "Data", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 1, + "in_standard_filter": 0, + "label": "Column in Bank File", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 1, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + } + ], + "has_web_view": 0, + "hide_heading": 0, + "hide_toolbar": 0, + "idx": 0, + "image_view": 0, + "in_create": 0, + "is_submittable": 0, + "issingle": 0, + "istable": 1, + "max_attachments": 0, + "modified": "2018-10-24 15:24:56.713277", + "modified_by": "Administrator", + "module": "Accounts", + "name": "Bank Transaction Mapping", + "name_case": "", + "owner": "Administrator", + "permissions": [], + "quick_entry": 0, + "read_only": 0, + "read_only_onload": 0, + "show_name_in_global_search": 0, + "sort_field": "modified", + "sort_order": "DESC", + "track_changes": 0, + "track_seen": 0, + "track_views": 0 +} \ No newline at end of file diff --git a/erpnext/accounts/doctype/bank_transaction_mapping/bank_transaction_mapping.py b/erpnext/accounts/doctype/bank_transaction_mapping/bank_transaction_mapping.py new file mode 100644 index 0000000000..95a5bc3388 --- /dev/null +++ b/erpnext/accounts/doctype/bank_transaction_mapping/bank_transaction_mapping.py @@ -0,0 +1,9 @@ +# -*- coding: utf-8 -*- +# Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors +# For license information, please see license.txt + +from __future__ import unicode_literals +from frappe.model.document import Document + +class BankTransactionMapping(Document): + pass diff --git a/erpnext/accounts/doctype/bank_transaction_payments/__init__.py b/erpnext/accounts/doctype/bank_transaction_payments/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/erpnext/accounts/doctype/bank_transaction_payments/bank_transaction_payments.json b/erpnext/accounts/doctype/bank_transaction_payments/bank_transaction_payments.json new file mode 100644 index 0000000000..a75e866997 --- /dev/null +++ b/erpnext/accounts/doctype/bank_transaction_payments/bank_transaction_payments.json @@ -0,0 +1,141 @@ +{ + "allow_copy": 0, + "allow_events_in_timeline": 0, + "allow_guest_to_view": 0, + "allow_import": 0, + "allow_rename": 0, + "beta": 0, + "creation": "2018-11-28 08:55:40.815355", + "custom": 0, + "docstatus": 0, + "doctype": "DocType", + "document_type": "", + "editable_grid": 1, + "engine": "InnoDB", + "fields": [ + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "payment_document", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 1, + "in_standard_filter": 0, + "label": "Payment Document", + "length": 0, + "no_copy": 0, + "options": "DocType", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 1, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "payment_entry", + "fieldtype": "Dynamic Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 1, + "in_standard_filter": 0, + "label": "Payment Entry", + "length": 0, + "no_copy": 0, + "options": "payment_document", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 1, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "allocated_amount", + "fieldtype": "Currency", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 1, + "in_standard_filter": 0, + "label": "Allocated Amount", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 1, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + } + ], + "has_web_view": 0, + "hide_heading": 0, + "hide_toolbar": 0, + "idx": 0, + "image_view": 0, + "in_create": 0, + "is_submittable": 0, + "issingle": 0, + "istable": 1, + "max_attachments": 0, + "modified": "2018-12-06 10:57:02.635141", + "modified_by": "Administrator", + "module": "Accounts", + "name": "Bank Transaction Payments", + "name_case": "", + "owner": "Administrator", + "permissions": [], + "quick_entry": 1, + "read_only": 0, + "read_only_onload": 0, + "show_name_in_global_search": 0, + "sort_field": "modified", + "sort_order": "DESC", + "track_changes": 1, + "track_seen": 0, + "track_views": 0 +} \ No newline at end of file diff --git a/erpnext/accounts/doctype/bank_transaction_payments/bank_transaction_payments.py b/erpnext/accounts/doctype/bank_transaction_payments/bank_transaction_payments.py new file mode 100644 index 0000000000..d6d7c109cf --- /dev/null +++ b/erpnext/accounts/doctype/bank_transaction_payments/bank_transaction_payments.py @@ -0,0 +1,9 @@ +# -*- coding: utf-8 -*- +# Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors +# For license information, please see license.txt + +from __future__ import unicode_literals +from frappe.model.document import Document + +class BankTransactionPayments(Document): + pass diff --git a/erpnext/accounts/doctype/journal_entry/journal_entry.js b/erpnext/accounts/doctype/journal_entry/journal_entry.js index b7f383fb13..b6c48c81b9 100644 --- a/erpnext/accounts/doctype/journal_entry/journal_entry.js +++ b/erpnext/accounts/doctype/journal_entry/journal_entry.js @@ -228,6 +228,10 @@ erpnext.accounts.JournalEntry = frappe.ui.form.Controller.extend({ frappe.model.validate_missing(jvd, "account"); var party_account_field = jvd.reference_type==="Sales Invoice" ? "debit_to": "credit_to"; out.filters.push([jvd.reference_type, party_account_field, "=", jvd.account]); + + if (in_list(['Debit Note', 'Credit Note'], doc.voucher_type)) { + out.filters.push([jvd.reference_type, "is_return", "=", 1]); + } } if(in_list(["Sales Order", "Purchase Order"], jvd.reference_type)) { diff --git a/erpnext/accounts/doctype/journal_entry/journal_entry.py b/erpnext/accounts/doctype/journal_entry/journal_entry.py index a9929c379d..15ab48be9f 100644 --- a/erpnext/accounts/doctype/journal_entry/journal_entry.py +++ b/erpnext/accounts/doctype/journal_entry/journal_entry.py @@ -335,7 +335,8 @@ class JournalEntry(AccountsController): for reference_name, total in iteritems(self.reference_totals): reference_type = self.reference_types[reference_name] - if reference_type in ("Sales Invoice", "Purchase Invoice"): + if (reference_type in ("Sales Invoice", "Purchase Invoice") and + self.voucher_type not in ['Debit Note', 'Credit Note']): invoice = frappe.db.get_value(reference_type, reference_name, ["docstatus", "outstanding_amount"], as_dict=1) diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.py b/erpnext/accounts/doctype/payment_entry/payment_entry.py index 92803a6312..ea76126d8c 100644 --- a/erpnext/accounts/doctype/payment_entry/payment_entry.py +++ b/erpnext/accounts/doctype/payment_entry/payment_entry.py @@ -535,6 +535,20 @@ class PaymentEntry(AccountsController): "amount": self.total_allocated_amount * (tax_details['tax']['rate'] / 100) } + def set_gain_or_loss(self, account_details=None): + if not self.difference_amount: + self.set_difference_amount() + + row = { + 'amount': self.difference_amount + } + + if account_details: + row.update(account_details) + + self.append('deductions', row) + self.set_unallocated_amount() + @frappe.whitelist() def get_outstanding_reference_documents(args): diff --git a/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.js b/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.js index 4c24a9fc97..d3992d5111 100644 --- a/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.js +++ b/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.js @@ -16,6 +16,20 @@ frappe.ui.form.on("Payment Reconciliation Payment", { })[0].outstanding_amount; frappe.model.set_value(cdt, cdn, "allocated_amount", Math.min(invoice_amount, row.amount)); + + frm.call({ + doc: frm.doc, + method: 'get_difference_amount', + args: { + child_row: row + }, + callback: function(r, rt) { + if(r.message) { + frappe.model.set_value(cdt, cdn, + "difference_amount", r.message); + } + } + }); } } }); @@ -104,6 +118,91 @@ erpnext.accounts.PaymentReconciliationController = frappe.ui.form.Controller.ext reconcile: function() { var me = this; + var show_dialog = me.frm.doc.payments.filter(d => d.difference_amount && !d.difference_account); + + if (show_dialog && show_dialog.length) { + + this.data = []; + const dialog = new frappe.ui.Dialog({ + title: __("Select Difference Account"), + fields: [ + { + fieldname: "payments", fieldtype: "Table", label: __("Payments"), + data: this.data, in_place_edit: true, + get_data: () => { + return this.data; + }, + fields: [{ + fieldtype:'Data', + fieldname:"docname", + in_list_view: 1, + hidden: 1 + }, { + fieldtype:'Data', + fieldname:"reference_name", + label: __("Voucher No"), + in_list_view: 1, + read_only: 1 + }, { + fieldtype:'Link', + options: 'Account', + in_list_view: 1, + label: __("Difference Account"), + fieldname: 'difference_account', + reqd: 1, + get_query: function() { + return { + filters: { + company: me.frm.doc.company, + is_group: 0 + } + } + } + }, { + fieldtype:'Currency', + in_list_view: 1, + label: __("Difference Amount"), + fieldname: 'difference_amount', + read_only: 1 + }] + }, + ], + primary_action: function() { + const args = dialog.get_values()["payments"]; + + args.forEach(d => { + frappe.model.set_value("Payment Reconciliation Payment", d.docname, + "difference_account", d.difference_account); + }); + + me.reconcile_payment_entries(); + dialog.hide(); + }, + primary_action_label: __('Reconcile Entries') + }); + + this.frm.doc.payments.forEach(d => { + if (d.difference_amount && !d.difference_account) { + dialog.fields_dict.payments.df.data.push({ + 'docname': d.name, + 'reference_name': d.reference_name, + 'difference_amount': d.difference_amount, + 'difference_account': d.difference_account, + }); + } + }); + + this.data = dialog.fields_dict.payments.df.data; + dialog.fields_dict.payments.grid.refresh(); + dialog.show(); + } else { + this.reconcile_payment_entries(); + } + }, + + reconcile_payment_entries: function() { + var me = this; + return this.frm.call({ doc: me.frm.doc, method: 'reconcile', diff --git a/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py b/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py index 9e7c3eb55e..b74eed5841 100644 --- a/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py +++ b/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py @@ -3,10 +3,11 @@ from __future__ import unicode_literals import frappe, erpnext -from frappe.utils import flt +from frappe.utils import flt, today from frappe import msgprint, _ from frappe.model.document import Document -from erpnext.accounts.utils import get_outstanding_invoices +from erpnext.accounts.utils import (get_outstanding_invoices, + update_reference_in_payment_entry, reconcile_against_document) from erpnext.controllers.accounts_controller import get_advance_payment_entries class PaymentReconciliation(Document): @@ -20,14 +21,16 @@ class PaymentReconciliation(Document): payment_entries = self.get_payment_entries() journal_entries = self.get_jv_entries() - self.add_payment_entries(payment_entries + journal_entries) + if self.party_type in ["Customer", "Supplier"]: + dr_or_cr_notes = self.get_dr_or_cr_notes() + + self.add_payment_entries(payment_entries + journal_entries + dr_or_cr_notes) def get_payment_entries(self): order_doctype = "Sales Order" if self.party_type=="Customer" else "Purchase Order" - payment_entries = get_advance_payment_entries(self.party_type, self.party, self.receivable_payable_account, order_doctype, against_all_orders=True, limit=self.limit) - + return payment_entries def get_jv_entries(self): @@ -37,7 +40,7 @@ class PaymentReconciliation(Document): bank_account_condition = "t2.against_account like %(bank_cash_account)s" \ if self.bank_cash_account else "1=1" - limit_cond = "limit %s" % (self.limit or 1000) + limit_cond = "limit %s" % self.limit if self.limit else "" journal_entries = frappe.db.sql(""" select @@ -72,6 +75,34 @@ class PaymentReconciliation(Document): return list(journal_entries) + def get_dr_or_cr_notes(self): + dr_or_cr = ("credit_in_account_currency" + if erpnext.get_party_account_type(self.party_type) == 'Receivable' else "debit_in_account_currency") + + reconciled_dr_or_cr = ("debit_in_account_currency" + if dr_or_cr == "credit_in_account_currency" else "credit_in_account_currency") + + voucher_type = ('Sales Invoice' + if self.party_type == 'Customer' else "Purchase Invoice") + + return frappe.db.sql(""" SELECT `tab{doc}`.name as reference_name, %(voucher_type)s as reference_type, + (sum(`tabGL Entry`.{dr_or_cr}) - sum(`tabGL Entry`.{reconciled_dr_or_cr})) as amount + FROM `tab{doc}`, `tabGL Entry` + WHERE + (`tab{doc}`.name = `tabGL Entry`.against_voucher or `tab{doc}`.name = `tabGL Entry`.voucher_no) + and `tab{doc}`.is_return = 1 and `tabGL Entry`.against_voucher_type = %(voucher_type)s + and `tab{doc}`.docstatus = 1 and `tabGL Entry`.party = %(party)s + and `tabGL Entry`.party_type = %(party_type)s and `tabGL Entry`.account = %(account)s + GROUP BY `tabSales Invoice`.name + Having + amount > 0 + """.format(doc=voucher_type, dr_or_cr=dr_or_cr, reconciled_dr_or_cr=reconciled_dr_or_cr), { + 'party': self.party, + 'party_type': self.party_type, + 'voucher_type': voucher_type, + 'account': self.receivable_payable_account + }, as_dict=1) + def add_payment_entries(self, entries): self.set('payments', []) for e in entries: @@ -84,7 +115,10 @@ class PaymentReconciliation(Document): condition = self.check_condition() non_reconciled_invoices = get_outstanding_invoices(self.party_type, self.party, - self.receivable_payable_account, condition=condition, limit=self.limit) + self.receivable_payable_account, condition=condition) + + if self.limit: + non_reconciled_invoices = non_reconciled_invoices[:self.limit] self.add_invoice_entries(non_reconciled_invoices) @@ -112,36 +146,67 @@ class PaymentReconciliation(Document): if erpnext.get_party_account_type(self.party_type) == 'Receivable' else "debit_in_account_currency") lst = [] + dr_or_cr_notes = [] for e in self.get('payments'): + reconciled_entry = [] if e.invoice_number and e.allocated_amount: - lst.append(frappe._dict({ - 'voucher_type': e.reference_type, - 'voucher_no' : e.reference_name, - 'voucher_detail_no' : e.reference_row, - 'against_voucher_type' : e.invoice_type, - 'against_voucher' : e.invoice_number, - 'account' : self.receivable_payable_account, - 'party_type': self.party_type, - 'party': self.party, - 'is_advance' : e.is_advance, - 'dr_or_cr' : dr_or_cr, - 'unadjusted_amount' : flt(e.amount), - 'allocated_amount' : flt(e.allocated_amount) - })) + if e.reference_type in ['Sales Invoice', 'Purchase Invoice']: + reconciled_entry = dr_or_cr_notes + else: + reconciled_entry = lst + + reconciled_entry.append(self.get_payment_details(e, dr_or_cr)) if lst: - from erpnext.accounts.utils import reconcile_against_document reconcile_against_document(lst) - msgprint(_("Successfully Reconciled")) - self.get_unreconciled_entries() + if dr_or_cr_notes: + reconcile_dr_cr_note(dr_or_cr_notes) + + msgprint(_("Successfully Reconciled")) + self.get_unreconciled_entries() + + def get_payment_details(self, row, dr_or_cr): + return frappe._dict({ + 'voucher_type': row.reference_type, + 'voucher_no' : row.reference_name, + 'voucher_detail_no' : row.reference_row, + 'against_voucher_type' : row.invoice_type, + 'against_voucher' : row.invoice_number, + 'account' : self.receivable_payable_account, + 'party_type': self.party_type, + 'party': self.party, + 'is_advance' : row.is_advance, + 'dr_or_cr' : dr_or_cr, + 'unadjusted_amount' : flt(row.amount), + 'allocated_amount' : flt(row.allocated_amount), + 'difference_amount': row.difference_amount, + 'difference_account': row.difference_account + }) + + def get_difference_amount(self, child_row): + if child_row.get("reference_type") != 'Payment Entry': return + + child_row = frappe._dict(child_row) + + if child_row.invoice_number and " | " in child_row.invoice_number: + child_row.invoice_type, child_row.invoice_number = child_row.invoice_number.split(" | ") + + dr_or_cr = ("credit_in_account_currency" + if erpnext.get_party_account_type(self.party_type) == 'Receivable' else "debit_in_account_currency") + + row = self.get_payment_details(child_row, dr_or_cr) + + doc = frappe.get_doc(row.voucher_type, row.voucher_no) + update_reference_in_payment_entry(row, doc, do_not_save=True) + + return doc.difference_amount def check_mandatory_to_fetch(self): for fieldname in ["company", "party_type", "party", "receivable_payable_account"]: if not self.get(fieldname): frappe.throw(_("Please select {0} first").format(self.meta.get_label(fieldname))) - def validate_invoice(self): if not self.get("invoices"): frappe.throw(_("No records found in the Invoice table")) @@ -186,3 +251,41 @@ class PaymentReconciliation(Document): cond += " and `{0}` <= {1}".format(dr_or_cr, flt(self.maximum_amount)) return cond + +def reconcile_dr_cr_note(dr_cr_notes): + for d in dr_cr_notes: + voucher_type = ('Credit Note' + if d.voucher_type == 'Sales Invoice' else 'Debit Note') + + dr_or_cr = ('credit_in_account_currency' + if d.reference_type == 'Sales Invoice' else 'debit_in_account_currency') + + reconcile_dr_or_cr = ('debit_in_account_currency' + if dr_or_cr == 'credit_in_account_currency' else 'credit_in_account_currency') + + jv = frappe.get_doc({ + "doctype": "Journal Entry", + "voucher_type": voucher_type, + "posting_date": today(), + "accounts": [ + { + 'account': d.account, + 'party': d.party, + 'party_type': d.party_type, + reconcile_dr_or_cr: (abs(d.allocated_amount) + if abs(d.unadjusted_amount) > abs(d.allocated_amount) else abs(d.unadjusted_amount)), + 'reference_type': d.against_voucher_type, + 'reference_name': d.against_voucher + }, + { + 'account': d.account, + 'party': d.party, + 'party_type': d.party_type, + dr_or_cr: abs(d.allocated_amount), + 'reference_type': d.voucher_type, + 'reference_name': d.voucher_no + } + ] + }) + + jv.submit() \ No newline at end of file diff --git a/erpnext/accounts/doctype/payment_reconciliation_payment/payment_reconciliation_payment.json b/erpnext/accounts/doctype/payment_reconciliation_payment/payment_reconciliation_payment.json index 814257c047..018bfd028a 100644 --- a/erpnext/accounts/doctype/payment_reconciliation_payment/payment_reconciliation_payment.json +++ b/erpnext/accounts/doctype/payment_reconciliation_payment/payment_reconciliation_payment.json @@ -1,389 +1,127 @@ { - "allow_copy": 0, - "allow_events_in_timeline": 0, - "allow_guest_to_view": 0, - "allow_import": 0, - "allow_rename": 0, - "beta": 0, - "creation": "2014-07-09 16:13:35.452759", - "custom": 0, - "docstatus": 0, - "doctype": "DocType", - "document_type": "", - "editable_grid": 1, + "creation": "2014-07-09 16:13:35.452759", + "doctype": "DocType", + "editable_grid": 1, + "field_order": [ + "reference_type", + "reference_name", + "posting_date", + "is_advance", + "reference_row", + "col_break1", + "invoice_number", + "amount", + "allocated_amount", + "section_break_10", + "difference_account", + "difference_amount", + "sec_break1", + "remark" + ], "fields": [ { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "reference_type", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Reference Type", - "length": 0, - "no_copy": 0, - "options": "DocType", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 1, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, + "fieldname": "reference_type", + "fieldtype": "Link", + "label": "Reference Type", + "options": "DocType", + "read_only": 1 + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 3, - "fieldname": "reference_name", - "fieldtype": "Dynamic Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "Reference Name", - "length": 0, - "no_copy": 0, - "options": "reference_type", - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 1, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, + "columns": 2, + "fieldname": "reference_name", + "fieldtype": "Dynamic Link", + "in_list_view": 1, + "label": "Reference Name", + "options": "reference_type", + "read_only": 1 + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "posting_date", - "fieldtype": "Date", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Posting Date", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 1, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, + "fieldname": "posting_date", + "fieldtype": "Date", + "label": "Posting Date", + "read_only": 1 + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "is_advance", - "fieldtype": "Data", - "hidden": 1, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Is Advance", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 1, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, + "fieldname": "is_advance", + "fieldtype": "Data", + "hidden": 1, + "label": "Is Advance", + "read_only": 1 + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "reference_row", - "fieldtype": "Data", - "hidden": 1, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Reference Row", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 1, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, + "fieldname": "reference_row", + "fieldtype": "Data", + "hidden": 1, + "label": "Reference Row", + "read_only": 1 + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "col_break1", - "fieldtype": "Column Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, + "fieldname": "col_break1", + "fieldtype": "Column Break" + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 3, - "fieldname": "invoice_number", - "fieldtype": "Select", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "Invoice Number", - "length": 0, - "no_copy": 0, - "options": "", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 1, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, + "columns": 2, + "fieldname": "invoice_number", + "fieldtype": "Select", + "in_list_view": 1, + "label": "Invoice Number", + "reqd": 1 + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 2, - "fieldname": "amount", - "fieldtype": "Currency", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "Amount", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 1, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, + "columns": 2, + "fieldname": "amount", + "fieldtype": "Currency", + "in_list_view": 1, + "label": "Amount", + "read_only": 1 + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 2, - "fieldname": "allocated_amount", - "fieldtype": "Currency", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "Allocated amount", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 1, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, + "columns": 2, + "fieldname": "allocated_amount", + "fieldtype": "Currency", + "in_list_view": 1, + "label": "Allocated amount", + "reqd": 1 + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "sec_break1", - "fieldtype": "Section Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, + "fieldname": "sec_break1", + "fieldtype": "Section Break" + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "remark", - "fieldtype": "Small Text", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "Remark", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 1, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 + "fieldname": "remark", + "fieldtype": "Small Text", + "in_list_view": 1, + "label": "Remark", + "read_only": 1 + }, + { + "columns": 2, + "fieldname": "difference_account", + "fieldtype": "Link", + "in_list_view": 1, + "label": "Difference Account", + "options": "Account" + }, + { + "fieldname": "difference_amount", + "fieldtype": "Currency", + "label": "Difference Amount", + "print_hide": 1, + "read_only": 1 + }, + { + "fieldname": "section_break_10", + "fieldtype": "Section Break" } - ], - "has_web_view": 0, - "hide_heading": 0, - "hide_toolbar": 0, - "idx": 0, - "image_view": 0, - "in_create": 0, - "is_submittable": 0, - "issingle": 0, - "istable": 1, - "max_attachments": 0, - "menu_index": 0, - "modified": "2019-01-07 16:52:07.567027", - "modified_by": "Administrator", - "module": "Accounts", - "name": "Payment Reconciliation Payment", - "name_case": "", - "owner": "Administrator", - "permissions": [], - "quick_entry": 1, - "read_only": 0, - "read_only_onload": 0, - "show_name_in_global_search": 0, - "sort_field": "modified", - "sort_order": "DESC", - "track_changes": 0, - "track_seen": 0, - "track_views": 0 + ], + "istable": 1, + "modified": "2019-06-24 00:08:11.150796", + "modified_by": "Administrator", + "module": "Accounts", + "name": "Payment Reconciliation Payment", + "owner": "Administrator", + "permissions": [], + "quick_entry": 1, + "sort_field": "modified", + "sort_order": "DESC" } \ No newline at end of file diff --git a/erpnext/accounts/doctype/pricing_rule/pricing_rule.py b/erpnext/accounts/doctype/pricing_rule/pricing_rule.py index 9a95e087c1..a94d127f62 100644 --- a/erpnext/accounts/doctype/pricing_rule/pricing_rule.py +++ b/erpnext/accounts/doctype/pricing_rule/pricing_rule.py @@ -220,7 +220,12 @@ def get_pricing_rule_for_item(args, price_list_rate=0, doc=None): if args.transaction_type=="selling": if args.customer and not (args.customer_group and args.territory): - customer = frappe.get_cached_value("Customer", args.customer, ["customer_group", "territory"]) + + if args.quotation_to and args.quotation_to != 'Customer': + customer = frappe._dict() + else: + customer = frappe.get_cached_value("Customer", args.customer, ["customer_group", "territory"]) + if customer: args.customer_group, args.territory = customer diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js index d224961bd8..f4b656d3f6 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js @@ -157,7 +157,7 @@ erpnext.accounts.PurchaseInvoice = erpnext.buying.BuyingController.extend({ can_change_release_date: function(date) { const diff = frappe.datetime.get_diff(date, frappe.datetime.nowdate()); if (diff < 0) { - frappe.throw('New release date should be in the future'); + frappe.throw(__('New release date should be in the future')); return false; } else { return true; @@ -523,8 +523,13 @@ frappe.ui.form.on("Purchase Invoice", { }, onload: function(frm) { - if(frm.doc.__onload && !frm.doc.__onload.supplier_tds) { - me.frm.set_df_property("apply_tds", "read_only", 1); + if(frm.doc.__onload) { + if(frm.doc.supplier) { + frm.doc.apply_tds = frm.doc.__onload.supplier_tds ? 1 : 0; + } + if(!frm.doc.__onload.supplier_tds) { + frm.set_df_property("apply_tds", "read_only", 1); + } } erpnext.queries.setup_queries(frm, "Warehouse", function() { diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json index 0d9a46b41e..73c4bc14c3 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json @@ -1,1342 +1,1349 @@ { - "allow_import": 1, - "autoname": "naming_series:", - "creation": "2013-05-21 16:16:39", - "doctype": "DocType", - "document_type": "Document", - "field_order": [ - "title", - "naming_series", - "supplier", - "supplier_name", - "tax_id", - "due_date", - "is_paid", - "is_return", - "apply_tds", - "column_break1", - "company", - "posting_date", - "posting_time", - "set_posting_time", - "amended_from", - "accounting_dimensions_section", - "cost_center", - "dimension_col_break", - "sb_14", - "on_hold", - "release_date", - "cb_17", - "hold_comment", - "supplier_invoice_details", - "bill_no", - "column_break_15", - "bill_date", - "returns", - "return_against", - "section_addresses", - "supplier_address", - "address_display", - "contact_person", - "contact_display", - "contact_mobile", - "contact_email", - "col_break_address", - "shipping_address", - "shipping_address_display", - "currency_and_price_list", - "currency", - "conversion_rate", - "column_break2", - "buying_price_list", - "price_list_currency", - "plc_conversion_rate", - "ignore_pricing_rule", - "sec_warehouse", - "set_warehouse", - "rejected_warehouse", - "col_break_warehouse", - "is_subcontracted", - "supplier_warehouse", - "items_section", - "update_stock", - "scan_barcode", - "items", - "pricing_rule_details", - "pricing_rules", - "raw_materials_supplied", - "supplied_items", - "section_break_26", - "total_qty", - "base_total", - "base_net_total", - "column_break_28", - "total", - "net_total", - "total_net_weight", - "taxes_section", - "tax_category", - "column_break_49", - "shipping_rule", - "section_break_51", - "taxes_and_charges", - "taxes", - "sec_tax_breakup", - "other_charges_calculation", - "totals", - "base_taxes_and_charges_added", - "base_taxes_and_charges_deducted", - "base_total_taxes_and_charges", - "column_break_40", - "taxes_and_charges_added", - "taxes_and_charges_deducted", - "total_taxes_and_charges", - "section_break_44", - "apply_discount_on", - "base_discount_amount", - "column_break_46", - "additional_discount_percentage", - "discount_amount", - "section_break_49", - "base_grand_total", - "base_rounding_adjustment", - "base_rounded_total", - "base_in_words", - "column_break8", - "grand_total", - "rounding_adjustment", - "rounded_total", - "in_words", - "total_advance", - "outstanding_amount", - "disable_rounded_total", - "payments_section", - "mode_of_payment", - "cash_bank_account", - "col_br_payments", - "paid_amount", - "base_paid_amount", - "write_off", - "write_off_amount", - "base_write_off_amount", - "column_break_61", - "write_off_account", - "write_off_cost_center", - "advances_section", - "allocate_advances_automatically", - "get_advances", - "advances", - "payment_schedule_section", - "payment_terms_template", - "payment_schedule", - "terms_section_break", - "tc_name", - "terms", - "printing_settings", - "letter_head", - "group_same_items", - "column_break_112", - "select_print_heading", - "language", - "more_info", - "credit_to", - "party_account_currency", - "is_opening", - "against_expense_account", - "column_break_63", - "status", - "inter_company_invoice_reference", - "remarks", - "subscription_section", - "from_date", - "to_date", - "column_break_114", - "auto_repeat", - "update_auto_repeat_reference" - ], - "fields": [ - { - "allow_on_submit": 1, - "default": "{supplier_name}", - "fieldname": "title", - "fieldtype": "Data", - "hidden": 1, - "label": "Title", - "no_copy": 1, - "print_hide": 1 - }, - { - "fieldname": "naming_series", - "fieldtype": "Select", - "label": "Series", - "no_copy": 1, - "oldfieldname": "naming_series", - "oldfieldtype": "Select", - "options": "ACC-PINV-.YYYY.-", - "print_hide": 1, - "reqd": 1, - "set_only_once": 1 - }, - { - "fieldname": "supplier", - "fieldtype": "Link", - "in_standard_filter": 1, - "label": "Supplier", - "oldfieldname": "supplier", - "oldfieldtype": "Link", - "options": "Supplier", - "print_hide": 1, - "search_index": 1 - }, - { - "bold": 1, - "depends_on": "supplier", - "fetch_from": "supplier.supplier_name", - "fieldname": "supplier_name", - "fieldtype": "Data", - "in_global_search": 1, - "label": "Supplier Name", - "oldfieldname": "supplier_name", - "oldfieldtype": "Data", - "read_only": 1 - }, - { - "fetch_from": "supplier.tax_id", - "fieldname": "tax_id", - "fieldtype": "Read Only", - "label": "Tax Id", - "print_hide": 1, - "read_only": 1 - }, - { - "fieldname": "due_date", - "fieldtype": "Date", - "label": "Due Date", - "oldfieldname": "due_date", - "oldfieldtype": "Date" - }, - { - "default": "0", - "fieldname": "is_paid", - "fieldtype": "Check", - "label": "Is Paid", - "print_hide": 1 - }, - { - "default": "0", - "fieldname": "is_return", - "fieldtype": "Check", - "label": "Is Return (Debit Note)", - "no_copy": 1, - "print_hide": 1 - }, - { - "default": "0", - "fieldname": "apply_tds", - "fieldtype": "Check", - "label": "Apply Tax Withholding Amount", - "print_hide": 1 - }, - { - "fieldname": "column_break1", - "fieldtype": "Column Break", - "oldfieldtype": "Column Break", - "width": "50%" - }, - { - "fieldname": "company", - "fieldtype": "Link", - "in_standard_filter": 1, - "label": "Company", - "options": "Company", - "print_hide": 1, - "remember_last_selected_value": 1 - }, - { - "fieldname": "cost_center", - "fieldtype": "Link", - "label": "Cost Center", - "options": "Cost Center" - }, - { - "default": "Today", - "fieldname": "posting_date", - "fieldtype": "Date", - "in_list_view": 1, - "label": "Date", - "oldfieldname": "posting_date", - "oldfieldtype": "Date", - "print_hide": 1, - "reqd": 1, - "search_index": 1 - }, - { - "fieldname": "posting_time", - "fieldtype": "Time", - "label": "Posting Time", - "no_copy": 1, - "print_hide": 1, - "print_width": "100px", - "width": "100px" - }, - { - "default": "0", - "depends_on": "eval:doc.docstatus==0", - "fieldname": "set_posting_time", - "fieldtype": "Check", - "label": "Edit Posting Date and Time", - "print_hide": 1 - }, - { - "fieldname": "amended_from", - "fieldtype": "Link", - "ignore_user_permissions": 1, - "label": "Amended From", - "no_copy": 1, - "oldfieldname": "amended_from", - "oldfieldtype": "Link", - "options": "Purchase Invoice", - "print_hide": 1, - "read_only": 1 - }, - { - "collapsible": 1, - "collapsible_depends_on": "eval:doc.on_hold", - "fieldname": "sb_14", - "fieldtype": "Section Break", - "label": "Hold Invoice" - }, - { - "default": "0", - "fieldname": "on_hold", - "fieldtype": "Check", - "label": "Hold Invoice" - }, - { - "depends_on": "eval:doc.on_hold", - "description": "Once set, this invoice will be on hold till the set date", - "fieldname": "release_date", - "fieldtype": "Date", - "label": "Release Date" - }, - { - "fieldname": "cb_17", - "fieldtype": "Column Break" - }, - { - "depends_on": "eval:doc.on_hold", - "fieldname": "hold_comment", - "fieldtype": "Small Text", - "label": "Reason For Putting On Hold" - }, - { - "collapsible": 1, - "collapsible_depends_on": "bill_no", - "fieldname": "supplier_invoice_details", - "fieldtype": "Section Break", - "label": "Supplier Invoice Details" - }, - { - "fieldname": "bill_no", - "fieldtype": "Data", - "label": "Supplier Invoice No", - "oldfieldname": "bill_no", - "oldfieldtype": "Data", - "print_hide": 1 - }, - { - "fieldname": "column_break_15", - "fieldtype": "Column Break" - }, - { - "fieldname": "bill_date", - "fieldtype": "Date", - "label": "Supplier Invoice Date", - "oldfieldname": "bill_date", - "oldfieldtype": "Date", - "print_hide": 1 - }, - { - "depends_on": "return_against", - "fieldname": "returns", - "fieldtype": "Section Break", - "label": "Returns" - }, - { - "depends_on": "return_against", - "fieldname": "return_against", - "fieldtype": "Link", - "label": "Return Against Purchase Invoice", - "no_copy": 1, - "options": "Purchase Invoice", - "print_hide": 1, - "read_only": 1 - }, - { - "collapsible": 1, - "fieldname": "section_addresses", - "fieldtype": "Section Break", - "label": "Address and Contact" - }, - { - "fieldname": "supplier_address", - "fieldtype": "Link", - "label": "Select Supplier Address", - "options": "Address", - "print_hide": 1 - }, - { - "fieldname": "address_display", - "fieldtype": "Small Text", - "label": "Address", - "read_only": 1 - }, - { - "fieldname": "contact_person", - "fieldtype": "Link", - "in_global_search": 1, - "label": "Contact Person", - "options": "Contact", - "print_hide": 1 - }, - { - "fieldname": "contact_display", - "fieldtype": "Small Text", - "label": "Contact", - "read_only": 1 - }, - { - "fieldname": "contact_mobile", - "fieldtype": "Small Text", - "label": "Mobile No", - "read_only": 1 - }, - { - "fieldname": "contact_email", - "fieldtype": "Small Text", - "label": "Contact Email", - "print_hide": 1, - "read_only": 1 - }, - { - "fieldname": "col_break_address", - "fieldtype": "Column Break" - }, - { - "fieldname": "shipping_address", - "fieldtype": "Link", - "label": "Select Shipping Address", - "options": "Address", - "print_hide": 1 - }, - { - "fieldname": "shipping_address_display", - "fieldtype": "Small Text", - "label": "Shipping Address", - "print_hide": 1, - "read_only": 1 - }, - { - "collapsible": 1, - "fieldname": "currency_and_price_list", - "fieldtype": "Section Break", - "label": "Currency and Price List", - "options": "fa fa-tag" - }, - { - "fieldname": "currency", - "fieldtype": "Link", - "label": "Currency", - "oldfieldname": "currency", - "oldfieldtype": "Select", - "options": "Currency", - "print_hide": 1 - }, - { - "fieldname": "conversion_rate", - "fieldtype": "Float", - "label": "Exchange Rate", - "oldfieldname": "conversion_rate", - "oldfieldtype": "Currency", - "precision": "9", - "print_hide": 1 - }, - { - "fieldname": "column_break2", - "fieldtype": "Column Break" - }, - { - "fieldname": "buying_price_list", - "fieldtype": "Link", - "label": "Price List", - "options": "Price List", - "print_hide": 1 - }, - { - "fieldname": "price_list_currency", - "fieldtype": "Link", - "label": "Price List Currency", - "options": "Currency", - "print_hide": 1, - "read_only": 1 - }, - { - "fieldname": "plc_conversion_rate", - "fieldtype": "Float", - "label": "Price List Exchange Rate", - "precision": "9", - "print_hide": 1 - }, - { - "default": "0", - "fieldname": "ignore_pricing_rule", - "fieldtype": "Check", - "label": "Ignore Pricing Rule", - "no_copy": 1, - "permlevel": 1, - "print_hide": 1 - }, - { - "fieldname": "sec_warehouse", - "fieldtype": "Section Break" - }, - { - "depends_on": "update_stock", - "fieldname": "set_warehouse", - "fieldtype": "Link", - "label": "Set Accepted Warehouse", - "options": "Warehouse", - "print_hide": 1 - }, - { - "depends_on": "update_stock", - "description": "Warehouse where you are maintaining stock of rejected items", - "fieldname": "rejected_warehouse", - "fieldtype": "Link", - "label": "Rejected Warehouse", - "no_copy": 1, - "options": "Warehouse", - "print_hide": 1 - }, - { - "fieldname": "col_break_warehouse", - "fieldtype": "Column Break" - }, - { - "default": "No", - "fieldname": "is_subcontracted", - "fieldtype": "Select", - "label": "Raw Materials Supplied", - "options": "No\nYes", - "print_hide": 1 - }, - { - "depends_on": "eval:doc.is_subcontracted==\"Yes\"", - "fieldname": "supplier_warehouse", - "fieldtype": "Link", - "label": "Supplier Warehouse", - "no_copy": 1, - "options": "Warehouse", - "print_hide": 1, - "print_width": "50px", - "width": "50px" - }, - { - "fieldname": "items_section", - "fieldtype": "Section Break", - "oldfieldtype": "Section Break", - "options": "fa fa-shopping-cart" - }, - { - "default": "0", - "fieldname": "update_stock", - "fieldtype": "Check", - "label": "Update Stock", - "print_hide": 1 - }, - { - "fieldname": "scan_barcode", - "fieldtype": "Data", - "label": "Scan Barcode" - }, - { - "allow_bulk_edit": 1, - "fieldname": "items", - "fieldtype": "Table", - "label": "Items", - "oldfieldname": "entries", - "oldfieldtype": "Table", - "options": "Purchase Invoice Item", - "reqd": 1 - }, - { - "fieldname": "pricing_rule_details", - "fieldtype": "Section Break", - "label": "Pricing Rules" - }, - { - "fieldname": "pricing_rules", - "fieldtype": "Table", - "label": "Pricing Rule Detail", - "options": "Pricing Rule Detail", - "read_only": 1 - }, - { - "collapsible_depends_on": "supplied_items", - "fieldname": "raw_materials_supplied", - "fieldtype": "Section Break", - "label": "Raw Materials Supplied" - }, - { - "fieldname": "supplied_items", - "fieldtype": "Table", - "label": "Supplied Items", - "options": "Purchase Receipt Item Supplied", - "read_only": 1 - }, - { - "fieldname": "section_break_26", - "fieldtype": "Section Break" - }, - { - "fieldname": "total_qty", - "fieldtype": "Float", - "label": "Total Quantity", - "read_only": 1 - }, - { - "fieldname": "base_total", - "fieldtype": "Currency", - "label": "Total (Company Currency)", - "options": "Company:company:default_currency", - "print_hide": 1, - "read_only": 1 - }, - { - "fieldname": "base_net_total", - "fieldtype": "Currency", - "label": "Net Total (Company Currency)", - "oldfieldname": "net_total", - "oldfieldtype": "Currency", - "options": "Company:company:default_currency", - "print_hide": 1, - "read_only": 1 - }, - { - "fieldname": "column_break_28", - "fieldtype": "Column Break" - }, - { - "fieldname": "total", - "fieldtype": "Currency", - "label": "Total", - "options": "currency", - "read_only": 1 - }, - { - "fieldname": "net_total", - "fieldtype": "Currency", - "label": "Net Total", - "oldfieldname": "net_total_import", - "oldfieldtype": "Currency", - "options": "currency", - "print_hide": 1, - "read_only": 1 - }, - { - "fieldname": "total_net_weight", - "fieldtype": "Float", - "label": "Total Net Weight", - "print_hide": 1, - "read_only": 1 - }, - { - "fieldname": "taxes_section", - "fieldtype": "Section Break", - "oldfieldtype": "Section Break", - "options": "fa fa-money" - }, - { - "fieldname": "tax_category", - "fieldtype": "Link", - "label": "Tax Category", - "options": "Tax Category", - "print_hide": 1 - }, - { - "fieldname": "column_break_49", - "fieldtype": "Column Break" - }, - { - "fieldname": "shipping_rule", - "fieldtype": "Link", - "label": "Shipping Rule", - "options": "Shipping Rule", - "print_hide": 1 - }, - { - "fieldname": "section_break_51", - "fieldtype": "Section Break" - }, - { - "fieldname": "taxes_and_charges", - "fieldtype": "Link", - "label": "Purchase Taxes and Charges Template", - "oldfieldname": "purchase_other_charges", - "oldfieldtype": "Link", - "options": "Purchase Taxes and Charges Template", - "print_hide": 1 - }, - { - "fieldname": "taxes", - "fieldtype": "Table", - "label": "Purchase Taxes and Charges", - "oldfieldname": "purchase_tax_details", - "oldfieldtype": "Table", - "options": "Purchase Taxes and Charges" - }, - { - "collapsible": 1, - "fieldname": "sec_tax_breakup", - "fieldtype": "Section Break", - "label": "Tax Breakup" - }, - { - "fieldname": "other_charges_calculation", - "fieldtype": "Text", - "label": "Taxes and Charges Calculation", - "no_copy": 1, - "oldfieldtype": "HTML", - "print_hide": 1, - "read_only": 1 - }, - { - "fieldname": "totals", - "fieldtype": "Section Break", - "oldfieldtype": "Section Break", - "options": "fa fa-money" - }, - { - "fieldname": "base_taxes_and_charges_added", - "fieldtype": "Currency", - "label": "Taxes and Charges Added (Company Currency)", - "oldfieldname": "other_charges_added", - "oldfieldtype": "Currency", - "options": "Company:company:default_currency", - "print_hide": 1, - "read_only": 1 - }, - { - "fieldname": "base_taxes_and_charges_deducted", - "fieldtype": "Currency", - "label": "Taxes and Charges Deducted (Company Currency)", - "oldfieldname": "other_charges_deducted", - "oldfieldtype": "Currency", - "options": "Company:company:default_currency", - "print_hide": 1, - "read_only": 1 - }, - { - "fieldname": "base_total_taxes_and_charges", - "fieldtype": "Currency", - "label": "Total Taxes and Charges (Company Currency)", - "oldfieldname": "total_tax", - "oldfieldtype": "Currency", - "options": "Company:company:default_currency", - "print_hide": 1, - "read_only": 1 - }, - { - "fieldname": "column_break_40", - "fieldtype": "Column Break" - }, - { - "fieldname": "taxes_and_charges_added", - "fieldtype": "Currency", - "label": "Taxes and Charges Added", - "oldfieldname": "other_charges_added_import", - "oldfieldtype": "Currency", - "options": "currency", - "print_hide": 1, - "read_only": 1 - }, - { - "fieldname": "taxes_and_charges_deducted", - "fieldtype": "Currency", - "label": "Taxes and Charges Deducted", - "oldfieldname": "other_charges_deducted_import", - "oldfieldtype": "Currency", - "options": "currency", - "print_hide": 1, - "read_only": 1 - }, - { - "fieldname": "total_taxes_and_charges", - "fieldtype": "Currency", - "label": "Total Taxes and Charges", - "options": "currency", - "print_hide": 1, - "read_only": 1 - }, - { - "collapsible": 1, - "collapsible_depends_on": "discount_amount", - "fieldname": "section_break_44", - "fieldtype": "Section Break", - "label": "Additional Discount" - }, - { - "default": "Grand Total", - "fieldname": "apply_discount_on", - "fieldtype": "Select", - "label": "Apply Additional Discount On", - "options": "\nGrand Total\nNet Total", - "print_hide": 1 - }, - { - "fieldname": "base_discount_amount", - "fieldtype": "Currency", - "label": "Additional Discount Amount (Company Currency)", - "options": "Company:company:default_currency", - "print_hide": 1, - "read_only": 1 - }, - { - "fieldname": "column_break_46", - "fieldtype": "Column Break" - }, - { - "fieldname": "additional_discount_percentage", - "fieldtype": "Float", - "label": "Additional Discount Percentage", - "print_hide": 1 - }, - { - "fieldname": "discount_amount", - "fieldtype": "Currency", - "label": "Additional Discount Amount", - "options": "currency", - "print_hide": 1 - }, - { - "fieldname": "section_break_49", - "fieldtype": "Section Break" - }, - { - "fieldname": "base_grand_total", - "fieldtype": "Currency", - "label": "Grand Total (Company Currency)", - "oldfieldname": "grand_total", - "oldfieldtype": "Currency", - "options": "Company:company:default_currency", - "print_hide": 1, - "read_only": 1 - }, - { - "fieldname": "base_rounding_adjustment", - "fieldtype": "Currency", - "label": "Rounding Adjustment (Company Currency)", - "no_copy": 1, - "options": "Company:company:default_currency", - "print_hide": 1, - "read_only": 1 - }, - { - "depends_on": "eval:!doc.disable_rounded_total", - "fieldname": "base_rounded_total", - "fieldtype": "Currency", - "label": "Rounded Total (Company Currency)", - "no_copy": 1, - "options": "Company:company:default_currency", - "print_hide": 1, - "read_only": 1 - }, - { - "fieldname": "base_in_words", - "fieldtype": "Data", - "label": "In Words (Company Currency)", - "oldfieldname": "in_words", - "oldfieldtype": "Data", - "print_hide": 1, - "read_only": 1 - }, - { - "fieldname": "column_break8", - "fieldtype": "Column Break", - "oldfieldtype": "Column Break", - "print_hide": 1, - "width": "50%" - }, - { - "fieldname": "grand_total", - "fieldtype": "Currency", - "in_list_view": 1, - "label": "Grand Total", - "oldfieldname": "grand_total_import", - "oldfieldtype": "Currency", - "options": "currency", - "read_only": 1 - }, - { - "fieldname": "rounding_adjustment", - "fieldtype": "Currency", - "label": "Rounding Adjustment", - "no_copy": 1, - "options": "currency", - "print_hide": 1, - "read_only": 1 - }, - { - "depends_on": "eval:!doc.disable_rounded_total", - "fieldname": "rounded_total", - "fieldtype": "Currency", - "label": "Rounded Total", - "no_copy": 1, - "options": "currency", - "print_hide": 1, - "read_only": 1 - }, - { - "fieldname": "in_words", - "fieldtype": "Data", - "label": "In Words", - "oldfieldname": "in_words_import", - "oldfieldtype": "Data", - "print_hide": 1, - "read_only": 1 - }, - { - "fieldname": "total_advance", - "fieldtype": "Currency", - "label": "Total Advance", - "no_copy": 1, - "oldfieldname": "total_advance", - "oldfieldtype": "Currency", - "options": "party_account_currency", - "print_hide": 1, - "read_only": 1 - }, - { - "fieldname": "outstanding_amount", - "fieldtype": "Currency", - "label": "Outstanding Amount", - "no_copy": 1, - "oldfieldname": "outstanding_amount", - "oldfieldtype": "Currency", - "options": "party_account_currency", - "print_hide": 1, - "read_only": 1 - }, - { - "default": "0", - "depends_on": "grand_total", - "fieldname": "disable_rounded_total", - "fieldtype": "Check", - "label": "Disable Rounded Total" - }, - { - "collapsible": 1, - "collapsible_depends_on": "paid_amount", - "depends_on": "eval:doc.is_paid===1||(doc.advances && doc.advances.length>0)", - "fieldname": "payments_section", - "fieldtype": "Section Break", - "label": "Payments" - }, - { - "fieldname": "mode_of_payment", - "fieldtype": "Link", - "label": "Mode of Payment", - "options": "Mode of Payment", - "print_hide": 1 - }, - { - "fieldname": "cash_bank_account", - "fieldtype": "Link", - "label": "Cash/Bank Account", - "options": "Account" - }, - { - "fieldname": "col_br_payments", - "fieldtype": "Column Break" - }, - { - "depends_on": "is_paid", - "fieldname": "paid_amount", - "fieldtype": "Currency", - "label": "Paid Amount", - "no_copy": 1, - "options": "currency", - "print_hide": 1 - }, - { - "fieldname": "base_paid_amount", - "fieldtype": "Currency", - "label": "Paid Amount (Company Currency)", - "no_copy": 1, - "options": "Company:company:default_currency", - "print_hide": 1, - "read_only": 1 - }, - { - "collapsible": 1, - "collapsible_depends_on": "write_off_amount", - "depends_on": "grand_total", - "fieldname": "write_off", - "fieldtype": "Section Break", - "label": "Write Off" - }, - { - "fieldname": "write_off_amount", - "fieldtype": "Currency", - "label": "Write Off Amount", - "no_copy": 1, - "options": "currency", - "print_hide": 1 - }, - { - "fieldname": "base_write_off_amount", - "fieldtype": "Currency", - "label": "Write Off Amount (Company Currency)", - "no_copy": 1, - "options": "Company:company:default_currency", - "print_hide": 1, - "read_only": 1 - }, - { - "fieldname": "column_break_61", - "fieldtype": "Column Break" - }, - { - "depends_on": "eval:flt(doc.write_off_amount)!=0", - "fieldname": "write_off_account", - "fieldtype": "Link", - "label": "Write Off Account", - "options": "Account", - "print_hide": 1 - }, - { - "depends_on": "eval:flt(doc.write_off_amount)!=0", - "fieldname": "write_off_cost_center", - "fieldtype": "Link", - "label": "Write Off Cost Center", - "options": "Cost Center", - "print_hide": 1 - }, - { - "collapsible": 1, - "collapsible_depends_on": "advances", - "fieldname": "advances_section", - "fieldtype": "Section Break", - "label": "Advance Payments", - "oldfieldtype": "Section Break", - "options": "fa fa-money", - "print_hide": 1 - }, - { - "default": "0", - "fieldname": "allocate_advances_automatically", - "fieldtype": "Check", - "label": "Set Advances and Allocate (FIFO)" - }, - { - "depends_on": "eval:!doc.allocate_advances_automatically", - "fieldname": "get_advances", - "fieldtype": "Button", - "label": "Get Advances Paid", - "oldfieldtype": "Button", - "print_hide": 1 - }, - { - "fieldname": "advances", - "fieldtype": "Table", - "label": "Advances", - "no_copy": 1, - "oldfieldname": "advance_allocation_details", - "oldfieldtype": "Table", - "options": "Purchase Invoice Advance", - "print_hide": 1 - }, - { - "collapsible": 1, - "collapsible_depends_on": "eval:(!doc.is_return)", - "fieldname": "payment_schedule_section", - "fieldtype": "Section Break", - "label": "Payment Terms" - }, - { - "fieldname": "payment_terms_template", - "fieldtype": "Link", - "label": "Payment Terms Template", - "options": "Payment Terms Template" - }, - { - "fieldname": "payment_schedule", - "fieldtype": "Table", - "label": "Payment Schedule", - "no_copy": 1, - "options": "Payment Schedule", - "print_hide": 1 - }, - { - "collapsible": 1, - "collapsible_depends_on": "terms", - "fieldname": "terms_section_break", - "fieldtype": "Section Break", - "label": "Terms and Conditions", - "options": "fa fa-legal" - }, - { - "fieldname": "tc_name", - "fieldtype": "Link", - "label": "Terms", - "options": "Terms and Conditions", - "print_hide": 1 - }, - { - "fieldname": "terms", - "fieldtype": "Text Editor", - "label": "Terms and Conditions1" - }, - { - "collapsible": 1, - "fieldname": "printing_settings", - "fieldtype": "Section Break", - "label": "Printing Settings" - }, - { - "allow_on_submit": 1, - "fieldname": "letter_head", - "fieldtype": "Link", - "label": "Letter Head", - "options": "Letter Head", - "print_hide": 1 - }, - { - "allow_on_submit": 1, - "default": "0", - "fieldname": "group_same_items", - "fieldtype": "Check", - "label": "Group same items", - "print_hide": 1 - }, - { - "fieldname": "column_break_112", - "fieldtype": "Column Break" - }, - { - "allow_on_submit": 1, - "fieldname": "select_print_heading", - "fieldtype": "Link", - "label": "Print Heading", - "no_copy": 1, - "oldfieldname": "select_print_heading", - "oldfieldtype": "Link", - "options": "Print Heading", - "print_hide": 1, - "report_hide": 1 - }, - { - "fieldname": "language", - "fieldtype": "Data", - "label": "Print Language", - "read_only": 1 - }, - { - "collapsible": 1, - "fieldname": "more_info", - "fieldtype": "Section Break", - "label": "More Information", - "oldfieldtype": "Section Break", - "options": "fa fa-file-text", - "print_hide": 1 - }, - { - "fieldname": "credit_to", - "fieldtype": "Link", - "label": "Credit To", - "oldfieldname": "credit_to", - "oldfieldtype": "Link", - "options": "Account", - "print_hide": 1, - "reqd": 1, - "search_index": 1 - }, - { - "fieldname": "party_account_currency", - "fieldtype": "Link", - "hidden": 1, - "label": "Party Account Currency", - "no_copy": 1, - "options": "Currency", - "print_hide": 1, - "read_only": 1 - }, - { - "default": "No", - "fieldname": "is_opening", - "fieldtype": "Select", - "label": "Is Opening", - "oldfieldname": "is_opening", - "oldfieldtype": "Select", - "options": "No\nYes", - "print_hide": 1 - }, - { - "fieldname": "against_expense_account", - "fieldtype": "Small Text", - "hidden": 1, - "label": "Against Expense Account", - "no_copy": 1, - "oldfieldname": "against_expense_account", - "oldfieldtype": "Small Text", - "print_hide": 1 - }, - { - "fieldname": "column_break_63", - "fieldtype": "Column Break" - }, - { - "default": "Draft", - "fieldname": "status", - "fieldtype": "Select", - "in_standard_filter": 1, - "label": "Status", - "options": "\nDraft\nReturn\nDebit Note Issued\nSubmitted\nPaid\nUnpaid\nOverdue\nCancelled" - }, - { - "fieldname": "inter_company_invoice_reference", - "fieldtype": "Link", - "label": "Inter Company Invoice Reference", - "options": "Sales Invoice", - "read_only": 1 - }, - { - "fieldname": "remarks", - "fieldtype": "Small Text", - "label": "Remarks", - "no_copy": 1, - "oldfieldname": "remarks", - "oldfieldtype": "Text", - "print_hide": 1 - }, - { - "fieldname": "subscription_section", - "fieldtype": "Section Break", - "label": "Subscription Section", - "print_hide": 1 - }, - { - "allow_on_submit": 1, - "description": "Start date of current invoice's period", - "fieldname": "from_date", - "fieldtype": "Date", - "label": "From Date", - "no_copy": 1, - "print_hide": 1 - }, - { - "allow_on_submit": 1, - "description": "End date of current invoice's period", - "fieldname": "to_date", - "fieldtype": "Date", - "label": "To Date", - "no_copy": 1, - "print_hide": 1 - }, - { - "fieldname": "column_break_114", - "fieldtype": "Column Break" - }, - { - "fieldname": "auto_repeat", - "fieldtype": "Link", - "label": "Auto Repeat", - "no_copy": 1, - "options": "Auto Repeat", - "print_hide": 1, - "read_only": 1 - }, - { - "allow_on_submit": 1, - "depends_on": "eval: doc.auto_repeat", - "fieldname": "update_auto_repeat_reference", - "fieldtype": "Button", - "label": "Update Auto Repeat Reference" - }, - { - "collapsible": 1, - "fieldname": "accounting_dimensions_section", - "fieldtype": "Section Break", - "label": "Accounting Dimensions " - }, - { - "fieldname": "dimension_col_break", - "fieldtype": "Column Break" - } - ], - "icon": "fa fa-file-text", - "idx": 204, - "is_submittable": 1, - "modified": "2019-05-25 22:04:28.889159", - "modified_by": "Administrator", - "module": "Accounts", - "name": "Purchase Invoice", - "name_case": "Title Case", - "owner": "Administrator", - "permissions": [ - { - "amend": 1, - "cancel": 1, - "create": 1, - "email": 1, - "print": 1, - "read": 1, - "report": 1, - "role": "Accounts User", - "share": 1, - "submit": 1, - "write": 1 - }, - { - "email": 1, - "print": 1, - "read": 1, - "report": 1, - "role": "Purchase User" - }, - { - "amend": 1, - "cancel": 1, - "create": 1, - "delete": 1, - "email": 1, - "print": 1, - "read": 1, - "report": 1, - "role": "Accounts Manager", - "share": 1, - "submit": 1, - "write": 1 - }, - { - "email": 1, - "print": 1, - "read": 1, - "report": 1, - "role": "Auditor" - }, - { - "permlevel": 1, - "read": 1, - "role": "Accounts Manager", - "write": 1 - } - ], - "search_fields": "posting_date, supplier, bill_no, base_grand_total, outstanding_amount", - "show_name_in_global_search": 1, - "sort_field": "modified", - "sort_order": "DESC", - "timeline_field": "supplier", - "title_field": "title", - "track_changes": 1 -} \ No newline at end of file + "allow_import": 1, + "autoname": "naming_series:", + "creation": "2013-05-21 16:16:39", + "doctype": "DocType", + "document_type": "Document", + "field_order": [ + "title", + "naming_series", + "supplier", + "supplier_name", + "tax_id", + "due_date", + "is_paid", + "is_return", + "apply_tds", + "column_break1", + "company", + "posting_date", + "posting_time", + "set_posting_time", + "amended_from", + "accounting_dimensions_section", + "cost_center", + "dimension_col_break", + "sb_14", + "on_hold", + "release_date", + "cb_17", + "hold_comment", + "supplier_invoice_details", + "bill_no", + "column_break_15", + "bill_date", + "returns", + "return_against", + "section_addresses", + "supplier_address", + "address_display", + "contact_person", + "contact_display", + "contact_mobile", + "contact_email", + "col_break_address", + "shipping_address", + "shipping_address_display", + "currency_and_price_list", + "currency", + "conversion_rate", + "column_break2", + "buying_price_list", + "price_list_currency", + "plc_conversion_rate", + "ignore_pricing_rule", + "sec_warehouse", + "set_warehouse", + "rejected_warehouse", + "col_break_warehouse", + "is_subcontracted", + "supplier_warehouse", + "items_section", + "update_stock", + "scan_barcode", + "items", + "pricing_rule_details", + "pricing_rules", + "raw_materials_supplied", + "supplied_items", + "section_break_26", + "total_qty", + "base_total", + "base_net_total", + "column_break_28", + "total", + "net_total", + "total_net_weight", + "taxes_section", + "tax_category", + "column_break_49", + "shipping_rule", + "section_break_51", + "taxes_and_charges", + "taxes", + "sec_tax_breakup", + "other_charges_calculation", + "totals", + "base_taxes_and_charges_added", + "base_taxes_and_charges_deducted", + "base_total_taxes_and_charges", + "column_break_40", + "taxes_and_charges_added", + "taxes_and_charges_deducted", + "total_taxes_and_charges", + "section_break_44", + "apply_discount_on", + "base_discount_amount", + "column_break_46", + "additional_discount_percentage", + "discount_amount", + "section_break_49", + "base_grand_total", + "base_rounding_adjustment", + "base_rounded_total", + "base_in_words", + "column_break8", + "grand_total", + "rounding_adjustment", + "rounded_total", + "in_words", + "total_advance", + "outstanding_amount", + "disable_rounded_total", + "payments_section", + "mode_of_payment", + "cash_bank_account", + "clearance_date", + "col_br_payments", + "paid_amount", + "base_paid_amount", + "write_off", + "write_off_amount", + "base_write_off_amount", + "column_break_61", + "write_off_account", + "write_off_cost_center", + "advances_section", + "allocate_advances_automatically", + "get_advances", + "advances", + "payment_schedule_section", + "payment_terms_template", + "payment_schedule", + "terms_section_break", + "tc_name", + "terms", + "printing_settings", + "letter_head", + "group_same_items", + "column_break_112", + "select_print_heading", + "language", + "more_info", + "credit_to", + "party_account_currency", + "is_opening", + "against_expense_account", + "column_break_63", + "status", + "inter_company_invoice_reference", + "remarks", + "subscription_section", + "from_date", + "to_date", + "column_break_114", + "auto_repeat", + "update_auto_repeat_reference" + ], + "fields": [ + { + "allow_on_submit": 1, + "default": "{supplier_name}", + "fieldname": "title", + "fieldtype": "Data", + "hidden": 1, + "label": "Title", + "no_copy": 1, + "print_hide": 1 + }, + { + "fieldname": "naming_series", + "fieldtype": "Select", + "label": "Series", + "no_copy": 1, + "oldfieldname": "naming_series", + "oldfieldtype": "Select", + "options": "ACC-PINV-.YYYY.-", + "print_hide": 1, + "reqd": 1, + "set_only_once": 1 + }, + { + "fieldname": "supplier", + "fieldtype": "Link", + "in_standard_filter": 1, + "label": "Supplier", + "oldfieldname": "supplier", + "oldfieldtype": "Link", + "options": "Supplier", + "print_hide": 1, + "search_index": 1 + }, + { + "bold": 1, + "depends_on": "supplier", + "fetch_from": "supplier.supplier_name", + "fieldname": "supplier_name", + "fieldtype": "Data", + "in_global_search": 1, + "label": "Supplier Name", + "oldfieldname": "supplier_name", + "oldfieldtype": "Data", + "read_only": 1 + }, + { + "fetch_from": "supplier.tax_id", + "fieldname": "tax_id", + "fieldtype": "Read Only", + "label": "Tax Id", + "print_hide": 1, + "read_only": 1 + }, + { + "fieldname": "due_date", + "fieldtype": "Date", + "label": "Due Date", + "oldfieldname": "due_date", + "oldfieldtype": "Date" + }, + { + "default": "0", + "fieldname": "is_paid", + "fieldtype": "Check", + "label": "Is Paid", + "print_hide": 1 + }, + { + "default": "0", + "fieldname": "is_return", + "fieldtype": "Check", + "label": "Is Return (Debit Note)", + "no_copy": 1, + "print_hide": 1 + }, + { + "default": "0", + "fieldname": "apply_tds", + "fieldtype": "Check", + "label": "Apply Tax Withholding Amount", + "print_hide": 1 + }, + { + "fieldname": "column_break1", + "fieldtype": "Column Break", + "oldfieldtype": "Column Break", + "width": "50%" + }, + { + "fieldname": "company", + "fieldtype": "Link", + "in_standard_filter": 1, + "label": "Company", + "options": "Company", + "print_hide": 1, + "remember_last_selected_value": 1 + }, + { + "fieldname": "cost_center", + "fieldtype": "Link", + "label": "Cost Center", + "options": "Cost Center" + }, + { + "default": "Today", + "fieldname": "posting_date", + "fieldtype": "Date", + "in_list_view": 1, + "label": "Date", + "oldfieldname": "posting_date", + "oldfieldtype": "Date", + "print_hide": 1, + "reqd": 1, + "search_index": 1 + }, + { + "fieldname": "posting_time", + "fieldtype": "Time", + "label": "Posting Time", + "no_copy": 1, + "print_hide": 1, + "print_width": "100px", + "width": "100px" + }, + { + "default": "0", + "depends_on": "eval:doc.docstatus==0", + "fieldname": "set_posting_time", + "fieldtype": "Check", + "label": "Edit Posting Date and Time", + "print_hide": 1 + }, + { + "fieldname": "amended_from", + "fieldtype": "Link", + "ignore_user_permissions": 1, + "label": "Amended From", + "no_copy": 1, + "oldfieldname": "amended_from", + "oldfieldtype": "Link", + "options": "Purchase Invoice", + "print_hide": 1, + "read_only": 1 + }, + { + "collapsible": 1, + "collapsible_depends_on": "eval:doc.on_hold", + "fieldname": "sb_14", + "fieldtype": "Section Break", + "label": "Hold Invoice" + }, + { + "default": "0", + "fieldname": "on_hold", + "fieldtype": "Check", + "label": "Hold Invoice" + }, + { + "depends_on": "eval:doc.on_hold", + "description": "Once set, this invoice will be on hold till the set date", + "fieldname": "release_date", + "fieldtype": "Date", + "label": "Release Date" + }, + { + "fieldname": "cb_17", + "fieldtype": "Column Break" + }, + { + "depends_on": "eval:doc.on_hold", + "fieldname": "hold_comment", + "fieldtype": "Small Text", + "label": "Reason For Putting On Hold" + }, + { + "collapsible": 1, + "collapsible_depends_on": "bill_no", + "fieldname": "supplier_invoice_details", + "fieldtype": "Section Break", + "label": "Supplier Invoice Details" + }, + { + "fieldname": "bill_no", + "fieldtype": "Data", + "label": "Supplier Invoice No", + "oldfieldname": "bill_no", + "oldfieldtype": "Data", + "print_hide": 1 + }, + { + "fieldname": "column_break_15", + "fieldtype": "Column Break" + }, + { + "fieldname": "bill_date", + "fieldtype": "Date", + "label": "Supplier Invoice Date", + "oldfieldname": "bill_date", + "oldfieldtype": "Date", + "print_hide": 1 + }, + { + "depends_on": "return_against", + "fieldname": "returns", + "fieldtype": "Section Break", + "label": "Returns" + }, + { + "depends_on": "return_against", + "fieldname": "return_against", + "fieldtype": "Link", + "label": "Return Against Purchase Invoice", + "no_copy": 1, + "options": "Purchase Invoice", + "print_hide": 1, + "read_only": 1 + }, + { + "collapsible": 1, + "fieldname": "section_addresses", + "fieldtype": "Section Break", + "label": "Address and Contact" + }, + { + "fieldname": "supplier_address", + "fieldtype": "Link", + "label": "Select Supplier Address", + "options": "Address", + "print_hide": 1 + }, + { + "fieldname": "address_display", + "fieldtype": "Small Text", + "label": "Address", + "read_only": 1 + }, + { + "fieldname": "contact_person", + "fieldtype": "Link", + "in_global_search": 1, + "label": "Contact Person", + "options": "Contact", + "print_hide": 1 + }, + { + "fieldname": "contact_display", + "fieldtype": "Small Text", + "label": "Contact", + "read_only": 1 + }, + { + "fieldname": "contact_mobile", + "fieldtype": "Small Text", + "label": "Mobile No", + "read_only": 1 + }, + { + "fieldname": "contact_email", + "fieldtype": "Small Text", + "label": "Contact Email", + "print_hide": 1, + "read_only": 1 + }, + { + "fieldname": "col_break_address", + "fieldtype": "Column Break" + }, + { + "fieldname": "shipping_address", + "fieldtype": "Link", + "label": "Select Shipping Address", + "options": "Address", + "print_hide": 1 + }, + { + "fieldname": "shipping_address_display", + "fieldtype": "Small Text", + "label": "Shipping Address", + "print_hide": 1, + "read_only": 1 + }, + { + "collapsible": 1, + "fieldname": "currency_and_price_list", + "fieldtype": "Section Break", + "label": "Currency and Price List", + "options": "fa fa-tag" + }, + { + "fieldname": "currency", + "fieldtype": "Link", + "label": "Currency", + "oldfieldname": "currency", + "oldfieldtype": "Select", + "options": "Currency", + "print_hide": 1 + }, + { + "fieldname": "conversion_rate", + "fieldtype": "Float", + "label": "Exchange Rate", + "oldfieldname": "conversion_rate", + "oldfieldtype": "Currency", + "precision": "9", + "print_hide": 1 + }, + { + "fieldname": "column_break2", + "fieldtype": "Column Break" + }, + { + "fieldname": "buying_price_list", + "fieldtype": "Link", + "label": "Price List", + "options": "Price List", + "print_hide": 1 + }, + { + "fieldname": "price_list_currency", + "fieldtype": "Link", + "label": "Price List Currency", + "options": "Currency", + "print_hide": 1, + "read_only": 1 + }, + { + "fieldname": "plc_conversion_rate", + "fieldtype": "Float", + "label": "Price List Exchange Rate", + "precision": "9", + "print_hide": 1 + }, + { + "default": "0", + "fieldname": "ignore_pricing_rule", + "fieldtype": "Check", + "label": "Ignore Pricing Rule", + "no_copy": 1, + "permlevel": 1, + "print_hide": 1 + }, + { + "fieldname": "sec_warehouse", + "fieldtype": "Section Break" + }, + { + "depends_on": "update_stock", + "fieldname": "set_warehouse", + "fieldtype": "Link", + "label": "Set Accepted Warehouse", + "options": "Warehouse", + "print_hide": 1 + }, + { + "depends_on": "update_stock", + "description": "Warehouse where you are maintaining stock of rejected items", + "fieldname": "rejected_warehouse", + "fieldtype": "Link", + "label": "Rejected Warehouse", + "no_copy": 1, + "options": "Warehouse", + "print_hide": 1 + }, + { + "fieldname": "col_break_warehouse", + "fieldtype": "Column Break" + }, + { + "default": "No", + "fieldname": "is_subcontracted", + "fieldtype": "Select", + "label": "Raw Materials Supplied", + "options": "No\nYes", + "print_hide": 1 + }, + { + "depends_on": "eval:doc.is_subcontracted==\"Yes\"", + "fieldname": "supplier_warehouse", + "fieldtype": "Link", + "label": "Supplier Warehouse", + "no_copy": 1, + "options": "Warehouse", + "print_hide": 1, + "print_width": "50px", + "width": "50px" + }, + { + "fieldname": "items_section", + "fieldtype": "Section Break", + "oldfieldtype": "Section Break", + "options": "fa fa-shopping-cart" + }, + { + "default": "0", + "fieldname": "update_stock", + "fieldtype": "Check", + "label": "Update Stock", + "print_hide": 1 + }, + { + "fieldname": "scan_barcode", + "fieldtype": "Data", + "label": "Scan Barcode" + }, + { + "allow_bulk_edit": 1, + "fieldname": "items", + "fieldtype": "Table", + "label": "Items", + "oldfieldname": "entries", + "oldfieldtype": "Table", + "options": "Purchase Invoice Item", + "reqd": 1 + }, + { + "fieldname": "pricing_rule_details", + "fieldtype": "Section Break", + "label": "Pricing Rules" + }, + { + "fieldname": "pricing_rules", + "fieldtype": "Table", + "label": "Pricing Rule Detail", + "options": "Pricing Rule Detail", + "read_only": 1 + }, + { + "collapsible_depends_on": "supplied_items", + "fieldname": "raw_materials_supplied", + "fieldtype": "Section Break", + "label": "Raw Materials Supplied" + }, + { + "fieldname": "supplied_items", + "fieldtype": "Table", + "label": "Supplied Items", + "options": "Purchase Receipt Item Supplied", + "read_only": 1 + }, + { + "fieldname": "section_break_26", + "fieldtype": "Section Break" + }, + { + "fieldname": "total_qty", + "fieldtype": "Float", + "label": "Total Quantity", + "read_only": 1 + }, + { + "fieldname": "base_total", + "fieldtype": "Currency", + "label": "Total (Company Currency)", + "options": "Company:company:default_currency", + "print_hide": 1, + "read_only": 1 + }, + { + "fieldname": "base_net_total", + "fieldtype": "Currency", + "label": "Net Total (Company Currency)", + "oldfieldname": "net_total", + "oldfieldtype": "Currency", + "options": "Company:company:default_currency", + "print_hide": 1, + "read_only": 1 + }, + { + "fieldname": "column_break_28", + "fieldtype": "Column Break" + }, + { + "fieldname": "total", + "fieldtype": "Currency", + "label": "Total", + "options": "currency", + "read_only": 1 + }, + { + "fieldname": "net_total", + "fieldtype": "Currency", + "label": "Net Total", + "oldfieldname": "net_total_import", + "oldfieldtype": "Currency", + "options": "currency", + "print_hide": 1, + "read_only": 1 + }, + { + "fieldname": "total_net_weight", + "fieldtype": "Float", + "label": "Total Net Weight", + "print_hide": 1, + "read_only": 1 + }, + { + "fieldname": "taxes_section", + "fieldtype": "Section Break", + "oldfieldtype": "Section Break", + "options": "fa fa-money" + }, + { + "fieldname": "tax_category", + "fieldtype": "Link", + "label": "Tax Category", + "options": "Tax Category", + "print_hide": 1 + }, + { + "fieldname": "column_break_49", + "fieldtype": "Column Break" + }, + { + "fieldname": "shipping_rule", + "fieldtype": "Link", + "label": "Shipping Rule", + "options": "Shipping Rule", + "print_hide": 1 + }, + { + "fieldname": "section_break_51", + "fieldtype": "Section Break" + }, + { + "fieldname": "taxes_and_charges", + "fieldtype": "Link", + "label": "Purchase Taxes and Charges Template", + "oldfieldname": "purchase_other_charges", + "oldfieldtype": "Link", + "options": "Purchase Taxes and Charges Template", + "print_hide": 1 + }, + { + "fieldname": "taxes", + "fieldtype": "Table", + "label": "Purchase Taxes and Charges", + "oldfieldname": "purchase_tax_details", + "oldfieldtype": "Table", + "options": "Purchase Taxes and Charges" + }, + { + "collapsible": 1, + "fieldname": "sec_tax_breakup", + "fieldtype": "Section Break", + "label": "Tax Breakup" + }, + { + "fieldname": "other_charges_calculation", + "fieldtype": "Text", + "label": "Taxes and Charges Calculation", + "no_copy": 1, + "oldfieldtype": "HTML", + "print_hide": 1, + "read_only": 1 + }, + { + "fieldname": "totals", + "fieldtype": "Section Break", + "oldfieldtype": "Section Break", + "options": "fa fa-money" + }, + { + "fieldname": "base_taxes_and_charges_added", + "fieldtype": "Currency", + "label": "Taxes and Charges Added (Company Currency)", + "oldfieldname": "other_charges_added", + "oldfieldtype": "Currency", + "options": "Company:company:default_currency", + "print_hide": 1, + "read_only": 1 + }, + { + "fieldname": "base_taxes_and_charges_deducted", + "fieldtype": "Currency", + "label": "Taxes and Charges Deducted (Company Currency)", + "oldfieldname": "other_charges_deducted", + "oldfieldtype": "Currency", + "options": "Company:company:default_currency", + "print_hide": 1, + "read_only": 1 + }, + { + "fieldname": "base_total_taxes_and_charges", + "fieldtype": "Currency", + "label": "Total Taxes and Charges (Company Currency)", + "oldfieldname": "total_tax", + "oldfieldtype": "Currency", + "options": "Company:company:default_currency", + "print_hide": 1, + "read_only": 1 + }, + { + "fieldname": "column_break_40", + "fieldtype": "Column Break" + }, + { + "fieldname": "taxes_and_charges_added", + "fieldtype": "Currency", + "label": "Taxes and Charges Added", + "oldfieldname": "other_charges_added_import", + "oldfieldtype": "Currency", + "options": "currency", + "print_hide": 1, + "read_only": 1 + }, + { + "fieldname": "taxes_and_charges_deducted", + "fieldtype": "Currency", + "label": "Taxes and Charges Deducted", + "oldfieldname": "other_charges_deducted_import", + "oldfieldtype": "Currency", + "options": "currency", + "print_hide": 1, + "read_only": 1 + }, + { + "fieldname": "total_taxes_and_charges", + "fieldtype": "Currency", + "label": "Total Taxes and Charges", + "options": "currency", + "print_hide": 1, + "read_only": 1 + }, + { + "collapsible": 1, + "collapsible_depends_on": "discount_amount", + "fieldname": "section_break_44", + "fieldtype": "Section Break", + "label": "Additional Discount" + }, + { + "default": "Grand Total", + "fieldname": "apply_discount_on", + "fieldtype": "Select", + "label": "Apply Additional Discount On", + "options": "\nGrand Total\nNet Total", + "print_hide": 1 + }, + { + "fieldname": "base_discount_amount", + "fieldtype": "Currency", + "label": "Additional Discount Amount (Company Currency)", + "options": "Company:company:default_currency", + "print_hide": 1, + "read_only": 1 + }, + { + "fieldname": "column_break_46", + "fieldtype": "Column Break" + }, + { + "fieldname": "additional_discount_percentage", + "fieldtype": "Float", + "label": "Additional Discount Percentage", + "print_hide": 1 + }, + { + "fieldname": "discount_amount", + "fieldtype": "Currency", + "label": "Additional Discount Amount", + "options": "currency", + "print_hide": 1 + }, + { + "fieldname": "section_break_49", + "fieldtype": "Section Break" + }, + { + "fieldname": "base_grand_total", + "fieldtype": "Currency", + "label": "Grand Total (Company Currency)", + "oldfieldname": "grand_total", + "oldfieldtype": "Currency", + "options": "Company:company:default_currency", + "print_hide": 1, + "read_only": 1 + }, + { + "fieldname": "base_rounding_adjustment", + "fieldtype": "Currency", + "label": "Rounding Adjustment (Company Currency)", + "no_copy": 1, + "options": "Company:company:default_currency", + "print_hide": 1, + "read_only": 1 + }, + { + "depends_on": "eval:!doc.disable_rounded_total", + "fieldname": "base_rounded_total", + "fieldtype": "Currency", + "label": "Rounded Total (Company Currency)", + "no_copy": 1, + "options": "Company:company:default_currency", + "print_hide": 1, + "read_only": 1 + }, + { + "fieldname": "base_in_words", + "fieldtype": "Data", + "label": "In Words (Company Currency)", + "oldfieldname": "in_words", + "oldfieldtype": "Data", + "print_hide": 1, + "read_only": 1 + }, + { + "fieldname": "column_break8", + "fieldtype": "Column Break", + "oldfieldtype": "Column Break", + "print_hide": 1, + "width": "50%" + }, + { + "fieldname": "grand_total", + "fieldtype": "Currency", + "in_list_view": 1, + "label": "Grand Total", + "oldfieldname": "grand_total_import", + "oldfieldtype": "Currency", + "options": "currency", + "read_only": 1 + }, + { + "fieldname": "rounding_adjustment", + "fieldtype": "Currency", + "label": "Rounding Adjustment", + "no_copy": 1, + "options": "currency", + "print_hide": 1, + "read_only": 1 + }, + { + "depends_on": "eval:!doc.disable_rounded_total", + "fieldname": "rounded_total", + "fieldtype": "Currency", + "label": "Rounded Total", + "no_copy": 1, + "options": "currency", + "print_hide": 1, + "read_only": 1 + }, + { + "fieldname": "in_words", + "fieldtype": "Data", + "label": "In Words", + "oldfieldname": "in_words_import", + "oldfieldtype": "Data", + "print_hide": 1, + "read_only": 1 + }, + { + "fieldname": "total_advance", + "fieldtype": "Currency", + "label": "Total Advance", + "no_copy": 1, + "oldfieldname": "total_advance", + "oldfieldtype": "Currency", + "options": "party_account_currency", + "print_hide": 1, + "read_only": 1 + }, + { + "fieldname": "outstanding_amount", + "fieldtype": "Currency", + "label": "Outstanding Amount", + "no_copy": 1, + "oldfieldname": "outstanding_amount", + "oldfieldtype": "Currency", + "options": "party_account_currency", + "print_hide": 1, + "read_only": 1 + }, + { + "default": "0", + "depends_on": "grand_total", + "fieldname": "disable_rounded_total", + "fieldtype": "Check", + "label": "Disable Rounded Total" + }, + { + "collapsible": 1, + "collapsible_depends_on": "paid_amount", + "depends_on": "eval:doc.is_paid===1||(doc.advances && doc.advances.length>0)", + "fieldname": "payments_section", + "fieldtype": "Section Break", + "label": "Payments" + }, + { + "fieldname": "mode_of_payment", + "fieldtype": "Link", + "label": "Mode of Payment", + "options": "Mode of Payment", + "print_hide": 1 + }, + { + "fieldname": "cash_bank_account", + "fieldtype": "Link", + "label": "Cash/Bank Account", + "options": "Account" + }, + { + "fieldname": "clearance_date", + "fieldtype": "Date", + "hidden": 1, + "label": "Clearance Date" + }, + { + "fieldname": "col_br_payments", + "fieldtype": "Column Break" + }, + { + "depends_on": "is_paid", + "fieldname": "paid_amount", + "fieldtype": "Currency", + "label": "Paid Amount", + "no_copy": 1, + "options": "currency", + "print_hide": 1 + }, + { + "fieldname": "base_paid_amount", + "fieldtype": "Currency", + "label": "Paid Amount (Company Currency)", + "no_copy": 1, + "options": "Company:company:default_currency", + "print_hide": 1, + "read_only": 1 + }, + { + "collapsible": 1, + "collapsible_depends_on": "write_off_amount", + "depends_on": "grand_total", + "fieldname": "write_off", + "fieldtype": "Section Break", + "label": "Write Off" + }, + { + "fieldname": "write_off_amount", + "fieldtype": "Currency", + "label": "Write Off Amount", + "no_copy": 1, + "options": "currency", + "print_hide": 1 + }, + { + "fieldname": "base_write_off_amount", + "fieldtype": "Currency", + "label": "Write Off Amount (Company Currency)", + "no_copy": 1, + "options": "Company:company:default_currency", + "print_hide": 1, + "read_only": 1 + }, + { + "fieldname": "column_break_61", + "fieldtype": "Column Break" + }, + { + "depends_on": "eval:flt(doc.write_off_amount)!=0", + "fieldname": "write_off_account", + "fieldtype": "Link", + "label": "Write Off Account", + "options": "Account", + "print_hide": 1 + }, + { + "depends_on": "eval:flt(doc.write_off_amount)!=0", + "fieldname": "write_off_cost_center", + "fieldtype": "Link", + "label": "Write Off Cost Center", + "options": "Cost Center", + "print_hide": 1 + }, + { + "collapsible": 1, + "collapsible_depends_on": "advances", + "fieldname": "advances_section", + "fieldtype": "Section Break", + "label": "Advance Payments", + "oldfieldtype": "Section Break", + "options": "fa fa-money", + "print_hide": 1 + }, + { + "default": "0", + "fieldname": "allocate_advances_automatically", + "fieldtype": "Check", + "label": "Set Advances and Allocate (FIFO)" + }, + { + "depends_on": "eval:!doc.allocate_advances_automatically", + "fieldname": "get_advances", + "fieldtype": "Button", + "label": "Get Advances Paid", + "oldfieldtype": "Button", + "print_hide": 1 + }, + { + "fieldname": "advances", + "fieldtype": "Table", + "label": "Advances", + "no_copy": 1, + "oldfieldname": "advance_allocation_details", + "oldfieldtype": "Table", + "options": "Purchase Invoice Advance", + "print_hide": 1 + }, + { + "collapsible": 1, + "collapsible_depends_on": "eval:(!doc.is_return)", + "fieldname": "payment_schedule_section", + "fieldtype": "Section Break", + "label": "Payment Terms" + }, + { + "fieldname": "payment_terms_template", + "fieldtype": "Link", + "label": "Payment Terms Template", + "options": "Payment Terms Template" + }, + { + "fieldname": "payment_schedule", + "fieldtype": "Table", + "label": "Payment Schedule", + "no_copy": 1, + "options": "Payment Schedule", + "print_hide": 1 + }, + { + "collapsible": 1, + "collapsible_depends_on": "terms", + "fieldname": "terms_section_break", + "fieldtype": "Section Break", + "label": "Terms and Conditions", + "options": "fa fa-legal" + }, + { + "fieldname": "tc_name", + "fieldtype": "Link", + "label": "Terms", + "options": "Terms and Conditions", + "print_hide": 1 + }, + { + "fieldname": "terms", + "fieldtype": "Text Editor", + "label": "Terms and Conditions1" + }, + { + "collapsible": 1, + "fieldname": "printing_settings", + "fieldtype": "Section Break", + "label": "Printing Settings" + }, + { + "allow_on_submit": 1, + "fieldname": "letter_head", + "fieldtype": "Link", + "label": "Letter Head", + "options": "Letter Head", + "print_hide": 1 + }, + { + "allow_on_submit": 1, + "default": "0", + "fieldname": "group_same_items", + "fieldtype": "Check", + "label": "Group same items", + "print_hide": 1 + }, + { + "fieldname": "column_break_112", + "fieldtype": "Column Break" + }, + { + "allow_on_submit": 1, + "fieldname": "select_print_heading", + "fieldtype": "Link", + "label": "Print Heading", + "no_copy": 1, + "oldfieldname": "select_print_heading", + "oldfieldtype": "Link", + "options": "Print Heading", + "print_hide": 1, + "report_hide": 1 + }, + { + "fieldname": "language", + "fieldtype": "Data", + "label": "Print Language", + "read_only": 1 + }, + { + "collapsible": 1, + "fieldname": "more_info", + "fieldtype": "Section Break", + "label": "More Information", + "oldfieldtype": "Section Break", + "options": "fa fa-file-text", + "print_hide": 1 + }, + { + "fieldname": "credit_to", + "fieldtype": "Link", + "label": "Credit To", + "oldfieldname": "credit_to", + "oldfieldtype": "Link", + "options": "Account", + "print_hide": 1, + "reqd": 1, + "search_index": 1 + }, + { + "fieldname": "party_account_currency", + "fieldtype": "Link", + "hidden": 1, + "label": "Party Account Currency", + "no_copy": 1, + "options": "Currency", + "print_hide": 1, + "read_only": 1 + }, + { + "default": "No", + "fieldname": "is_opening", + "fieldtype": "Select", + "label": "Is Opening", + "oldfieldname": "is_opening", + "oldfieldtype": "Select", + "options": "No\nYes", + "print_hide": 1 + }, + { + "fieldname": "against_expense_account", + "fieldtype": "Small Text", + "hidden": 1, + "label": "Against Expense Account", + "no_copy": 1, + "oldfieldname": "against_expense_account", + "oldfieldtype": "Small Text", + "print_hide": 1 + }, + { + "fieldname": "column_break_63", + "fieldtype": "Column Break" + }, + { + "default": "Draft", + "fieldname": "status", + "fieldtype": "Select", + "in_standard_filter": 1, + "label": "Status", + "options": "\nDraft\nReturn\nDebit Note Issued\nSubmitted\nPaid\nUnpaid\nOverdue\nCancelled" + }, + { + "fieldname": "inter_company_invoice_reference", + "fieldtype": "Link", + "label": "Inter Company Invoice Reference", + "options": "Sales Invoice", + "read_only": 1 + }, + { + "fieldname": "remarks", + "fieldtype": "Small Text", + "label": "Remarks", + "no_copy": 1, + "oldfieldname": "remarks", + "oldfieldtype": "Text", + "print_hide": 1 + }, + { + "fieldname": "subscription_section", + "fieldtype": "Section Break", + "label": "Subscription Section", + "print_hide": 1 + }, + { + "allow_on_submit": 1, + "description": "Start date of current invoice's period", + "fieldname": "from_date", + "fieldtype": "Date", + "label": "From Date", + "no_copy": 1, + "print_hide": 1 + }, + { + "allow_on_submit": 1, + "description": "End date of current invoice's period", + "fieldname": "to_date", + "fieldtype": "Date", + "label": "To Date", + "no_copy": 1, + "print_hide": 1 + }, + { + "fieldname": "column_break_114", + "fieldtype": "Column Break" + }, + { + "fieldname": "auto_repeat", + "fieldtype": "Link", + "label": "Auto Repeat", + "no_copy": 1, + "options": "Auto Repeat", + "print_hide": 1, + "read_only": 1 + }, + { + "allow_on_submit": 1, + "depends_on": "eval: doc.auto_repeat", + "fieldname": "update_auto_repeat_reference", + "fieldtype": "Button", + "label": "Update Auto Repeat Reference" + }, + { + "collapsible": 1, + "fieldname": "accounting_dimensions_section", + "fieldtype": "Section Break", + "label": "Accounting Dimensions " + }, + { + "fieldname": "dimension_col_break", + "fieldtype": "Column Break" + } + ], + "icon": "fa fa-file-text", + "idx": 204, + "is_submittable": 1, + "modified": "2019-06-18 22:04:28.889159", + "modified_by": "Administrator", + "module": "Accounts", + "name": "Purchase Invoice", + "name_case": "Title Case", + "owner": "Administrator", + "permissions": [ + { + "amend": 1, + "cancel": 1, + "create": 1, + "email": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "Accounts User", + "share": 1, + "submit": 1, + "write": 1 + }, + { + "email": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "Purchase User" + }, + { + "amend": 1, + "cancel": 1, + "create": 1, + "delete": 1, + "email": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "Accounts Manager", + "share": 1, + "submit": 1, + "write": 1 + }, + { + "email": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "Auditor" + }, + { + "permlevel": 1, + "read": 1, + "role": "Accounts Manager", + "write": 1 + } + ], + "search_fields": "posting_date, supplier, bill_no, base_grand_total, outstanding_amount", + "show_name_in_global_search": 1, + "sort_field": "modified", + "sort_order": "DESC", + "timeline_field": "supplier", + "title_field": "title", + "track_changes": 1 + } \ No newline at end of file diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py index 4d87edf375..a6f6acea66 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py @@ -105,7 +105,7 @@ class PurchaseInvoice(BuyingController): def validate_release_date(self): if self.release_date and getdate(nowdate()) >= getdate(self.release_date): - frappe.msgprint('Release date must be in the future', raise_exception=True) + frappe.throw(_('Release date must be in the future')) def validate_cash(self): if not self.cash_bank_account and flt(self.paid_amount): @@ -787,9 +787,8 @@ class PurchaseInvoice(BuyingController): for d in self.items: if d.project and d.project not in project_list: project = frappe.get_doc("Project", d.project) - project.flags.dont_sync_tasks = True project.update_purchase_costing() - project.save() + project.db_update() project_list.append(d.project) def validate_supplier_invoice(self): diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice_list.js b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice_list.js index 4103e57df8..4e76a8d955 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice_list.js +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice_list.js @@ -6,8 +6,8 @@ frappe.listview_settings['Purchase Invoice'] = { add_fields: ["supplier", "supplier_name", "base_grand_total", "outstanding_amount", "due_date", "company", "currency", "is_return", "release_date", "on_hold"], get_indicator: function(doc) { - if(cint(doc.is_return)==1) { - return [__("Return"), "darkgrey", "is_return,=,Yes"]; + if(flt(doc.outstanding_amount) < 0 && doc.docstatus == 1) { + return [__("Debit Note Issued"), "darkgrey", "outstanding_amount,<,0"] } else if(flt(doc.outstanding_amount) > 0 && doc.docstatus==1) { if(cint(doc.on_hold) && !doc.release_date) { return [__("On Hold"), "darkgrey"]; @@ -18,9 +18,9 @@ frappe.listview_settings['Purchase Invoice'] = { } else { return [__("Unpaid"), "orange", "outstanding_amount,>,0|due,>=,Today"]; } - } else if(flt(doc.outstanding_amount) < 0 && doc.docstatus == 1) { - return [__("Debit Note Issued"), "darkgrey", "outstanding_amount,<,0"] - }else if(flt(doc.outstanding_amount)==0 && doc.docstatus==1) { + } else if(cint(doc.is_return)) { + return [__("Return"), "darkgrey", "is_return,=,Yes"]; + } else if(flt(doc.outstanding_amount)==0 && doc.docstatus==1) { return [__("Paid"), "green", "outstanding_amount,=,0"]; } } diff --git a/erpnext/accounts/doctype/sales_invoice/regional/india.js b/erpnext/accounts/doctype/sales_invoice/regional/india.js new file mode 100644 index 0000000000..c8305e325f --- /dev/null +++ b/erpnext/accounts/doctype/sales_invoice/regional/india.js @@ -0,0 +1,38 @@ +frappe.ui.form.on("Sales Invoice", { + setup: function(frm) { + frm.set_query('transporter', function() { + return { + filters: { + 'is_transporter': 1 + } + }; + }); + + frm.set_query('driver', function(doc) { + return { + filters: { + 'transporter': doc.transporter + } + }; + }); + }, + + refresh: function(frm) { + if(frm.doc.docstatus == 1 && !frm.is_dirty() + && !frm.doc.is_return && !frm.doc.ewaybill) { + + frm.add_custom_button('e-Way Bill JSON', () => { + var w = window.open( + frappe.urllib.get_full_url( + "/api/method/erpnext.regional.india.utils.generate_ewb_json?" + + "dt=" + encodeURIComponent(frm.doc.doctype) + + "&dn=" + encodeURIComponent(frm.doc.name) + ) + ); + if (!w) { + frappe.msgprint(__("Please enable pop-ups")); return; + } + }, __("Make")); + } + } +}); diff --git a/erpnext/accounts/doctype/sales_invoice/regional/india_list.js b/erpnext/accounts/doctype/sales_invoice/regional/india_list.js new file mode 100644 index 0000000000..66d74b4b06 --- /dev/null +++ b/erpnext/accounts/doctype/sales_invoice/regional/india_list.js @@ -0,0 +1,33 @@ +var globalOnload = frappe.listview_settings['Sales Invoice'].onload; +frappe.listview_settings['Sales Invoice'].onload = function (doclist) { + + // Provision in case onload event is added to sales_invoice.js in future + if (globalOnload) { + globalOnload(doclist); + } + + const action = () => { + const selected_docs = doclist.get_checked_items(); + const docnames = doclist.get_checked_items(true); + + for (let doc of selected_docs) { + if (doc.docstatus !== 1) { + frappe.throw(__("e-Way Bill JSON can only be generated from a submitted document")); + } + } + + var w = window.open( + frappe.urllib.get_full_url( + "/api/method/erpnext.regional.india.utils.generate_ewb_json?" + + "dt=" + encodeURIComponent(doclist.doctype) + + "&dn=" + encodeURIComponent(docnames) + ) + ); + if (!w) { + frappe.msgprint(__("Please enable pop-ups")); return; + } + + }; + + doclist.page.add_actions_menu_item(__('Generate e-Way Bill JSON'), action, false); +}; \ No newline at end of file diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.json b/erpnext/accounts/doctype/sales_invoice/sales_invoice.json index c0a1abd785..1f578366d9 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.json +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.json @@ -1,1624 +1,1623 @@ { - "allow_import": 1, - "autoname": "naming_series:", - "creation": "2013-05-24 19:29:05", - "doctype": "DocType", - "engine": "InnoDB", - "field_order": [ - "customer_section", - "title", - "naming_series", - "customer", - "customer_name", - "tax_id", - "is_pos", - "pos_profile", - "offline_pos_name", - "is_return", - "column_break1", - "company", - "posting_date", - "posting_time", - "set_posting_time", - "due_date", - "amended_from", - "returns", - "return_against", - "column_break_21", - "update_billed_amount_in_sales_order", - "accounting_dimensions_section", - "project", - "dimension_col_break", - "cost_center", - "customer_po_details", - "po_no", - "column_break_23", - "po_date", - "address_and_contact", - "customer_address", - "address_display", - "contact_person", - "contact_display", - "contact_mobile", - "contact_email", - "territory", - "col_break4", - "shipping_address_name", - "shipping_address", - "company_address", - "company_address_display", - "currency_and_price_list", - "currency", - "conversion_rate", - "column_break2", - "selling_price_list", - "price_list_currency", - "plc_conversion_rate", - "ignore_pricing_rule", - "sec_warehouse", - "set_warehouse", - "items_section", - "update_stock", - "scan_barcode", - "items", - "pricing_rule_details", - "pricing_rules", - "packing_list", - "packed_items", - "product_bundle_help", - "time_sheet_list", - "timesheets", - "total_billing_amount", - "section_break_30", - "total_qty", - "base_total", - "base_net_total", - "column_break_32", - "total", - "net_total", - "total_net_weight", - "taxes_section", - "taxes_and_charges", - "column_break_38", - "shipping_rule", - "tax_category", - "section_break_40", - "taxes", - "sec_tax_breakup", - "other_charges_calculation", - "section_break_43", - "base_total_taxes_and_charges", - "column_break_47", - "total_taxes_and_charges", - "loyalty_points_redemption", - "loyalty_points", - "loyalty_amount", - "redeem_loyalty_points", - "column_break_77", - "loyalty_program", - "loyalty_redemption_account", - "loyalty_redemption_cost_center", - "section_break_49", - "apply_discount_on", - "base_discount_amount", - "column_break_51", - "additional_discount_percentage", - "discount_amount", - "totals", - "base_grand_total", - "base_rounding_adjustment", - "base_rounded_total", - "base_in_words", - "column_break5", - "grand_total", - "rounding_adjustment", - "rounded_total", - "in_words", - "total_advance", - "outstanding_amount", - "advances_section", - "allocate_advances_automatically", - "get_advances", - "advances", - "payment_schedule_section", - "payment_terms_template", - "payment_schedule", - "payments_section", - "cash_bank_account", - "payments", - "section_break_84", - "base_paid_amount", - "column_break_86", - "paid_amount", - "section_break_88", - "base_change_amount", - "column_break_90", - "change_amount", - "account_for_change_amount", - "column_break4", - "write_off_amount", - "base_write_off_amount", - "write_off_outstanding_amount_automatically", - "column_break_74", - "write_off_account", - "write_off_cost_center", - "terms_section_break", - "tc_name", - "terms", - "edit_printing_settings", - "letter_head", - "group_same_items", - "language", - "column_break_84", - "select_print_heading", - "more_information", - "inter_company_invoice_reference", - "customer_group", - "campaign", - "is_discounted", - "col_break23", - "status", - "source", - "more_info", - "debit_to", - "party_account_currency", - "is_opening", - "c_form_applicable", - "c_form_no", - "column_break8", - "remarks", - "sales_team_section_break", - "sales_partner", - "column_break10", - "commission_rate", - "total_commission", - "section_break2", - "sales_team", - "subscription_section", - "from_date", - "to_date", - "column_break_140", - "auto_repeat", - "update_auto_repeat_reference", - "against_income_account", - "pos_total_qty" - ], - "fields": [ - { - "fieldname": "customer_section", - "fieldtype": "Section Break", - "options": "fa fa-user" - }, - { - "allow_on_submit": 1, - "default": "{customer_name}", - "fieldname": "title", - "fieldtype": "Data", - "hidden": 1, - "label": "Title", - "no_copy": 1, - "print_hide": 1 - }, - { - "bold": 1, - "fieldname": "naming_series", - "fieldtype": "Select", - "label": "Series", - "no_copy": 1, - "oldfieldname": "naming_series", - "oldfieldtype": "Select", - "options": "ACC-SINV-.YYYY.-", - "print_hide": 1, - "reqd": 1, - "set_only_once": 1 - }, - { - "bold": 1, - "fieldname": "customer", - "fieldtype": "Link", - "in_standard_filter": 1, - "label": "Customer", - "oldfieldname": "customer", - "oldfieldtype": "Link", - "options": "Customer", - "print_hide": 1, - "search_index": 1 - }, - { - "bold": 1, - "depends_on": "customer", - "fetch_from": "customer.customer_name", - "fieldname": "customer_name", - "fieldtype": "Data", - "in_global_search": 1, - "label": "Customer Name", - "oldfieldname": "customer_name", - "oldfieldtype": "Data", - "read_only": 1 - }, - { - "fieldname": "tax_id", - "fieldtype": "Data", - "label": "Tax Id", - "print_hide": 1, - "read_only": 1 - }, - { - "fieldname": "project", - "fieldtype": "Link", - "in_global_search": 1, - "label": "Project", - "oldfieldname": "project_name", - "oldfieldtype": "Link", - "options": "Project", - "print_hide": 1 - }, - { - "default": "0", - "fieldname": "is_pos", - "fieldtype": "Check", - "label": "Include Payment (POS)", - "oldfieldname": "is_pos", - "oldfieldtype": "Check", - "print_hide": 1 - }, - { - "depends_on": "is_pos", - "fieldname": "pos_profile", - "fieldtype": "Link", - "label": "POS Profile", - "options": "POS Profile", - "print_hide": 1 - }, - { - "fieldname": "offline_pos_name", - "fieldtype": "Data", - "hidden": 1, - "label": "Offline POS Name", - "print_hide": 1, - "read_only": 1 - }, - { - "default": "0", - "fieldname": "is_return", - "fieldtype": "Check", - "label": "Is Return (Credit Note)", - "no_copy": 1, - "print_hide": 1 - }, - { - "fieldname": "column_break1", - "fieldtype": "Column Break", - "oldfieldtype": "Column Break" - }, - { - "fieldname": "company", - "fieldtype": "Link", - "in_standard_filter": 1, - "label": "Company", - "oldfieldname": "company", - "oldfieldtype": "Link", - "options": "Company", - "print_hide": 1, - "remember_last_selected_value": 1, - "reqd": 1 - }, - { - "fieldname": "cost_center", - "fieldtype": "Link", - "label": "Cost Center", - "options": "Cost Center" - }, - { - "bold": 1, - "default": "Today", - "fieldname": "posting_date", - "fieldtype": "Date", - "label": "Date", - "no_copy": 1, - "oldfieldname": "posting_date", - "oldfieldtype": "Date", - "reqd": 1, - "search_index": 1 - }, - { - "fieldname": "posting_time", - "fieldtype": "Time", - "label": "Posting Time", - "no_copy": 1, - "oldfieldname": "posting_time", - "oldfieldtype": "Time", - "print_hide": 1 - }, - { - "default": "0", - "depends_on": "eval:doc.docstatus==0", - "fieldname": "set_posting_time", - "fieldtype": "Check", - "label": "Edit Posting Date and Time", - "print_hide": 1 - }, - { - "fieldname": "due_date", - "fieldtype": "Date", - "label": "Payment Due Date", - "no_copy": 1, - "oldfieldname": "due_date", - "oldfieldtype": "Date" - }, - { - "fieldname": "amended_from", - "fieldtype": "Link", - "ignore_user_permissions": 1, - "label": "Amended From", - "no_copy": 1, - "oldfieldname": "amended_from", - "oldfieldtype": "Link", - "options": "Sales Invoice", - "print_hide": 1, - "read_only": 1 - }, - { - "depends_on": "return_against", - "fieldname": "returns", - "fieldtype": "Section Break", - "label": "Returns" - }, - { - "depends_on": "return_against", - "fieldname": "return_against", - "fieldtype": "Link", - "label": "Return Against Sales Invoice", - "no_copy": 1, - "options": "Sales Invoice", - "print_hide": 1, - "read_only": 1 - }, - { - "fieldname": "column_break_21", - "fieldtype": "Column Break" - }, - { - "default": "0", - "depends_on": "eval: doc.is_return && doc.return_against", - "fieldname": "update_billed_amount_in_sales_order", - "fieldtype": "Check", - "label": "Update Billed Amount in Sales Order" - }, - { - "collapsible": 1, - "collapsible_depends_on": "po_no", - "fieldname": "customer_po_details", - "fieldtype": "Section Break", - "label": "Customer PO Details" - }, - { - "allow_on_submit": 1, - "fieldname": "po_no", - "fieldtype": "Data", - "label": "Customer's Purchase Order", - "no_copy": 1, - "print_hide": 1 - }, - { - "fieldname": "column_break_23", - "fieldtype": "Column Break" - }, - { - "allow_on_submit": 1, - "fieldname": "po_date", - "fieldtype": "Date", - "label": "Customer's Purchase Order Date" - }, - { - "collapsible": 1, - "fieldname": "address_and_contact", - "fieldtype": "Section Break", - "label": "Address and Contact" - }, - { - "fieldname": "customer_address", - "fieldtype": "Link", - "label": "Customer Address", - "options": "Address", - "print_hide": 1 - }, - { - "fieldname": "address_display", - "fieldtype": "Small Text", - "label": "Address", - "read_only": 1 - }, - { - "fieldname": "contact_person", - "fieldtype": "Link", - "in_global_search": 1, - "label": "Contact Person", - "options": "Contact", - "print_hide": 1 - }, - { - "fieldname": "contact_display", - "fieldtype": "Small Text", - "label": "Contact", - "read_only": 1 - }, - { - "fieldname": "contact_mobile", - "fieldtype": "Small Text", - "hidden": 1, - "label": "Mobile No", - "read_only": 1 - }, - { - "fieldname": "contact_email", - "fieldtype": "Data", - "hidden": 1, - "label": "Contact Email", - "options": "Email", - "print_hide": 1, - "read_only": 1 - }, - { - "fieldname": "territory", - "fieldtype": "Link", - "label": "Territory", - "options": "Territory", - "print_hide": 1 - }, - { - "fieldname": "col_break4", - "fieldtype": "Column Break" - }, - { - "fieldname": "shipping_address_name", - "fieldtype": "Link", - "label": "Shipping Address Name", - "options": "Address", - "print_hide": 1 - }, - { - "fieldname": "shipping_address", - "fieldtype": "Small Text", - "label": "Shipping Address", - "print_hide": 1, - "read_only": 1 - }, - { - "fieldname": "company_address", - "fieldtype": "Link", - "label": "Company Address Name", - "options": "Address", - "print_hide": 1 - }, - { - "fieldname": "company_address_display", - "fieldtype": "Small Text", - "hidden": 1, - "label": "Company Address", - "print_hide": 1, - "read_only": 1 - }, - { - "collapsible": 1, - "depends_on": "customer", - "fieldname": "currency_and_price_list", - "fieldtype": "Section Break", - "label": "Currency and Price List" - }, - { - "fieldname": "currency", - "fieldtype": "Link", - "label": "Currency", - "oldfieldname": "currency", - "oldfieldtype": "Select", - "options": "Currency", - "print_hide": 1, - "reqd": 1 - }, - { - "description": "Rate at which Customer Currency is converted to customer's base currency", - "fieldname": "conversion_rate", - "fieldtype": "Float", - "label": "Exchange Rate", - "oldfieldname": "conversion_rate", - "oldfieldtype": "Currency", - "precision": "9", - "print_hide": 1, - "reqd": 1 - }, - { - "fieldname": "column_break2", - "fieldtype": "Column Break", - "width": "50%" - }, - { - "fieldname": "selling_price_list", - "fieldtype": "Link", - "label": "Price List", - "oldfieldname": "price_list_name", - "oldfieldtype": "Select", - "options": "Price List", - "print_hide": 1, - "reqd": 1 - }, - { - "fieldname": "price_list_currency", - "fieldtype": "Link", - "label": "Price List Currency", - "options": "Currency", - "print_hide": 1, - "read_only": 1, - "reqd": 1 - }, - { - "description": "Rate at which Price list currency is converted to customer's base currency", - "fieldname": "plc_conversion_rate", - "fieldtype": "Float", - "label": "Price List Exchange Rate", - "precision": "9", - "print_hide": 1, - "reqd": 1 - }, - { - "default": "0", - "fieldname": "ignore_pricing_rule", - "fieldtype": "Check", - "label": "Ignore Pricing Rule", - "no_copy": 1, - "permlevel": 1, - "print_hide": 1 - }, - { - "fieldname": "sec_warehouse", - "fieldtype": "Section Break" - }, - { - "depends_on": "update_stock", - "fieldname": "set_warehouse", - "fieldtype": "Link", - "label": "Set Source Warehouse", - "options": "Warehouse", - "print_hide": 1 - }, - { - "fieldname": "items_section", - "fieldtype": "Section Break", - "oldfieldtype": "Section Break", - "options": "fa fa-shopping-cart" - }, - { - "default": "0", - "fieldname": "update_stock", - "fieldtype": "Check", - "label": "Update Stock", - "oldfieldname": "update_stock", - "oldfieldtype": "Check", - "print_hide": 1 - }, - { - "fieldname": "scan_barcode", - "fieldtype": "Data", - "label": "Scan Barcode" - }, - { - "allow_bulk_edit": 1, - "fieldname": "items", - "fieldtype": "Table", - "label": "Items", - "oldfieldname": "entries", - "oldfieldtype": "Table", - "options": "Sales Invoice Item", - "reqd": 1 - }, - { - "fieldname": "pricing_rule_details", - "fieldtype": "Section Break", - "label": "Pricing Rules" - }, - { - "fieldname": "pricing_rules", - "fieldtype": "Table", - "label": "Pricing Rule Detail", - "options": "Pricing Rule Detail", - "read_only": 1 - }, - { - "fieldname": "packing_list", - "fieldtype": "Section Break", - "label": "Packing List", - "options": "fa fa-suitcase", - "print_hide": 1 - }, - { - "fieldname": "packed_items", - "fieldtype": "Table", - "label": "Packed Items", - "options": "Packed Item", - "print_hide": 1 - }, - { - "fieldname": "product_bundle_help", - "fieldtype": "HTML", - "label": "Product Bundle Help", - "print_hide": 1 - }, - { - "collapsible": 1, - "collapsible_depends_on": "eval:doc.total_billing_amount > 0", - "fieldname": "time_sheet_list", - "fieldtype": "Section Break", - "label": "Time Sheet List" - }, - { - "fieldname": "timesheets", - "fieldtype": "Table", - "label": "Time Sheets", - "options": "Sales Invoice Timesheet", - "print_hide": 1 - }, - { - "default": "0", - "fieldname": "total_billing_amount", - "fieldtype": "Currency", - "label": "Total Billing Amount", - "print_hide": 1, - "read_only": 1 - }, - { - "fieldname": "section_break_30", - "fieldtype": "Section Break" - }, - { - "fieldname": "total_qty", - "fieldtype": "Float", - "label": "Total Quantity", - "read_only": 1 - }, - { - "fieldname": "base_total", - "fieldtype": "Currency", - "label": "Total (Company Currency)", - "options": "Company:company:default_currency", - "print_hide": 1, - "read_only": 1 - }, - { - "fieldname": "base_net_total", - "fieldtype": "Currency", - "label": "Net Total (Company Currency)", - "oldfieldname": "net_total", - "oldfieldtype": "Currency", - "options": "Company:company:default_currency", - "print_hide": 1, - "read_only": 1, - "reqd": 1 - }, - { - "fieldname": "column_break_32", - "fieldtype": "Column Break" - }, - { - "fieldname": "total", - "fieldtype": "Currency", - "label": "Total", - "options": "currency", - "read_only": 1 - }, - { - "fieldname": "net_total", - "fieldtype": "Currency", - "label": "Net Total", - "options": "currency", - "print_hide": 1, - "read_only": 1 - }, - { - "fieldname": "total_net_weight", - "fieldtype": "Float", - "label": "Total Net Weight", - "print_hide": 1, - "read_only": 1 - }, - { - "fieldname": "taxes_section", - "fieldtype": "Section Break", - "oldfieldtype": "Section Break", - "options": "fa fa-money" - }, - { - "fieldname": "taxes_and_charges", - "fieldtype": "Link", - "label": "Sales Taxes and Charges Template", - "oldfieldname": "charge", - "oldfieldtype": "Link", - "options": "Sales Taxes and Charges Template", - "print_hide": 1 - }, - { - "fieldname": "column_break_38", - "fieldtype": "Column Break" - }, - { - "fieldname": "shipping_rule", - "fieldtype": "Link", - "label": "Shipping Rule", - "oldfieldtype": "Button", - "options": "Shipping Rule", - "print_hide": 1 - }, - { - "fieldname": "tax_category", - "fieldtype": "Link", - "label": "Tax Category", - "options": "Tax Category", - "print_hide": 1 - }, - { - "fieldname": "section_break_40", - "fieldtype": "Section Break" - }, - { - "fieldname": "taxes", - "fieldtype": "Table", - "label": "Sales Taxes and Charges", - "oldfieldname": "other_charges", - "oldfieldtype": "Table", - "options": "Sales Taxes and Charges" - }, - { - "collapsible": 1, - "fieldname": "sec_tax_breakup", - "fieldtype": "Section Break", - "label": "Tax Breakup" - }, - { - "fieldname": "other_charges_calculation", - "fieldtype": "Text", - "label": "Taxes and Charges Calculation", - "no_copy": 1, - "oldfieldtype": "HTML", - "print_hide": 1, - "read_only": 1 - }, - { - "fieldname": "section_break_43", - "fieldtype": "Section Break" - }, - { - "fieldname": "base_total_taxes_and_charges", - "fieldtype": "Currency", - "label": "Total Taxes and Charges (Company Currency)", - "oldfieldname": "other_charges_total", - "oldfieldtype": "Currency", - "options": "Company:company:default_currency", - "print_hide": 1, - "read_only": 1 - }, - { - "fieldname": "column_break_47", - "fieldtype": "Column Break" - }, - { - "fieldname": "total_taxes_and_charges", - "fieldtype": "Currency", - "label": "Total Taxes and Charges", - "options": "currency", - "print_hide": 1, - "read_only": 1 - }, - { - "collapsible": 1, - "fieldname": "loyalty_points_redemption", - "fieldtype": "Section Break", - "label": "Loyalty Points Redemption" - }, - { - "depends_on": "redeem_loyalty_points", - "fieldname": "loyalty_points", - "fieldtype": "Int", - "label": "Loyalty Points", - "no_copy": 1, - "print_hide": 1 - }, - { - "depends_on": "redeem_loyalty_points", - "fieldname": "loyalty_amount", - "fieldtype": "Currency", - "label": "Loyalty Amount", - "no_copy": 1, - "options": "Company:company:default_currency", - "print_hide": 1, - "read_only": 1 - }, - { - "default": "0", - "fieldname": "redeem_loyalty_points", - "fieldtype": "Check", - "label": "Redeem Loyalty Points", - "no_copy": 1, - "print_hide": 1 - }, - { - "fieldname": "column_break_77", - "fieldtype": "Column Break" - }, - { - "fetch_from": "customer.loyalty_program", - "fieldname": "loyalty_program", - "fieldtype": "Link", - "label": "Loyalty Program", - "no_copy": 1, - "options": "Loyalty Program", - "print_hide": 1, - "read_only": 1 - }, - { - "depends_on": "redeem_loyalty_points", - "fieldname": "loyalty_redemption_account", - "fieldtype": "Link", - "label": "Redemption Account", - "no_copy": 1, - "options": "Account" - }, - { - "depends_on": "redeem_loyalty_points", - "fieldname": "loyalty_redemption_cost_center", - "fieldtype": "Link", - "label": "Redemption Cost Center", - "no_copy": 1, - "options": "Cost Center" - }, - { - "collapsible": 1, - "collapsible_depends_on": "discount_amount", - "fieldname": "section_break_49", - "fieldtype": "Section Break", - "label": "Additional Discount" - }, - { - "default": "Grand Total", - "fieldname": "apply_discount_on", - "fieldtype": "Select", - "label": "Apply Additional Discount On", - "options": "\nGrand Total\nNet Total", - "print_hide": 1 - }, - { - "fieldname": "base_discount_amount", - "fieldtype": "Currency", - "label": "Additional Discount Amount (Company Currency)", - "options": "Company:company:default_currency", - "print_hide": 1, - "read_only": 1 - }, - { - "fieldname": "column_break_51", - "fieldtype": "Column Break" - }, - { - "fieldname": "additional_discount_percentage", - "fieldtype": "Float", - "label": "Additional Discount Percentage", - "print_hide": 1 - }, - { - "fieldname": "discount_amount", - "fieldtype": "Currency", - "label": "Additional Discount Amount", - "options": "currency", - "print_hide": 1 - }, - { - "fieldname": "totals", - "fieldtype": "Section Break", - "oldfieldtype": "Section Break", - "options": "fa fa-money", - "print_hide": 1 - }, - { - "fieldname": "base_grand_total", - "fieldtype": "Currency", - "label": "Grand Total (Company Currency)", - "oldfieldname": "grand_total", - "oldfieldtype": "Currency", - "options": "Company:company:default_currency", - "print_hide": 1, - "read_only": 1, - "reqd": 1 - }, - { - "fieldname": "base_rounding_adjustment", - "fieldtype": "Currency", - "label": "Rounding Adjustment (Company Currency)", - "no_copy": 1, - "options": "Company:company:default_currency", - "print_hide": 1, - "read_only": 1 - }, - { - "fieldname": "base_rounded_total", - "fieldtype": "Currency", - "label": "Rounded Total (Company Currency)", - "oldfieldname": "rounded_total", - "oldfieldtype": "Currency", - "options": "Company:company:default_currency", - "print_hide": 1, - "read_only": 1 - }, - { - "description": "In Words will be visible once you save the Sales Invoice.", - "fieldname": "base_in_words", - "fieldtype": "Data", - "label": "In Words (Company Currency)", - "oldfieldname": "in_words", - "oldfieldtype": "Data", - "print_hide": 1, - "read_only": 1 - }, - { - "fieldname": "column_break5", - "fieldtype": "Column Break", - "oldfieldtype": "Column Break", - "print_hide": 1, - "width": "50%" - }, - { - "bold": 1, - "fieldname": "grand_total", - "fieldtype": "Currency", - "in_list_view": 1, - "label": "Grand Total", - "oldfieldname": "grand_total_export", - "oldfieldtype": "Currency", - "options": "currency", - "read_only": 1, - "reqd": 1 - }, - { - "fieldname": "rounding_adjustment", - "fieldtype": "Currency", - "label": "Rounding Adjustment", - "no_copy": 1, - "options": "currency", - "print_hide": 1, - "read_only": 1 - }, - { - "bold": 1, - "fieldname": "rounded_total", - "fieldtype": "Currency", - "label": "Rounded Total", - "oldfieldname": "rounded_total_export", - "oldfieldtype": "Currency", - "options": "currency", - "read_only": 1 - }, - { - "fieldname": "in_words", - "fieldtype": "Data", - "label": "In Words", - "oldfieldname": "in_words_export", - "oldfieldtype": "Data", - "print_hide": 1, - "read_only": 1 - }, - { - "fieldname": "total_advance", - "fieldtype": "Currency", - "label": "Total Advance", - "oldfieldname": "total_advance", - "oldfieldtype": "Currency", - "options": "party_account_currency", - "print_hide": 1, - "read_only": 1 - }, - { - "fieldname": "outstanding_amount", - "fieldtype": "Currency", - "label": "Outstanding Amount", - "no_copy": 1, - "oldfieldname": "outstanding_amount", - "oldfieldtype": "Currency", - "options": "party_account_currency", - "print_hide": 1, - "read_only": 1 - }, - { - "collapsible": 1, - "collapsible_depends_on": "advances", - "fieldname": "advances_section", - "fieldtype": "Section Break", - "label": "Advance Payments", - "oldfieldtype": "Section Break", - "options": "fa fa-money", - "print_hide": 1 - }, - { - "default": "0", - "fieldname": "allocate_advances_automatically", - "fieldtype": "Check", - "label": "Allocate Advances Automatically (FIFO)" - }, - { - "depends_on": "eval:!doc.allocate_advances_automatically", - "fieldname": "get_advances", - "fieldtype": "Button", - "label": "Get Advances Received", - "options": "set_advances" - }, - { - "fieldname": "advances", - "fieldtype": "Table", - "label": "Advances", - "oldfieldname": "advance_adjustment_details", - "oldfieldtype": "Table", - "options": "Sales Invoice Advance", - "print_hide": 1 - }, - { - "collapsible": 1, - "collapsible_depends_on": "eval:(!doc.is_pos && !doc.is_return)", - "fieldname": "payment_schedule_section", - "fieldtype": "Section Break", - "label": "Payment Terms" - }, - { - "depends_on": "eval:(!doc.is_pos && !doc.is_return)", - "fieldname": "payment_terms_template", - "fieldtype": "Link", - "label": "Payment Terms Template", - "no_copy": 1, - "options": "Payment Terms Template", - "print_hide": 1 - }, - { - "depends_on": "eval:(!doc.is_pos && !doc.is_return)", - "fieldname": "payment_schedule", - "fieldtype": "Table", - "label": "Payment Schedule", - "no_copy": 1, - "options": "Payment Schedule", - "print_hide": 1 - }, - { - "depends_on": "eval:doc.is_pos===1||(doc.advances && doc.advances.length>0)", - "fieldname": "payments_section", - "fieldtype": "Section Break", - "label": "Payments", - "options": "fa fa-money" - }, - { - "depends_on": "is_pos", - "fieldname": "cash_bank_account", - "fieldtype": "Link", - "hidden": 1, - "label": "Cash/Bank Account", - "oldfieldname": "cash_bank_account", - "oldfieldtype": "Link", - "options": "Account", - "print_hide": 1 - }, - { - "depends_on": "eval:doc.is_pos===1", - "fieldname": "payments", - "fieldtype": "Table", - "label": "Sales Invoice Payment", - "options": "Sales Invoice Payment", - "print_hide": 1 - }, - { - "fieldname": "section_break_84", - "fieldtype": "Section Break" - }, - { - "fieldname": "base_paid_amount", - "fieldtype": "Currency", - "label": "Paid Amount (Company Currency)", - "no_copy": 1, - "options": "Company:company:default_currency", - "print_hide": 1, - "read_only": 1 - }, - { - "fieldname": "column_break_86", - "fieldtype": "Column Break" - }, - { - "depends_on": "eval: doc.is_pos || doc.redeem_loyalty_points", - "fieldname": "paid_amount", - "fieldtype": "Currency", - "label": "Paid Amount", - "no_copy": 1, - "oldfieldname": "paid_amount", - "oldfieldtype": "Currency", - "options": "currency", - "print_hide": 1, - "read_only": 1 - }, - { - "fieldname": "section_break_88", - "fieldtype": "Section Break" - }, - { - "depends_on": "is_pos", - "fieldname": "base_change_amount", - "fieldtype": "Currency", - "label": "Base Change Amount (Company Currency)", - "no_copy": 1, - "options": "Company:company:default_currency", - "print_hide": 1, - "read_only": 1 - }, - { - "fieldname": "column_break_90", - "fieldtype": "Column Break" - }, - { - "depends_on": "is_pos", - "fieldname": "change_amount", - "fieldtype": "Currency", - "label": "Change Amount", - "no_copy": 1, - "options": "currency", - "print_hide": 1 - }, - { - "depends_on": "is_pos", - "fieldname": "account_for_change_amount", - "fieldtype": "Link", - "label": "Account for Change Amount", - "options": "Account", - "print_hide": 1 - }, - { - "collapsible": 1, - "collapsible_depends_on": "write_off_amount", - "depends_on": "grand_total", - "fieldname": "column_break4", - "fieldtype": "Section Break", - "label": "Write Off", - "width": "50%" - }, - { - "fieldname": "write_off_amount", - "fieldtype": "Currency", - "label": "Write Off Amount", - "no_copy": 1, - "options": "currency", - "print_hide": 1 - }, - { - "fieldname": "base_write_off_amount", - "fieldtype": "Currency", - "label": "Write Off Amount (Company Currency)", - "no_copy": 1, - "options": "Company:company:default_currency", - "print_hide": 1, - "read_only": 1 - }, - { - "default": "0", - "depends_on": "is_pos", - "fieldname": "write_off_outstanding_amount_automatically", - "fieldtype": "Check", - "label": "Write Off Outstanding Amount", - "print_hide": 1 - }, - { - "fieldname": "column_break_74", - "fieldtype": "Column Break" - }, - { - "fieldname": "write_off_account", - "fieldtype": "Link", - "label": "Write Off Account", - "options": "Account", - "print_hide": 1 - }, - { - "fieldname": "write_off_cost_center", - "fieldtype": "Link", - "label": "Write Off Cost Center", - "options": "Cost Center", - "print_hide": 1 - }, - { - "collapsible": 1, - "collapsible_depends_on": "terms", - "fieldname": "terms_section_break", - "fieldtype": "Section Break", - "label": "Terms", - "oldfieldtype": "Section Break" - }, - { - "fieldname": "tc_name", - "fieldtype": "Link", - "label": "Terms", - "oldfieldname": "tc_name", - "oldfieldtype": "Link", - "options": "Terms and Conditions", - "print_hide": 1 - }, - { - "fieldname": "terms", - "fieldtype": "Text Editor", - "label": "Terms and Conditions Details", - "oldfieldname": "terms", - "oldfieldtype": "Text Editor" - }, - { - "collapsible": 1, - "fieldname": "edit_printing_settings", - "fieldtype": "Section Break", - "label": "Printing Settings" - }, - { - "allow_on_submit": 1, - "fieldname": "letter_head", - "fieldtype": "Link", - "label": "Letter Head", - "oldfieldname": "letter_head", - "oldfieldtype": "Select", - "options": "Letter Head", - "print_hide": 1 - }, - { - "allow_on_submit": 1, - "default": "0", - "fieldname": "group_same_items", - "fieldtype": "Check", - "label": "Group same items", - "print_hide": 1 - }, - { - "fieldname": "language", - "fieldtype": "Data", - "label": "Print Language", - "print_hide": 1, - "read_only": 1 - }, - { - "fieldname": "column_break_84", - "fieldtype": "Column Break" - }, - { - "allow_on_submit": 1, - "fieldname": "select_print_heading", - "fieldtype": "Link", - "label": "Print Heading", - "no_copy": 1, - "oldfieldname": "select_print_heading", - "oldfieldtype": "Link", - "options": "Print Heading", - "print_hide": 1, - "report_hide": 1 - }, - { - "collapsible": 1, - "depends_on": "customer", - "fieldname": "more_information", - "fieldtype": "Section Break", - "label": "More Information" - }, - { - "fieldname": "inter_company_invoice_reference", - "fieldtype": "Link", - "label": "Inter Company Invoice Reference", - "options": "Purchase Invoice", - "read_only": 1 - }, - { - "fieldname": "customer_group", - "fieldtype": "Link", - "hidden": 1, - "label": "Customer Group", - "options": "Customer Group", - "print_hide": 1 - }, - { - "fieldname": "campaign", - "fieldtype": "Link", - "label": "Campaign", - "oldfieldname": "campaign", - "oldfieldtype": "Link", - "options": "Campaign", - "print_hide": 1 - }, - { - "fieldname": "col_break23", - "fieldtype": "Column Break", - "width": "50%" - }, - { - "default": "Draft", - "fieldname": "status", - "fieldtype": "Select", - "in_standard_filter": 1, - "label": "Status", - "no_copy": 1, - "options": "\nDraft\nReturn\nCredit Note Issued\nSubmitted\nPaid\nUnpaid\nUnpaid and Discounted\nOverdue and Discounted\nOverdue\nOverdue\nCancelled", - "print_hide": 1, - "read_only": 1 - }, - { - "fieldname": "source", - "fieldtype": "Link", - "label": "Source", - "oldfieldname": "source", - "oldfieldtype": "Select", - "options": "Lead Source", - "print_hide": 1 - }, - { - "collapsible": 1, - "fieldname": "more_info", - "fieldtype": "Section Break", - "label": "Accounting Details", - "oldfieldtype": "Section Break", - "options": "fa fa-file-text", - "print_hide": 1 - }, - { - "fieldname": "debit_to", - "fieldtype": "Link", - "label": "Debit To", - "oldfieldname": "debit_to", - "oldfieldtype": "Link", - "options": "Account", - "print_hide": 1, - "reqd": 1, - "search_index": 1 - }, - { - "fieldname": "party_account_currency", - "fieldtype": "Link", - "hidden": 1, - "label": "Party Account Currency", - "no_copy": 1, - "options": "Currency", - "print_hide": 1, - "read_only": 1 - }, - { - "default": "No", - "fieldname": "is_opening", - "fieldtype": "Select", - "label": "Is Opening Entry", - "oldfieldname": "is_opening", - "oldfieldtype": "Select", - "options": "No\nYes", - "print_hide": 1 - }, - { - "fieldname": "c_form_applicable", - "fieldtype": "Select", - "label": "C-Form Applicable", - "no_copy": 1, - "options": "No\nYes", - "print_hide": 1 - }, - { - "fieldname": "c_form_no", - "fieldtype": "Link", - "label": "C-Form No", - "no_copy": 1, - "options": "C-Form", - "print_hide": 1, - "read_only": 1 - }, - { - "fieldname": "column_break8", - "fieldtype": "Column Break", - "oldfieldtype": "Column Break", - "print_hide": 1 - }, - { - "fieldname": "remarks", - "fieldtype": "Small Text", - "label": "Remarks", - "no_copy": 1, - "oldfieldname": "remarks", - "oldfieldtype": "Text", - "print_hide": 1 - }, - { - "collapsible": 1, - "collapsible_depends_on": "sales_partner", - "fieldname": "sales_team_section_break", - "fieldtype": "Section Break", - "label": "Commission", - "oldfieldtype": "Section Break", - "options": "fa fa-group", - "print_hide": 1 - }, - { - "fieldname": "sales_partner", - "fieldtype": "Link", - "label": "Sales Partner", - "oldfieldname": "sales_partner", - "oldfieldtype": "Link", - "options": "Sales Partner", - "print_hide": 1 - }, - { - "fieldname": "column_break10", - "fieldtype": "Column Break", - "oldfieldtype": "Column Break", - "print_hide": 1, - "width": "50%" - }, - { - "fieldname": "commission_rate", - "fieldtype": "Float", - "label": "Commission Rate (%)", - "oldfieldname": "commission_rate", - "oldfieldtype": "Currency", - "print_hide": 1 - }, - { - "fieldname": "total_commission", - "fieldtype": "Currency", - "label": "Total Commission", - "oldfieldname": "total_commission", - "oldfieldtype": "Currency", - "options": "Company:company:default_currency", - "print_hide": 1 - }, - { - "collapsible": 1, - "collapsible_depends_on": "sales_team", - "fieldname": "section_break2", - "fieldtype": "Section Break", - "label": "Sales Team", - "print_hide": 1 - }, - { - "allow_on_submit": 1, - "fieldname": "sales_team", - "fieldtype": "Table", - "label": "Sales Team1", - "oldfieldname": "sales_team", - "oldfieldtype": "Table", - "options": "Sales Team", - "print_hide": 1 - }, - { - "fieldname": "subscription_section", - "fieldtype": "Section Break", - "label": "Subscription Section" - }, - { - "allow_on_submit": 1, - "fieldname": "from_date", - "fieldtype": "Date", - "label": "From Date", - "no_copy": 1, - "print_hide": 1 - }, - { - "allow_on_submit": 1, - "fieldname": "to_date", - "fieldtype": "Date", - "label": "To Date", - "no_copy": 1, - "print_hide": 1 - }, - { - "fieldname": "column_break_140", - "fieldtype": "Column Break" - }, - { - "allow_on_submit": 1, - "fieldname": "auto_repeat", - "fieldtype": "Link", - "label": "Auto Repeat", - "no_copy": 1, - "options": "Auto Repeat", - "print_hide": 1, - "read_only": 1 - }, - { - "allow_on_submit": 1, - "depends_on": "eval: doc.auto_repeat", - "fieldname": "update_auto_repeat_reference", - "fieldtype": "Button", - "label": "Update Auto Repeat Reference" - }, - { - "fieldname": "against_income_account", - "fieldtype": "Small Text", - "hidden": 1, - "label": "Against Income Account", - "no_copy": 1, - "oldfieldname": "against_income_account", - "oldfieldtype": "Small Text", - "print_hide": 1, - "report_hide": 1 - }, - { - "fieldname": "pos_total_qty", - "fieldtype": "Float", - "hidden": 1, - "label": "Total Qty", - "print_hide": 1, - "print_hide_if_no_value": 1, - "read_only": 1 - }, - { - "collapsible": 1, - "fieldname": "accounting_dimensions_section", - "fieldtype": "Section Break", - "label": "Accounting Dimensions" - }, - { - "fieldname": "dimension_col_break", - "fieldtype": "Column Break" - }, - { - "default": "0", - "fieldname": "is_discounted", - "fieldtype": "Check", - "label": "Is Discounted", - "no_copy": 1, - "read_only": 1 + "allow_import": 1, + "autoname": "naming_series:", + "creation": "2013-05-24 19:29:05", + "doctype": "DocType", + "engine": "InnoDB", + "field_order": [ + "customer_section", + "title", + "naming_series", + "customer", + "customer_name", + "tax_id", + "is_pos", + "pos_profile", + "offline_pos_name", + "is_return", + "column_break1", + "company", + "posting_date", + "posting_time", + "set_posting_time", + "due_date", + "amended_from", + "returns", + "return_against", + "column_break_21", + "update_billed_amount_in_sales_order", + "accounting_dimensions_section", + "project", + "dimension_col_break", + "cost_center", + "customer_po_details", + "po_no", + "column_break_23", + "po_date", + "address_and_contact", + "customer_address", + "address_display", + "contact_person", + "contact_display", + "contact_mobile", + "contact_email", + "territory", + "col_break4", + "shipping_address_name", + "shipping_address", + "company_address", + "company_address_display", + "currency_and_price_list", + "currency", + "conversion_rate", + "column_break2", + "selling_price_list", + "price_list_currency", + "plc_conversion_rate", + "ignore_pricing_rule", + "sec_warehouse", + "set_warehouse", + "items_section", + "update_stock", + "scan_barcode", + "items", + "pricing_rule_details", + "pricing_rules", + "packing_list", + "packed_items", + "product_bundle_help", + "time_sheet_list", + "timesheets", + "total_billing_amount", + "section_break_30", + "total_qty", + "base_total", + "base_net_total", + "column_break_32", + "total", + "net_total", + "total_net_weight", + "taxes_section", + "taxes_and_charges", + "column_break_38", + "shipping_rule", + "tax_category", + "section_break_40", + "taxes", + "sec_tax_breakup", + "other_charges_calculation", + "section_break_43", + "base_total_taxes_and_charges", + "column_break_47", + "total_taxes_and_charges", + "loyalty_points_redemption", + "loyalty_points", + "loyalty_amount", + "redeem_loyalty_points", + "column_break_77", + "loyalty_program", + "loyalty_redemption_account", + "loyalty_redemption_cost_center", + "section_break_49", + "apply_discount_on", + "base_discount_amount", + "column_break_51", + "additional_discount_percentage", + "discount_amount", + "totals", + "base_grand_total", + "base_rounding_adjustment", + "base_rounded_total", + "base_in_words", + "column_break5", + "grand_total", + "rounding_adjustment", + "rounded_total", + "in_words", + "total_advance", + "outstanding_amount", + "advances_section", + "allocate_advances_automatically", + "get_advances", + "advances", + "payment_schedule_section", + "payment_terms_template", + "payment_schedule", + "payments_section", + "cash_bank_account", + "payments", + "section_break_84", + "base_paid_amount", + "column_break_86", + "paid_amount", + "section_break_88", + "base_change_amount", + "column_break_90", + "change_amount", + "account_for_change_amount", + "column_break4", + "write_off_amount", + "base_write_off_amount", + "write_off_outstanding_amount_automatically", + "column_break_74", + "write_off_account", + "write_off_cost_center", + "terms_section_break", + "tc_name", + "terms", + "edit_printing_settings", + "letter_head", + "group_same_items", + "language", + "column_break_84", + "select_print_heading", + "more_information", + "inter_company_invoice_reference", + "customer_group", + "campaign", + "is_discounted", + "col_break23", + "status", + "source", + "more_info", + "debit_to", + "party_account_currency", + "is_opening", + "c_form_applicable", + "c_form_no", + "column_break8", + "remarks", + "sales_team_section_break", + "sales_partner", + "column_break10", + "commission_rate", + "total_commission", + "section_break2", + "sales_team", + "subscription_section", + "from_date", + "to_date", + "column_break_140", + "auto_repeat", + "update_auto_repeat_reference", + "against_income_account", + "pos_total_qty" + ], + "fields": [ + { + "fieldname": "customer_section", + "fieldtype": "Section Break", + "options": "fa fa-user" + }, + { + "allow_on_submit": 1, + "default": "{customer_name}", + "fieldname": "title", + "fieldtype": "Data", + "hidden": 1, + "label": "Title", + "no_copy": 1, + "print_hide": 1 + }, + { + "bold": 1, + "fieldname": "naming_series", + "fieldtype": "Select", + "label": "Series", + "no_copy": 1, + "oldfieldname": "naming_series", + "oldfieldtype": "Select", + "options": "ACC-SINV-.YYYY.-", + "print_hide": 1, + "reqd": 1, + "set_only_once": 1 + }, + { + "bold": 1, + "fieldname": "customer", + "fieldtype": "Link", + "in_standard_filter": 1, + "label": "Customer", + "oldfieldname": "customer", + "oldfieldtype": "Link", + "options": "Customer", + "print_hide": 1, + "search_index": 1 + }, + { + "bold": 1, + "depends_on": "customer", + "fetch_from": "customer.customer_name", + "fieldname": "customer_name", + "fieldtype": "Data", + "in_global_search": 1, + "label": "Customer Name", + "oldfieldname": "customer_name", + "oldfieldtype": "Data", + "read_only": 1 + }, + { + "fieldname": "tax_id", + "fieldtype": "Data", + "label": "Tax Id", + "print_hide": 1, + "read_only": 1 + }, + { + "fieldname": "project", + "fieldtype": "Link", + "in_global_search": 1, + "label": "Project", + "oldfieldname": "project_name", + "oldfieldtype": "Link", + "options": "Project", + "print_hide": 1 + }, + { + "default": "0", + "fieldname": "is_pos", + "fieldtype": "Check", + "label": "Include Payment (POS)", + "oldfieldname": "is_pos", + "oldfieldtype": "Check", + "print_hide": 1 + }, + { + "depends_on": "is_pos", + "fieldname": "pos_profile", + "fieldtype": "Link", + "label": "POS Profile", + "options": "POS Profile", + "print_hide": 1 + }, + { + "fieldname": "offline_pos_name", + "fieldtype": "Data", + "hidden": 1, + "label": "Offline POS Name", + "print_hide": 1, + "read_only": 1 + }, + { + "default": "0", + "fieldname": "is_return", + "fieldtype": "Check", + "label": "Is Return (Credit Note)", + "no_copy": 1, + "print_hide": 1 + }, + { + "fieldname": "column_break1", + "fieldtype": "Column Break", + "oldfieldtype": "Column Break" + }, + { + "fieldname": "company", + "fieldtype": "Link", + "in_standard_filter": 1, + "label": "Company", + "oldfieldname": "company", + "oldfieldtype": "Link", + "options": "Company", + "print_hide": 1, + "remember_last_selected_value": 1, + "reqd": 1 + }, + { + "fieldname": "cost_center", + "fieldtype": "Link", + "label": "Cost Center", + "options": "Cost Center" + }, + { + "bold": 1, + "default": "Today", + "fieldname": "posting_date", + "fieldtype": "Date", + "label": "Date", + "no_copy": 1, + "oldfieldname": "posting_date", + "oldfieldtype": "Date", + "reqd": 1, + "search_index": 1 + }, + { + "fieldname": "posting_time", + "fieldtype": "Time", + "label": "Posting Time", + "no_copy": 1, + "oldfieldname": "posting_time", + "oldfieldtype": "Time", + "print_hide": 1 + }, + { + "default": "0", + "depends_on": "eval:doc.docstatus==0", + "fieldname": "set_posting_time", + "fieldtype": "Check", + "label": "Edit Posting Date and Time", + "print_hide": 1 + }, + { + "fieldname": "due_date", + "fieldtype": "Date", + "label": "Payment Due Date", + "no_copy": 1, + "oldfieldname": "due_date", + "oldfieldtype": "Date" + }, + { + "fieldname": "amended_from", + "fieldtype": "Link", + "ignore_user_permissions": 1, + "label": "Amended From", + "no_copy": 1, + "oldfieldname": "amended_from", + "oldfieldtype": "Link", + "options": "Sales Invoice", + "print_hide": 1, + "read_only": 1 + }, + { + "depends_on": "return_against", + "fieldname": "returns", + "fieldtype": "Section Break", + "label": "Returns" + }, + { + "depends_on": "return_against", + "fieldname": "return_against", + "fieldtype": "Link", + "label": "Return Against Sales Invoice", + "no_copy": 1, + "options": "Sales Invoice", + "print_hide": 1, + "read_only": 1 + }, + { + "fieldname": "column_break_21", + "fieldtype": "Column Break" + }, + { + "default": "0", + "depends_on": "eval: doc.is_return && doc.return_against", + "fieldname": "update_billed_amount_in_sales_order", + "fieldtype": "Check", + "label": "Update Billed Amount in Sales Order" + }, + { + "collapsible": 1, + "collapsible_depends_on": "po_no", + "fieldname": "customer_po_details", + "fieldtype": "Section Break", + "label": "Customer PO Details" + }, + { + "allow_on_submit": 1, + "fieldname": "po_no", + "fieldtype": "Data", + "label": "Customer's Purchase Order", + "no_copy": 1, + "print_hide": 1 + }, + { + "fieldname": "column_break_23", + "fieldtype": "Column Break" + }, + { + "allow_on_submit": 1, + "fieldname": "po_date", + "fieldtype": "Date", + "label": "Customer's Purchase Order Date" + }, + { + "collapsible": 1, + "fieldname": "address_and_contact", + "fieldtype": "Section Break", + "label": "Address and Contact" + }, + { + "fieldname": "customer_address", + "fieldtype": "Link", + "label": "Customer Address", + "options": "Address", + "print_hide": 1 + }, + { + "fieldname": "address_display", + "fieldtype": "Small Text", + "label": "Address", + "read_only": 1 + }, + { + "fieldname": "contact_person", + "fieldtype": "Link", + "in_global_search": 1, + "label": "Contact Person", + "options": "Contact", + "print_hide": 1 + }, + { + "fieldname": "contact_display", + "fieldtype": "Small Text", + "label": "Contact", + "read_only": 1 + }, + { + "fieldname": "contact_mobile", + "fieldtype": "Small Text", + "hidden": 1, + "label": "Mobile No", + "read_only": 1 + }, + { + "fieldname": "contact_email", + "fieldtype": "Data", + "hidden": 1, + "label": "Contact Email", + "options": "Email", + "print_hide": 1, + "read_only": 1 + }, + { + "fieldname": "territory", + "fieldtype": "Link", + "label": "Territory", + "options": "Territory", + "print_hide": 1 + }, + { + "fieldname": "col_break4", + "fieldtype": "Column Break" + }, + { + "fieldname": "shipping_address_name", + "fieldtype": "Link", + "label": "Shipping Address Name", + "options": "Address", + "print_hide": 1 + }, + { + "fieldname": "shipping_address", + "fieldtype": "Small Text", + "label": "Shipping Address", + "print_hide": 1, + "read_only": 1 + }, + { + "fieldname": "company_address", + "fieldtype": "Link", + "label": "Company Address Name", + "options": "Address", + "print_hide": 1 + }, + { + "fieldname": "company_address_display", + "fieldtype": "Small Text", + "hidden": 1, + "label": "Company Address", + "print_hide": 1, + "read_only": 1 + }, + { + "collapsible": 1, + "depends_on": "customer", + "fieldname": "currency_and_price_list", + "fieldtype": "Section Break", + "label": "Currency and Price List" + }, + { + "fieldname": "currency", + "fieldtype": "Link", + "label": "Currency", + "oldfieldname": "currency", + "oldfieldtype": "Select", + "options": "Currency", + "print_hide": 1, + "reqd": 1 + }, + { + "description": "Rate at which Customer Currency is converted to customer's base currency", + "fieldname": "conversion_rate", + "fieldtype": "Float", + "label": "Exchange Rate", + "oldfieldname": "conversion_rate", + "oldfieldtype": "Currency", + "precision": "9", + "print_hide": 1, + "reqd": 1 + }, + { + "fieldname": "column_break2", + "fieldtype": "Column Break", + "width": "50%" + }, + { + "fieldname": "selling_price_list", + "fieldtype": "Link", + "label": "Price List", + "oldfieldname": "price_list_name", + "oldfieldtype": "Select", + "options": "Price List", + "print_hide": 1, + "reqd": 1 + }, + { + "fieldname": "price_list_currency", + "fieldtype": "Link", + "label": "Price List Currency", + "options": "Currency", + "print_hide": 1, + "read_only": 1, + "reqd": 1 + }, + { + "description": "Rate at which Price list currency is converted to customer's base currency", + "fieldname": "plc_conversion_rate", + "fieldtype": "Float", + "label": "Price List Exchange Rate", + "precision": "9", + "print_hide": 1, + "reqd": 1 + }, + { + "default": "0", + "fieldname": "ignore_pricing_rule", + "fieldtype": "Check", + "label": "Ignore Pricing Rule", + "no_copy": 1, + "permlevel": 1, + "print_hide": 1 + }, + { + "fieldname": "sec_warehouse", + "fieldtype": "Section Break" + }, + { + "depends_on": "update_stock", + "fieldname": "set_warehouse", + "fieldtype": "Link", + "label": "Set Source Warehouse", + "options": "Warehouse", + "print_hide": 1 + }, + { + "fieldname": "items_section", + "fieldtype": "Section Break", + "oldfieldtype": "Section Break", + "options": "fa fa-shopping-cart" + }, + { + "default": "0", + "fieldname": "update_stock", + "fieldtype": "Check", + "label": "Update Stock", + "oldfieldname": "update_stock", + "oldfieldtype": "Check", + "print_hide": 1 + }, + { + "fieldname": "scan_barcode", + "fieldtype": "Data", + "label": "Scan Barcode" + }, + { + "allow_bulk_edit": 1, + "fieldname": "items", + "fieldtype": "Table", + "label": "Items", + "oldfieldname": "entries", + "oldfieldtype": "Table", + "options": "Sales Invoice Item", + "reqd": 1 + }, + { + "fieldname": "pricing_rule_details", + "fieldtype": "Section Break", + "label": "Pricing Rules" + }, + { + "fieldname": "pricing_rules", + "fieldtype": "Table", + "label": "Pricing Rule Detail", + "options": "Pricing Rule Detail", + "read_only": 1 + }, + { + "fieldname": "packing_list", + "fieldtype": "Section Break", + "label": "Packing List", + "options": "fa fa-suitcase", + "print_hide": 1 + }, + { + "fieldname": "packed_items", + "fieldtype": "Table", + "label": "Packed Items", + "options": "Packed Item", + "print_hide": 1 + }, + { + "fieldname": "product_bundle_help", + "fieldtype": "HTML", + "label": "Product Bundle Help", + "print_hide": 1 + }, + { + "collapsible": 1, + "collapsible_depends_on": "eval:doc.total_billing_amount > 0", + "fieldname": "time_sheet_list", + "fieldtype": "Section Break", + "label": "Time Sheet List" + }, + { + "fieldname": "timesheets", + "fieldtype": "Table", + "label": "Time Sheets", + "options": "Sales Invoice Timesheet", + "print_hide": 1 + }, + { + "default": "0", + "fieldname": "total_billing_amount", + "fieldtype": "Currency", + "label": "Total Billing Amount", + "print_hide": 1, + "read_only": 1 + }, + { + "fieldname": "section_break_30", + "fieldtype": "Section Break" + }, + { + "fieldname": "total_qty", + "fieldtype": "Float", + "label": "Total Quantity", + "read_only": 1 + }, + { + "fieldname": "base_total", + "fieldtype": "Currency", + "label": "Total (Company Currency)", + "options": "Company:company:default_currency", + "print_hide": 1, + "read_only": 1 + }, + { + "fieldname": "base_net_total", + "fieldtype": "Currency", + "label": "Net Total (Company Currency)", + "oldfieldname": "net_total", + "oldfieldtype": "Currency", + "options": "Company:company:default_currency", + "print_hide": 1, + "read_only": 1, + "reqd": 1 + }, + { + "fieldname": "column_break_32", + "fieldtype": "Column Break" + }, + { + "fieldname": "total", + "fieldtype": "Currency", + "label": "Total", + "options": "currency", + "read_only": 1 + }, + { + "fieldname": "net_total", + "fieldtype": "Currency", + "label": "Net Total", + "options": "currency", + "print_hide": 1, + "read_only": 1 + }, + { + "fieldname": "total_net_weight", + "fieldtype": "Float", + "label": "Total Net Weight", + "print_hide": 1, + "read_only": 1 + }, + { + "fieldname": "taxes_section", + "fieldtype": "Section Break", + "oldfieldtype": "Section Break", + "options": "fa fa-money" + }, + { + "fieldname": "taxes_and_charges", + "fieldtype": "Link", + "label": "Sales Taxes and Charges Template", + "oldfieldname": "charge", + "oldfieldtype": "Link", + "options": "Sales Taxes and Charges Template", + "print_hide": 1 + }, + { + "fieldname": "column_break_38", + "fieldtype": "Column Break" + }, + { + "fieldname": "shipping_rule", + "fieldtype": "Link", + "label": "Shipping Rule", + "oldfieldtype": "Button", + "options": "Shipping Rule", + "print_hide": 1 + }, + { + "fieldname": "tax_category", + "fieldtype": "Link", + "label": "Tax Category", + "options": "Tax Category", + "print_hide": 1 + }, + { + "fieldname": "section_break_40", + "fieldtype": "Section Break" + }, + { + "fieldname": "taxes", + "fieldtype": "Table", + "label": "Sales Taxes and Charges", + "oldfieldname": "other_charges", + "oldfieldtype": "Table", + "options": "Sales Taxes and Charges" + }, + { + "collapsible": 1, + "fieldname": "sec_tax_breakup", + "fieldtype": "Section Break", + "label": "Tax Breakup" + }, + { + "fieldname": "other_charges_calculation", + "fieldtype": "Text", + "label": "Taxes and Charges Calculation", + "no_copy": 1, + "oldfieldtype": "HTML", + "print_hide": 1, + "read_only": 1 + }, + { + "fieldname": "section_break_43", + "fieldtype": "Section Break" + }, + { + "fieldname": "base_total_taxes_and_charges", + "fieldtype": "Currency", + "label": "Total Taxes and Charges (Company Currency)", + "oldfieldname": "other_charges_total", + "oldfieldtype": "Currency", + "options": "Company:company:default_currency", + "print_hide": 1, + "read_only": 1 + }, + { + "fieldname": "column_break_47", + "fieldtype": "Column Break" + }, + { + "fieldname": "total_taxes_and_charges", + "fieldtype": "Currency", + "label": "Total Taxes and Charges", + "options": "currency", + "print_hide": 1, + "read_only": 1 + }, + { + "collapsible": 1, + "fieldname": "loyalty_points_redemption", + "fieldtype": "Section Break", + "label": "Loyalty Points Redemption" + }, + { + "depends_on": "redeem_loyalty_points", + "fieldname": "loyalty_points", + "fieldtype": "Int", + "label": "Loyalty Points", + "no_copy": 1, + "print_hide": 1 + }, + { + "depends_on": "redeem_loyalty_points", + "fieldname": "loyalty_amount", + "fieldtype": "Currency", + "label": "Loyalty Amount", + "no_copy": 1, + "options": "Company:company:default_currency", + "print_hide": 1, + "read_only": 1 + }, + { + "default": "0", + "fieldname": "redeem_loyalty_points", + "fieldtype": "Check", + "label": "Redeem Loyalty Points", + "no_copy": 1, + "print_hide": 1 + }, + { + "fieldname": "column_break_77", + "fieldtype": "Column Break" + }, + { + "fetch_from": "customer.loyalty_program", + "fieldname": "loyalty_program", + "fieldtype": "Link", + "label": "Loyalty Program", + "no_copy": 1, + "options": "Loyalty Program", + "print_hide": 1, + "read_only": 1 + }, + { + "depends_on": "redeem_loyalty_points", + "fieldname": "loyalty_redemption_account", + "fieldtype": "Link", + "label": "Redemption Account", + "no_copy": 1, + "options": "Account" + }, + { + "depends_on": "redeem_loyalty_points", + "fieldname": "loyalty_redemption_cost_center", + "fieldtype": "Link", + "label": "Redemption Cost Center", + "no_copy": 1, + "options": "Cost Center" + }, + { + "collapsible": 1, + "collapsible_depends_on": "discount_amount", + "fieldname": "section_break_49", + "fieldtype": "Section Break", + "label": "Additional Discount" + }, + { + "default": "Grand Total", + "fieldname": "apply_discount_on", + "fieldtype": "Select", + "label": "Apply Additional Discount On", + "options": "\nGrand Total\nNet Total", + "print_hide": 1 + }, + { + "fieldname": "base_discount_amount", + "fieldtype": "Currency", + "label": "Additional Discount Amount (Company Currency)", + "options": "Company:company:default_currency", + "print_hide": 1, + "read_only": 1 + }, + { + "fieldname": "column_break_51", + "fieldtype": "Column Break" + }, + { + "fieldname": "additional_discount_percentage", + "fieldtype": "Float", + "label": "Additional Discount Percentage", + "print_hide": 1 + }, + { + "fieldname": "discount_amount", + "fieldtype": "Currency", + "label": "Additional Discount Amount", + "options": "currency", + "print_hide": 1 + }, + { + "fieldname": "totals", + "fieldtype": "Section Break", + "oldfieldtype": "Section Break", + "options": "fa fa-money", + "print_hide": 1 + }, + { + "fieldname": "base_grand_total", + "fieldtype": "Currency", + "label": "Grand Total (Company Currency)", + "oldfieldname": "grand_total", + "oldfieldtype": "Currency", + "options": "Company:company:default_currency", + "print_hide": 1, + "read_only": 1, + "reqd": 1 + }, + { + "fieldname": "base_rounding_adjustment", + "fieldtype": "Currency", + "label": "Rounding Adjustment (Company Currency)", + "no_copy": 1, + "options": "Company:company:default_currency", + "print_hide": 1, + "read_only": 1 + }, + { + "fieldname": "base_rounded_total", + "fieldtype": "Currency", + "label": "Rounded Total (Company Currency)", + "oldfieldname": "rounded_total", + "oldfieldtype": "Currency", + "options": "Company:company:default_currency", + "print_hide": 1, + "read_only": 1 + }, + { + "description": "In Words will be visible once you save the Sales Invoice.", + "fieldname": "base_in_words", + "fieldtype": "Data", + "label": "In Words (Company Currency)", + "oldfieldname": "in_words", + "oldfieldtype": "Data", + "print_hide": 1, + "read_only": 1 + }, + { + "fieldname": "column_break5", + "fieldtype": "Column Break", + "oldfieldtype": "Column Break", + "print_hide": 1, + "width": "50%" + }, + { + "bold": 1, + "fieldname": "grand_total", + "fieldtype": "Currency", + "in_list_view": 1, + "label": "Grand Total", + "oldfieldname": "grand_total_export", + "oldfieldtype": "Currency", + "options": "currency", + "read_only": 1, + "reqd": 1 + }, + { + "fieldname": "rounding_adjustment", + "fieldtype": "Currency", + "label": "Rounding Adjustment", + "no_copy": 1, + "options": "currency", + "print_hide": 1, + "read_only": 1 + }, + { + "bold": 1, + "fieldname": "rounded_total", + "fieldtype": "Currency", + "label": "Rounded Total", + "oldfieldname": "rounded_total_export", + "oldfieldtype": "Currency", + "options": "currency", + "read_only": 1 + }, + { + "fieldname": "in_words", + "fieldtype": "Data", + "label": "In Words", + "oldfieldname": "in_words_export", + "oldfieldtype": "Data", + "print_hide": 1, + "read_only": 1 + }, + { + "fieldname": "total_advance", + "fieldtype": "Currency", + "label": "Total Advance", + "oldfieldname": "total_advance", + "oldfieldtype": "Currency", + "options": "party_account_currency", + "print_hide": 1, + "read_only": 1 + }, + { + "fieldname": "outstanding_amount", + "fieldtype": "Currency", + "label": "Outstanding Amount", + "no_copy": 1, + "oldfieldname": "outstanding_amount", + "oldfieldtype": "Currency", + "options": "party_account_currency", + "print_hide": 1, + "read_only": 1 + }, + { + "collapsible": 1, + "collapsible_depends_on": "advances", + "fieldname": "advances_section", + "fieldtype": "Section Break", + "label": "Advance Payments", + "oldfieldtype": "Section Break", + "options": "fa fa-money", + "print_hide": 1 + }, + { + "default": "0", + "fieldname": "allocate_advances_automatically", + "fieldtype": "Check", + "label": "Allocate Advances Automatically (FIFO)" + }, + { + "depends_on": "eval:!doc.allocate_advances_automatically", + "fieldname": "get_advances", + "fieldtype": "Button", + "label": "Get Advances Received", + "options": "set_advances" + }, + { + "fieldname": "advances", + "fieldtype": "Table", + "label": "Advances", + "oldfieldname": "advance_adjustment_details", + "oldfieldtype": "Table", + "options": "Sales Invoice Advance", + "print_hide": 1 + }, + { + "collapsible": 1, + "collapsible_depends_on": "eval:(!doc.is_pos && !doc.is_return)", + "fieldname": "payment_schedule_section", + "fieldtype": "Section Break", + "label": "Payment Terms" + }, + { + "depends_on": "eval:(!doc.is_pos && !doc.is_return)", + "fieldname": "payment_terms_template", + "fieldtype": "Link", + "label": "Payment Terms Template", + "no_copy": 1, + "options": "Payment Terms Template", + "print_hide": 1 + }, + { + "depends_on": "eval:(!doc.is_pos && !doc.is_return)", + "fieldname": "payment_schedule", + "fieldtype": "Table", + "label": "Payment Schedule", + "no_copy": 1, + "options": "Payment Schedule", + "print_hide": 1 + }, + { + "depends_on": "eval:doc.is_pos===1||(doc.advances && doc.advances.length>0)", + "fieldname": "payments_section", + "fieldtype": "Section Break", + "label": "Payments", + "options": "fa fa-money" + }, + { + "depends_on": "is_pos", + "fieldname": "cash_bank_account", + "fieldtype": "Link", + "hidden": 1, + "label": "Cash/Bank Account", + "oldfieldname": "cash_bank_account", + "oldfieldtype": "Link", + "options": "Account", + "print_hide": 1 + }, + { + "depends_on": "eval:doc.is_pos===1", + "fieldname": "payments", + "fieldtype": "Table", + "label": "Sales Invoice Payment", + "options": "Sales Invoice Payment", + "print_hide": 1 + }, + { + "fieldname": "section_break_84", + "fieldtype": "Section Break" + }, + { + "fieldname": "base_paid_amount", + "fieldtype": "Currency", + "label": "Paid Amount (Company Currency)", + "no_copy": 1, + "options": "Company:company:default_currency", + "print_hide": 1, + "read_only": 1 + }, + { + "fieldname": "column_break_86", + "fieldtype": "Column Break" + }, + { + "depends_on": "eval: doc.is_pos || doc.redeem_loyalty_points", + "fieldname": "paid_amount", + "fieldtype": "Currency", + "label": "Paid Amount", + "no_copy": 1, + "oldfieldname": "paid_amount", + "oldfieldtype": "Currency", + "options": "currency", + "print_hide": 1, + "read_only": 1 + }, + { + "fieldname": "section_break_88", + "fieldtype": "Section Break" + }, + { + "depends_on": "is_pos", + "fieldname": "base_change_amount", + "fieldtype": "Currency", + "label": "Base Change Amount (Company Currency)", + "no_copy": 1, + "options": "Company:company:default_currency", + "print_hide": 1, + "read_only": 1 + }, + { + "fieldname": "column_break_90", + "fieldtype": "Column Break" + }, + { + "depends_on": "is_pos", + "fieldname": "change_amount", + "fieldtype": "Currency", + "label": "Change Amount", + "no_copy": 1, + "options": "currency", + "print_hide": 1 + }, + { + "depends_on": "is_pos", + "fieldname": "account_for_change_amount", + "fieldtype": "Link", + "label": "Account for Change Amount", + "options": "Account", + "print_hide": 1 + }, + { + "collapsible": 1, + "collapsible_depends_on": "write_off_amount", + "depends_on": "grand_total", + "fieldname": "column_break4", + "fieldtype": "Section Break", + "label": "Write Off", + "width": "50%" + }, + { + "fieldname": "write_off_amount", + "fieldtype": "Currency", + "label": "Write Off Amount", + "no_copy": 1, + "options": "currency", + "print_hide": 1 + }, + { + "fieldname": "base_write_off_amount", + "fieldtype": "Currency", + "label": "Write Off Amount (Company Currency)", + "no_copy": 1, + "options": "Company:company:default_currency", + "print_hide": 1, + "read_only": 1 + }, + { + "default": "0", + "depends_on": "is_pos", + "fieldname": "write_off_outstanding_amount_automatically", + "fieldtype": "Check", + "label": "Write Off Outstanding Amount", + "print_hide": 1 + }, + { + "fieldname": "column_break_74", + "fieldtype": "Column Break" + }, + { + "fieldname": "write_off_account", + "fieldtype": "Link", + "label": "Write Off Account", + "options": "Account", + "print_hide": 1 + }, + { + "fieldname": "write_off_cost_center", + "fieldtype": "Link", + "label": "Write Off Cost Center", + "options": "Cost Center", + "print_hide": 1 + }, + { + "collapsible": 1, + "collapsible_depends_on": "terms", + "fieldname": "terms_section_break", + "fieldtype": "Section Break", + "label": "Terms", + "oldfieldtype": "Section Break" + }, + { + "fieldname": "tc_name", + "fieldtype": "Link", + "label": "Terms", + "oldfieldname": "tc_name", + "oldfieldtype": "Link", + "options": "Terms and Conditions", + "print_hide": 1 + }, + { + "fieldname": "terms", + "fieldtype": "Text Editor", + "label": "Terms and Conditions Details", + "oldfieldname": "terms", + "oldfieldtype": "Text Editor" + }, + { + "collapsible": 1, + "fieldname": "edit_printing_settings", + "fieldtype": "Section Break", + "label": "Printing Settings" + }, + { + "allow_on_submit": 1, + "fieldname": "letter_head", + "fieldtype": "Link", + "label": "Letter Head", + "oldfieldname": "letter_head", + "oldfieldtype": "Select", + "options": "Letter Head", + "print_hide": 1 + }, + { + "allow_on_submit": 1, + "default": "0", + "fieldname": "group_same_items", + "fieldtype": "Check", + "label": "Group same items", + "print_hide": 1 + }, + { + "fieldname": "language", + "fieldtype": "Data", + "label": "Print Language", + "print_hide": 1, + "read_only": 1 + }, + { + "fieldname": "column_break_84", + "fieldtype": "Column Break" + }, + { + "allow_on_submit": 1, + "fieldname": "select_print_heading", + "fieldtype": "Link", + "label": "Print Heading", + "no_copy": 1, + "oldfieldname": "select_print_heading", + "oldfieldtype": "Link", + "options": "Print Heading", + "print_hide": 1, + "report_hide": 1 + }, + { + "collapsible": 1, + "depends_on": "customer", + "fieldname": "more_information", + "fieldtype": "Section Break", + "label": "More Information" + }, + { + "fieldname": "inter_company_invoice_reference", + "fieldtype": "Link", + "label": "Inter Company Invoice Reference", + "options": "Purchase Invoice", + "read_only": 1 + }, + { + "fieldname": "customer_group", + "fieldtype": "Link", + "hidden": 1, + "label": "Customer Group", + "options": "Customer Group", + "print_hide": 1 + }, + { + "fieldname": "campaign", + "fieldtype": "Link", + "label": "Campaign", + "oldfieldname": "campaign", + "oldfieldtype": "Link", + "options": "Campaign", + "print_hide": 1 + }, + { + "fieldname": "is_discounted", + "fieldtype": "Check", + "label": "Is Discounted", + "no_copy": 1, + "read_only": 1 + }, + { + "fieldname": "col_break23", + "fieldtype": "Column Break", + "width": "50%" + }, + { + "default": "Draft", + "fieldname": "status", + "fieldtype": "Select", + "in_standard_filter": 1, + "label": "Status", + "no_copy": 1, + "options": "\nDraft\nReturn\nCredit Note Issued\nSubmitted\nPaid\nUnpaid\nUnpaid and Discounted\nOverdue and Discounted\nOverdue\nOverdue\nCancelled", + "print_hide": 1, + "read_only": 1 + }, + { + "fieldname": "source", + "fieldtype": "Link", + "label": "Source", + "oldfieldname": "source", + "oldfieldtype": "Select", + "options": "Lead Source", + "print_hide": 1 + }, + { + "collapsible": 1, + "fieldname": "more_info", + "fieldtype": "Section Break", + "label": "Accounting Details", + "oldfieldtype": "Section Break", + "options": "fa fa-file-text", + "print_hide": 1 + }, + { + "fieldname": "debit_to", + "fieldtype": "Link", + "label": "Debit To", + "oldfieldname": "debit_to", + "oldfieldtype": "Link", + "options": "Account", + "print_hide": 1, + "reqd": 1, + "search_index": 1 + }, + { + "fieldname": "party_account_currency", + "fieldtype": "Link", + "hidden": 1, + "label": "Party Account Currency", + "no_copy": 1, + "options": "Currency", + "print_hide": 1, + "read_only": 1 + }, + { + "default": "No", + "fieldname": "is_opening", + "fieldtype": "Select", + "label": "Is Opening Entry", + "oldfieldname": "is_opening", + "oldfieldtype": "Select", + "options": "No\nYes", + "print_hide": 1 + }, + { + "fieldname": "c_form_applicable", + "fieldtype": "Select", + "label": "C-Form Applicable", + "no_copy": 1, + "options": "No\nYes", + "print_hide": 1 + }, + { + "fieldname": "c_form_no", + "fieldtype": "Link", + "label": "C-Form No", + "no_copy": 1, + "options": "C-Form", + "print_hide": 1, + "read_only": 1 + }, + { + "fieldname": "column_break8", + "fieldtype": "Column Break", + "oldfieldtype": "Column Break", + "print_hide": 1 + }, + { + "fieldname": "remarks", + "fieldtype": "Small Text", + "label": "Remarks", + "no_copy": 1, + "oldfieldname": "remarks", + "oldfieldtype": "Text", + "print_hide": 1 + }, + { + "collapsible": 1, + "collapsible_depends_on": "sales_partner", + "fieldname": "sales_team_section_break", + "fieldtype": "Section Break", + "label": "Commission", + "oldfieldtype": "Section Break", + "options": "fa fa-group", + "print_hide": 1 + }, + { + "fieldname": "sales_partner", + "fieldtype": "Link", + "label": "Sales Partner", + "oldfieldname": "sales_partner", + "oldfieldtype": "Link", + "options": "Sales Partner", + "print_hide": 1 + }, + { + "fieldname": "column_break10", + "fieldtype": "Column Break", + "oldfieldtype": "Column Break", + "print_hide": 1, + "width": "50%" + }, + { + "fieldname": "commission_rate", + "fieldtype": "Float", + "label": "Commission Rate (%)", + "oldfieldname": "commission_rate", + "oldfieldtype": "Currency", + "print_hide": 1 + }, + { + "fieldname": "total_commission", + "fieldtype": "Currency", + "label": "Total Commission", + "oldfieldname": "total_commission", + "oldfieldtype": "Currency", + "options": "Company:company:default_currency", + "print_hide": 1 + }, + { + "collapsible": 1, + "collapsible_depends_on": "sales_team", + "fieldname": "section_break2", + "fieldtype": "Section Break", + "label": "Sales Team", + "print_hide": 1 + }, + { + "allow_on_submit": 1, + "fieldname": "sales_team", + "fieldtype": "Table", + "label": "Sales Team1", + "oldfieldname": "sales_team", + "oldfieldtype": "Table", + "options": "Sales Team", + "print_hide": 1 + }, + { + "fieldname": "subscription_section", + "fieldtype": "Section Break", + "label": "Subscription Section" + }, + { + "allow_on_submit": 1, + "fieldname": "from_date", + "fieldtype": "Date", + "label": "From Date", + "no_copy": 1, + "print_hide": 1 + }, + { + "allow_on_submit": 1, + "fieldname": "to_date", + "fieldtype": "Date", + "label": "To Date", + "no_copy": 1, + "print_hide": 1 + }, + { + "fieldname": "column_break_140", + "fieldtype": "Column Break" + }, + { + "allow_on_submit": 1, + "fieldname": "auto_repeat", + "fieldtype": "Link", + "label": "Auto Repeat", + "no_copy": 1, + "options": "Auto Repeat", + "print_hide": 1, + "read_only": 1 + }, + { + "allow_on_submit": 1, + "depends_on": "eval: doc.auto_repeat", + "fieldname": "update_auto_repeat_reference", + "fieldtype": "Button", + "label": "Update Auto Repeat Reference" + }, + { + "fieldname": "against_income_account", + "fieldtype": "Small Text", + "hidden": 1, + "label": "Against Income Account", + "no_copy": 1, + "oldfieldname": "against_income_account", + "oldfieldtype": "Small Text", + "print_hide": 1, + "report_hide": 1 + }, + { + "fieldname": "pos_total_qty", + "fieldtype": "Float", + "hidden": 1, + "label": "Total Qty", + "print_hide": 1, + "print_hide_if_no_value": 1, + "read_only": 1 + }, + { + "collapsible": 1, + "fieldname": "accounting_dimensions_section", + "fieldtype": "Section Break", + "label": "Accounting Dimensions" + }, + { + "fieldname": "dimension_col_break", + "fieldtype": "Column Break" + } + ], + "icon": "fa fa-file-text", + "idx": 181, + "is_submittable": 1, + "modified": "2019-07-04 22:05:03.474745", + "modified_by": "Administrator", + "module": "Accounts", + "name": "Sales Invoice", + "name_case": "Title Case", + "owner": "Administrator", + "permissions": [ + { + "amend": 1, + "cancel": 1, + "create": 1, + "delete": 1, + "email": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "Accounts Manager", + "share": 1, + "submit": 1, + "write": 1 + }, + { + "amend": 1, + "create": 1, + "email": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "Accounts User", + "share": 1, + "submit": 1, + "write": 1 + }, + { + "permlevel": 1, + "read": 1, + "role": "Accounts Manager", + "write": 1 + }, + { + "permlevel": 1, + "read": 1, + "role": "All" + } + ], + "quick_entry": 1, + "search_fields": "posting_date, due_date, customer, base_grand_total, outstanding_amount", + "show_name_in_global_search": 1, + "sort_field": "modified", + "sort_order": "DESC", + "timeline_field": "customer", + "title_field": "title", + "track_changes": 1, + "track_seen": 1 } - ], - "icon": "fa fa-file-text", - "idx": 181, - "is_submittable": 1, - "modified": "2019-07-02 15:21:40.257028", - "modified_by": "Administrator", - "module": "Accounts", - "name": "Sales Invoice", - "name_case": "Title Case", - "owner": "Administrator", - "permissions": [ - { - "amend": 1, - "cancel": 1, - "create": 1, - "delete": 1, - "email": 1, - "print": 1, - "read": 1, - "report": 1, - "role": "Accounts Manager", - "share": 1, - "submit": 1, - "write": 1 - }, - { - "amend": 1, - "create": 1, - "email": 1, - "print": 1, - "read": 1, - "report": 1, - "role": "Accounts User", - "share": 1, - "submit": 1, - "write": 1 - }, - { - "permlevel": 1, - "read": 1, - "role": "Accounts Manager", - "write": 1 - }, - { - "permlevel": 1, - "read": 1, - "role": "All" - } - ], - "quick_entry": 1, - "search_fields": "posting_date, due_date, customer, base_grand_total, outstanding_amount", - "show_name_in_global_search": 1, - "sort_field": "modified", - "sort_order": "DESC", - "timeline_field": "customer", - "title_field": "title", - "track_changes": 1, - "track_seen": 1 -} \ No newline at end of file diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py index 43bbfab130..b686c67fee 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py @@ -54,8 +54,8 @@ class SalesInvoice(SellingController): def set_indicator(self): """Set indicator for portal""" - if cint(self.is_return) == 1: - self.indicator_title = _("Return") + if self.outstanding_amount < 0: + self.indicator_title = _("Credit Note Issued") self.indicator_color = "darkgrey" elif self.outstanding_amount > 0 and getdate(self.due_date) >= getdate(nowdate()): self.indicator_color = "orange" @@ -63,8 +63,8 @@ class SalesInvoice(SellingController): elif self.outstanding_amount > 0 and getdate(self.due_date) < getdate(nowdate()): self.indicator_color = "red" self.indicator_title = _("Overdue") - elif self.outstanding_amount < 0: - self.indicator_title = _("Credit Note Issued") + elif cint(self.is_return) == 1: + self.indicator_title = _("Return") self.indicator_color = "darkgrey" else: self.indicator_color = "green" @@ -508,8 +508,8 @@ class SalesInvoice(SellingController): if frappe.db.get_single_value('Selling Settings', dic[i][0]) == 'Yes': for d in self.get('items'): is_stock_item = frappe.get_cached_value('Item', d.item_code, 'is_stock_item') - if d.item_code and is_stock_item == 1\ - and not d.get(i.lower().replace(' ','_')) and not self.get(dic[i][1]): + if (d.item_code and is_stock_item == 1\ + and not d.get(i.lower().replace(' ','_')) and not self.get(dic[i][1])): msgprint(_("{0} is mandatory for Item {1}").format(i,d.item_code), raise_exception=1) @@ -1029,9 +1029,8 @@ class SalesInvoice(SellingController): def update_project(self): if self.project: project = frappe.get_doc("Project", self.project) - project.flags.dont_sync_tasks = True project.update_billed_amount() - project.save() + project.db_update() def verify_payment_amount_is_positive(self): @@ -1212,10 +1211,10 @@ class SalesInvoice(SellingController): self.status = "Unpaid" elif self.outstanding_amount < 0 and self.is_return==0 and frappe.db.get_value('Sales Invoice', {'is_return': 1, 'return_against': self.name, 'docstatus': 1}): self.status = "Credit Note Issued" - elif self.outstanding_amount<=0 and self.is_return==0: - self.status = "Paid" elif self.is_return == 1: self.status = "Return" + elif self.outstanding_amount<=0: + self.status = "Paid" else: self.status = "Submitted" else: diff --git a/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py index 47c60839b3..52470fde95 100644 --- a/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py @@ -19,6 +19,8 @@ from erpnext.controllers.taxes_and_totals import get_itemised_tax_breakup_data from erpnext.stock.doctype.item.test_item import create_item from six import iteritems from erpnext.accounts.doctype.sales_invoice.sales_invoice import make_inter_company_transaction +from erpnext.regional.india.utils import get_ewb_data + class TestSalesInvoice(unittest.TestCase): def make(self): w = frappe.copy_doc(test_records[0]) @@ -1421,7 +1423,7 @@ class TestSalesInvoice(unittest.TestCase): "included_in_print_rate": 1 }) si.save() - + si.submit() self.assertEqual(si.net_total, 19453.13) self.assertEqual(si.grand_total, 24900) self.assertEqual(si.total_taxes_and_charges, 5446.88) @@ -1443,6 +1445,50 @@ class TestSalesInvoice(unittest.TestCase): self.assertEqual(expected_values[gle.account][1], gle.debit) self.assertEqual(expected_values[gle.account][2], gle.credit) + def test_rounding_adjustment_2(self): + si = create_sales_invoice(rate=400, do_not_save=True) + for rate in [400, 600, 100]: + si.append("items", { + "item_code": "_Test Item", + "gst_hsn_code": "999800", + "warehouse": "_Test Warehouse - _TC", + "qty": 1, + "rate": rate, + "income_account": "Sales - _TC", + "cost_center": "_Test Cost Center - _TC" + }) + for tax_account in ["_Test Account VAT - _TC", "_Test Account Service Tax - _TC"]: + si.append("taxes", { + "charge_type": "On Net Total", + "account_head": tax_account, + "description": tax_account, + "rate": 9, + "cost_center": "_Test Cost Center - _TC", + "included_in_print_rate": 1 + }) + si.save() + si.submit() + self.assertEqual(si.net_total, 1271.19) + self.assertEqual(si.grand_total, 1500) + self.assertEqual(si.total_taxes_and_charges, 228.82) + self.assertEqual(si.rounding_adjustment, -0.01) + + expected_values = dict((d[0], d) for d in [ + [si.debit_to, 1500, 0.0], + ["_Test Account Service Tax - _TC", 0.0, 114.41], + ["_Test Account VAT - _TC", 0.0, 114.41], + ["Sales - _TC", 0.0, 1271.18] + ]) + + gl_entries = frappe.db.sql("""select account, debit, credit + from `tabGL Entry` where voucher_type='Sales Invoice' and voucher_no=%s + order by account asc""", si.name, as_dict=1) + + for gle in gl_entries: + self.assertEqual(expected_values[gle.account][0], gle.account) + self.assertEqual(expected_values[gle.account][1], gle.debit) + self.assertEqual(expected_values[gle.account][2], gle.credit) + def test_sales_invoice_with_shipping_rule(self): from erpnext.accounts.doctype.shipping_rule.test_shipping_rule \ import create_shipping_rule @@ -1681,6 +1727,111 @@ class TestSalesInvoice(unittest.TestCase): self.assertEqual(target_doc.company, "_Test Company 1") self.assertEqual(target_doc.supplier, "_Test Internal Supplier") + def test_eway_bill_json(self): + if not frappe.db.exists('Address', '_Test Address for Eway bill-Billing'): + address = frappe.get_doc({ + "address_line1": "_Test Address Line 1", + "address_title": "_Test Address for Eway bill", + "address_type": "Billing", + "city": "_Test City", + "state": "Test State", + "country": "India", + "doctype": "Address", + "is_primary_address": 1, + "phone": "+91 0000000000", + "gstin": "27AAECE4835E1ZR", + "gst_state": "Maharashtra", + "gst_state_number": "27", + "pincode": "401108" + }).insert() + + address.append("links", { + "link_doctype": "Company", + "link_name": "_Test Company" + }) + + address.save() + + if not frappe.db.exists('Address', '_Test Customer-Address for Eway bill-Shipping'): + address = frappe.get_doc({ + "address_line1": "_Test Address Line 1", + "address_title": "_Test Customer-Address for Eway bill", + "address_type": "Shipping", + "city": "_Test City", + "state": "Test State", + "country": "India", + "doctype": "Address", + "is_primary_address": 1, + "phone": "+91 0000000000", + "gst_state": "Maharashtra", + "gst_state_number": "27", + "pincode": "410038" + }).insert() + + address.append("links", { + "link_doctype": "Customer", + "link_name": "_Test Customer" + }) + + address.save() + + gst_settings = frappe.get_doc("GST Settings") + + gst_account = frappe.get_all( + "GST Account", + fields=["cgst_account", "sgst_account", "igst_account"], + filters = {"company": "_Test Company"}) + + if not gst_account: + gst_settings.append("gst_accounts", { + "company": "_Test Company", + "cgst_account": "CGST - _TC", + "sgst_account": "SGST - _TC", + "igst_account": "IGST - _TC", + }) + + gst_settings.save() + + si = create_sales_invoice(do_not_save =1, rate = '60000') + + si.distance = 2000 + si.company_address = "_Test Address for Eway bill-Billing" + si.customer_address = "_Test Customer-Address for Eway bill-Shipping" + si.vehicle_no = "KA12KA1234" + si.gst_category = "Registered Regular" + + si.append("taxes", { + "charge_type": "On Net Total", + "account_head": "CGST - _TC", + "cost_center": "Main - _TC", + "description": "CGST @ 9.0", + "rate": 9 + }) + + si.append("taxes", { + "charge_type": "On Net Total", + "account_head": "SGST - _TC", + "cost_center": "Main - _TC", + "description": "SGST @ 9.0", + "rate": 9 + }) + + si.submit() + + data = get_ewb_data("Sales Invoice", si.name) + + self.assertEqual(data['version'], '1.0.1118') + self.assertEqual(data['billLists'][0]['fromGstin'], '27AAECE4835E1ZR') + self.assertEqual(data['billLists'][0]['fromTrdName'], '_Test Company') + self.assertEqual(data['billLists'][0]['toTrdName'], '_Test Customer') + self.assertEqual(data['billLists'][0]['vehicleType'], 'R') + self.assertEqual(data['billLists'][0]['totalValue'], 60000) + self.assertEqual(data['billLists'][0]['cgstValue'], 5400) + self.assertEqual(data['billLists'][0]['sgstValue'], 5400) + self.assertEqual(data['billLists'][0]['vehicleNo'], 'KA12KA1234') + self.assertEqual(data['billLists'][0]['itemList'][0]['taxableAmount'], 60000) + + def create_sales_invoice(**args): si = frappe.new_doc("Sales Invoice") args = frappe._dict(args) diff --git a/erpnext/accounts/doctype/sales_invoice_payment/sales_invoice_payment.json b/erpnext/accounts/doctype/sales_invoice_payment/sales_invoice_payment.json index 1c5962acf6..52cf810ae4 100644 --- a/erpnext/accounts/doctype/sales_invoice_payment/sales_invoice_payment.json +++ b/erpnext/accounts/doctype/sales_invoice_payment/sales_invoice_payment.json @@ -295,7 +295,7 @@ "issingle": 0, "istable": 1, "max_attachments": 0, - "modified": "2019-03-06 15:58:37.839241", + "modified": "2019-03-19 14:54:56.524556", "modified_by": "Administrator", "module": "Accounts", "name": "Sales Invoice Payment", diff --git a/erpnext/accounts/doctype/subscription_plan/subscription_plan.py b/erpnext/accounts/doctype/subscription_plan/subscription_plan.py index d3fef6023b..625979bee1 100644 --- a/erpnext/accounts/doctype/subscription_plan/subscription_plan.py +++ b/erpnext/accounts/doctype/subscription_plan/subscription_plan.py @@ -4,6 +4,7 @@ from __future__ import unicode_literals import frappe +from frappe import _ from frappe.model.document import Document from erpnext.utilities.product import get_price @@ -13,7 +14,7 @@ class SubscriptionPlan(Document): def validate_interval_count(self): if self.billing_interval_count < 1: - frappe.throw('Billing Interval Count cannot be less than 1') + frappe.throw(_('Billing Interval Count cannot be less than 1')) @frappe.whitelist() def get_plan_rate(plan, quantity=1, customer=None): @@ -26,7 +27,7 @@ def get_plan_rate(plan, quantity=1, customer=None): customer_group = frappe.db.get_value("Customer", customer, "customer_group") else: customer_group = None - + price = get_price(item_code=plan.item, price_list=plan.price_list, customer_group=customer_group, company=None, qty=quantity) if not price: return 0 diff --git a/erpnext/accounts/general_ledger.py b/erpnext/accounts/general_ledger.py index e15dd2a7a6..9a014840eb 100644 --- a/erpnext/accounts/general_ledger.py +++ b/erpnext/accounts/general_ledger.py @@ -145,9 +145,9 @@ def round_off_debit_credit(gl_map): .format(gl_map[0].voucher_type, gl_map[0].voucher_no, debit_credit_diff)) elif abs(debit_credit_diff) >= (1.0 / (10**precision)): - make_round_off_gle(gl_map, debit_credit_diff) + make_round_off_gle(gl_map, debit_credit_diff, precision) -def make_round_off_gle(gl_map, debit_credit_diff): +def make_round_off_gle(gl_map, debit_credit_diff, precision): round_off_account, round_off_cost_center = get_round_off_account_and_cost_center(gl_map[0].company) round_off_account_exists = False round_off_gle = frappe._dict() @@ -160,6 +160,10 @@ def make_round_off_gle(gl_map, debit_credit_diff): debit_credit_diff += flt(d.credit_in_account_currency) round_off_account_exists = True + if round_off_account_exists and abs(debit_credit_diff) <= (1.0 / (10**precision)): + gl_map.remove(round_off_gle) + return + if not round_off_gle: for k in ["voucher_type", "voucher_no", "company", "posting_date", "remarks", "is_opening"]: diff --git a/erpnext/accounts/page/bank_reconciliation/__init__.py b/erpnext/accounts/page/bank_reconciliation/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/erpnext/accounts/page/bank_reconciliation/bank_reconciliation.js b/erpnext/accounts/page/bank_reconciliation/bank_reconciliation.js new file mode 100644 index 0000000000..6eafa0d231 --- /dev/null +++ b/erpnext/accounts/page/bank_reconciliation/bank_reconciliation.js @@ -0,0 +1,578 @@ +frappe.provide("erpnext.accounts"); + +frappe.pages['bank-reconciliation'].on_page_load = function(wrapper) { + new erpnext.accounts.bankReconciliation(wrapper); +} + +erpnext.accounts.bankReconciliation = class BankReconciliation { + constructor(wrapper) { + this.page = frappe.ui.make_app_page({ + parent: wrapper, + title: __("Bank Reconciliation"), + single_column: true + }); + this.parent = wrapper; + this.page = this.parent.page; + + this.check_plaid_status(); + this.make(); + } + + make() { + const me = this; + + me.$main_section = $(`
`).appendTo(me.page.main); + const empty_state = __("Upload a bank statement, link or reconcile a bank account") + me.$main_section.append(`
${empty_state}
`) + + me.page.add_field({ + fieldtype: 'Link', + label: __('Company'), + fieldname: 'company', + options: "Company", + onchange: function() { + if (this.value) { + me.company = this.value; + } else { + me.company = null; + me.bank_account = null; + } + } + }) + me.page.add_field({ + fieldtype: 'Link', + label: __('Bank Account'), + fieldname: 'bank_account', + options: "Bank Account", + get_query: function() { + if(!me.company) { + frappe.throw(__("Please select company first")); + return + } + + return { + filters: { + "company": me.company + } + } + }, + onchange: function() { + if (this.value) { + me.bank_account = this.value; + me.add_actions(); + } else { + me.bank_account = null; + me.page.hide_actions_menu(); + } + } + }) + } + + check_plaid_status() { + const me = this; + frappe.db.get_value("Plaid Settings", "Plaid Settings", "enabled", (r) => { + if (r && r.enabled == "1") { + me.plaid_status = "active" + } else { + me.plaid_status = "inactive" + } + }) + } + + add_actions() { + const me = this; + + me.page.show_menu() + + me.page.add_menu_item(__("Upload a statement"), function() { + me.clear_page_content(); + new erpnext.accounts.bankTransactionUpload(me); + }, true) + + if (me.plaid_status==="active") { + me.page.add_menu_item(__("Synchronize this account"), function() { + me.clear_page_content(); + new erpnext.accounts.bankTransactionSync(me); + }, true) + } + + me.page.add_menu_item(__("Reconcile this account"), function() { + me.clear_page_content(); + me.make_reconciliation_tool(); + }, true) + } + + clear_page_content() { + const me = this; + $(me.page.body).find('.frappe-list').remove(); + me.$main_section.empty(); + } + + make_reconciliation_tool() { + const me = this; + frappe.model.with_doctype("Bank Transaction", () => { + erpnext.accounts.ReconciliationList = new erpnext.accounts.ReconciliationTool({ + parent: me.parent, + doctype: "Bank Transaction" + }); + }) + } +} + + +erpnext.accounts.bankTransactionUpload = class bankTransactionUpload { + constructor(parent) { + this.parent = parent; + this.data = []; + + const assets = [ + "/assets/frappe/css/frappe-datatable.css", + "/assets/frappe/js/lib/clusterize.min.js", + "/assets/frappe/js/lib/Sortable.min.js", + "/assets/frappe/js/lib/frappe-datatable.js" + ]; + + frappe.require(assets, () => { + this.make(); + }); + } + + make() { + const me = this; + frappe.upload.make({ + args: { + method: 'erpnext.accounts.doctype.bank_transaction.bank_transaction_upload.upload_bank_statement', + allow_multiple: 0 + }, + no_socketio: true, + sample_url: "e.g. http://example.com/somefile.csv", + callback: function(attachment, r) { + if (!r.exc && r.message) { + me.data = r.message; + me.setup_transactions_dom(); + me.create_datatable(); + me.add_primary_action(); + } + } + }) + } + + setup_transactions_dom() { + const me = this; + me.parent.$main_section.append(`
`) + } + + create_datatable() { + try { + this.datatable = new DataTable('.transactions-table', { + columns: this.data.columns, + data: this.data.data + }) + } + catch(err) { + let msg = __(`Your file could not be processed by ERPNext. +
It should be a standard CSV or XLSX file. +
The headers should be in the first row.`) + frappe.throw(msg) + } + + } + + add_primary_action() { + const me = this; + me.parent.page.set_primary_action(__("Submit"), function() { + me.add_bank_entries() + }, null, __("Creating bank entries...")) + } + + add_bank_entries() { + const me = this; + frappe.xcall('erpnext.accounts.doctype.bank_transaction.bank_transaction_upload.create_bank_entries', + {columns: this.datatable.datamanager.columns, data: this.datatable.datamanager.data, bank_account: me.parent.bank_account} + ).then((result) => { + let result_title = result.errors == 0 ? __("{0} bank transaction(s) created", [result.success]) : __("{0} bank transaction(s) created and {1} errors", [result.success, result.errors]) + let result_msg = ` +
+
${result_title}
+
` + me.parent.page.clear_primary_action(); + me.parent.$main_section.empty(); + me.parent.$main_section.append(result_msg); + if (result.errors == 0) { + frappe.show_alert({message:__("All bank transactions have been created"), indicator:'green'}); + } else { + frappe.show_alert({message:__("Please check the error log for details about the import errors"), indicator:'red'}); + } + }) + } +} + +erpnext.accounts.bankTransactionSync = class bankTransactionSync { + constructor(parent) { + this.parent = parent; + this.data = []; + + this.init_config() + } + + init_config() { + const me = this; + frappe.xcall('erpnext.erpnext_integrations.doctype.plaid_settings.plaid_settings.plaid_configuration') + .then(result => { + me.plaid_env = result.plaid_env; + me.plaid_public_key = result.plaid_public_key; + me.client_name = result.client_name; + me.sync_transactions() + }) + } + + sync_transactions() { + const me = this; + frappe.db.get_value("Bank Account", me.parent.bank_account, "bank", (v) => { + frappe.xcall('erpnext.erpnext_integrations.doctype.plaid_settings.plaid_settings.sync_transactions', { + bank: v['bank'], + bank_account: me.parent.bank_account, + freeze: true + }) + .then((result) => { + let result_title = (result.length > 0) ? __("{0} bank transaction(s) created", [result.length]) : __("This bank account is already synchronized") + let result_msg = ` +
+
${result_title}
+
` + this.parent.$main_section.append(result_msg) + frappe.show_alert({message:__("Bank account '{0}' has been synchronized", [me.parent.bank_account]), indicator:'green'}); + }) + }) + } +} + + +erpnext.accounts.ReconciliationTool = class ReconciliationTool extends frappe.views.BaseList { + constructor(opts) { + super(opts); + this.show(); + } + + setup_defaults() { + super.setup_defaults(); + + this.page_title = __("Bank Reconciliation"); + this.doctype = 'Bank Transaction'; + this.fields = ['date', 'description', 'debit', 'credit', 'currency'] + + } + + setup_view() { + this.render_header(); + } + + setup_side_bar() { + // + } + + make_standard_filters() { + // + } + + freeze() { + this.$result.find('.list-count').html(`${__('Refreshing')}...`); + } + + get_args() { + const args = super.get_args(); + + return Object.assign({}, args, { + ...args.filters.push(["Bank Transaction", "docstatus", "=", 1], + ["Bank Transaction", "unallocated_amount", ">", 0]) + }); + + } + + update_data(r) { + let data = r.message || []; + + if (this.start === 0) { + this.data = data; + } else { + this.data = this.data.concat(data); + } + } + + render() { + const me = this; + this.$result.find('.list-row-container').remove(); + $('[data-fieldname="name"]').remove(); + me.data.map((value) => { + const row = $('
').data("data", value).appendTo(me.$result).get(0); + new erpnext.accounts.ReconciliationRow(row, value); + }) + } + + render_header() { + const me = this; + if ($(this.wrapper).find('.transaction-header').length === 0) { + me.$result.append(frappe.render_template("bank_transaction_header")); + } + } +} + +erpnext.accounts.ReconciliationRow = class ReconciliationRow { + constructor(row, data) { + this.data = data; + this.row = row; + this.make(); + this.bind_events(); + } + + make() { + $(this.row).append(frappe.render_template("bank_transaction_row", this.data)) + } + + bind_events() { + const me = this; + $(me.row).on('click', '.clickable-section', function() { + me.bank_entry = $(this).attr("data-name"); + me.show_dialog($(this).attr("data-name")); + }) + + $(me.row).on('click', '.new-reconciliation', function() { + me.bank_entry = $(this).attr("data-name"); + me.show_dialog($(this).attr("data-name")); + }) + + $(me.row).on('click', '.new-payment', function() { + me.bank_entry = $(this).attr("data-name"); + me.new_payment(); + }) + + $(me.row).on('click', '.new-invoice', function() { + me.bank_entry = $(this).attr("data-name"); + me.new_invoice(); + }) + + $(me.row).on('click', '.new-expense', function() { + me.bank_entry = $(this).attr("data-name"); + me.new_expense(); + }) + } + + new_payment() { + const me = this; + const paid_amount = me.data.credit > 0 ? me.data.credit : me.data.debit; + const payment_type = me.data.credit > 0 ? "Receive": "Pay"; + const party_type = me.data.credit > 0 ? "Customer": "Supplier"; + + frappe.new_doc("Payment Entry", {"payment_type": payment_type, "paid_amount": paid_amount, + "party_type": party_type, "paid_from": me.data.bank_account}) + } + + new_invoice() { + const me = this; + const invoice_type = me.data.credit > 0 ? "Sales Invoice" : "Purchase Invoice"; + + frappe.new_doc(invoice_type) + } + + new_expense() { + frappe.new_doc("Expense Claim") + } + + + show_dialog(data) { + const me = this; + + frappe.db.get_value("Bank Account", me.data.bank_account, "account", (r) => { + me.gl_account = r.account; + }) + + frappe.xcall('erpnext.accounts.page.bank_reconciliation.bank_reconciliation.get_linked_payments', + {bank_transaction: data, freeze:true, freeze_message:__("Finding linked payments")} + ).then((result) => { + me.make_dialog(result) + }) + } + + make_dialog(data) { + const me = this; + me.selected_payment = null; + + const fields = [ + { + fieldtype: 'Section Break', + fieldname: 'section_break_1', + label: __('Automatic Reconciliation') + }, + { + fieldtype: 'HTML', + fieldname: 'payment_proposals' + }, + { + fieldtype: 'Section Break', + fieldname: 'section_break_2', + label: __('Search for a payment') + }, + { + fieldtype: 'Link', + fieldname: 'payment_doctype', + options: 'DocType', + label: 'Payment DocType', + get_query: () => { + return { + filters : { + "name": ["in", ["Payment Entry", "Journal Entry", "Sales Invoice", "Purchase Invoice", "Expense Claim"]] + } + } + }, + }, + { + fieldtype: 'Column Break', + fieldname: 'column_break_1', + }, + { + fieldtype: 'Dynamic Link', + fieldname: 'payment_entry', + options: 'payment_doctype', + label: 'Payment Document', + get_query: () => { + let dt = this.dialog.fields_dict.payment_doctype.value; + if (dt === "Payment Entry") { + return { + query: "erpnext.accounts.page.bank_reconciliation.bank_reconciliation.payment_entry_query", + filters : { + "bank_account": this.data.bank_account, + "company": this.data.company + } + } + } else if (dt === "Journal Entry") { + return { + query: "erpnext.accounts.page.bank_reconciliation.bank_reconciliation.journal_entry_query", + filters : { + "bank_account": this.data.bank_account, + "company": this.data.company + } + } + } else if (dt === "Sales Invoice") { + return { + query: "erpnext.accounts.page.bank_reconciliation.bank_reconciliation.sales_invoices_query" + } + } else if (dt === "Purchase Invoice") { + return { + filters : [ + ["Purchase Invoice", "ifnull(clearance_date, '')", "=", ""], + ["Purchase Invoice", "docstatus", "=", 1], + ["Purchase Invoice", "company", "=", this.data.company] + ] + } + } else if (dt === "Expense Claim") { + return { + filters : [ + ["Expense Claim", "ifnull(clearance_date, '')", "=", ""], + ["Expense Claim", "docstatus", "=", 1], + ["Expense Claim", "company", "=", this.data.company] + ] + } + } + }, + onchange: function() { + if (me.selected_payment !== this.value) { + me.selected_payment = this.value; + me.display_payment_details(this); + } + } + }, + { + fieldtype: 'Section Break', + fieldname: 'section_break_3' + }, + { + fieldtype: 'HTML', + fieldname: 'payment_details' + }, + ]; + + me.dialog = new frappe.ui.Dialog({ + title: __("Choose a corresponding payment"), + fields: fields, + size: "large" + }); + + const proposals_wrapper = me.dialog.fields_dict.payment_proposals.$wrapper; + if (data && data.length > 0) { + proposals_wrapper.append(frappe.render_template("linked_payment_header")); + data.map(value => { + proposals_wrapper.append(frappe.render_template("linked_payment_row", value)) + }) + } else { + const empty_data_msg = __("ERPNext could not find any matching payment entry") + proposals_wrapper.append(`
${empty_data_msg}
`) + } + + $(me.dialog.body).on('click', '.reconciliation-btn', (e) => { + const payment_entry = $(e.target).attr('data-name'); + const payment_doctype = $(e.target).attr('data-doctype'); + frappe.xcall('erpnext.accounts.page.bank_reconciliation.bank_reconciliation.reconcile', + {bank_transaction: me.bank_entry, payment_doctype: payment_doctype, payment_name: payment_entry}) + .then((result) => { + setTimeout(function(){ + erpnext.accounts.ReconciliationList.refresh(); + }, 2000); + me.dialog.hide(); + }) + }) + + me.dialog.show(); + } + + display_payment_details(event) { + const me = this; + if (event.value) { + let dt = me.dialog.fields_dict.payment_doctype.value; + me.dialog.fields_dict['payment_details'].$wrapper.empty(); + frappe.db.get_doc(dt, event.value) + .then(doc => { + let displayed_docs = [] + if (dt === "Payment Entry") { + payment.currency = doc.payment_type == "Receive" ? doc.paid_to_account_currency : doc.paid_from_account_currency; + payment.doctype = dt + displayed_docs.push(payment); + } else if (dt === "Journal Entry") { + doc.accounts.forEach(payment => { + if (payment.account === me.gl_account) { + payment.doctype = dt; + payment.posting_date = doc.posting_date; + payment.party = doc.pay_to_recd_from; + payment.reference_no = doc.cheque_no; + payment.reference_date = doc.cheque_date; + payment.currency = payment.account_currency; + payment.paid_amount = payment.credit > 0 ? payment.credit : payment.debit; + payment.name = doc.name; + displayed_docs.push(payment); + } + }) + } else if (dt === "Sales Invoice") { + doc.payments.forEach(payment => { + if (payment.clearance_date === null || payment.clearance_date === "") { + payment.doctype = dt; + payment.posting_date = doc.posting_date; + payment.party = doc.customer; + payment.reference_no = doc.remarks; + payment.currency = doc.currency; + payment.paid_amount = payment.amount; + payment.name = doc.name; + displayed_docs.push(payment); + } + }) + } + + const details_wrapper = me.dialog.fields_dict.payment_details.$wrapper; + details_wrapper.append(frappe.render_template("linked_payment_header")); + displayed_docs.forEach(values => { + details_wrapper.append(frappe.render_template("linked_payment_row", values)); + }) + }) + } + + } +} \ No newline at end of file diff --git a/erpnext/accounts/page/bank_reconciliation/bank_reconciliation.json b/erpnext/accounts/page/bank_reconciliation/bank_reconciliation.json new file mode 100644 index 0000000000..feea36860b --- /dev/null +++ b/erpnext/accounts/page/bank_reconciliation/bank_reconciliation.json @@ -0,0 +1,29 @@ +{ + "content": null, + "creation": "2018-11-24 12:03:14.646669", + "docstatus": 0, + "doctype": "Page", + "idx": 0, + "modified": "2018-11-24 12:03:14.646669", + "modified_by": "Administrator", + "module": "Accounts", + "name": "bank-reconciliation", + "owner": "Administrator", + "page_name": "bank-reconciliation", + "roles": [ + { + "role": "System Manager" + }, + { + "role": "Accounts Manager" + }, + { + "role": "Accounts User" + } + ], + "script": null, + "standard": "Yes", + "style": null, + "system_page": 0, + "title": "Bank Reconciliation" +} \ No newline at end of file diff --git a/erpnext/accounts/page/bank_reconciliation/bank_reconciliation.py b/erpnext/accounts/page/bank_reconciliation/bank_reconciliation.py new file mode 100644 index 0000000000..36c939996f --- /dev/null +++ b/erpnext/accounts/page/bank_reconciliation/bank_reconciliation.py @@ -0,0 +1,378 @@ +# -*- coding: utf-8 -*- +# Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors +# For license information, please see license.txt + +from __future__ import unicode_literals +import frappe +from frappe import _ +import difflib +from frappe.utils import flt +from six import iteritems +from erpnext import get_company_currency + +@frappe.whitelist() +def reconcile(bank_transaction, payment_doctype, payment_name): + transaction = frappe.get_doc("Bank Transaction", bank_transaction) + payment_entry = frappe.get_doc(payment_doctype, payment_name) + + account = frappe.db.get_value("Bank Account", transaction.bank_account, "account") + gl_entry = frappe.get_doc("GL Entry", dict(account=account, voucher_type=payment_doctype, voucher_no=payment_name)) + + if transaction.unallocated_amount == 0: + frappe.throw(_("This bank transaction is already fully reconciled")) + + if transaction.credit > 0 and gl_entry.credit > 0: + frappe.throw(_("The selected payment entry should be linked with a debtor bank transaction")) + + if transaction.debit > 0 and gl_entry.debit > 0: + frappe.throw(_("The selected payment entry should be linked with a creditor bank transaction")) + + add_payment_to_transaction(transaction, payment_entry, gl_entry) + + return 'reconciled' + +def add_payment_to_transaction(transaction, payment_entry, gl_entry): + gl_amount, transaction_amount = (gl_entry.credit, transaction.debit) if gl_entry.credit > 0 else (gl_entry.debit, transaction.credit) + allocated_amount = gl_amount if gl_amount <= transaction_amount else transaction_amount + transaction.append("payment_entries", { + "payment_document": payment_entry.doctype, + "payment_entry": payment_entry.name, + "allocated_amount": allocated_amount + }) + + transaction.save() + transaction.update_allocations() + +@frappe.whitelist() +def get_linked_payments(bank_transaction): + transaction = frappe.get_doc("Bank Transaction", bank_transaction) + bank_account = frappe.db.get_values("Bank Account", transaction.bank_account, ["account", "company"], as_dict=True) + + # Get all payment entries with a matching amount + amount_matching = check_matching_amount(bank_account[0].account, bank_account[0].company, transaction) + + # Get some data from payment entries linked to a corresponding bank transaction + description_matching = get_matching_descriptions_data(bank_account[0].company, transaction) + + if amount_matching: + return check_amount_vs_description(amount_matching, description_matching) + + elif description_matching: + description_matching = filter(lambda x: not x.get('clearance_date'), description_matching) + if not description_matching: + return [] + + return sorted(list(description_matching), key = lambda x: x["posting_date"], reverse=True) + + else: + return [] + +def check_matching_amount(bank_account, company, transaction): + payments = [] + amount = transaction.credit if transaction.credit > 0 else transaction.debit + + payment_type = "Receive" if transaction.credit > 0 else "Pay" + account_from_to = "paid_to" if transaction.credit > 0 else "paid_from" + currency_field = "paid_to_account_currency as currency" if transaction.credit > 0 else "paid_from_account_currency as currency" + + payment_entries = frappe.get_all("Payment Entry", fields=["'Payment Entry' as doctype", "name", "paid_amount", "payment_type", "reference_no", "reference_date", + "party", "party_type", "posting_date", "{0}".format(currency_field)], filters=[["paid_amount", "like", "{0}%".format(amount)], + ["docstatus", "=", "1"], ["payment_type", "=", [payment_type, "Internal Transfer"]], ["ifnull(clearance_date, '')", "=", ""], ["{0}".format(account_from_to), "=", "{0}".format(bank_account)]]) + + if transaction.credit > 0: + journal_entries = frappe.db.sql(""" + SELECT + 'Journal Entry' as doctype, je.name, je.posting_date, je.cheque_no as reference_no, + je.pay_to_recd_from as party, je.cheque_date as reference_date, jea.debit_in_account_currency as paid_amount + FROM + `tabJournal Entry Account` as jea + JOIN + `tabJournal Entry` as je + ON + jea.parent = je.name + WHERE + (je.clearance_date is null or je.clearance_date='0000-00-00') + AND + jea.account = %s + AND + jea.debit_in_account_currency like %s + AND + je.docstatus = 1 + """, (bank_account, amount), as_dict=True) + else: + journal_entries = frappe.db.sql(""" + SELECT + 'Journal Entry' as doctype, je.name, je.posting_date, je.cheque_no as reference_no, + jea.account_currency as currency, je.pay_to_recd_from as party, je.cheque_date as reference_date, + jea.credit_in_account_currency as paid_amount + FROM + `tabJournal Entry Account` as jea + JOIN + `tabJournal Entry` as je + ON + jea.parent = je.name + WHERE + (je.clearance_date is null or je.clearance_date='0000-00-00') + AND + jea.account = %(bank_account)s + AND + jea.credit_in_account_currency like %(txt)s + AND + je.docstatus = 1 + """, { + 'bank_account': bank_account, + 'txt': '%%%s%%' % amount + }, as_dict=True) + + frappe.errprint(journal_entries) + + if transaction.credit > 0: + sales_invoices = frappe.db.sql(""" + SELECT + 'Sales Invoice' as doctype, si.name, si.customer as party, + si.posting_date, sip.amount as paid_amount + FROM + `tabSales Invoice Payment` as sip + JOIN + `tabSales Invoice` as si + ON + sip.parent = si.name + WHERE + (sip.clearance_date is null or sip.clearance_date='0000-00-00') + AND + sip.account = %s + AND + sip.amount like %s + AND + si.docstatus = 1 + """, (bank_account, amount), as_dict=True) + else: + sales_invoices = [] + + if transaction.debit > 0: + purchase_invoices = frappe.get_all("Purchase Invoice", + fields = ["'Purchase Invoice' as doctype", "name", "paid_amount", "supplier as party", "posting_date", "currency"], + filters=[ + ["paid_amount", "like", "{0}%".format(amount)], + ["docstatus", "=", "1"], + ["is_paid", "=", "1"], + ["ifnull(clearance_date, '')", "=", ""], + ["cash_bank_account", "=", "{0}".format(bank_account)] + ] + ) + + mode_of_payments = [x["parent"] for x in frappe.db.get_list("Mode of Payment Account", + filters={"default_account": bank_account}, fields=["parent"])] + + company_currency = get_company_currency(company) + + expense_claims = frappe.get_all("Expense Claim", + fields=["'Expense Claim' as doctype", "name", "total_sanctioned_amount as paid_amount", + "employee as party", "posting_date", "'{0}' as currency".format(company_currency)], + filters=[ + ["total_sanctioned_amount", "like", "{0}%".format(amount)], + ["docstatus", "=", "1"], + ["is_paid", "=", "1"], + ["ifnull(clearance_date, '')", "=", ""], + ["mode_of_payment", "in", "{0}".format(tuple(mode_of_payments))] + ] + ) + else: + purchase_invoices = expense_claims = [] + + for data in [payment_entries, journal_entries, sales_invoices, purchase_invoices, expense_claims]: + if data: + payments.extend(data) + + return payments + +def get_matching_descriptions_data(company, transaction): + if not transaction.description : + return [] + + bank_transactions = frappe.db.sql(""" + SELECT + bt.name, bt.description, bt.date, btp.payment_document, btp.payment_entry + FROM + `tabBank Transaction` as bt + LEFT JOIN + `tabBank Transaction Payments` as btp + ON + bt.name = btp.parent + WHERE + bt.allocated_amount > 0 + AND + bt.docstatus = 1 + """, as_dict=True) + + selection = [] + for bank_transaction in bank_transactions: + if bank_transaction.description: + seq=difflib.SequenceMatcher(lambda x: x == " ", transaction.description, bank_transaction.description) + + if seq.ratio() > 0.6: + bank_transaction["ratio"] = seq.ratio() + selection.append(bank_transaction) + + document_types = set([x["payment_document"] for x in selection]) + + links = {} + for document_type in document_types: + links[document_type] = [x["payment_entry"] for x in selection if x["payment_document"]==document_type] + + + data = [] + company_currency = get_company_currency(company) + for key, value in iteritems(links): + if key == "Payment Entry": + data.extend(frappe.get_all("Payment Entry", filters=[["name", "in", value]], + fields=["'Payment Entry' as doctype", "posting_date", "party", "reference_no", + "reference_date", "paid_amount", "paid_to_account_currency as currency", "clearance_date"])) + if key == "Journal Entry": + journal_entries = frappe.get_all("Journal Entry", filters=[["name", "in", value]], + fields=["name", "'Journal Entry' as doctype", "posting_date", + "pay_to_recd_from as party", "cheque_no as reference_no", "cheque_date as reference_date", + "total_credit as paid_amount", "clearance_date"]) + for journal_entry in journal_entries: + journal_entry_accounts = frappe.get_all("Journal Entry Account", filters={"parenttype": journal_entry["doctype"], "parent": journal_entry["name"]}, fields=["account_currency"]) + journal_entry["currency"] = journal_entry_accounts[0]["account_currency"] if journal_entry_accounts else company_currency + data.extend(journal_entries) + if key == "Sales Invoice": + data.extend(frappe.get_all("Sales Invoice", filters=[["name", "in", value]], fields=["'Sales Invoice' as doctype", "posting_date", "customer_name as party", "paid_amount", "currency"])) + if key == "Purchase Invoice": + data.extend(frappe.get_all("Purchase Invoice", filters=[["name", "in", value]], fields=["'Purchase Invoice' as doctype", "posting_date", "supplier_name as party", "paid_amount", "currency"])) + if key == "Expense Claim": + expense_claims = frappe.get_all("Expense Claim", filters=[["name", "in", value]], fields=["'Expense Claim' as doctype", "posting_date", "employee_name as party", "total_amount_reimbursed as paid_amount"]) + data.extend([dict(x,**{"currency": company_currency}) for x in expense_claims]) + + return data + +def check_amount_vs_description(amount_matching, description_matching): + result = [] + + if description_matching: + for am_match in amount_matching: + for des_match in description_matching: + if des_match.get("clearance_date"): + continue + + if am_match["party"] == des_match["party"]: + if am_match not in result: + result.append(am_match) + continue + + if "reference_no" in am_match and "reference_no" in des_match: + if difflib.SequenceMatcher(lambda x: x == " ", am_match["reference_no"], des_match["reference_no"]).ratio() > 70: + if am_match not in result: + result.append(am_match) + if result: + return sorted(result, key = lambda x: x["posting_date"], reverse=True) + else: + return sorted(amount_matching, key = lambda x: x["posting_date"], reverse=True) + + else: + return sorted(amount_matching, key = lambda x: x["posting_date"], reverse=True) + +def get_matching_transactions_payments(description_matching): + payments = [x["payment_entry"] for x in description_matching] + + payment_by_ratio = {x["payment_entry"]: x["ratio"] for x in description_matching} + + if payments: + reference_payment_list = frappe.get_all("Payment Entry", fields=["name", "paid_amount", "payment_type", "reference_no", "reference_date", + "party", "party_type", "posting_date", "paid_to_account_currency"], filters=[["name", "in", payments]]) + + return sorted(reference_payment_list, key=lambda x: payment_by_ratio[x["name"]]) + + else: + return [] + +def payment_entry_query(doctype, txt, searchfield, start, page_len, filters): + account = frappe.db.get_value("Bank Account", filters.get("bank_account"), "account") + if not account: + return + + return frappe.db.sql(""" + SELECT + name, party, paid_amount, received_amount, reference_no + FROM + `tabPayment Entry` + WHERE + (clearance_date is null or clearance_date='0000-00-00') + AND (paid_from = %(account)s or paid_to = %(account)s) + AND (name like %(txt)s or party like %(txt)s) + AND docstatus = 1 + ORDER BY + if(locate(%(_txt)s, name), locate(%(_txt)s, name), 99999), name + LIMIT + %(start)s, %(page_len)s""", + { + 'txt': "%%%s%%" % txt, + '_txt': txt.replace("%", ""), + 'start': start, + 'page_len': page_len, + 'account': account + } + ) + +def journal_entry_query(doctype, txt, searchfield, start, page_len, filters): + account = frappe.db.get_value("Bank Account", filters.get("bank_account"), "account") + + return frappe.db.sql(""" + SELECT + jea.parent, je.pay_to_recd_from, + if(jea.debit_in_account_currency > 0, jea.debit_in_account_currency, jea.credit_in_account_currency) + FROM + `tabJournal Entry Account` as jea + LEFT JOIN + `tabJournal Entry` as je + ON + jea.parent = je.name + WHERE + (je.clearance_date is null or je.clearance_date='0000-00-00') + AND + jea.account = %(account)s + AND + (jea.parent like %(txt)s or je.pay_to_recd_from like %(txt)s) + AND + je.docstatus = 1 + ORDER BY + if(locate(%(_txt)s, jea.parent), locate(%(_txt)s, jea.parent), 99999), + jea.parent + LIMIT + %(start)s, %(page_len)s""", + { + 'txt': "%%%s%%" % txt, + '_txt': txt.replace("%", ""), + 'start': start, + 'page_len': page_len, + 'account': account + } + ) + +def sales_invoices_query(doctype, txt, searchfield, start, page_len, filters): + return frappe.db.sql(""" + SELECT + sip.parent, si.customer, sip.amount, sip.mode_of_payment + FROM + `tabSales Invoice Payment` as sip + LEFT JOIN + `tabSales Invoice` as si + ON + sip.parent = si.name + WHERE + (sip.clearance_date is null or sip.clearance_date='0000-00-00') + AND + (sip.parent like %(txt)s or si.customer like %(txt)s) + ORDER BY + if(locate(%(_txt)s, sip.parent), locate(%(_txt)s, sip.parent), 99999), + sip.parent + LIMIT + %(start)s, %(page_len)s""", + { + 'txt': "%%%s%%" % txt, + '_txt': txt.replace("%", ""), + 'start': start, + 'page_len': page_len + } + ) \ No newline at end of file diff --git a/erpnext/accounts/page/bank_reconciliation/bank_transaction_header.html b/erpnext/accounts/page/bank_reconciliation/bank_transaction_header.html new file mode 100644 index 0000000000..94f183b793 --- /dev/null +++ b/erpnext/accounts/page/bank_reconciliation/bank_transaction_header.html @@ -0,0 +1,21 @@ +
+
+ +
+ {{ __("Description") }} +
+ + + +
+
+
+
diff --git a/erpnext/accounts/page/bank_reconciliation/bank_transaction_row.html b/erpnext/accounts/page/bank_reconciliation/bank_transaction_row.html new file mode 100644 index 0000000000..742b84c63f --- /dev/null +++ b/erpnext/accounts/page/bank_reconciliation/bank_transaction_row.html @@ -0,0 +1,36 @@ +
+
+
+ +
+ {{ description }} +
+ + + +
+ +
+
diff --git a/erpnext/accounts/page/bank_reconciliation/linked_payment_header.html b/erpnext/accounts/page/bank_reconciliation/linked_payment_header.html new file mode 100644 index 0000000000..4542c36e0d --- /dev/null +++ b/erpnext/accounts/page/bank_reconciliation/linked_payment_header.html @@ -0,0 +1,21 @@ +
+
+
+ {{ __("Payment Name") }} +
+
+ {{ __("Reference Date") }} +
+ + +
+ {{ __("Reference Number") }} +
+
+
+
+
diff --git a/erpnext/accounts/page/bank_reconciliation/linked_payment_row.html b/erpnext/accounts/page/bank_reconciliation/linked_payment_row.html new file mode 100644 index 0000000000..bdbc9fce03 --- /dev/null +++ b/erpnext/accounts/page/bank_reconciliation/linked_payment_row.html @@ -0,0 +1,36 @@ +
+
+
+ {{ name }} +
+
+ {% if (typeof reference_date !== "undefined") %} + {%= frappe.datetime.str_to_user(reference_date) %} + {% else %} + {% if (typeof posting_date !== "undefined") %} + {%= frappe.datetime.str_to_user(posting_date) %} + {% endif %} + {% endif %} +
+ + +
+ {% if (typeof reference_no !== "undefined") %} + {{ reference_no }} + {% else %} + {{ "" }} + {% endif %} +
+
+
+ +
+
+
+
\ No newline at end of file diff --git a/erpnext/accounts/page/pos/pos.js b/erpnext/accounts/page/pos/pos.js index 4550dedba9..3834c96bfb 100755 --- a/erpnext/accounts/page/pos/pos.js +++ b/erpnext/accounts/page/pos/pos.js @@ -1957,6 +1957,12 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({ }], function(values){ me.item_batch_no[me.items[0].item_code] = values.batch; + const item = me.frm.doc.items.find( + ({ item_code }) => item_code === me.items[0].item_code + ); + if (item) { + item.batch_no = values.batch; + } }, __('Select Batch No')) } diff --git a/erpnext/accounts/party.py b/erpnext/accounts/party.py index 26e445b2e3..cb94722651 100644 --- a/erpnext/accounts/party.py +++ b/erpnext/accounts/party.py @@ -44,7 +44,7 @@ def _get_party_details(party=None, account=None, party_type="Customer", company= frappe.throw(_("Not permitted for {0}").format(party), frappe.PermissionError) party = frappe.get_doc(party_type, party) - currency = party.default_currency if party.default_currency else get_company_currency(company) + currency = party.default_currency if party.get("default_currency") else get_company_currency(company) party_address, shipping_address = set_address_details(out, party, party_type, doctype, company, party_address, shipping_address) set_contact_details(out, party, party_type) @@ -144,7 +144,7 @@ def set_other_values(out, party, party_type): def get_default_price_list(party): """Return default price list for party (Document object)""" - if party.default_price_list: + if party.get("default_price_list"): return party.default_price_list if party.doctype == "Customer": diff --git a/erpnext/accounts/print_format/credit_note/credit_note.json b/erpnext/accounts/print_format/credit_note/credit_note.json index 863d4aa607..c5a11cf395 100644 --- a/erpnext/accounts/print_format/credit_note/credit_note.json +++ b/erpnext/accounts/print_format/credit_note/credit_note.json @@ -1,19 +1,23 @@ { - "creation": "2014-08-28 11:11:39.796473", - "custom_format": 0, - "disabled": 0, - "doc_type": "Journal Entry", - "docstatus": 0, - "doctype": "Print Format", - "html": "{%- from \"templates/print_formats/standard_macros.html\" import add_header -%}\n\n
\n {%- if not doc.get(\"print_heading\") and not doc.get(\"select_print_heading\") \n and doc.set(\"select_print_heading\", _(\"Credit Note\")) -%}{%- endif -%}\n {{ add_header(0, 1, doc, letter_head, no_letterhead) }}\n\n {%- for label, value in (\n (_(\"Credit To\"), doc.pay_to_recd_from),\n (_(\"Date\"), frappe.utils.formatdate(doc.voucher_date)),\n (_(\"Amount\"), \"\" + doc.get_formatted(\"total_amount\") + \"
\" + (doc.total_amount_in_words or \"\") + \"
\"),\n (_(\"Remarks\"), doc.remark)\n ) -%}\n\n
\n
\n
{{ value }}
\n
\n\n {%- endfor -%}\n\n
\n
\n

\n {{ _(\"For\") }} {{ doc.company }},
\n
\n
\n
\n {{ _(\"Authorized Signatory\") }}\n

\n
\n\n\n", - "idx": 2, - "modified": "2015-07-22 17:42:01.560817", - "modified_by": "Administrator", - "name": "Credit Note", - "owner": "Administrator", - "parent": "Journal Entry", - "parentfield": "__print_formats", - "parenttype": "DocType", - "print_format_type": "Server", + "align_labels_right": 0, + "creation": "2014-08-28 11:11:39.796473", + "custom_format": 0, + "disabled": 0, + "doc_type": "Journal Entry", + "docstatus": 0, + "doctype": "Print Format", + "format_data": "[{\"fieldname\": \"print_heading_template\", \"fieldtype\": \"Custom HTML\", \"options\": \"
\\t\\t\\t\\t

Journal Entry
{{ doc.name }}\\t\\t\\t\\t

\"}, {\"fieldtype\": \"Section Break\", \"label\": \"\"}, {\"fieldtype\": \"Column Break\"}, {\"fieldname\": \"voucher_type\", \"print_hide\": 0, \"label\": \"Entry Type\"}, {\"fieldtype\": \"Column Break\"}, {\"fieldname\": \"posting_date\", \"print_hide\": 0, \"label\": \"Posting Date\"}, {\"fieldname\": \"finance_book\", \"print_hide\": 0, \"label\": \"Finance Book\"}, {\"fieldtype\": \"Section Break\", \"label\": \"\"}, {\"fieldtype\": \"Column Break\"}, {\"fieldname\": \"accounts\", \"print_hide\": 0, \"label\": \"Accounting Entries\", \"visible_columns\": [{\"fieldname\": \"account\", \"print_width\": \"250px\", \"print_hide\": 0}, {\"fieldname\": \"bank_account_no\", \"print_width\": \"\", \"print_hide\": 0}, {\"fieldname\": \"party_type\", \"print_width\": \"\", \"print_hide\": 0}, {\"fieldname\": \"party\", \"print_width\": \"\", \"print_hide\": 0}, {\"fieldname\": \"debit_in_account_currency\", \"print_width\": \"\", \"print_hide\": 0}, {\"fieldname\": \"credit_in_account_currency\", \"print_width\": \"\", \"print_hide\": 0}, {\"fieldname\": \"reference_type\", \"print_width\": \"\", \"print_hide\": 0}, {\"fieldname\": \"reference_name\", \"print_width\": \"\", \"print_hide\": 0}, {\"fieldname\": \"reference_due_date\", \"print_width\": \"\", \"print_hide\": 0}, {\"fieldname\": \"project\", \"print_width\": \"\", \"print_hide\": 0}]}, {\"fieldtype\": \"Section Break\", \"label\": \"\"}, {\"fieldtype\": \"Column Break\"}, {\"fieldname\": \"cheque_no\", \"print_hide\": 0, \"label\": \"Reference Number\"}, {\"fieldname\": \"cheque_date\", \"print_hide\": 0, \"label\": \"Reference Date\"}, {\"fieldtype\": \"Column Break\"}, {\"fieldname\": \"get_balance\", \"print_hide\": 0, \"label\": \"Make Difference Entry\"}, {\"fieldname\": \"total_amount\", \"print_hide\": 0, \"label\": \"Total Amount\"}, {\"fieldtype\": \"Section Break\", \"label\": \"Reference\"}, {\"fieldtype\": \"Column Break\"}, {\"fieldname\": \"clearance_date\", \"print_hide\": 0, \"label\": \"Clearance Date\"}, {\"fieldname\": \"remark\", \"print_hide\": 0, \"label\": \"Remark\"}, {\"fieldname\": \"inter_company_journal_entry_reference\", \"print_hide\": 0, \"label\": \"Inter Company Journal Entry Reference\"}, {\"fieldtype\": \"Column Break\"}, {\"fieldname\": \"due_date\", \"print_hide\": 0, \"label\": \"Due Date\"}, {\"fieldtype\": \"Section Break\", \"label\": \"Printing Settings\"}, {\"fieldtype\": \"Column Break\"}, {\"fieldname\": \"pay_to_recd_from\", \"print_hide\": 0, \"label\": \"Pay To / Recd From\"}, {\"fieldtype\": \"Column Break\"}, {\"fieldname\": \"letter_head\", \"print_hide\": 0, \"label\": \"Letter Head\"}, {\"fieldtype\": \"Section Break\", \"label\": \"More Information\"}, {\"fieldtype\": \"Column Break\"}, {\"fieldname\": \"mode_of_payment\", \"print_hide\": 0, \"label\": \"Mode of Payment\"}, {\"fieldtype\": \"Column Break\"}, {\"fieldname\": \"stock_entry\", \"print_hide\": 0, \"label\": \"Stock Entry\"}]", + "html": "{%- from \"templates/print_formats/standard_macros.html\" import add_header -%}\n\n
\n {%- if not doc.get(\"print_heading\") and not doc.get(\"select_print_heading\") \n and doc.set(\"select_print_heading\", _(\"Credit Note\")) -%}{%- endif -%}\n {{ add_header(0, 1, doc, letter_head, no_letterhead) }}\n\n {%- for label, value in (\n (_(\"Credit To\"), doc.pay_to_recd_from),\n (_(\"Date\"), frappe.utils.formatdate(doc.voucher_date)),\n (_(\"Amount\"), \"\" + doc.get_formatted(\"total_amount\") + \"
\" + (doc.total_amount_in_words or \"\") + \"
\"),\n (_(\"Remarks\"), doc.remark)\n ) -%}\n\n
\n
\n
{{ value }}
\n
\n\n {%- endfor -%}\n\n
\n
\n

\n {{ _(\"For\") }} {{ doc.company }},
\n
\n
\n
\n {{ _(\"Authorized Signatory\") }}\n

\n
\n\n\n", + "idx": 2, + "line_breaks": 0, + "modified": "2019-04-18 12:10:14.732269", + "modified_by": "Administrator", + "module": "Accounts", + "name": "Credit Note", + "owner": "Administrator", + "parentfield": "__print_formats", + "print_format_builder": 0, + "print_format_type": "Server", + "show_section_headings": 0, "standard": "Yes" } \ No newline at end of file diff --git a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py index f0769f68c9..29737484c7 100755 --- a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py +++ b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py @@ -197,10 +197,9 @@ class ReceivablePayableReport(object): self.payment_term_map = self.get_payment_term_detail(voucher_nos) for gle in gl_entries_data: - if self.is_receivable_or_payable(gle, self.dr_or_cr, future_vouchers): + if self.is_receivable_or_payable(gle, self.dr_or_cr, future_vouchers, return_entries): outstanding_amount, credit_note_amount, payment_amount = self.get_outstanding_amount( gle,self.filters.report_date, self.dr_or_cr, return_entries) - temp_outstanding_amt = outstanding_amount temp_credit_note_amt = credit_note_amount @@ -379,7 +378,7 @@ class ReceivablePayableReport(object): # returns a generator return self.get_gl_entries(party_type, report_date) - def is_receivable_or_payable(self, gle, dr_or_cr, future_vouchers): + def is_receivable_or_payable(self, gle, dr_or_cr, future_vouchers, return_entries): return ( # advance (not gle.against_voucher) or @@ -390,30 +389,37 @@ class ReceivablePayableReport(object): # sales invoice/purchase invoice (gle.against_voucher==gle.voucher_no and gle.get(dr_or_cr) > 0) or + # standalone credit notes + (gle.against_voucher==gle.voucher_no and gle.voucher_no in return_entries and not return_entries.get(gle.voucher_no)) or + # entries adjusted with future vouchers ((gle.against_voucher_type, gle.against_voucher) in future_vouchers) ) def get_return_entries(self, party_type): doctype = "Sales Invoice" if party_type=="Customer" else "Purchase Invoice" - return [d.name for d in frappe.get_all(doctype, filters={"is_return": 1, "docstatus": 1})] + return_entries = frappe._dict(frappe.get_all(doctype, + filters={"is_return": 1, "docstatus": 1}, fields=["name", "return_against"], as_list=1)) + return return_entries def get_outstanding_amount(self, gle, report_date, dr_or_cr, return_entries): payment_amount, credit_note_amount = 0.0, 0.0 reverse_dr_or_cr = "credit" if dr_or_cr=="debit" else "debit" - for e in self.get_gl_entries_for(gle.party, gle.party_type, gle.voucher_type, gle.voucher_no): - if getdate(e.posting_date) <= report_date and e.name!=gle.name: + if getdate(e.posting_date) <= report_date \ + and (e.name!=gle.name or (e.voucher_no in return_entries and not return_entries.get(e.voucher_no))): + amount = flt(e.get(reverse_dr_or_cr), self.currency_precision) - flt(e.get(dr_or_cr), self.currency_precision) if e.voucher_no not in return_entries: payment_amount += amount else: credit_note_amount += amount - outstanding_amount = (flt((flt(gle.get(dr_or_cr), self.currency_precision) - - flt(gle.get(reverse_dr_or_cr), self.currency_precision) - - payment_amount - credit_note_amount), self.currency_precision)) + voucher_amount = flt(gle.get(dr_or_cr), self.currency_precision) - flt(gle.get(reverse_dr_or_cr), self.currency_precision) + if gle.voucher_no in return_entries and not return_entries.get(gle.voucher_no): + voucher_amount = 0 + outstanding_amount = flt((voucher_amount - payment_amount - credit_note_amount), self.currency_precision) credit_note_amount = flt(credit_note_amount, self.currency_precision) return outstanding_amount, credit_note_amount, payment_amount @@ -593,9 +599,12 @@ class ReceivablePayableReport(object): rows = [] for d in data: + values = d[self.ageing_col_idx_start : self.ageing_col_idx_start+5] + precision = cint(frappe.db.get_default("float_precision")) or 2 + formatted_values = [frappe.utils.rounded(val, precision) for val in values] rows.append( { - 'values': d[self.ageing_col_idx_start : self.ageing_col_idx_start+5] + 'values': formatted_values } ) diff --git a/erpnext/accounts/report/financial_statements.py b/erpnext/accounts/report/financial_statements.py index 7ef7e00876..7b9c939b47 100644 --- a/erpnext/accounts/report/financial_statements.py +++ b/erpnext/accounts/report/financial_statements.py @@ -322,7 +322,10 @@ def sort_accounts(accounts, is_root=False, key="name"): """Sort root types as Asset, Liability, Equity, Income, Expense""" def compare_accounts(a, b): - if is_root: + if re.split('\W+', a[key])[0].isdigit(): + # if chart of accounts is numbered, then sort by number + return cmp(a[key], b[key]) + elif is_root: if a.report_type != b.report_type and a.report_type == "Balance Sheet": return -1 if a.root_type != b.root_type and a.root_type == "Asset": @@ -353,6 +356,7 @@ def set_gl_entries_by_account( "company": company, "from_date": from_date, "to_date": to_date, + "finance_book": filters.get("finance_book") } if filters.get("include_default_book_entries"): diff --git a/erpnext/accounts/report/general_ledger/general_ledger.js b/erpnext/accounts/report/general_ledger/general_ledger.js index 61e21fda89..32af644021 100644 --- a/erpnext/accounts/report/general_ledger/general_ledger.js +++ b/erpnext/accounts/report/general_ledger/general_ledger.js @@ -171,4 +171,3 @@ dimension_filters.then((dimensions) => { }); }); }); - diff --git a/erpnext/accounts/report/gross_profit/gross_profit.py b/erpnext/accounts/report/gross_profit/gross_profit.py index 9a02d1b8e8..6ef6d6eea0 100644 --- a/erpnext/accounts/report/gross_profit/gross_profit.py +++ b/erpnext/accounts/report/gross_profit/gross_profit.py @@ -65,7 +65,7 @@ def get_columns(group_wise_columns, filters): "warehouse": _("Warehouse") + ":Link/Warehouse", "qty": _("Qty") + ":Float", "base_rate": _("Avg. Selling Rate") + ":Currency/currency", - "buying_rate": _("Avg. Buying Rate") + ":Currency/currency", + "buying_rate": _("Valuation Rate") + ":Currency/currency", "base_amount": _("Selling Amount") + ":Currency/currency", "buying_amount": _("Buying Amount") + ":Currency/currency", "gross_profit": _("Gross Profit") + ":Currency/currency", diff --git a/erpnext/accounts/report/inactive_sales_items/inactive_sales_items.json b/erpnext/accounts/report/inactive_sales_items/inactive_sales_items.json index c97f824b62..a9f79b7156 100644 --- a/erpnext/accounts/report/inactive_sales_items/inactive_sales_items.json +++ b/erpnext/accounts/report/inactive_sales_items/inactive_sales_items.json @@ -1,14 +1,13 @@ { "add_total_row": 0, - "creation": "2019-05-01 13:46:23.044979", + "creation": "2019-05-01 12:59:52.018850", "disable_prepared_report": 0, "disabled": 0, "docstatus": 0, "doctype": "Report", "idx": 0, "is_standard": "Yes", - "letter_head": "Test Letter Head 1", - "modified": "2019-05-01 13:46:23.044979", + "modified": "2019-05-01 13:00:26.545278", "modified_by": "Administrator", "module": "Accounts", "name": "Inactive Sales Items", @@ -17,5 +16,15 @@ "ref_doctype": "Sales Invoice", "report_name": "Inactive Sales Items", "report_type": "Script Report", - "roles": [] + "roles": [ + { + "role": "Accounts User" + }, + { + "role": "Accounts Manager" + }, + { + "role": "Auditor" + } + ] } \ No newline at end of file diff --git a/erpnext/accounts/report/item_wise_sales_register/item_wise_sales_register.py b/erpnext/accounts/report/item_wise_sales_register/item_wise_sales_register.py index 5d3253a552..e8b19b4024 100644 --- a/erpnext/accounts/report/item_wise_sales_register/item_wise_sales_register.py +++ b/erpnext/accounts/report/item_wise_sales_register/item_wise_sales_register.py @@ -102,9 +102,7 @@ def get_conditions(filters): ("customer", " and `tabSales Invoice`.customer = %(customer)s"), ("item_code", " and `tabSales Invoice Item`.item_code = %(item_code)s"), ("from_date", " and `tabSales Invoice`.posting_date>=%(from_date)s"), - ("to_date", " and `tabSales Invoice`.posting_date<=%(to_date)s"), - ("company_gstin", " and `tabSales Invoice`.company_gstin = %(company_gstin)s"), - ("invoice_type", " and `tabSales Invoice`.invoice_type = %(invoice_type)s")): + ("to_date", " and `tabSales Invoice`.posting_date<=%(to_date)s")): if filters.get(opts[0]): conditions += opts[1] diff --git a/erpnext/accounts/report/sales_register/sales_register.py b/erpnext/accounts/report/sales_register/sales_register.py index d37caaf59d..de60995ca2 100644 --- a/erpnext/accounts/report/sales_register/sales_register.py +++ b/erpnext/accounts/report/sales_register/sales_register.py @@ -157,7 +157,7 @@ def get_conditions(filters): conditions += """ and exists(select name from `tabSales Invoice Item` where parent=`tabSales Invoice`.name and ifnull(`tabSales Invoice Item`.brand, '') = %(brand)s)""" - + if filters.get("item_group"): conditions += """ and exists(select name from `tabSales Invoice Item` where parent=`tabSales Invoice`.name @@ -171,7 +171,7 @@ def get_invoices(filters, additional_query_columns): conditions = get_conditions(filters) return frappe.db.sql(""" - select name, posting_date, debit_to, project, customer, + select name, posting_date, debit_to, project, customer, customer_name, owner, remarks, territory, tax_id, customer_group, base_net_total, base_grand_total, base_rounded_total, outstanding_amount {0} from `tabSales Invoice` diff --git a/erpnext/accounts/report/trial_balance/trial_balance.js b/erpnext/accounts/report/trial_balance/trial_balance.js index cdc77456d0..8bc72807b3 100644 --- a/erpnext/accounts/report/trial_balance/trial_balance.js +++ b/erpnext/accounts/report/trial_balance/trial_balance.js @@ -96,3 +96,16 @@ frappe.require("assets/erpnext/js/financial_statements.js", function() { } }); +let dimension_filters = erpnext.get_dimension_filters(); + +dimension_filters.then((dimensions) => { + dimensions.forEach((dimension) => { + frappe.query_reports["Trial Balance"].filters.splice(5, 0 ,{ + "fieldname": dimension["fieldname"], + "label": __(dimension["label"]), + "fieldtype": "Link", + "options": dimension["document_type"] + }); + }); +}); + diff --git a/erpnext/accounts/report/trial_balance/trial_balance.py b/erpnext/accounts/report/trial_balance/trial_balance.py index 5758b0bc6b..b6ddaa8e85 100644 --- a/erpnext/accounts/report/trial_balance/trial_balance.py +++ b/erpnext/accounts/report/trial_balance/trial_balance.py @@ -7,6 +7,7 @@ from frappe import _ from frappe.utils import flt, getdate, formatdate, cstr from erpnext.accounts.report.financial_statements \ import filter_accounts, set_gl_entries_by_account, filter_out_zero_value_rows +from erpnext.accounts.doctype.accounting_dimension.accounting_dimension import get_accounting_dimensions value_fields = ("opening_debit", "opening_credit", "debit", "credit", "closing_debit", "closing_credit") @@ -109,6 +110,25 @@ def get_rootwise_opening_balances(filters, report_type): additional_conditions += fb_conditions + accounting_dimensions = get_accounting_dimensions() + + query_filters = { + "company": filters.company, + "from_date": filters.from_date, + "report_type": report_type, + "year_start_date": filters.year_start_date, + "finance_book": filters.finance_book, + "company_fb": frappe.db.get_value("Company", filters.company, 'default_finance_book') + } + + if accounting_dimensions: + for dimension in accounting_dimensions: + additional_conditions += """ and {0} in (%({0})s) """.format(dimension) + + query_filters.update({ + dimension: filters.get(dimension) + }) + gle = frappe.db.sql(""" select account, sum(debit) as opening_debit, sum(credit) as opening_credit @@ -118,16 +138,7 @@ def get_rootwise_opening_balances(filters, report_type): {additional_conditions} and (posting_date < %(from_date)s or ifnull(is_opening, 'No') = 'Yes') and account in (select name from `tabAccount` where report_type=%(report_type)s) - group by account""".format(additional_conditions=additional_conditions), - { - "company": filters.company, - "from_date": filters.from_date, - "report_type": report_type, - "year_start_date": filters.year_start_date, - "finance_book": filters.finance_book, - "company_fb": frappe.db.get_value("Company", filters.company, 'default_finance_book') - }, - as_dict=True) + group by account""".format(additional_conditions=additional_conditions), query_filters , as_dict=True) opening = frappe._dict() for d in gle: diff --git a/erpnext/accounts/utils.py b/erpnext/accounts/utils.py index 96f64e8db3..7a1f6c57c2 100644 --- a/erpnext/accounts/utils.py +++ b/erpnext/accounts/utils.py @@ -435,7 +435,7 @@ def update_reference_in_journal_entry(d, jv_obj): jv_obj.flags.ignore_validate_update_after_submit = True jv_obj.save(ignore_permissions=True) -def update_reference_in_payment_entry(d, payment_entry): +def update_reference_in_payment_entry(d, payment_entry, do_not_save=False): reference_details = { "reference_doctype": d.against_voucher_type, "reference_name": d.against_voucher, @@ -466,7 +466,17 @@ def update_reference_in_payment_entry(d, payment_entry): payment_entry.setup_party_account_field() payment_entry.set_missing_values() payment_entry.set_amounts() - payment_entry.save(ignore_permissions=True) + + if d.difference_amount and d.difference_account: + payment_entry.set_gain_or_loss(account_details={ + 'account': d.difference_account, + 'cost_center': payment_entry.cost_center or frappe.get_cached_value('Company', + payment_entry.company, "cost_center"), + 'amount': d.difference_amount + }) + + if not do_not_save: + payment_entry.save(ignore_permissions=True) def unlink_ref_doc_from_payment_entries(ref_doc): remove_ref_doc_link_from_jv(ref_doc.doctype, ref_doc.name) @@ -618,7 +628,7 @@ def get_held_invoices(party_type, party): return held_invoices -def get_outstanding_invoices(party_type, party, account, condition=None, limit=None): +def get_outstanding_invoices(party_type, party, account, condition=None): outstanding_invoices = [] precision = frappe.get_precision("Sales Invoice", "outstanding_amount") or 2 @@ -631,7 +641,6 @@ def get_outstanding_invoices(party_type, party, account, condition=None, limit=N invoice = 'Sales Invoice' if erpnext.get_party_account_type(party_type) == 'Receivable' else 'Purchase Invoice' held_invoices = get_held_invoices(party_type, party) - limit_cond = "limit %s" % limit if limit else "" invoice_list = frappe.db.sql(""" select @@ -646,11 +655,10 @@ def get_outstanding_invoices(party_type, party, account, condition=None, limit=N and (against_voucher = '' or against_voucher is null)) or (voucher_type not in ('Journal Entry', 'Payment Entry'))) group by voucher_type, voucher_no - order by posting_date, name {limit_cond}""".format( + order by posting_date, name""".format( dr_or_cr=dr_or_cr, invoice = invoice, - condition=condition or "", - limit_cond = limit_cond + condition=condition or "" ), { "party_type": party_type, "party": party, diff --git a/erpnext/assets/doctype/asset/asset.json b/erpnext/assets/doctype/asset/asset.json index 350856fd70..c60ec5ec3f 100644 --- a/erpnext/assets/doctype/asset/asset.json +++ b/erpnext/assets/doctype/asset/asset.json @@ -1,497 +1,497 @@ { - "allow_import": 1, - "allow_rename": 1, - "autoname": "naming_series:", - "creation": "2016-03-01 17:01:27.920130", - "doctype": "DocType", - "document_type": "Document", - "field_order": [ - "naming_series", - "asset_name", - "item_code", - "item_name", - "asset_category", - "asset_owner", - "asset_owner_company", - "supplier", - "customer", - "image", - "column_break_3", - "company", - "location", - "custodian", - "department", - "purchase_date", - "disposal_date", - "journal_entry_for_scrap", - "accounting_dimensions_section", - "cost_center", - "dimension_col_break", - "section_break_5", - "gross_purchase_amount", - "available_for_use_date", - "column_break_18", - "calculate_depreciation", - "is_existing_asset", - "opening_accumulated_depreciation", - "number_of_depreciations_booked", - "section_break_23", - "finance_books", - "section_break_33", - "depreciation_method", - "value_after_depreciation", - "total_number_of_depreciations", - "column_break_24", - "frequency_of_depreciation", - "next_depreciation_date", - "section_break_14", - "schedules", - "insurance_details", - "policy_number", - "insurer", - "insured_value", - "column_break_48", - "insurance_start_date", - "insurance_end_date", - "comprehensive_insurance", - "section_break_31", - "maintenance_required", - "other_details", - "status", - "booked_fixed_asset", - "column_break_51", - "purchase_receipt", - "purchase_receipt_amount", - "purchase_invoice", - "default_finance_book", - "amended_from" - ], - "fields": [ - { - "fieldname": "naming_series", - "fieldtype": "Select", - "label": "Naming Series", - "options": "ACC-ASS-.YYYY.-" - }, - { - "fieldname": "asset_name", - "fieldtype": "Data", - "in_list_view": 1, - "label": "Asset Name", - "reqd": 1 - }, - { - "fieldname": "item_code", - "fieldtype": "Link", - "in_standard_filter": 1, - "label": "Item Code", - "options": "Item", - "reqd": 1 - }, - { - "fetch_from": "item_code.item_name", - "fieldname": "item_name", - "fieldtype": "Read Only", - "label": "Item Name" - }, - { - "fetch_from": "item_code.asset_category", - "fieldname": "asset_category", - "fieldtype": "Link", - "in_global_search": 1, - "in_list_view": 1, - "in_standard_filter": 1, - "label": "Asset Category", - "options": "Asset Category", - "read_only": 1 - }, - { - "fieldname": "asset_owner", - "fieldtype": "Select", - "label": "Asset Owner", - "options": "\nCompany\nSupplier\nCustomer" - }, - { - "depends_on": "eval:doc.asset_owner == \"Company\"", - "fieldname": "asset_owner_company", - "fieldtype": "Link", - "label": "Asset Owner Company", - "options": "Company" - }, - { - "depends_on": "eval:doc.asset_owner == \"Supplier\"", - "fieldname": "supplier", - "fieldtype": "Link", - "label": "Supplier", - "options": "Supplier" - }, - { - "depends_on": "eval:doc.asset_owner == \"Customer\"", - "fieldname": "customer", - "fieldtype": "Link", - "label": "Customer", - "options": "Customer" - }, - { - "allow_on_submit": 1, - "fieldname": "image", - "fieldtype": "Attach Image", - "hidden": 1, - "label": "Image", - "no_copy": 1, - "print_hide": 1 - }, - { - "fieldname": "column_break_3", - "fieldtype": "Column Break" - }, - { - "fieldname": "company", - "fieldtype": "Link", - "label": "Company", - "options": "Company", - "remember_last_selected_value": 1, - "reqd": 1 - }, - { - "fieldname": "location", - "fieldtype": "Link", - "in_list_view": 1, - "label": "Location", - "options": "Location", - "reqd": 1 - }, - { - "fieldname": "custodian", - "fieldtype": "Link", - "ignore_user_permissions": 1, - "label": "Custodian", - "options": "Employee" - }, - { - "fieldname": "cost_center", - "fieldtype": "Link", - "label": "Cost Center", - "options": "Cost Center" - }, - { - "fieldname": "department", - "fieldtype": "Link", - "label": "Department", - "options": "Department" - }, - { - "fieldname": "purchase_date", - "fieldtype": "Date", - "label": "Purchase Date", - "reqd": 1 - }, - { - "fieldname": "disposal_date", - "fieldtype": "Date", - "label": "Disposal Date", - "read_only": 1 - }, - { - "fieldname": "journal_entry_for_scrap", - "fieldtype": "Link", - "label": "Journal Entry for Scrap", - "no_copy": 1, - "options": "Journal Entry", - "print_hide": 1, - "read_only": 1 - }, - { - "fieldname": "section_break_5", - "fieldtype": "Section Break" - }, - { - "fieldname": "gross_purchase_amount", - "fieldtype": "Currency", - "label": "Gross Purchase Amount", - "options": "Company:company:default_currency", - "reqd": 1 - }, - { - "fieldname": "available_for_use_date", - "fieldtype": "Date", - "label": "Available-for-use Date" - }, - { - "fieldname": "column_break_18", - "fieldtype": "Column Break" - }, - { - "default": "0", - "fieldname": "calculate_depreciation", - "fieldtype": "Check", - "label": "Calculate Depreciation" - }, - { - "default": "0", - "fieldname": "is_existing_asset", - "fieldtype": "Check", - "label": "Is Existing Asset" - }, - { - "depends_on": "is_existing_asset", - "fieldname": "opening_accumulated_depreciation", - "fieldtype": "Currency", - "label": "Opening Accumulated Depreciation", - "no_copy": 1, - "options": "Company:company:default_currency" - }, - { - "depends_on": "eval:(doc.is_existing_asset && doc.opening_accumulated_depreciation)", - "fieldname": "number_of_depreciations_booked", - "fieldtype": "Int", - "label": "Number of Depreciations Booked", - "no_copy": 1 - }, - { - "depends_on": "calculate_depreciation", - "fieldname": "section_break_23", - "fieldtype": "Section Break", - "label": "Depreciation" - }, - { - "fieldname": "finance_books", - "fieldtype": "Table", - "label": "Finance Books", - "options": "Asset Finance Book" - }, - { - "fieldname": "section_break_33", - "fieldtype": "Section Break", - "hidden": 1 - }, - { - "fieldname": "depreciation_method", - "fieldtype": "Select", - "label": "Depreciation Method", - "options": "\nStraight Line\nDouble Declining Balance\nManual" - }, - { - "fieldname": "value_after_depreciation", - "fieldtype": "Currency", - "hidden": 1, - "label": "Value After Depreciation", - "options": "Company:company:default_currency", - "read_only": 1 - }, - { - "fieldname": "total_number_of_depreciations", - "fieldtype": "Int", - "label": "Total Number of Depreciations" - }, - { - "fieldname": "column_break_24", - "fieldtype": "Column Break" - }, - { - "fieldname": "frequency_of_depreciation", - "fieldtype": "Int", - "label": "Frequency of Depreciation (Months)" - }, - { - "fieldname": "next_depreciation_date", - "fieldtype": "Date", - "label": "Next Depreciation Date", - "no_copy": 1 - }, - { - "depends_on": "calculate_depreciation", - "fieldname": "section_break_14", - "fieldtype": "Section Break", - "label": "Depreciation Schedule" - }, - { - "fieldname": "schedules", - "fieldtype": "Table", - "label": "Depreciation Schedules", - "no_copy": 1, - "options": "Depreciation Schedule" - }, - { - "collapsible": 1, - "fieldname": "insurance_details", - "fieldtype": "Section Break", - "label": "Insurance details" - }, - { - "fieldname": "policy_number", - "fieldtype": "Data", - "label": "Policy number" - }, - { - "fieldname": "insurer", - "fieldtype": "Data", - "label": "Insurer" - }, - { - "fieldname": "insured_value", - "fieldtype": "Data", - "label": "Insured value" - }, - { - "fieldname": "column_break_48", - "fieldtype": "Column Break" - }, - { - "fieldname": "insurance_start_date", - "fieldtype": "Date", - "label": "Insurance Start Date" - }, - { - "fieldname": "insurance_end_date", - "fieldtype": "Date", - "label": "Insurance End Date" - }, - { - "fieldname": "comprehensive_insurance", - "fieldtype": "Data", - "label": "Comprehensive Insurance" - }, - { - "fieldname": "section_break_31", - "fieldtype": "Section Break", - "label": "Maintenance" - }, - { - "allow_on_submit": 1, - "default": "0", - "description": "Check if Asset requires Preventive Maintenance or Calibration", - "fieldname": "maintenance_required", - "fieldtype": "Check", - "label": "Maintenance Required" - }, - { - "collapsible": 1, - "fieldname": "other_details", - "fieldtype": "Section Break", - "label": "Other Details" - }, - { - "allow_on_submit": 1, - "default": "Draft", - "fieldname": "status", - "fieldtype": "Select", - "in_list_view": 1, - "in_standard_filter": 1, - "label": "Status", - "no_copy": 1, - "options": "Draft\nSubmitted\nPartially Depreciated\nFully Depreciated\nSold\nScrapped\nIn Maintenance\nOut of Order\nIssue\nReceipt", - "read_only": 1 - }, - { - "default": "0", - "fieldname": "booked_fixed_asset", - "fieldtype": "Check", - "label": "Booked Fixed Asset", - "no_copy": 1, - "read_only": 1 - }, - { - "fieldname": "column_break_51", - "fieldtype": "Column Break" - }, - { - "fieldname": "purchase_receipt", - "fieldtype": "Link", - "label": "Purchase Receipt", - "no_copy": 1, - "options": "Purchase Receipt", - "print_hide": 1, - "read_only": 1 - }, - { - "fieldname": "purchase_receipt_amount", - "fieldtype": "Currency", - "hidden": 1, - "label": "Purchase Receipt Amount", - "no_copy": 1, - "print_hide": 1, - "read_only": 1 - }, - { - "fieldname": "purchase_invoice", - "fieldtype": "Link", - "label": "Purchase Invoice", - "no_copy": 1, - "options": "Purchase Invoice", - "read_only": 1 - }, - { - "fetch_from": "company.default_finance_book", - "fieldname": "default_finance_book", - "fieldtype": "Link", - "hidden": 1, - "label": "Default Finance Book", - "options": "Finance Book", - "read_only": 1 - }, - { - "fieldname": "amended_from", - "fieldtype": "Link", - "label": "Amended From", - "no_copy": 1, - "options": "Asset", - "print_hide": 1, - "read_only": 1 - }, - { - "collapsible": 1, - "fieldname": "accounting_dimensions_section", - "fieldtype": "Section Break", - "label": "Accounting Dimensions" - }, - { - "fieldname": "dimension_col_break", - "fieldtype": "Column Break" - } - ], - "idx": 72, - "image_field": "image", - "is_submittable": 1, - "modified": "2019-05-25 22:26:19.786201", - "modified_by": "Administrator", - "module": "Assets", - "name": "Asset", - "owner": "Administrator", - "permissions": [ - { - "amend": 1, - "cancel": 1, - "create": 1, - "delete": 1, - "email": 1, - "export": 1, - "import": 1, - "print": 1, - "read": 1, - "report": 1, - "role": "Accounts User", - "share": 1, - "submit": 1, - "write": 1 - }, - { - "cancel": 1, - "create": 1, - "delete": 1, - "email": 1, - "export": 1, - "print": 1, - "read": 1, - "report": 1, - "role": "Quality Manager", - "share": 1, - "submit": 1, - "write": 1 - } - ], - "show_name_in_global_search": 1, - "sort_field": "modified", - "sort_order": "DESC", - "title_field": "asset_name" -} \ No newline at end of file + "allow_import": 1, + "allow_rename": 1, + "autoname": "naming_series:", + "creation": "2016-03-01 17:01:27.920130", + "doctype": "DocType", + "document_type": "Document", + "field_order": [ + "naming_series", + "asset_name", + "item_code", + "item_name", + "asset_category", + "asset_owner", + "asset_owner_company", + "supplier", + "customer", + "image", + "column_break_3", + "company", + "location", + "custodian", + "department", + "purchase_date", + "disposal_date", + "journal_entry_for_scrap", + "accounting_dimensions_section", + "cost_center", + "dimension_col_break", + "section_break_5", + "gross_purchase_amount", + "available_for_use_date", + "column_break_18", + "calculate_depreciation", + "is_existing_asset", + "opening_accumulated_depreciation", + "number_of_depreciations_booked", + "section_break_23", + "finance_books", + "section_break_33", + "depreciation_method", + "value_after_depreciation", + "total_number_of_depreciations", + "column_break_24", + "frequency_of_depreciation", + "next_depreciation_date", + "section_break_14", + "schedules", + "insurance_details", + "policy_number", + "insurer", + "insured_value", + "column_break_48", + "insurance_start_date", + "insurance_end_date", + "comprehensive_insurance", + "section_break_31", + "maintenance_required", + "other_details", + "status", + "booked_fixed_asset", + "column_break_51", + "purchase_receipt", + "purchase_receipt_amount", + "purchase_invoice", + "default_finance_book", + "amended_from" + ], + "fields": [ + { + "fieldname": "naming_series", + "fieldtype": "Select", + "label": "Naming Series", + "options": "ACC-ASS-.YYYY.-" + }, + { + "fieldname": "asset_name", + "fieldtype": "Data", + "in_list_view": 1, + "label": "Asset Name", + "reqd": 1 + }, + { + "fieldname": "item_code", + "fieldtype": "Link", + "in_standard_filter": 1, + "label": "Item Code", + "options": "Item", + "reqd": 1 + }, + { + "fetch_from": "item_code.item_name", + "fieldname": "item_name", + "fieldtype": "Read Only", + "label": "Item Name" + }, + { + "fetch_from": "item_code.asset_category", + "fieldname": "asset_category", + "fieldtype": "Link", + "in_global_search": 1, + "in_list_view": 1, + "in_standard_filter": 1, + "label": "Asset Category", + "options": "Asset Category", + "read_only": 1 + }, + { + "fieldname": "asset_owner", + "fieldtype": "Select", + "label": "Asset Owner", + "options": "\nCompany\nSupplier\nCustomer" + }, + { + "depends_on": "eval:doc.asset_owner == \"Company\"", + "fieldname": "asset_owner_company", + "fieldtype": "Link", + "label": "Asset Owner Company", + "options": "Company" + }, + { + "depends_on": "eval:doc.asset_owner == \"Supplier\"", + "fieldname": "supplier", + "fieldtype": "Link", + "label": "Supplier", + "options": "Supplier" + }, + { + "depends_on": "eval:doc.asset_owner == \"Customer\"", + "fieldname": "customer", + "fieldtype": "Link", + "label": "Customer", + "options": "Customer" + }, + { + "allow_on_submit": 1, + "fieldname": "image", + "fieldtype": "Attach Image", + "hidden": 1, + "label": "Image", + "no_copy": 1, + "print_hide": 1 + }, + { + "fieldname": "column_break_3", + "fieldtype": "Column Break" + }, + { + "fieldname": "company", + "fieldtype": "Link", + "label": "Company", + "options": "Company", + "remember_last_selected_value": 1, + "reqd": 1 + }, + { + "fieldname": "location", + "fieldtype": "Link", + "in_list_view": 1, + "label": "Location", + "options": "Location", + "reqd": 1 + }, + { + "fieldname": "custodian", + "fieldtype": "Link", + "ignore_user_permissions": 1, + "label": "Custodian", + "options": "Employee" + }, + { + "fieldname": "cost_center", + "fieldtype": "Link", + "label": "Cost Center", + "options": "Cost Center" + }, + { + "fieldname": "department", + "fieldtype": "Link", + "label": "Department", + "options": "Department" + }, + { + "fieldname": "purchase_date", + "fieldtype": "Date", + "label": "Purchase Date", + "reqd": 1 + }, + { + "fieldname": "disposal_date", + "fieldtype": "Date", + "label": "Disposal Date", + "read_only": 1 + }, + { + "fieldname": "journal_entry_for_scrap", + "fieldtype": "Link", + "label": "Journal Entry for Scrap", + "no_copy": 1, + "options": "Journal Entry", + "print_hide": 1, + "read_only": 1 + }, + { + "fieldname": "section_break_5", + "fieldtype": "Section Break" + }, + { + "fieldname": "gross_purchase_amount", + "fieldtype": "Currency", + "label": "Gross Purchase Amount", + "options": "Company:company:default_currency", + "reqd": 1 + }, + { + "fieldname": "available_for_use_date", + "fieldtype": "Date", + "label": "Available-for-use Date" + }, + { + "fieldname": "column_break_18", + "fieldtype": "Column Break" + }, + { + "default": "0", + "fieldname": "calculate_depreciation", + "fieldtype": "Check", + "label": "Calculate Depreciation" + }, + { + "default": "0", + "fieldname": "is_existing_asset", + "fieldtype": "Check", + "label": "Is Existing Asset" + }, + { + "depends_on": "is_existing_asset", + "fieldname": "opening_accumulated_depreciation", + "fieldtype": "Currency", + "label": "Opening Accumulated Depreciation", + "no_copy": 1, + "options": "Company:company:default_currency" + }, + { + "depends_on": "eval:(doc.is_existing_asset && doc.opening_accumulated_depreciation)", + "fieldname": "number_of_depreciations_booked", + "fieldtype": "Int", + "label": "Number of Depreciations Booked", + "no_copy": 1 + }, + { + "depends_on": "calculate_depreciation", + "fieldname": "section_break_23", + "fieldtype": "Section Break", + "label": "Depreciation" + }, + { + "fieldname": "finance_books", + "fieldtype": "Table", + "label": "Finance Books", + "options": "Asset Finance Book" + }, + { + "fieldname": "section_break_33", + "fieldtype": "Section Break", + "hidden": 1 + }, + { + "fieldname": "depreciation_method", + "fieldtype": "Select", + "label": "Depreciation Method", + "options": "\nStraight Line\nDouble Declining Balance\nManual" + }, + { + "fieldname": "value_after_depreciation", + "fieldtype": "Currency", + "hidden": 1, + "label": "Value After Depreciation", + "options": "Company:company:default_currency", + "read_only": 1 + }, + { + "fieldname": "total_number_of_depreciations", + "fieldtype": "Int", + "label": "Total Number of Depreciations" + }, + { + "fieldname": "column_break_24", + "fieldtype": "Column Break" + }, + { + "fieldname": "frequency_of_depreciation", + "fieldtype": "Int", + "label": "Frequency of Depreciation (Months)" + }, + { + "fieldname": "next_depreciation_date", + "fieldtype": "Date", + "label": "Next Depreciation Date", + "no_copy": 1 + }, + { + "depends_on": "calculate_depreciation", + "fieldname": "section_break_14", + "fieldtype": "Section Break", + "label": "Depreciation Schedule" + }, + { + "fieldname": "schedules", + "fieldtype": "Table", + "label": "Depreciation Schedules", + "no_copy": 1, + "options": "Depreciation Schedule" + }, + { + "collapsible": 1, + "fieldname": "insurance_details", + "fieldtype": "Section Break", + "label": "Insurance details" + }, + { + "fieldname": "policy_number", + "fieldtype": "Data", + "label": "Policy number" + }, + { + "fieldname": "insurer", + "fieldtype": "Data", + "label": "Insurer" + }, + { + "fieldname": "insured_value", + "fieldtype": "Data", + "label": "Insured value" + }, + { + "fieldname": "column_break_48", + "fieldtype": "Column Break" + }, + { + "fieldname": "insurance_start_date", + "fieldtype": "Date", + "label": "Insurance Start Date" + }, + { + "fieldname": "insurance_end_date", + "fieldtype": "Date", + "label": "Insurance End Date" + }, + { + "fieldname": "comprehensive_insurance", + "fieldtype": "Data", + "label": "Comprehensive Insurance" + }, + { + "fieldname": "section_break_31", + "fieldtype": "Section Break", + "label": "Maintenance" + }, + { + "allow_on_submit": 1, + "default": "0", + "description": "Check if Asset requires Preventive Maintenance or Calibration", + "fieldname": "maintenance_required", + "fieldtype": "Check", + "label": "Maintenance Required" + }, + { + "collapsible": 1, + "fieldname": "other_details", + "fieldtype": "Section Break", + "label": "Other Details" + }, + { + "allow_on_submit": 1, + "default": "Draft", + "fieldname": "status", + "fieldtype": "Select", + "in_list_view": 1, + "in_standard_filter": 1, + "label": "Status", + "no_copy": 1, + "options": "Draft\nSubmitted\nPartially Depreciated\nFully Depreciated\nSold\nScrapped\nIn Maintenance\nOut of Order\nIssue\nReceipt", + "read_only": 1 + }, + { + "default": "0", + "fieldname": "booked_fixed_asset", + "fieldtype": "Check", + "label": "Booked Fixed Asset", + "no_copy": 1, + "read_only": 1 + }, + { + "fieldname": "column_break_51", + "fieldtype": "Column Break" + }, + { + "fieldname": "purchase_receipt", + "fieldtype": "Link", + "label": "Purchase Receipt", + "no_copy": 1, + "options": "Purchase Receipt", + "print_hide": 1, + "read_only": 1 + }, + { + "fieldname": "purchase_receipt_amount", + "fieldtype": "Currency", + "hidden": 1, + "label": "Purchase Receipt Amount", + "no_copy": 1, + "print_hide": 1, + "read_only": 1 + }, + { + "fieldname": "purchase_invoice", + "fieldtype": "Link", + "label": "Purchase Invoice", + "no_copy": 1, + "options": "Purchase Invoice", + "read_only": 1 + }, + { + "fetch_from": "company.default_finance_book", + "fieldname": "default_finance_book", + "fieldtype": "Link", + "hidden": 1, + "label": "Default Finance Book", + "options": "Finance Book", + "read_only": 1 + }, + { + "fieldname": "amended_from", + "fieldtype": "Link", + "label": "Amended From", + "no_copy": 1, + "options": "Asset", + "print_hide": 1, + "read_only": 1 + }, + { + "collapsible": 1, + "fieldname": "accounting_dimensions_section", + "fieldtype": "Section Break", + "label": "Accounting Dimensions" + }, + { + "fieldname": "dimension_col_break", + "fieldtype": "Column Break" + } + ], + "idx": 72, + "image_field": "image", + "is_submittable": 1, + "modified": "2019-05-25 22:26:19.786201", + "modified_by": "Administrator", + "module": "Assets", + "name": "Asset", + "owner": "Administrator", + "permissions": [ + { + "amend": 1, + "cancel": 1, + "create": 1, + "delete": 1, + "email": 1, + "export": 1, + "import": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "Accounts User", + "share": 1, + "submit": 1, + "write": 1 + }, + { + "cancel": 1, + "create": 1, + "delete": 1, + "email": 1, + "export": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "Quality Manager", + "share": 1, + "submit": 1, + "write": 1 + } + ], + "show_name_in_global_search": 1, + "sort_field": "modified", + "sort_order": "DESC", + "title_field": "asset_name" + } \ No newline at end of file diff --git a/erpnext/buying/report/requested_items_to_be_ordered/requested_items_to_be_ordered.json b/erpnext/buying/report/requested_items_to_be_ordered/requested_items_to_be_ordered.json index 9e6e80a342..bb112698d3 100644 --- a/erpnext/buying/report/requested_items_to_be_ordered/requested_items_to_be_ordered.json +++ b/erpnext/buying/report/requested_items_to_be_ordered/requested_items_to_be_ordered.json @@ -1,31 +1,31 @@ { - "add_total_row": 1, - "creation": "2013-05-13 16:10:02", - "disable_prepared_report": 0, - "disabled": 0, - "docstatus": 0, - "doctype": "Report", - "idx": 3, - "is_standard": "Yes", - "modified": "2019-04-18 19:02:03.099422", - "modified_by": "Administrator", - "module": "Buying", - "name": "Requested Items To Be Ordered", - "owner": "Administrator", - "prepared_report": 0, - "query": "select \n mr.name as \"Material Request:Link/Material Request:120\",\n\tmr.transaction_date as \"Date:Date:100\",\n\tmr_item.item_code as \"Item Code:Link/Item:120\",\n\tsum(ifnull(mr_item.stock_qty, 0)) as \"Qty:Float:100\",\n\tifnull(mr_item.stock_uom, '') as \"UOM:Link/UOM:100\",\n\tsum(ifnull(mr_item.ordered_qty, 0)) as \"Ordered Qty:Float:100\", \n\t(sum(mr_item.stock_qty) - sum(ifnull(mr_item.ordered_qty, 0))) as \"Qty to Order:Float:100\",\n\tmr_item.item_name as \"Item Name::150\",\n\tmr_item.description as \"Description::200\",\n\tmr.company as \"Company:Link/Company:\"\nfrom\n\t`tabMaterial Request` mr, `tabMaterial Request Item` mr_item\nwhere\n\tmr_item.parent = mr.name\n\tand mr.material_request_type = \"Purchase\"\n\tand mr.docstatus = 1\n\tand mr.status != \"Stopped\"\ngroup by mr.name, mr_item.item_code\nhaving\n\tsum(ifnull(mr_item.ordered_qty, 0)) < sum(ifnull(mr_item.stock_qty, 0))\norder by mr.transaction_date asc", - "ref_doctype": "Purchase Order", - "report_name": "Requested Items To Be Ordered", - "report_type": "Query Report", - "roles": [ - { - "role": "Stock User" - }, - { - "role": "Purchase Manager" - }, - { - "role": "Purchase User" - } - ] -} \ No newline at end of file + "add_total_row": 1, + "creation": "2013-05-13 16:10:02", + "disable_prepared_report": 0, + "disabled": 0, + "docstatus": 0, + "doctype": "Report", + "idx": 3, + "is_standard": "Yes", + "modified": "2019-04-18 19:02:03.099422", + "modified_by": "Administrator", + "module": "Buying", + "name": "Requested Items To Be Ordered", + "owner": "Administrator", + "prepared_report": 0, + "query": "select \n mr.name as \"Material Request:Link/Material Request:120\",\n\tmr.transaction_date as \"Date:Date:100\",\n\tmr_item.item_code as \"Item Code:Link/Item:120\",\n\tsum(ifnull(mr_item.stock_qty, 0)) as \"Qty:Float:100\",\n\tifnull(mr_item.stock_uom, '') as \"UOM:Link/UOM:100\",\n\tsum(ifnull(mr_item.ordered_qty, 0)) as \"Ordered Qty:Float:100\", \n\t(sum(mr_item.stock_qty) - sum(ifnull(mr_item.ordered_qty, 0))) as \"Qty to Order:Float:100\",\n\tmr_item.item_name as \"Item Name::150\",\n\tmr_item.description as \"Description::200\",\n\tmr.company as \"Company:Link/Company:\"\nfrom\n\t`tabMaterial Request` mr, `tabMaterial Request Item` mr_item\nwhere\n\tmr_item.parent = mr.name\n\tand mr.material_request_type = \"Purchase\"\n\tand mr.docstatus = 1\n\tand mr.status != \"Stopped\"\ngroup by mr.name, mr_item.item_code\nhaving\n\tsum(ifnull(mr_item.ordered_qty, 0)) < sum(ifnull(mr_item.stock_qty, 0))\norder by mr.transaction_date asc", + "ref_doctype": "Purchase Order", + "report_name": "Requested Items To Be Ordered", + "report_type": "Query Report", + "roles": [ + { + "role": "Stock User" + }, + { + "role": "Purchase Manager" + }, + { + "role": "Purchase User" + } + ] + } \ No newline at end of file diff --git a/erpnext/config/accounting.py b/erpnext/config/accounting.py index 9a9ee7e963..ce1384aae7 100644 --- a/erpnext/config/accounting.py +++ b/erpnext/config/accounting.py @@ -167,7 +167,7 @@ def get_data(): "type": "doctype", "name": "Opening Invoice Creation Tool", "description": _("Create Opening Sales and Purchase Invoices") - }, + } ] }, { @@ -182,7 +182,7 @@ def get_data(): "type": "doctype", "name": "Journal Entry", "description": _("Accounting journal entries.") - }, + } ] }, { @@ -246,6 +246,12 @@ def get_data(): "label": _("Bank"), "name": "Bank", }, + { + "type": "page", + "label": _("Reconcile payments and bank transactions"), + "name": "bank-reconciliation", + "description": _("Link bank transactions with payments.") + }, { "type": "doctype", "label": _("Bank Account"), diff --git a/erpnext/config/integrations.py b/erpnext/config/integrations.py index 01e077fba3..52c9ab8e46 100644 --- a/erpnext/config/integrations.py +++ b/erpnext/config/integrations.py @@ -35,6 +35,11 @@ def get_data(): "type": "doctype", "name": "Amazon MWS Settings", "description": _("Connect Amazon with ERPNext"), + }, + { + "type": "doctype", + "name": "Plaid Settings", + "description": _("Connect your bank accounts to ERPNext"), } ] } diff --git a/erpnext/config/selling.py b/erpnext/config/selling.py index b31eb02cf7..f18aadb9ef 100644 --- a/erpnext/config/selling.py +++ b/erpnext/config/selling.py @@ -304,6 +304,12 @@ def get_data(): "name": "Customers Without Any Sales Transactions", "doctype": "Customer" }, + { + "type": "report", + "is_query_report": True, + "name": "Sales Partners Commission", + "doctype": "Customer" + }, { "type": "report", "is_query_report": True, @@ -312,6 +318,23 @@ def get_data(): } ] }, + { + "label": _("SMS"), + "icon": "fa fa-wrench", + "items": [ + { + "type": "doctype", + "name": "SMS Center", + "description":_("Send mass SMS to your contacts"), + }, + { + "type": "doctype", + "name": "SMS Log", + "description":_("Logs for maintaining sms delivery status"), + }, + + ] + }, { "label": _("Help"), "items": [ diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index f6914b63e7..f5ecaeb286 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -32,8 +32,8 @@ class AccountsController(TransactionBase): return self.__company_currency def onload(self): - self.get("__onload").make_payment_via_journal_entry \ - = frappe.db.get_single_value('Accounts Settings', 'make_payment_via_journal_entry') + self.set_onload("make_payment_via_journal_entry", + frappe.db.get_single_value('Accounts Settings', 'make_payment_via_journal_entry')) if self.is_new(): relevant_docs = ("Quotation", "Purchase Order", "Sales Order", @@ -242,6 +242,10 @@ class AccountsController(TransactionBase): parent_dict.update({"document_type": document_type}) self.set('pricing_rules', []) + # party_name field used for customer in quotation + if self.doctype == "Quotation" and self.quotation_to == "Customer" and parent_dict.get("party_name"): + parent_dict.update({"customer": parent_dict.get("party_name")}) + for item in self.get("items"): if item.get("item_code"): args = parent_dict.copy() @@ -1006,11 +1010,11 @@ def get_advance_journal_entries(party_type, party, party_account, amount_field, def get_advance_payment_entries(party_type, party, party_account, order_doctype, - order_list=None, include_unallocated=True, against_all_orders=False, limit=1000): + order_list=None, include_unallocated=True, against_all_orders=False, limit=None): party_account_field = "paid_from" if party_type == "Customer" else "paid_to" payment_type = "Receive" if party_type == "Customer" else "Pay" payment_entries_against_order, unallocated_payment_entries = [], [] - limit_cond = "limit %s" % (limit or 1000) + limit_cond = "limit %s" % limit if limit else "" if order_list or against_all_orders: if order_list: diff --git a/erpnext/controllers/item_variant.py b/erpnext/controllers/item_variant.py index bfb8432cab..dee71dc944 100644 --- a/erpnext/controllers/item_variant.py +++ b/erpnext/controllers/item_variant.py @@ -98,8 +98,8 @@ def validate_item_attribute_value(attributes_list, attribute, attribute_value, i if allow_rename_attribute_value: pass elif attribute_value not in attributes_list: - frappe.throw(_("Value {0} for Attribute {1} does not exist in the list of valid Item Attribute Values for Item {2}").format( - attribute_value, attribute, item), InvalidItemAttributeValueError, title=_('Invalid Attribute')) + frappe.throw(_("The value {0} is already assigned to an exisiting Item {2}.").format( + attribute_value, attribute, item), InvalidItemAttributeValueError, title=_('Rename Not Allowed')) def get_attribute_values(item): if not frappe.flags.attribute_values: @@ -176,7 +176,7 @@ def enqueue_multiple_variant_creation(item, args): for key in variants: total_variants *= len(variants[key]) if total_variants >= 600: - frappe.msgprint("Please do not create more than 500 items at a time", raise_exception=1) + frappe.throw(_("Please do not create more than 500 items at a time")) return if total_variants < 10: return create_multiple_variants(item, args) @@ -282,7 +282,7 @@ def copy_attributes_to_variant(item, variant): if 'description' not in allow_fields: if not variant.description: - variant.description = "" + variant.description = "" if item.variant_based_on=='Item Attribute': if variant.attributes: diff --git a/erpnext/controllers/sales_and_purchase_return.py b/erpnext/controllers/sales_and_purchase_return.py index b82987a499..8cf11f785b 100644 --- a/erpnext/controllers/sales_and_purchase_return.py +++ b/erpnext/controllers/sales_and_purchase_return.py @@ -205,11 +205,14 @@ def get_already_returned_items(doc): def make_return_doc(doctype, source_name, target_doc=None): from frappe.model.mapper import get_mapped_doc + company = frappe.db.get_value("Delivery Note", source_name, "company") + default_warehouse_for_sales_return = frappe.db.get_value("Company", company, "default_warehouse_for_sales_return") def set_missing_values(source, target): doc = frappe.get_doc(target) doc.is_return = 1 doc.return_against = source.name doc.ignore_pricing_rule = 1 + doc.set_warehouse = "" if doctype == "Sales Invoice": doc.is_pos = source.is_pos @@ -253,7 +256,6 @@ def make_return_doc(doctype, source_name, target_doc=None): def update_item(source_doc, target_doc, source_parent): target_doc.qty = -1* source_doc.qty - default_return_warehouse = frappe.db.get_single_value("Stock Settings", "default_return_warehouse") if doctype == "Purchase Receipt": target_doc.received_qty = -1* source_doc.received_qty target_doc.rejected_qty = -1* source_doc.rejected_qty @@ -278,13 +280,16 @@ def make_return_doc(doctype, source_name, target_doc=None): target_doc.so_detail = source_doc.so_detail target_doc.si_detail = source_doc.si_detail target_doc.expense_account = source_doc.expense_account - target_doc.warehouse = default_return_warehouse if default_return_warehouse else source_doc.warehouse + if default_warehouse_for_sales_return: + target_doc.warehouse = default_warehouse_for_sales_return elif doctype == "Sales Invoice": target_doc.sales_order = source_doc.sales_order target_doc.delivery_note = source_doc.delivery_note target_doc.so_detail = source_doc.so_detail target_doc.dn_detail = source_doc.dn_detail target_doc.expense_account = source_doc.expense_account + if default_warehouse_for_sales_return: + target_doc.warehouse = default_warehouse_for_sales_return def update_terms(source_doc, target_doc, source_parent): target_doc.payment_amount = -source_doc.payment_amount diff --git a/erpnext/controllers/selling_controller.py b/erpnext/controllers/selling_controller.py index ea18004a8f..2cbe596770 100644 --- a/erpnext/controllers/selling_controller.py +++ b/erpnext/controllers/selling_controller.py @@ -55,14 +55,28 @@ class SellingController(StockController): self.set_price_list_and_item_details(for_validate=for_validate) def set_missing_lead_customer_details(self): + customer, lead = None, None if getattr(self, "customer", None): + customer = self.customer + elif self.doctype == "Opportunity" and self.party_name: + if self.opportunity_from == "Customer": + customer = self.party_name + else: + lead = self.party_name + elif self.doctype == "Quotation" and self.party_name: + if self.quotation_to == "Customer": + customer = self.party_name + else: + lead = self.party_name + + if customer: from erpnext.accounts.party import _get_party_details fetch_payment_terms_template = False if (self.get("__islocal") or self.company != frappe.db.get_value(self.doctype, self.name, 'company')): fetch_payment_terms_template = True - party_details = _get_party_details(self.customer, + party_details = _get_party_details(customer, ignore_permissions=self.flags.ignore_permissions, doctype=self.doctype, company=self.company, fetch_payment_terms_template=fetch_payment_terms_template, @@ -71,10 +85,9 @@ class SellingController(StockController): party_details.pop("sales_team") self.update_if_missing(party_details) - elif getattr(self, "lead", None): + elif lead: from erpnext.crm.doctype.lead.lead import get_lead_details - self.update_if_missing(get_lead_details( - self.lead, + self.update_if_missing(get_lead_details(lead, posting_date=self.get('transaction_date') or self.get('posting_date'), company=self.company)) diff --git a/erpnext/controllers/status_updater.py b/erpnext/controllers/status_updater.py index db6460f00c..7936370a98 100644 --- a/erpnext/controllers/status_updater.py +++ b/erpnext/controllers/status_updater.py @@ -46,9 +46,9 @@ status_map = { "Purchase Invoice": [ ["Draft", None], ["Submitted", "eval:self.docstatus==1"], + ["Paid", "eval:self.outstanding_amount==0 and self.docstatus==1"], ["Return", "eval:self.is_return==1 and self.docstatus==1"], - ["Paid", "eval:self.outstanding_amount<=0 and self.docstatus==1 and self.is_return==0"], - ["Debit Note Issued", "eval:self.outstanding_amount < 0 and self.docstatus==1 and self.is_return==0 and get_value('Purchase Invoice', {'is_return': 1, 'return_against': self.name, 'docstatus': 1})"], + ["Debit Note Issued", "eval:self.outstanding_amount < 0 and self.docstatus==1"], ["Unpaid", "eval:self.outstanding_amount > 0 and getdate(self.due_date) >= getdate(nowdate()) and self.docstatus==1"], ["Overdue", "eval:self.outstanding_amount > 0 and getdate(self.due_date) < getdate(nowdate()) and self.docstatus==1"], ["Cancelled", "eval:self.docstatus==2"], @@ -89,6 +89,10 @@ status_map = { ["Issued", "eval:self.status != 'Stopped' and self.per_ordered == 100 and self.docstatus == 1 and self.material_request_type == 'Material Issue'"], ["Received", "eval:self.status != 'Stopped' and self.per_received == 100 and self.docstatus == 1 and self.material_request_type == 'Purchase'"], ["Partially Received", "eval:self.status != 'Stopped' and self.per_received > 0 and self.per_received < 100 and self.docstatus == 1 and self.material_request_type == 'Purchase'"] + ], + "Bank Transaction": [ + ["Unreconciled", "eval:self.docstatus == 1 and self.unallocated_amount>0"], + ["Reconciled", "eval:self.docstatus == 1 and self.unallocated_amount<=0"] ] } diff --git a/erpnext/controllers/stock_controller.py b/erpnext/controllers/stock_controller.py index 3021f18310..2d87a98f20 100644 --- a/erpnext/controllers/stock_controller.py +++ b/erpnext/controllers/stock_controller.py @@ -128,7 +128,7 @@ class StockController(AccountsController): reconciliation_purpose = frappe.db.get_value(self.doctype, self.name, "purpose") is_opening = "Yes" if reconciliation_purpose == "Opening Stock" else "No" details = [] - for voucher_detail_no, sle in sle_map.items(): + for voucher_detail_no in sle_map: details.append(frappe._dict({ "name": voucher_detail_no, "expense_account": default_expense_account, @@ -362,10 +362,12 @@ class StockController(AccountsController): frappe.throw(_("Row {0}: Quality Inspection rejected for item {1}") .format(d.idx, d.item_code), QualityInspectionRejectedError) elif qa_required : - frappe.msgprint(_("Quality Inspection required for Item {0}").format(d.item_code)) - if self.docstatus==1: - raise QualityInspectionRequiredError - + action = frappe.get_doc('Stock Settings').action_if_quality_inspection_is_not_submitted + if self.docstatus==1 and action == 'Stop': + frappe.throw(_("Quality Inspection required for Item {0} to submit").format(frappe.bold(d.item_code)), + exc=QualityInspectionRequiredError) + else: + frappe.msgprint(_("Create Quality Inspection for Item {0}").format(frappe.bold(d.item_code))) def update_blanket_order(self): blanket_orders = list(set([d.blanket_order for d in self.items if d.blanket_order])) diff --git a/erpnext/controllers/taxes_and_totals.py b/erpnext/controllers/taxes_and_totals.py index d5f86a1586..ebbe3d9d27 100644 --- a/erpnext/controllers/taxes_and_totals.py +++ b/erpnext/controllers/taxes_and_totals.py @@ -616,7 +616,7 @@ def get_itemised_tax_breakup_data(doc): return itemised_tax, itemised_taxable_amount -def get_itemised_tax(taxes): +def get_itemised_tax(taxes, with_tax_account=False): itemised_tax = {} for tax in taxes: if getattr(tax, "category", None) and tax.category=="Valuation": @@ -641,6 +641,9 @@ def get_itemised_tax(taxes): tax_amount = tax_amount )) + if with_tax_account: + itemised_tax[item_code][tax.description].tax_account = tax.account_head + return itemised_tax def get_itemised_taxable_amount(items): diff --git a/erpnext/controllers/tests/test_mapper.py b/erpnext/controllers/tests/test_mapper.py index 14738c5ff2..d02308d8f2 100644 --- a/erpnext/controllers/tests/test_mapper.py +++ b/erpnext/controllers/tests/test_mapper.py @@ -43,7 +43,7 @@ class TestMapper(unittest.TestCase): qtn = frappe.get_doc({ "doctype": "Quotation", "quotation_to": "Customer", - "customer": customer, + "party_name": customer, "order_type": "Sales", "transaction_date" : nowdate(), "valid_till" : add_months(nowdate(), 1) diff --git a/erpnext/crm/doctype/lead/lead.js b/erpnext/crm/doctype/lead/lead.js index 8c1ab2f38f..cfa7290110 100644 --- a/erpnext/crm/doctype/lead/lead.js +++ b/erpnext/crm/doctype/lead/lead.js @@ -6,6 +6,17 @@ cur_frm.email_field = "email_id"; erpnext.LeadController = frappe.ui.form.Controller.extend({ setup: function () { + this.frm.make_methods = { + 'Quotation': () => erpnext.utils.create_new_doc('Quotation', { + 'quotation_to': this.frm.doc.doctype, + 'party_name': this.frm.doc.name + }), + 'Opportunity': () => erpnext.utils.create_new_doc('Opportunity', { + 'opportunity_from': this.frm.doc.doctype, + 'party_name': this.frm.doc.name + }) + } + this.frm.fields_dict.customer.get_query = function (doc, cdt, cdn) { return { query: "erpnext.controllers.queries.customer_query" } } diff --git a/erpnext/crm/doctype/lead/lead.json b/erpnext/crm/doctype/lead/lead.json index 600e070b7c..3c22dc7199 100644 --- a/erpnext/crm/doctype/lead/lead.json +++ b/erpnext/crm/doctype/lead/lead.json @@ -1430,7 +1430,7 @@ "issingle": 0, "istable": 0, "max_attachments": 0, - "modified": "2019-05-10 03:22:57.283628", + "modified": "2019-06-18 03:22:57.283628", "modified_by": "Administrator", "module": "CRM", "name": "Lead", diff --git a/erpnext/crm/doctype/lead/lead.py b/erpnext/crm/doctype/lead/lead.py index 4f507f1b46..4343db04b4 100644 --- a/erpnext/crm/doctype/lead/lead.py +++ b/erpnext/crm/doctype/lead/lead.py @@ -90,11 +90,11 @@ class Lead(SellingController): return frappe.db.get_value("Customer", {"lead_name": self.name}) def has_opportunity(self): - return frappe.db.get_value("Opportunity", {"lead": self.name, "status": ["!=", "Lost"]}) + return frappe.db.get_value("Opportunity", {"party_name": self.name, "status": ["!=", "Lost"]}) def has_quotation(self): return frappe.db.get_value("Quotation", { - "lead": self.name, + "party_name": self.name, "docstatus": 1, "status": ["!=", "Lost"] @@ -102,7 +102,7 @@ class Lead(SellingController): def has_lost_quotation(self): return frappe.db.get_value("Quotation", { - "lead": self.name, + "party_name": self.name, "docstatus": 1, "status": "Lost" }) @@ -150,8 +150,8 @@ def make_opportunity(source_name, target_doc=None): "doctype": "Opportunity", "field_map": { "campaign_name": "campaign", - "doctype": "enquiry_from", - "name": "lead", + "doctype": "opportunity_from", + "name": "party_name", "lead_name": "contact_display", "company_name": "customer_name", "email_id": "contact_email", @@ -167,7 +167,7 @@ def make_quotation(source_name, target_doc=None): {"Lead": { "doctype": "Quotation", "field_map": { - "name": "lead" + "name": "party_name" } }}, target_doc) target_doc.quotation_to = "Lead" @@ -190,7 +190,7 @@ def get_lead_details(lead, posting_date=None, company=None): out.update({ "territory": lead.territory, "customer_name": lead.company_name or lead.lead_name, - "contact_display": lead.lead_name, + "contact_display": " ".join(filter(None, [lead.salutation, lead.lead_name])), "contact_email": lead.email_id, "contact_mobile": lead.mobile_no, "contact_phone": lead.phone, diff --git a/erpnext/crm/doctype/lead/lead_dashboard.py b/erpnext/crm/doctype/lead/lead_dashboard.py index e8472aafc2..69d8ca7092 100644 --- a/erpnext/crm/doctype/lead/lead_dashboard.py +++ b/erpnext/crm/doctype/lead/lead_dashboard.py @@ -4,6 +4,13 @@ from frappe import _ def get_data(): return { 'fieldname': 'lead', + 'non_standard_fieldnames': { + 'Quotation': 'party_name', + 'Opportunity': 'party_name' + }, + 'dynamic_links': { + 'party_name': ['Lead', 'quotation_to'] + }, 'transactions': [ { 'items': ['Opportunity', 'Quotation'] diff --git a/erpnext/crm/doctype/opportunity/opportunity.js b/erpnext/crm/doctype/opportunity/opportunity.js index 967459f082..9dcd0c493a 100644 --- a/erpnext/crm/doctype/opportunity/opportunity.js +++ b/erpnext/crm/doctype/opportunity/opportunity.js @@ -10,15 +10,34 @@ frappe.ui.form.on("Opportunity", { frm.custom_make_buttons = { 'Quotation': 'Quotation', 'Supplier Quotation': 'Supplier Quotation' - } - }, - customer: function(frm) { - frm.trigger('set_contact_link'); - erpnext.utils.get_party_details(frm); + }, + + frm.set_query("opportunity_from", function() { + return{ + "filters": { + "name": ["in", ["Customer", "Lead"]], + } + } + }); }, - lead: function(frm) { - frm.trigger('set_contact_link'); + onload_post_render: function(frm) { + frm.get_field("items").grid.set_multiple_add("item_code", "qty"); + }, + + party_name: function(frm) { + frm.toggle_display("contact_info", frm.doc.party_name); + + if (frm.doc.opportunity_from == "Customer") { + frm.trigger('set_contact_link'); + erpnext.utils.get_party_details(frm); + } else if (frm.doc.opportunity_from == "Lead") { + erpnext.utils.map_current_doc({ + method: "erpnext.crm.doctype.lead.lead.make_opportunity", + source_name: frm.doc.party_name, + frm: frm + }); + } }, onload_post_render: function(frm) { @@ -42,15 +61,14 @@ frappe.ui.form.on("Opportunity", { contact_person: erpnext.utils.get_contact_details, - enquiry_from: function(frm) { - frm.toggle_reqd("lead", frm.doc.enquiry_from==="Lead"); - frm.toggle_reqd("customer", frm.doc.enquiry_from==="Customer"); + opportunity_from: function(frm) { + frm.toggle_reqd("party_name", frm.doc.opportunity_from); + frm.trigger("set_dynamic_field_label"); }, refresh: function(frm) { var doc = frm.doc; - frm.events.enquiry_from(frm); - frm.trigger('set_contact_link'); + frm.events.opportunity_from(frm); frm.trigger('toggle_mandatory'); erpnext.toggle_naming_series(); @@ -88,10 +106,17 @@ frappe.ui.form.on("Opportunity", { }, set_contact_link: function(frm) { - if(frm.doc.customer) { - frappe.dynamic_link = {doc: frm.doc, fieldname: 'customer', doctype: 'Customer'} - } else if(frm.doc.lead) { - frappe.dynamic_link = {doc: frm.doc, fieldname: 'lead', doctype: 'Lead'} + if(frm.doc.opportunity_from == "Customer" && frm.doc.party_name) { + frappe.dynamic_link = {doc: frm.doc, fieldname: 'party_name', doctype: 'Customer'} + } else if(frm.doc.opportunity_from == "Lead" && frm.doc.party_name) { + frappe.dynamic_link = {doc: frm.doc, fieldname: 'party_name', doctype: 'Lead'} + } + }, + + set_dynamic_field_label: function(frm){ + + if (frm.doc.opportunity_from) { + frm.set_df_property("party_name", "label", frm.doc.opportunity_from); } }, @@ -110,10 +135,6 @@ frappe.ui.form.on("Opportunity", { // TODO commonify this code erpnext.crm.Opportunity = frappe.ui.form.Controller.extend({ onload: function() { - if(!this.frm.doc.enquiry_from && this.frm.doc.customer) - this.frm.doc.enquiry_from = "Customer"; - if(!this.frm.doc.enquiry_from && this.frm.doc.lead) - this.frm.doc.enquiry_from = "Lead"; if(!this.frm.doc.status) { frm.set_value('status', 'Open'); @@ -144,12 +165,14 @@ erpnext.crm.Opportunity = frappe.ui.form.Controller.extend({ }; }); - $.each([["lead", "lead"], - ["customer", "customer"], - ["contact_person", "contact_query"]], - function(i, opts) { - me.frm.set_query(opts[0], erpnext.queries[opts[1]]); - }); + me.frm.set_query('contact_person', erpnext.queries['contact_query']) + + if (me.frm.doc.opportunity_from == "Lead") { + me.frm.set_query('party_name', erpnext.queries['lead']); + } + else if (me.frm.doc.opportunity_from == "Cuatomer") { + me.frm.set_query('party_name', erpnext.queries['customer']); + } }, create_quotation: function() { @@ -162,11 +185,6 @@ erpnext.crm.Opportunity = frappe.ui.form.Controller.extend({ $.extend(cur_frm.cscript, new erpnext.crm.Opportunity({frm: cur_frm})); -cur_frm.cscript.onload_post_render = function(doc, cdt, cdn) { - if(doc.enquiry_from == 'Lead' && doc.lead) - cur_frm.cscript.lead(doc, cdt, cdn); -} - cur_frm.cscript.item_code = function(doc, cdt, cdn) { var d = locals[cdt][cdn]; if (d.item_code) { @@ -183,13 +201,4 @@ cur_frm.cscript.item_code = function(doc, cdt, cdn) { } }) } -} - -cur_frm.cscript.lead = function(doc, cdt, cdn) { - cur_frm.toggle_display("contact_info", doc.customer || doc.lead); - erpnext.utils.map_current_doc({ - method: "erpnext.crm.doctype.lead.lead.make_opportunity", - source_name: cur_frm.doc.lead, - frm: cur_frm - }); -} +} \ No newline at end of file diff --git a/erpnext/crm/doctype/opportunity/opportunity.json b/erpnext/crm/doctype/opportunity/opportunity.json index d3b22a344e..121a336691 100644 --- a/erpnext/crm/doctype/opportunity/opportunity.json +++ b/erpnext/crm/doctype/opportunity/opportunity.json @@ -1,1553 +1,1561 @@ { - "allow_copy": 0, - "allow_events_in_timeline": 0, - "allow_guest_to_view": 0, - "allow_import": 1, - "allow_rename": 0, - "autoname": "naming_series:", - "beta": 0, - "creation": "2013-03-07 18:50:30", - "custom": 0, - "description": "Potential Sales Deal", - "docstatus": 0, - "doctype": "DocType", - "document_type": "Document", - "editable_grid": 1, + "allow_copy": 0, + "allow_events_in_timeline": 0, + "allow_guest_to_view": 0, + "allow_import": 1, + "allow_rename": 0, + "autoname": "naming_series:", + "beta": 0, + "creation": "2013-03-07 18:50:30", + "custom": 0, + "description": "Potential Sales Deal", + "docstatus": 0, + "doctype": "DocType", + "document_type": "Document", + "editable_grid": 1, "fields": [ { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "from_section", - "fieldtype": "Section Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "", - "length": 0, - "no_copy": 0, - "options": "fa fa-user", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "from_section", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "", + "length": 0, + "no_copy": 0, + "options": "fa fa-user", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "default": "", - "fieldname": "naming_series", - "fieldtype": "Select", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "Series", - "length": 0, - "no_copy": 1, - "oldfieldname": "naming_series", - "oldfieldtype": "Select", - "options": "CRM-OPP-.YYYY.-", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 1, - "search_index": 0, - "set_only_once": 1, - "translatable": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "default": "", + "fetch_if_empty": 0, + "fieldname": "naming_series", + "fieldtype": "Select", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 1, + "in_standard_filter": 0, + "label": "Series", + "length": 0, + "no_copy": 1, + "oldfieldname": "naming_series", + "oldfieldtype": "Select", + "options": "CRM-OPP-.YYYY.-", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 1, + "search_index": 0, + "set_only_once": 1, + "translatable": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "enquiry_from", - "fieldtype": "Select", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "Opportunity From", - "length": 0, - "no_copy": 0, - "oldfieldname": "enquiry_from", - "oldfieldtype": "Select", - "options": "\nLead\nCustomer", - "permlevel": 0, - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 1, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "opportunity_from", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 1, + "in_standard_filter": 1, + "label": "Opportunity From", + "length": 0, + "no_copy": 0, + "oldfieldname": "enquiry_from", + "oldfieldtype": "Select", + "options": "DocType", + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 1, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 1, - "collapsible": 0, - "columns": 0, - "depends_on": "eval:doc.enquiry_from===\"Customer\"", - "fieldname": "customer", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 1, - "label": "Customer", - "length": 0, - "no_copy": 0, - "oldfieldname": "customer", - "oldfieldtype": "Link", - "options": "Customer", - "permlevel": 0, - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 1, + "collapsible": 0, + "columns": 0, + "depends_on": "", + "fetch_if_empty": 0, + "fieldname": "party_name", + "fieldtype": "Dynamic Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 1, + "label": "Party", + "length": 0, + "no_copy": 0, + "oldfieldname": "customer", + "oldfieldtype": "Link", + "options": "opportunity_from", + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 1, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 1, - "collapsible": 0, - "columns": 0, - "depends_on": "eval:doc.enquiry_from===\"Lead\"", - "fieldname": "lead", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 1, - "label": "Lead", - "length": 0, - "no_copy": 0, - "oldfieldname": "lead", - "oldfieldtype": "Link", - "options": "Lead", - "permlevel": 0, - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 1, + "collapsible": 0, + "columns": 0, + "depends_on": "", + "fetch_from": "", + "fetch_if_empty": 0, + "fieldname": "customer_name", + "fieldtype": "Data", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 1, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Customer / Lead Name", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 1, - "collapsible": 0, - "columns": 0, - "depends_on": "", - "fieldname": "customer_name", - "fieldtype": "Data", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 1, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Customer / Lead Name", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 1, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "column_break0", - "fieldtype": "Column Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "length": 0, - "no_copy": 0, - "oldfieldtype": "Column Break", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "column_break0", + "fieldtype": "Column Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "length": 0, + "no_copy": 0, + "oldfieldtype": "Column Break", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0, "width": "50%" - }, + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "title", - "fieldtype": "Data", - "hidden": 1, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Title", - "length": 0, - "no_copy": 1, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "title", + "fieldtype": "Data", + "hidden": 1, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Title", + "length": 0, + "no_copy": 1, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "default": "Sales", - "fieldname": "opportunity_type", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "Opportunity Type", - "length": 0, - "no_copy": 0, - "oldfieldname": "enquiry_type", - "oldfieldtype": "Select", - "options": "Opportunity Type", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "default": "Sales", + "fetch_if_empty": 0, + "fieldname": "opportunity_type", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 1, + "in_standard_filter": 0, + "label": "Opportunity Type", + "length": 0, + "no_copy": 0, + "oldfieldname": "enquiry_type", + "oldfieldtype": "Select", + "options": "Opportunity Type", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "default": "Open", - "fieldname": "status", - "fieldtype": "Select", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 1, - "label": "Status", - "length": 0, - "no_copy": 1, - "oldfieldname": "status", - "oldfieldtype": "Select", - "options": "Open\nQuotation\nConverted\nLost\nReplied\nClosed", - "permlevel": 0, - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 1, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "default": "Open", + "fetch_if_empty": 0, + "fieldname": "status", + "fieldtype": "Select", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 1, + "in_standard_filter": 1, + "label": "Status", + "length": 0, + "no_copy": 1, + "oldfieldname": "status", + "oldfieldtype": "Select", + "options": "Open\nQuotation\nConverted\nLost\nReplied\nClosed", + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 1, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 1, - "collapsible": 0, - "columns": 0, - "fieldname": "mins_to_first_response", - "fieldtype": "Float", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Mins to first response", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 1, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "eval:doc.status===\"Lost\"", + "fetch_if_empty": 0, + "fieldname": "order_lost_reason", + "fieldtype": "Small Text", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Lost Reason", + "length": 0, + "no_copy": 1, + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 1, - "collapsible_depends_on": "contact_by", - "columns": 0, - "fieldname": "next_contact", - "fieldtype": "Section Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Follow Up", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 1, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "mins_to_first_response", + "fieldtype": "Float", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Mins to first response", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "description": "", - "fieldname": "contact_by", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 1, - "label": "Next Contact By", - "length": 0, - "no_copy": 0, - "oldfieldname": "contact_by", - "oldfieldtype": "Link", - "options": "User", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 1, + "collapsible_depends_on": "contact_by", + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "next_contact", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Follow Up", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "description": "", + "fetch_if_empty": 0, + "fieldname": "contact_by", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 1, + "label": "Next Contact By", + "length": 0, + "no_copy": 0, + "oldfieldname": "contact_by", + "oldfieldtype": "Link", + "options": "User", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0, "width": "75px" - }, + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "description": "", - "fieldname": "contact_date", - "fieldtype": "Datetime", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Next Contact Date", - "length": 0, - "no_copy": 0, - "oldfieldname": "contact_date", - "oldfieldtype": "Date", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "description": "", + "fetch_if_empty": 0, + "fieldname": "contact_date", + "fieldtype": "Datetime", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Next Contact Date", + "length": 0, + "no_copy": 0, + "oldfieldname": "contact_date", + "oldfieldtype": "Date", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "column_break2", - "fieldtype": "Column Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "length": 0, - "no_copy": 0, - "oldfieldtype": "Column Break", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "column_break2", + "fieldtype": "Column Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "length": 0, + "no_copy": 0, + "oldfieldtype": "Column Break", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0, "width": "50%" - }, + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "to_discuss", - "fieldtype": "Small Text", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "To Discuss", - "length": 0, - "no_copy": 1, - "oldfieldname": "to_discuss", - "oldfieldtype": "Small Text", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "to_discuss", + "fieldtype": "Small Text", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "To Discuss", + "length": 0, + "no_copy": 1, + "oldfieldname": "to_discuss", + "oldfieldtype": "Small Text", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "section_break_14", - "fieldtype": "Section Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Sales", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "section_break_14", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Sales", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "currency", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Currency", - "length": 0, - "no_copy": 0, - "options": "Currency", - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "currency", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Currency", + "length": 0, + "no_copy": 0, + "options": "Currency", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "opportunity_amount", - "fieldtype": "Currency", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Opportunity Amount", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "opportunity_amount", + "fieldtype": "Currency", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Opportunity Amount", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "with_items", - "fieldtype": "Check", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "With Items", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "with_items", + "fieldtype": "Check", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "With Items", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "column_break_17", - "fieldtype": "Column Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "column_break_17", + "fieldtype": "Column Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "default": "Prospecting", - "fieldname": "sales_stage", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Sales Stage", - "length": 0, - "no_copy": 0, - "options": "Sales Stage", - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "default": "Prospecting", + "fetch_if_empty": 0, + "fieldname": "sales_stage", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Sales Stage", + "length": 0, + "no_copy": 0, + "options": "Sales Stage", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "default": "100", - "fieldname": "probability", - "fieldtype": "Percent", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Probability (%)", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "default": "100", + "fetch_if_empty": 0, + "fieldname": "probability", + "fieldtype": "Percent", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Probability (%)", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "with_items", - "fieldname": "items_section", - "fieldtype": "Section Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Items", - "length": 0, - "no_copy": 0, - "oldfieldtype": "Section Break", - "options": "fa fa-shopping-cart", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "with_items", + "fetch_if_empty": 0, + "fieldname": "items_section", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Items", + "length": 0, + "no_copy": 0, + "oldfieldtype": "Section Break", + "options": "fa fa-shopping-cart", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "description": "", - "fieldname": "items", - "fieldtype": "Table", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Items", - "length": 0, - "no_copy": 0, - "oldfieldname": "enquiry_details", - "oldfieldtype": "Table", - "options": "Opportunity Item", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "description": "", + "fetch_if_empty": 0, + "fieldname": "items", + "fieldtype": "Table", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Items", + "length": 0, + "no_copy": 0, + "oldfieldname": "enquiry_details", + "oldfieldtype": "Table", + "options": "Opportunity Item", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 1, - "collapsible_depends_on": "next_contact_by", - "columns": 0, - "depends_on": "eval:doc.lead || doc.customer", - "fieldname": "contact_info", - "fieldtype": "Section Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Contact Info", - "length": 0, - "no_copy": 0, - "options": "fa fa-bullhorn", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 1, + "collapsible_depends_on": "next_contact_by", + "columns": 0, + "depends_on": "eval:doc.party_name", + "fetch_if_empty": 0, + "fieldname": "contact_info", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Contact Info", + "length": 0, + "no_copy": 0, + "options": "fa fa-bullhorn", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "eval:doc.customer || doc.lead", - "fieldname": "customer_address", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Customer / Lead Address", - "length": 0, - "no_copy": 0, - "options": "Address", - "permlevel": 0, - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "eval:doc.party_name", + "fetch_if_empty": 0, + "fieldname": "customer_address", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Customer / Lead Address", + "length": 0, + "no_copy": 0, + "options": "Address", + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "address_display", - "fieldtype": "Small Text", - "hidden": 1, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Address", - "length": 0, - "no_copy": 0, - "oldfieldname": "address", - "oldfieldtype": "Small Text", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 1, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "address_display", + "fieldtype": "Small Text", + "hidden": 1, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Address", + "length": 0, + "no_copy": 0, + "oldfieldname": "address", + "oldfieldtype": "Small Text", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "customer", - "description": "", - "fieldname": "territory", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Territory", - "length": 0, - "no_copy": 0, - "options": "Territory", - "permlevel": 0, - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 1, - "set_only_once": 0, - "translatable": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "eval:", + "description": "", + "fetch_if_empty": 0, + "fieldname": "territory", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Territory", + "length": 0, + "no_copy": 0, + "options": "Territory", + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 1, + "set_only_once": 0, + "translatable": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "customer", - "description": "", - "fieldname": "customer_group", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Customer Group", - "length": 0, - "no_copy": 0, - "oldfieldname": "customer_group", - "oldfieldtype": "Link", - "options": "Customer Group", - "permlevel": 0, - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 1, - "set_only_once": 0, - "translatable": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "eval:doc.opportunity_from=='Customer' && doc.party_name", + "description": "", + "fetch_if_empty": 0, + "fieldname": "customer_group", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Customer Group", + "length": 0, + "no_copy": 0, + "oldfieldname": "customer_group", + "oldfieldtype": "Link", + "options": "Customer Group", + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 1, + "set_only_once": 0, + "translatable": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "column_break3", - "fieldtype": "Column Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "length": 0, - "no_copy": 0, - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "column_break3", + "fieldtype": "Column Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "length": 0, + "no_copy": 0, + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "eval:doc.lead || doc.customer", - "fieldname": "contact_person", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Contact Person", - "length": 0, - "no_copy": 0, - "options": "Contact", - "permlevel": 0, - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "eval:doc.party_name", + "fetch_if_empty": 0, + "fieldname": "contact_person", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Contact Person", + "length": 0, + "no_copy": 0, + "options": "Contact", + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "customer", - "fieldname": "contact_display", - "fieldtype": "Small Text", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 1, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Contact", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 1, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "eval:doc.opportunity_from=='Customer' && doc.party_name", + "fetch_if_empty": 0, + "fieldname": "contact_display", + "fieldtype": "Small Text", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 1, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Contact", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "eval:doc.lead || doc.customer", - "fieldname": "contact_email", - "fieldtype": "Data", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Contact Email", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 1, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "eval:doc.party_name", + "fetch_if_empty": 0, + "fieldname": "contact_email", + "fieldtype": "Data", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Contact Email", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "eval:doc.lead || doc.customer", - "fieldname": "contact_mobile", - "fieldtype": "Small Text", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Contact Mobile No", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 1, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "eval:doc.party_name", + "fetch_if_empty": 0, + "fieldname": "contact_mobile", + "fieldtype": "Small Text", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Contact Mobile No", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 1, - "collapsible_depends_on": "", - "columns": 0, - "fieldname": "more_info", - "fieldtype": "Section Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Source", - "length": 0, - "no_copy": 0, - "oldfieldtype": "Section Break", - "options": "fa fa-file-text", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 1, + "collapsible_depends_on": "", + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "more_info", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Source", + "length": 0, + "no_copy": 0, + "oldfieldtype": "Section Break", + "options": "fa fa-file-text", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "source", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Source", - "length": 0, - "no_copy": 0, - "oldfieldname": "source", - "oldfieldtype": "Select", - "options": "Lead Source", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "source", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Source", + "length": 0, + "no_copy": 0, + "oldfieldname": "source", + "oldfieldtype": "Select", + "options": "Lead Source", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "eval: doc.source==\"Campaign\"", - "description": "Enter name of campaign if source of enquiry is campaign", - "fieldname": "campaign", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Campaign", - "length": 0, - "no_copy": 0, - "oldfieldname": "campaign", - "oldfieldtype": "Link", - "options": "Campaign", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "eval: doc.source==\"Campaign\"", + "description": "Enter name of campaign if source of enquiry is campaign", + "fetch_if_empty": 0, + "fieldname": "campaign", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Campaign", + "length": 0, + "no_copy": 0, + "oldfieldname": "campaign", + "oldfieldtype": "Link", + "options": "Campaign", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "eval:doc.status===\"Lost\"", - "fieldname": "order_lost_reason", - "fieldtype": "Small Text", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Detailed Reason", - "length": 0, - "no_copy": 1, - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 1, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "column_break1", - "fieldtype": "Column Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "length": 0, - "no_copy": 0, - "oldfieldtype": "Column Break", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "column_break1", + "fieldtype": "Column Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "length": 0, + "no_copy": 0, + "oldfieldtype": "Column Break", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0, "width": "50%" - }, + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "company", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Company", - "length": 0, - "no_copy": 0, - "oldfieldname": "company", - "oldfieldtype": "Link", - "options": "Company", - "permlevel": 0, - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 1, - "report_hide": 0, - "reqd": 1, - "search_index": 1, - "set_only_once": 0, - "translatable": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "company", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Company", + "length": 0, + "no_copy": 0, + "oldfieldname": "company", + "oldfieldtype": "Link", + "options": "Company", + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 1, + "report_hide": 0, + "reqd": 1, + "search_index": 1, + "set_only_once": 0, + "translatable": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "default": "Today", - "fieldname": "transaction_date", - "fieldtype": "Date", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Opportunity Date", - "length": 0, - "no_copy": 0, - "oldfieldname": "transaction_date", - "oldfieldtype": "Date", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 1, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "default": "Today", + "fetch_if_empty": 0, + "fieldname": "transaction_date", + "fieldtype": "Date", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Opportunity Date", + "length": 0, + "no_copy": 0, + "oldfieldname": "transaction_date", + "oldfieldtype": "Date", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 1, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0, "width": "50px" - }, + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "amended_from", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 1, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Amended From", - "length": 0, - "no_copy": 1, - "oldfieldname": "amended_from", - "oldfieldtype": "Data", - "options": "Opportunity", - "permlevel": 0, - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 1, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "amended_from", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 1, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Amended From", + "length": 0, + "no_copy": 1, + "oldfieldname": "amended_from", + "oldfieldtype": "Data", + "options": "Opportunity", + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0, "width": "150px" - }, + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "lost_reasons", - "fieldtype": "Table MultiSelect", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Lost Reasons", - "length": 0, - "no_copy": 0, - "options": "Lost Reason Detail", - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 1, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "lost_reasons", + "fieldtype": "Table MultiSelect", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Lost Reasons", + "length": 0, + "no_copy": 0, + "options": "Lost Reason Detail", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, "unique": 0 } - ], - "has_web_view": 0, - "hide_heading": 0, - "hide_toolbar": 0, - "icon": "fa fa-info-sign", - "idx": 195, - "image_view": 0, - "in_create": 0, - "is_submittable": 0, - "issingle": 0, - "istable": 0, - "max_attachments": 0, - "modified": "2018-12-29 18:38:37.270217", - "modified_by": "Administrator", - "module": "CRM", - "name": "Opportunity", - "owner": "Administrator", + ], + "has_web_view": 0, + "hide_heading": 0, + "hide_toolbar": 0, + "icon": "fa fa-info-sign", + "idx": 195, + "image_view": 0, + "in_create": 0, + "is_submittable": 0, + "issingle": 0, + "istable": 0, + "max_attachments": 0, + "modified": "2019-06-19 19:03:32.740910", + "modified_by": "Administrator", + "module": "CRM", + "name": "Opportunity", + "owner": "Administrator", "permissions": [ { - "amend": 0, - "cancel": 0, - "create": 1, - "delete": 1, - "email": 1, - "export": 0, - "if_owner": 0, - "import": 0, - "permlevel": 0, - "print": 1, - "read": 1, - "report": 1, - "role": "Sales User", - "set_user_permissions": 0, - "share": 1, - "submit": 0, + "amend": 0, + "cancel": 0, + "create": 1, + "delete": 1, + "email": 1, + "export": 0, + "if_owner": 0, + "import": 0, + "permlevel": 0, + "print": 1, + "read": 1, + "report": 1, + "role": "Sales User", + "set_user_permissions": 0, + "share": 1, + "submit": 0, "write": 1 - }, + }, { - "amend": 0, - "cancel": 0, - "create": 1, - "delete": 1, - "email": 1, - "export": 1, - "if_owner": 0, - "import": 1, - "permlevel": 0, - "print": 1, - "read": 1, - "report": 1, - "role": "Sales Manager", - "set_user_permissions": 0, - "share": 1, - "submit": 0, + "amend": 0, + "cancel": 0, + "create": 1, + "delete": 1, + "email": 1, + "export": 1, + "if_owner": 0, + "import": 1, + "permlevel": 0, + "print": 1, + "read": 1, + "report": 1, + "role": "Sales Manager", + "set_user_permissions": 0, + "share": 1, + "submit": 0, "write": 1 } - ], - "quick_entry": 0, - "read_only": 0, - "read_only_onload": 0, - "search_fields": "status,transaction_date,customer,lead,opportunity_type,territory,company", - "show_name_in_global_search": 1, - "sort_field": "modified", - "sort_order": "DESC", - "timeline_field": "customer", - "title_field": "title", - "track_changes": 0, - "track_seen": 1, + ], + "quick_entry": 0, + "read_only": 0, + "read_only_onload": 0, + "search_fields": "status,transaction_date,party_name,opportunity_type,territory,company", + "show_name_in_global_search": 1, + "sort_field": "modified", + "sort_order": "DESC", + "timeline_field": "party_name", + "title_field": "title", + "track_changes": 0, + "track_seen": 1, "track_views": 1 } \ No newline at end of file diff --git a/erpnext/crm/doctype/opportunity/opportunity.py b/erpnext/crm/doctype/opportunity/opportunity.py index afea4a1e19..99486fa206 100644 --- a/erpnext/crm/doctype/opportunity/opportunity.py +++ b/erpnext/crm/doctype/opportunity/opportunity.py @@ -16,8 +16,8 @@ sender_field = "contact_email" class Opportunity(TransactionBase): def after_insert(self): - if self.lead: - frappe.get_doc("Lead", self.lead).set_status(update=True) + if self.opportunity_from == "Lead": + frappe.get_doc("Lead", self.party_name).set_status(update=True) def validate(self): self._prev = frappe._dict({ @@ -29,12 +29,8 @@ class Opportunity(TransactionBase): self.make_new_lead_if_required() - if not self.enquiry_from: - frappe.throw(_("Opportunity From field is mandatory")) - self.validate_item_details() self.validate_uom_is_integer("uom", "qty") - self.validate_lead_cust() self.validate_cust_name() if not self.title: @@ -45,7 +41,7 @@ class Opportunity(TransactionBase): def make_new_lead_if_required(self): """Set lead against new opportunity""" - if not (self.lead or self.customer) and self.contact_email: + if (not self.get("party_name")) and self.contact_email: # check if customer is already created agains the self.contact_email customer = frappe.db.sql("""select distinct `tabDynamic Link`.link_name as customer @@ -61,8 +57,8 @@ class Opportunity(TransactionBase): `tabDynamic Link`.link_doctype='Customer' """.format(self.contact_email), as_dict=True) if customer and customer[0].customer: - self.customer = customer[0].customer - self.enquiry_from = "Customer" + self.party_name = customer[0].customer + self.opportunity_from = "Customer" return lead_name = frappe.db.get_value("Lead", {"email_id": self.contact_email}) @@ -89,8 +85,8 @@ class Opportunity(TransactionBase): lead.insert(ignore_permissions=True) lead_name = lead.name - self.enquiry_from = "Lead" - self.lead = lead_name + self.opportunity_from = "Lead" + self.party_name = lead_name def declare_enquiry_lost(self, lost_reasons_list, detailed_reason=None): if not self.has_active_quotation(): @@ -145,10 +141,10 @@ class Opportunity(TransactionBase): return True def validate_cust_name(self): - if self.customer: - self.customer_name = frappe.db.get_value("Customer", self.customer, "customer_name") - elif self.lead: - lead_name, company_name = frappe.db.get_value("Lead", self.lead, ["lead_name", "company_name"]) + if self.party_name and self.opportunity_from == 'Customer': + self.customer_name = frappe.db.get_value("Customer", self.party_name, "customer_name") + elif self.party_name and self.opportunity_from == 'Lead': + lead_name, company_name = frappe.db.get_value("Lead", self.party_name, ["lead_name", "company_name"]) self.customer_name = company_name or lead_name def on_update(self): @@ -161,16 +157,16 @@ class Opportunity(TransactionBase): opts.description = "" opts.contact_date = self.contact_date - if self.customer: + if self.party_name and self.opportunity_from == 'Customer': if self.contact_person: opts.description = 'Contact '+cstr(self.contact_person) else: - opts.description = 'Contact customer '+cstr(self.customer) - elif self.lead: + opts.description = 'Contact customer '+cstr(self.party_name) + elif self.party_name and self.opportunity_from == 'Lead': if self.contact_display: opts.description = 'Contact '+cstr(self.contact_display) else: - opts.description = 'Contact lead '+cstr(self.lead) + opts.description = 'Contact lead '+cstr(self.party_name) opts.subject = opts.description opts.description += '. By : ' + cstr(self.contact_by) @@ -195,17 +191,6 @@ class Opportunity(TransactionBase): for key in item_fields: if not d.get(key): d.set(key, item.get(key)) - def validate_lead_cust(self): - if self.enquiry_from == 'Lead': - if not self.lead: - frappe.throw(_("Lead must be set if Opportunity is made from Lead")) - else: - self.customer = None - elif self.enquiry_from == 'Customer': - if not self.customer: - msgprint(_("Customer is mandatory if 'Opportunity From' is selected as Customer"), raise_exception=1) - else: - self.lead = None @frappe.whitelist() def get_item_details(item_code): @@ -227,8 +212,11 @@ def make_quotation(source_name, target_doc=None): quotation = frappe.get_doc(target) company_currency = frappe.get_cached_value('Company', quotation.company, "default_currency") - party_account_currency = get_party_account_currency("Customer", quotation.customer, - quotation.company) if quotation.customer else company_currency + + if quotation.quotation_to == 'Customer' and quotation.party_name: + party_account_currency = get_party_account_currency("Customer", quotation.party_name, quotation.company) + else: + party_account_currency = company_currency quotation.currency = party_account_currency or company_currency @@ -254,7 +242,7 @@ def make_quotation(source_name, target_doc=None): "Opportunity": { "doctype": "Quotation", "field_map": { - "enquiry_from": "quotation_to", + "opportunity_from": "quotation_to", "opportunity_type": "order_type", "name": "enq_no", } @@ -340,11 +328,11 @@ def make_opportunity_from_communication(communication, ignore_communication_link if not lead: lead = make_lead_from_communication(communication, ignore_communication_links=True) - enquiry_from = "Lead" + opportunity_from = "Lead" opportunity = frappe.get_doc({ "doctype": "Opportunity", - "enquiry_from": enquiry_from, + "opportunity_from": opportunity_from, "lead": lead }).insert(ignore_permissions=True) diff --git a/erpnext/crm/doctype/opportunity/opportunity_list.js b/erpnext/crm/doctype/opportunity/opportunity_list.js index 0dbbf8add1..af53bf7fbf 100644 --- a/erpnext/crm/doctype/opportunity/opportunity_list.js +++ b/erpnext/crm/doctype/opportunity/opportunity_list.js @@ -1,5 +1,5 @@ frappe.listview_settings['Opportunity'] = { - add_fields: ["customer_name", "opportunity_type", "enquiry_from", "status"], + add_fields: ["customer_name", "opportunity_type", "opportunity_from", "status"], get_indicator: function(doc) { var indicator = [__(doc.status), frappe.utils.guess_colour(doc.status), "status,=," + doc.status]; if(doc.status=="Quotation") { @@ -17,5 +17,13 @@ frappe.listview_settings['Opportunity'] = { listview.page.add_menu_item(__("Set as Closed"), function() { listview.call_for_selected_items(method, {"status": "Closed"}); }); + + listview.page.fields_dict.opportunity_from.get_query = function() { + return { + "filters": { + "name": ["in", ["Customer", "Lead"]], + } + }; + }; } }; diff --git a/erpnext/crm/doctype/opportunity/test_opportunity.js b/erpnext/crm/doctype/opportunity/test_opportunity.js index f2b04f8647..45b97ddc4d 100644 --- a/erpnext/crm/doctype/opportunity/test_opportunity.js +++ b/erpnext/crm/doctype/opportunity/test_opportunity.js @@ -6,7 +6,7 @@ QUnit.test("test: opportunity", function (assert) { () => frappe.timeout(1), () => frappe.click_button('New'), () => frappe.timeout(1), - () => cur_frm.set_value('enquiry_from', 'Customer'), + () => cur_frm.set_value('opportunity_from', 'Customer'), () => cur_frm.set_value('customer', 'Test Customer 1'), // check items diff --git a/erpnext/crm/doctype/opportunity/test_opportunity.py b/erpnext/crm/doctype/opportunity/test_opportunity.py index 9cbbb86e44..1a9f66ad9a 100644 --- a/erpnext/crm/doctype/opportunity/test_opportunity.py +++ b/erpnext/crm/doctype/opportunity/test_opportunity.py @@ -38,13 +38,13 @@ class TestOpportunity(unittest.TestCase): # new lead should be created against the new.opportunity@example.com opp_doc = frappe.get_doc(args).insert(ignore_permissions=True) - self.assertTrue(opp_doc.lead) - self.assertEqual(opp_doc.enquiry_from, "Lead") - self.assertEqual(frappe.db.get_value("Lead", opp_doc.lead, "email_id"), + self.assertTrue(opp_doc.party_name) + self.assertEqual(opp_doc.opportunity_from, "Lead") + self.assertEqual(frappe.db.get_value("Lead", opp_doc.party_name, "email_id"), new_lead_email_id) # create new customer and create new contact against 'new.opportunity@example.com' - customer = make_customer(opp_doc.lead).insert(ignore_permissions=True) + customer = make_customer(opp_doc.party_name).insert(ignore_permissions=True) frappe.get_doc({ "doctype": "Contact", "email_id": new_lead_email_id, @@ -56,10 +56,9 @@ class TestOpportunity(unittest.TestCase): }).insert(ignore_permissions=True) opp_doc = frappe.get_doc(args).insert(ignore_permissions=True) - self.assertTrue(opp_doc.customer) - self.assertEqual(opp_doc.enquiry_from, "Customer") - self.assertEqual(opp_doc.customer, customer.name) - + self.assertTrue(opp_doc.party_name) + self.assertEqual(opp_doc.opportunity_from, "Customer") + self.assertEqual(opp_doc.party_name, customer.name) def make_opportunity(**args): args = frappe._dict(args) @@ -67,17 +66,17 @@ def make_opportunity(**args): opp_doc = frappe.get_doc({ "doctype": "Opportunity", "company": args.company or "_Test Company", - "enquiry_from": args.enquiry_from or "Customer", + "opportunity_from": args.opportunity_from or "Customer", "opportunity_type": "Sales", "with_items": args.with_items or 0, "transaction_date": today() }) - if opp_doc.enquiry_from == 'Customer': - opp_doc.customer = args.customer or "_Test Customer" + if opp_doc.opportunity_from == 'Customer': + opp_doc.party_name= args.customer or "_Test Customer" - if opp_doc.enquiry_from == 'Lead': - opp_doc.lead = args.lead or "_T-Lead-00001" + if opp_doc.opportunity_from == 'Lead': + opp_doc.party_name = args.lead or "_T-Lead-00001" if args.with_items: opp_doc.append('items', { diff --git a/erpnext/crm/doctype/opportunity/test_records.json b/erpnext/crm/doctype/opportunity/test_records.json index 84dfea515a..a1e0ad921b 100644 --- a/erpnext/crm/doctype/opportunity/test_records.json +++ b/erpnext/crm/doctype/opportunity/test_records.json @@ -2,9 +2,9 @@ { "doctype": "Opportunity", "name": "_Test Opportunity 1", - "enquiry_from": "Lead", + "opportunity_from": "Lead", "enquiry_type": "Sales", - "lead": "_T-Lead-00001", + "party_name": "_T-Lead-00001", "transaction_date": "2013-12-12", "items": [{ "item_name": "Test Item", diff --git a/erpnext/crm/doctype/utils.py b/erpnext/crm/doctype/utils.py index bd8b678d3b..9cfab15995 100644 --- a/erpnext/crm/doctype/utils.py +++ b/erpnext/crm/doctype/utils.py @@ -87,7 +87,7 @@ def get_employee_emails_for_popup(communication_medium): 'parent': communication_medium, 'from_time': ['<=', now_time], 'to_time': ['>=', now_time], - }, fields=['employee_group'], debug=1) + }, fields=['employee_group']) available_employee_groups = tuple([emp.employee_group for emp in available_employee_groups]) diff --git a/erpnext/crm/report/campaign_efficiency/campaign_efficiency.py b/erpnext/crm/report/campaign_efficiency/campaign_efficiency.py index b20fe15ce2..ec498837f5 100644 --- a/erpnext/crm/report/campaign_efficiency/campaign_efficiency.py +++ b/erpnext/crm/report/campaign_efficiency/campaign_efficiency.py @@ -4,86 +4,132 @@ from __future__ import unicode_literals import frappe from frappe import _ +from frappe.utils import flt def execute(filters=None): columns, data = [], [] - columns=get_columns() - data=get_lead_data(filters, "Campaign Name") + columns=get_columns("Campaign Name") + data=get_lead_data(filters or {}, "Campaign Name") return columns, data - -def get_columns(): + +def get_columns(based_on): return [ - _("Campaign Name") + ":data:130", - _("Lead Count") + ":Int:80", - _("Opp Count") + ":Int:80", - _("Quot Count") + ":Int:80", - _("Order Count") + ":Int:100", - _("Order Value") + ":Float:100", - _("Opp/Lead %") + ":Float:100", - _("Quot/Lead %") + ":Float:100", - _("Order/Quot %") + ":Float:100" + { + "fieldname": frappe.scrub(based_on), + "label": _(based_on), + "fieldtype": "Data", + "width": 150 + }, + { + "fieldname": "lead_count", + "label": _("Lead Count"), + "fieldtype": "Int", + "width": 80 + }, + { + "fieldname": "opp_count", + "label": _("Opp Count"), + "fieldtype": "Int", + "width": 80 + }, + { + "fieldname": "quot_count", + "label": _("Quot Count"), + "fieldtype": "Int", + "width": 80 + }, + { + "fieldname": "order_count", + "label": _("Order Count"), + "fieldtype": "Int", + "width": 100 + }, + { + "fieldname": "order_value", + "label": _("Order Value"), + "fieldtype": "Float", + "width": 100 + }, + { + "fieldname": "opp_lead", + "label": _("Opp/Lead %"), + "fieldtype": "Float", + "width": 100 + }, + { + "fieldname": "quot_lead", + "label": _("Quot/Lead %"), + "fieldtype": "Float", + "width": 100 + }, + { + "fieldname": "order_quot", + "label": _("Order/Quot %"), + "fieldtype": "Float", + "width": 100 + } ] - + def get_lead_data(filters, based_on): based_on_field = frappe.scrub(based_on) conditions = get_filter_conditions(filters) - + lead_details = frappe.db.sql(""" select {based_on_field}, name - from `tabLead` - where {based_on_field} is not null and {based_on_field} != '' {conditions} + from `tabLead` + where {based_on_field} is not null and {based_on_field} != '' {conditions} """.format(based_on_field=based_on_field, conditions=conditions), filters, as_dict=1) - + lead_map = frappe._dict() for d in lead_details: lead_map.setdefault(d.get(based_on_field), []).append(d.name) - + data = [] for based_on_value, leads in lead_map.items(): row = { - based_on: based_on_value, - "Lead Count": len(leads) + based_on_field: based_on_value, + "lead_count": len(leads) } - row["Quot Count"]= get_lead_quotation_count(leads) - row["Opp Count"] = get_lead_opp_count(leads) - row["Order Count"] = get_quotation_ordered_count(leads) - row["Order Value"] = get_order_amount(leads) - - row["Opp/Lead %"] = row["Opp Count"] / row["Lead Count"] * 100 - row["Quot/Lead %"] = row["Quot Count"] / row["Lead Count"] * 100 - - row["Order/Quot %"] = row["Order Count"] / (row["Quot Count"] or 1) * 100 - + row["quot_count"]= get_lead_quotation_count(leads) + row["opp_count"] = get_lead_opp_count(leads) + row["order_count"] = get_quotation_ordered_count(leads) + row["order_value"] = get_order_amount(leads) or 0 + + row["opp_lead"] = flt(row["opp_count"]) / flt(row["lead_count"] or 1.0) * 100.0 + row["quot_lead"] = flt(row["quot_count"]) / flt(row["lead_count"] or 1.0) * 100.0 + + row["order_quot"] = flt(row["order_count"]) / flt(row["quot_count"] or 1.0) * 100.0 + data.append(row) - + return data - + def get_filter_conditions(filters): conditions="" if filters.from_date: conditions += " and date(creation) >= %(from_date)s" if filters.to_date: conditions += " and date(creation) <= %(to_date)s" - + return conditions - + def get_lead_quotation_count(leads): - return frappe.db.sql("""select count(name) from `tabQuotation` - where lead in (%s)""" % ', '.join(["%s"]*len(leads)), tuple(leads))[0][0] - + return frappe.db.sql("""select count(name) from `tabQuotation` + where quotation_to = 'Lead' and party_name in (%s)""" % ', '.join(["%s"]*len(leads)), tuple(leads))[0][0] #nosec + def get_lead_opp_count(leads): - return frappe.db.sql("""select count(name) from `tabOpportunity` - where lead in (%s)""" % ', '.join(["%s"]*len(leads)), tuple(leads))[0][0] - + return frappe.db.sql("""select count(name) from `tabOpportunity` + where opportunity_from = 'Lead' and party_name in (%s)""" % ', '.join(["%s"]*len(leads)), tuple(leads))[0][0] + def get_quotation_ordered_count(leads): - return frappe.db.sql("""select count(name) - from `tabQuotation` where status = 'Ordered' - and lead in (%s)""" % ', '.join(["%s"]*len(leads)), tuple(leads))[0][0] - + return frappe.db.sql("""select count(name) + from `tabQuotation` where status = 'Ordered' and quotation_to = 'Lead' + and party_name in (%s)""" % ', '.join(["%s"]*len(leads)), tuple(leads))[0][0] + def get_order_amount(leads): - return frappe.db.sql("""select sum(base_net_amount) + return frappe.db.sql("""select sum(base_net_amount) from `tabSales Order Item` where prevdoc_docname in ( - select name from `tabQuotation` where status = 'Ordered' - and lead in (%s) + select name from `tabQuotation` where status = 'Ordered' + and quotation_to = 'Lead' and party_name in (%s) )""" % ', '.join(["%s"]*len(leads)), tuple(leads))[0][0] \ No newline at end of file diff --git a/erpnext/crm/report/lead_conversion_time/lead_conversion_time.py b/erpnext/crm/report/lead_conversion_time/lead_conversion_time.py index d9ee30ec1a..d91b9c5607 100644 --- a/erpnext/crm/report/lead_conversion_time/lead_conversion_time.py +++ b/erpnext/crm/report/lead_conversion_time/lead_conversion_time.py @@ -66,7 +66,7 @@ def get_columns(): def get_communication_details(filters): communication_count = None communication_list = [] - opportunities = frappe.db.get_values('Opportunity', {'enquiry_from': 'Lead'},\ + opportunities = frappe.db.get_values('Opportunity', {'opportunity_from': 'Lead'},\ ['name', 'customer_name', 'lead', 'contact_email'], as_dict=1) for d in opportunities: diff --git a/erpnext/crm/report/lead_owner_efficiency/lead_owner_efficiency.py b/erpnext/crm/report/lead_owner_efficiency/lead_owner_efficiency.py index 8134bc2003..6172a75fdd 100644 --- a/erpnext/crm/report/lead_owner_efficiency/lead_owner_efficiency.py +++ b/erpnext/crm/report/lead_owner_efficiency/lead_owner_efficiency.py @@ -11,16 +11,61 @@ def execute(filters=None): columns=get_columns() data=get_lead_data(filters, "Lead Owner") return columns, data - + def get_columns(): return [ - _("Lead Owner") + ":Data:130", - _("Lead Count") + ":Int:80", - _("Opp Count") + ":Int:80", - _("Quot Count") + ":Int:80", - _("Order Count") + ":Int:100", - _("Order Value") + ":Float:100", - _("Opp/Lead %") + ":Float:100", - _("Quot/Lead %") + ":Float:100", - _("Order/Quot %") + ":Float:100" + { + "fieldname": "lead_owner", + "label": _("Lead Owner"), + "fieldtype": "Data", + "width": "130" + }, + { + "fieldname": "lead_count", + "label": _("Lead Count"), + "fieldtype": "Int", + "width": "80" + }, + { + "fieldname": "opp_count", + "label": _("Opp Count"), + "fieldtype": "Int", + "width": "80" + }, + { + "fieldname": "quot_count", + "label": _("Quot Count"), + "fieldtype": "Int", + "width": "80" + }, + { + "fieldname": "order_count", + "label": _("Order Count"), + "fieldtype": "Int", + "width": "100" + }, + { + "fieldname": "order_value", + "label": _("Order Value"), + "fieldtype": "Float", + "width": "100" + }, + { + "fieldname": "opp_lead", + "label": _("Opp/Lead %"), + "fieldtype": "Float", + "width": "100" + }, + { + "fieldname": "quot_lead", + "label": _("Quot/Lead %"), + "fieldtype": "Float", + "width": "100" + }, + { + "fieldname": "order_quot", + "label": _("Order/Quot %"), + "fieldtype": "Float", + "width": "100" + } ] \ No newline at end of file diff --git a/erpnext/crm/report/lost_opportunity/lost_opportunity.json b/erpnext/crm/report/lost_opportunity/lost_opportunity.json index c100ffa22d..e7c5068b86 100644 --- a/erpnext/crm/report/lost_opportunity/lost_opportunity.json +++ b/erpnext/crm/report/lost_opportunity/lost_opportunity.json @@ -1,25 +1,25 @@ { - "add_total_row": 0, - "creation": "2018-12-31 16:30:57.188837", - "disabled": 0, - "docstatus": 0, - "doctype": "Report", - "idx": 0, - "is_standard": "Yes", - "json": "{\"order_by\": \"`tabOpportunity`.`modified` desc\", \"filters\": [[\"Opportunity\", \"status\", \"=\", \"Lost\"]], \"fields\": [[\"name\", \"Opportunity\"], [\"enquiry_from\", \"Opportunity\"], [\"customer\", \"Opportunity\"], [\"lead\", \"Opportunity\"], [\"customer_name\", \"Opportunity\"], [\"opportunity_type\", \"Opportunity\"], [\"status\", \"Opportunity\"], [\"contact_by\", \"Opportunity\"], [\"docstatus\", \"Opportunity\"], [\"lost_reason\", \"Lost Reason Detail\"]], \"add_totals_row\": 0, \"add_total_row\": 0, \"page_length\": 20}", - "modified": "2018-12-31 16:33:08.083618", - "modified_by": "Administrator", - "module": "CRM", - "name": "Lost Opportunity", - "owner": "Administrator", - "prepared_report": 0, - "ref_doctype": "Opportunity", - "report_name": "Lost Opportunity", - "report_type": "Report Builder", + "add_total_row": 0, + "creation": "2018-12-31 16:30:57.188837", + "disabled": 0, + "docstatus": 0, + "doctype": "Report", + "idx": 0, + "is_standard": "Yes", + "json": "{\"order_by\": \"`tabOpportunity`.`modified` desc\", \"filters\": [[\"Opportunity\", \"status\", \"=\", \"Lost\"]], \"fields\": [[\"name\", \"Opportunity\"], [\"opportunity_from\", \"Opportunity\"], [\"party_name\", \"Opportunity\"], [\"customer_name\", \"Opportunity\"], [\"opportunity_type\", \"Opportunity\"], [\"status\", \"Opportunity\"], [\"contact_by\", \"Opportunity\"], [\"docstatus\", \"Opportunity\"], [\"lost_reason\", \"Lost Reason Detail\"]], \"add_totals_row\": 0, \"add_total_row\": 0, \"page_length\": 20}", + "modified": "2019-06-26 16:33:08.083618", + "modified_by": "Administrator", + "module": "CRM", + "name": "Lost Opportunity", + "owner": "Administrator", + "prepared_report": 0, + "ref_doctype": "Opportunity", + "report_name": "Lost Opportunity", + "report_type": "Report Builder", "roles": [ { "role": "Sales User" - }, + }, { "role": "Sales Manager" } diff --git a/erpnext/crm/report/prospects_engaged_but_not_converted/prospects_engaged_but_not_converted.py b/erpnext/crm/report/prospects_engaged_but_not_converted/prospects_engaged_but_not_converted.py index 36a4ad64ca..b538a58189 100644 --- a/erpnext/crm/report/prospects_engaged_but_not_converted/prospects_engaged_but_not_converted.py +++ b/erpnext/crm/report/prospects_engaged_but_not_converted/prospects_engaged_but_not_converted.py @@ -35,14 +35,14 @@ def get_data(filters): for lead in frappe.get_all('Lead', fields = ['name', 'lead_name', 'company_name'], filters=lead_filters): data = frappe.db.sql(""" - select - `tabCommunication`.reference_doctype, `tabCommunication`.reference_name, + select + `tabCommunication`.reference_doctype, `tabCommunication`.reference_name, `tabCommunication`.content, `tabCommunication`.communication_date - from + from ( - (select name, lead from `tabOpportunity` where lead = %(lead)s) - union - (select name, lead from `tabQuotation` where lead = %(lead)s) + (select name, party_name as lead from `tabOpportunity` where opportunity_from='Lead' and party_name = %(lead)s) + union + (select name, party_name as lead from `tabQuotation` where quotation_to = 'Lead' and party_name = %(lead)s) union (select name, lead from `tabIssue` where lead = %(lead)s and status!='Closed') union diff --git a/erpnext/demo/user/sales.py b/erpnext/demo/user/sales.py index d4b55e8e2c..457e9763dc 100644 --- a/erpnext/demo/user/sales.py +++ b/erpnext/demo/user/sales.py @@ -65,7 +65,7 @@ def work(domain="Manufacturing"): def make_opportunity(domain): b = frappe.get_doc({ "doctype": "Opportunity", - "enquiry_from": "Customer", + "opportunity_from": "Customer", "customer": get_random("Customer"), "opportunity_type": "Sales", "with_items": 1, @@ -108,7 +108,7 @@ def make_quotation(domain): "creation": frappe.flags.current_date, "doctype": "Quotation", "quotation_to": "Customer", - "customer": customer, + "party_name": customer, "currency": party_account_currency or company_currency, "conversion_rate": exchange_rate, "order_type": "Sales", diff --git a/erpnext/education/doctype/question/question.py b/erpnext/education/doctype/question/question.py index b8221081fa..9a973c7615 100644 --- a/erpnext/education/doctype/question/question.py +++ b/erpnext/education/doctype/question/question.py @@ -38,7 +38,7 @@ class Question(Document): options = self.options answers = [item.name for item in options if item.is_correct == True] if len(answers) == 0: - frappe.throw("No correct answer is set for {0}".format(self.name)) + frappe.throw(_("No correct answer is set for {0}".format(self.name))) return None elif len(answers) == 1: return answers[0] diff --git a/erpnext/education/doctype/quiz/quiz.py b/erpnext/education/doctype/quiz/quiz.py index 8e54745464..ae1cb6ce42 100644 --- a/erpnext/education/doctype/quiz/quiz.py +++ b/erpnext/education/doctype/quiz/quiz.py @@ -4,12 +4,13 @@ from __future__ import unicode_literals import frappe +from frappe import _ from frappe.model.document import Document class Quiz(Document): def validate(self): if self.passing_score > 100: - frappe.throw("Passing Score value should be between 0 and 100") + frappe.throw(_("Passing Score value should be between 0 and 100")) def allowed_attempt(self, enrollment, quiz_name): if self.max_attempts == 0: @@ -17,7 +18,7 @@ class Quiz(Document): try: if len(frappe.get_all("Quiz Activity", {'enrollment': enrollment.name, 'quiz': quiz_name})) >= self.max_attempts: - frappe.msgprint("Maximum attempts for this quiz reached!") + frappe.msgprint(_("Maximum attempts for this quiz reached!")) return False else: return True @@ -56,5 +57,5 @@ def compare_list_elementwise(*args): else: return False except TypeError: - frappe.throw("Compare List function takes on list arguments") + frappe.throw(_("Compare List function takes on list arguments")) diff --git a/erpnext/education/doctype/student_report_generation_tool/student_report_generation_tool.py b/erpnext/education/doctype/student_report_generation_tool/student_report_generation_tool.py index f9979752f7..16933dcfe0 100644 --- a/erpnext/education/doctype/student_report_generation_tool/student_report_generation_tool.py +++ b/erpnext/education/doctype/student_report_generation_tool/student_report_generation_tool.py @@ -4,6 +4,7 @@ from __future__ import unicode_literals import frappe, json +from frappe import _ from frappe.model.document import Document from erpnext.education.api import get_grade from frappe.utils.pdf import get_pdf @@ -79,7 +80,7 @@ def get_attendance_count(student, academic_year, academic_term=None): from_date, to_date = frappe.db.get_value("Academic Term", academic_term, ["term_start_date", "term_end_date"]) if from_date and to_date: attendance = dict(frappe.db.sql('''select status, count(student) as no_of_days - from `tabStudent Attendance` where student = %s + from `tabStudent Attendance` where student = %s and date between %s and %s group by status''', (student, from_date, to_date))) if "Absent" not in attendance.keys(): @@ -88,4 +89,4 @@ def get_attendance_count(student, academic_year, academic_term=None): attendance["Present"] = 0 return attendance else: - frappe.throw("Provide the academic year and set the starting and ending date.") \ No newline at end of file + frappe.throw(_("Provide the academic year and set the starting and ending date.")) \ No newline at end of file diff --git a/erpnext/education/utils.py b/erpnext/education/utils.py index 8cd5bbb95b..e0b278c2b1 100644 --- a/erpnext/education/utils.py +++ b/erpnext/education/utils.py @@ -148,7 +148,7 @@ def enroll_in_program(program_name, student=None): # Check if self enrollment in allowed program = frappe.get_doc('Program', program_name) if not program.allow_self_enroll: - return frappe.throw("You are not allowed to enroll for this course") + return frappe.throw(_("You are not allowed to enroll for this course")) student = get_current_student() if not student: @@ -162,7 +162,7 @@ def enroll_in_program(program_name, student=None): # Check if self enrollment in allowed program = frappe.get_doc('Program', program_name) if not program.allow_self_enroll: - return frappe.throw("You are not allowed to enroll for this course") + return frappe.throw(_("You are not allowed to enroll for this course")) # Enroll in program program_enrollment = student.enroll_in_program(program_name) @@ -185,7 +185,7 @@ def add_activity(course, content_type, content, program): student = get_current_student() if not student: - return frappe.throw("Student with email {0} does not exist".format(frappe.session.user), frappe.DoesNotExistError) + return frappe.throw(_("Student with email {0} does not exist".format(frappe.session.user)), frappe.DoesNotExistError) enrollment = get_or_create_course_enrollment(course, program) if content_type == 'Quiz': @@ -220,7 +220,7 @@ def get_quiz(quiz_name, course): quiz = frappe.get_doc("Quiz", quiz_name) questions = quiz.get_questions() except: - frappe.throw("Quiz {0} does not exist".format(quiz_name)) + frappe.throw(_("Quiz {0} does not exist".format(quiz_name))) return None questions = [{ @@ -347,7 +347,7 @@ def get_or_create_course_enrollment(course, program): if not course_enrollment: program_enrollment = get_enrollment('program', program, student.name) if not program_enrollment: - frappe.throw("You are not enrolled in program {0}".format(program)) + frappe.throw(_("You are not enrolled in program {0}".format(program))) return return student.enroll_in_course(course_name=course, program_enrollment=get_enrollment('program', program, student.name)) else: diff --git a/erpnext/erpnext_integrations/connectors/shopify_connection.py b/erpnext/erpnext_integrations/connectors/shopify_connection.py index 88078ab74f..1d6e8917f5 100644 --- a/erpnext/erpnext_integrations/connectors/shopify_connection.py +++ b/erpnext/erpnext_integrations/connectors/shopify_connection.py @@ -124,7 +124,7 @@ def create_sales_order(shopify_order, shopify_settings, company=None): else: so = frappe.get_doc("Sales Order", so) - + frappe.db.commit() return so @@ -252,6 +252,6 @@ def get_tax_account_head(tax): {"parent": "Shopify Settings", "shopify_tax": tax_title}, "tax_account") if not tax_account: - frappe.throw("Tax Account not specified for Shopify Tax {0}".format(tax.get("title"))) + frappe.throw(_("Tax Account not specified for Shopify Tax {0}".format(tax.get("title")))) return tax_account diff --git a/erpnext/erpnext_integrations/doctype/plaid_settings/__init__.py b/erpnext/erpnext_integrations/doctype/plaid_settings/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/erpnext/erpnext_integrations/doctype/plaid_settings/plaid_connector.py b/erpnext/erpnext_integrations/doctype/plaid_settings/plaid_connector.py new file mode 100644 index 0000000000..fbb0ebc2c8 --- /dev/null +++ b/erpnext/erpnext_integrations/doctype/plaid_settings/plaid_connector.py @@ -0,0 +1,81 @@ +# -*- coding: utf-8 -*- +# Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors +# For license information, please see license.txt + +from __future__ import unicode_literals +import frappe +from frappe import _ +import requests +from plaid import Client +from plaid.errors import APIError, ItemError + +class PlaidConnector(): + def __init__(self, access_token=None): + + if not(frappe.conf.get("plaid_client_id") and frappe.conf.get("plaid_secret") and frappe.conf.get("plaid_public_key")): + frappe.throw(_("Please complete your Plaid API configuration before synchronizing your account")) + + self.config = { + "plaid_client_id": frappe.conf.get("plaid_client_id"), + "plaid_secret": frappe.conf.get("plaid_secret"), + "plaid_public_key": frappe.conf.get("plaid_public_key"), + "plaid_env": frappe.conf.get("plaid_env") + } + + self.client = Client(client_id=self.config["plaid_client_id"], + secret=self.config["plaid_secret"], + public_key=self.config["plaid_public_key"], + environment=self.config["plaid_env"] + ) + + self.access_token = access_token + + def get_access_token(self, public_token): + if public_token is None: + frappe.log_error(_("Public token is missing for this bank"), _("Plaid public token error")) + + response = self.client.Item.public_token.exchange(public_token) + access_token = response['access_token'] + + return access_token + + def auth(self): + try: + self.client.Auth.get(self.access_token) + print("Authentication successful.....") + except ItemError as e: + if e.code == 'ITEM_LOGIN_REQUIRED': + pass + else: + pass + except APIError as e: + if e.code == 'PLANNED_MAINTENANCE': + pass + else: + pass + except requests.Timeout: + pass + except Exception as e: + print(e) + frappe.log_error(frappe.get_traceback(), _("Plaid authentication error")) + frappe.msgprint({"title": _("Authentication Failed"), "message":e, "raise_exception":1, "indicator":'red'}) + + def get_transactions(self, start_date, end_date, account_id=None): + try: + self.auth() + if account_id: + account_ids = [account_id] + + response = self.client.Transactions.get(self.access_token, start_date=start_date, end_date=end_date, account_ids=account_ids) + + else: + response = self.client.Transactions.get(self.access_token, start_date=start_date, end_date=end_date) + + transactions = response['transactions'] + + while len(transactions) < response['total_transactions']: + response = self.client.Transactions.get(self.access_token, start_date=start_date, end_date=end_date, offset=len(transactions)) + transactions.extend(response['transactions']) + return transactions + except Exception: + frappe.log_error(frappe.get_traceback(), _("Plaid transactions sync error")) \ No newline at end of file diff --git a/erpnext/erpnext_integrations/doctype/plaid_settings/plaid_settings.js b/erpnext/erpnext_integrations/doctype/plaid_settings/plaid_settings.js new file mode 100644 index 0000000000..ace4fbf9e3 --- /dev/null +++ b/erpnext/erpnext_integrations/doctype/plaid_settings/plaid_settings.js @@ -0,0 +1,107 @@ +// Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors +// For license information, please see license.txt + +frappe.provide("erpnext.integrations"); + +frappe.ui.form.on('Plaid Settings', { + link_new_account: function(frm) { + new erpnext.integrations.plaidLink(frm); + } +}); + +erpnext.integrations.plaidLink = class plaidLink { + constructor(parent) { + this.frm = parent; + this.product = ["transactions", "auth"]; + this.plaidUrl = 'https://cdn.plaid.com/link/v2/stable/link-initialize.js'; + this.init_config(); + } + + init_config() { + const me = this; + frappe.xcall('erpnext.erpnext_integrations.doctype.plaid_settings.plaid_settings.plaid_configuration') + .then(result => { + if (result !== "disabled") { + if (result.plaid_env == undefined || result.plaid_public_key == undefined) { + frappe.throw(__("Please add valid Plaid api keys in site_config.json first")); + } + me.plaid_env = result.plaid_env; + me.plaid_public_key = result.plaid_public_key; + me.client_name = result.client_name; + me.init_plaid(); + } else { + frappe.throw(__("Please save your document before adding a new account")); + } + }); + } + + init_plaid() { + const me = this; + me.loadScript(me.plaidUrl) + .then(() => { + me.onScriptLoaded(me); + }) + .then(() => { + if (me.linkHandler) { + me.linkHandler.open(); + } + }) + .catch((error) => { + me.onScriptError(error); + }); + } + + loadScript(src) { + return new Promise(function (resolve, reject) { + if (document.querySelector('script[src="' + src + '"]')) { + resolve(); + return; + } + const el = document.createElement('script'); + el.type = 'text/javascript'; + el.async = true; + el.src = src; + el.addEventListener('load', resolve); + el.addEventListener('error', reject); + el.addEventListener('abort', reject); + document.head.appendChild(el); + }); + } + + onScriptLoaded(me) { + me.linkHandler = window.Plaid.create({ + clientName: me.client_name, + env: me.plaid_env, + key: me.plaid_public_key, + onSuccess: me.plaid_success, + product: me.product + }); + } + + onScriptError(error) { + frappe.msgprint('There was an issue loading the link-initialize.js script'); + frappe.msgprint(error); + } + + plaid_success(token, response) { + const me = this; + + frappe.prompt({ + fieldtype:"Link", + options: "Company", + label:__("Company"), + fieldname:"company", + reqd:1 + }, (data) => { + me.company = data.company; + frappe.xcall('erpnext.erpnext_integrations.doctype.plaid_settings.plaid_settings.add_institution', {token: token, response: response}) + .then((result) => { + frappe.xcall('erpnext.erpnext_integrations.doctype.plaid_settings.plaid_settings.add_bank_accounts', {response: response, + bank: result, company: me.company}); + }) + .then(() => { + frappe.show_alert({message:__("Bank accounts added"), indicator:'green'}); + }); + }, __("Select a company"), __("Continue")); + } +}; \ No newline at end of file diff --git a/erpnext/erpnext_integrations/doctype/plaid_settings/plaid_settings.json b/erpnext/erpnext_integrations/doctype/plaid_settings/plaid_settings.json new file mode 100644 index 0000000000..ed51c4e8f8 --- /dev/null +++ b/erpnext/erpnext_integrations/doctype/plaid_settings/plaid_settings.json @@ -0,0 +1,161 @@ +{ + "allow_copy": 0, + "allow_events_in_timeline": 0, + "allow_guest_to_view": 0, + "allow_import": 0, + "allow_rename": 0, + "beta": 0, + "creation": "2018-10-25 10:02:48.656165", + "custom": 0, + "docstatus": 0, + "doctype": "DocType", + "document_type": "", + "editable_grid": 1, + "engine": "InnoDB", + "fields": [ + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "enabled", + "fieldtype": "Check", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Enabled", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "eval:doc.enabled==1", + "fieldname": "automatic_sync", + "fieldtype": "Check", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Synchronize all accounts every hour", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "eval:(doc.enabled==1)&&(!doc.__islocal)", + "fieldname": "link_new_account", + "fieldtype": "Button", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Link a new bank account", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + } + ], + "has_web_view": 0, + "hide_heading": 0, + "hide_toolbar": 0, + "idx": 0, + "image_view": 0, + "in_create": 0, + "is_submittable": 0, + "issingle": 1, + "istable": 0, + "max_attachments": 0, + "modified": "2018-12-14 12:51:12.331395", + "modified_by": "Administrator", + "module": "ERPNext Integrations", + "name": "Plaid Settings", + "name_case": "", + "owner": "Administrator", + "permissions": [ + { + "amend": 0, + "cancel": 0, + "create": 1, + "delete": 1, + "email": 1, + "export": 0, + "if_owner": 0, + "import": 0, + "permlevel": 0, + "print": 1, + "read": 1, + "report": 0, + "role": "System Manager", + "set_user_permissions": 0, + "share": 1, + "submit": 0, + "write": 1 + } + ], + "quick_entry": 0, + "read_only": 0, + "read_only_onload": 0, + "show_name_in_global_search": 0, + "sort_field": "modified", + "sort_order": "DESC", + "track_changes": 0, + "track_seen": 0, + "track_views": 0 +} \ No newline at end of file diff --git a/erpnext/erpnext_integrations/doctype/plaid_settings/plaid_settings.py b/erpnext/erpnext_integrations/doctype/plaid_settings/plaid_settings.py new file mode 100644 index 0000000000..8d31e24cd6 --- /dev/null +++ b/erpnext/erpnext_integrations/doctype/plaid_settings/plaid_settings.py @@ -0,0 +1,198 @@ +# -*- coding: utf-8 -*- +# Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors +# For license information, please see license.txt + +from __future__ import unicode_literals +import frappe +import json +from frappe import _ +from frappe.model.document import Document +from erpnext.accounts.doctype.journal_entry.journal_entry import get_default_bank_cash_account +from erpnext.erpnext_integrations.doctype.plaid_settings.plaid_connector import PlaidConnector +from frappe.utils import getdate, formatdate, today, add_months + +class PlaidSettings(Document): + pass + +@frappe.whitelist() +def plaid_configuration(): + if frappe.db.get_value("Plaid Settings", None, "enabled") == "1": + return {"plaid_public_key": frappe.conf.get("plaid_public_key") or None, "plaid_env": frappe.conf.get("plaid_env") or None, "client_name": frappe.local.site } + else: + return "disabled" + +@frappe.whitelist() +def add_institution(token, response): + response = json.loads(response) + + plaid = PlaidConnector() + access_token = plaid.get_access_token(token) + + if not frappe.db.exists("Bank", response["institution"]["name"]): + try: + bank = frappe.get_doc({ + "doctype": "Bank", + "bank_name": response["institution"]["name"], + "plaid_access_token": access_token + }) + bank.insert() + except Exception: + frappe.throw(frappe.get_traceback()) + + else: + bank = frappe.get_doc("Bank", response["institution"]["name"]) + bank.plaid_access_token = access_token + bank.save() + + return bank + +@frappe.whitelist() +def add_bank_accounts(response, bank, company): + response = json.loads(response) if not "accounts" in response else response + bank = json.loads(bank) + result = [] + + default_gl_account = get_default_bank_cash_account(company, "Bank") + if not default_gl_account: + frappe.throw(_("Please setup a default bank account for company {0}".format(company))) + + for account in response["accounts"]: + acc_type = frappe.db.get_value("Account Type", account["type"]) + if not acc_type: + add_account_type(account["type"]) + + acc_subtype = frappe.db.get_value("Account Subtype", account["subtype"]) + if not acc_subtype: + add_account_subtype(account["subtype"]) + + if not frappe.db.exists("Bank Account", dict(integration_id=account["id"])): + try: + new_account = frappe.get_doc({ + "doctype": "Bank Account", + "bank": bank["bank_name"], + "account": default_gl_account.account, + "account_name": account["name"], + "account_type": account["type"] or "", + "account_subtype": account["subtype"] or "", + "mask": account["mask"] or "", + "integration_id": account["id"], + "is_company_account": 1, + "company": company + }) + new_account.insert() + + result.append(new_account.name) + + except frappe.UniqueValidationError: + frappe.msgprint(_("Bank account {0} already exists and could not be created again").format(new_account.account_name)) + except Exception: + frappe.throw(frappe.get_traceback()) + + else: + result.append(frappe.db.get_value("Bank Account", dict(integration_id=account["id"]), "name")) + + return result + +def add_account_type(account_type): + try: + frappe.get_doc({ + "doctype": "Account Type", + "account_type": account_type + }).insert() + except Exception: + frappe.throw(frappe.get_traceback()) + + +def add_account_subtype(account_subtype): + try: + frappe.get_doc({ + "doctype": "Account Subtype", + "account_subtype": account_subtype + }).insert() + except Exception: + frappe.throw(frappe.get_traceback()) + +@frappe.whitelist() +def sync_transactions(bank, bank_account): + + last_sync_date = frappe.db.get_value("Bank Account", bank_account, "last_integration_date") + if last_sync_date: + start_date = formatdate(last_sync_date, "YYYY-MM-dd") + else: + start_date = formatdate(add_months(today(), -12), "YYYY-MM-dd") + end_date = formatdate(today(), "YYYY-MM-dd") + + try: + transactions = get_transactions(bank=bank, bank_account=bank_account, start_date=start_date, end_date=end_date) + result = [] + if transactions: + for transaction in transactions: + result.append(new_bank_transaction(transaction)) + + frappe.db.set_value("Bank Account", bank_account, "last_integration_date", getdate(end_date)) + + return result + except Exception: + frappe.log_error(frappe.get_traceback(), _("Plaid transactions sync error")) + +def get_transactions(bank, bank_account=None, start_date=None, end_date=None): + access_token = None + + if bank_account: + related_bank = frappe.db.get_values("Bank Account", bank_account, ["bank", "integration_id"], as_dict=True) + access_token = frappe.db.get_value("Bank", related_bank[0].bank, "plaid_access_token") + account_id = related_bank[0].integration_id + + else: + access_token = frappe.db.get_value("Bank", bank, "plaid_access_token") + account_id = None + + plaid = PlaidConnector(access_token) + transactions = plaid.get_transactions(start_date=start_date, end_date=end_date, account_id=account_id) + + return transactions + +def new_bank_transaction(transaction): + result = [] + + bank_account = frappe.db.get_value("Bank Account", dict(integration_id=transaction["account_id"])) + + if float(transaction["amount"]) >= 0: + debit = float(transaction["amount"]) + credit = 0 + else: + debit = 0 + credit = abs(float(transaction["amount"])) + + status = "Pending" if transaction["pending"] == "True" else "Settled" + + if not frappe.db.exists("Bank Transaction", dict(transaction_id=transaction["transaction_id"])): + try: + new_transaction = frappe.get_doc({ + "doctype": "Bank Transaction", + "date": getdate(transaction["date"]), + "status": status, + "bank_account": bank_account, + "debit": debit, + "credit": credit, + "currency": transaction["iso_currency_code"], + "description": transaction["name"] + }) + new_transaction.insert() + new_transaction.submit() + + result.append(new_transaction.name) + + except Exception: + frappe.throw(frappe.get_traceback()) + + return result + +def automatic_synchronization(): + settings = frappe.get_doc("Plaid Settings", "Plaid Settings") + + if settings.enabled == 1 and settings.automatic_sync == 1: + plaid_accounts = frappe.get_all("Bank Account", filter={"integration_id": ["!=", ""]}, fields=["name", "bank"]) + + for plaid_account in plaid_accounts: + frappe.enqueue("erpnext.erpnext_integrations.doctype.plaid_settings.plaid_settings.sync_transactions", bank=plaid_account.bank, bank_account=plaid_account.name) diff --git a/erpnext/erpnext_integrations/doctype/plaid_settings/test_plaid_settings.js b/erpnext/erpnext_integrations/doctype/plaid_settings/test_plaid_settings.js new file mode 100644 index 0000000000..dc91347336 --- /dev/null +++ b/erpnext/erpnext_integrations/doctype/plaid_settings/test_plaid_settings.js @@ -0,0 +1,23 @@ +/* eslint-disable */ +// rename this file from _test_[name] to test_[name] to activate +// and remove above this line + +QUnit.test("test: Plaid Settings", function (assert) { + let done = assert.async(); + + // number of asserts + assert.expect(1); + + frappe.run_serially([ + // insert a new Plaid Settings + () => frappe.tests.make('Plaid Settings', [ + // values to be set + {key: 'value'} + ]), + () => { + assert.equal(cur_frm.doc.key, 'value'); + }, + () => done() + ]); + +}); diff --git a/erpnext/erpnext_integrations/doctype/plaid_settings/test_plaid_settings.py b/erpnext/erpnext_integrations/doctype/plaid_settings/test_plaid_settings.py new file mode 100644 index 0000000000..29e8fa4fec --- /dev/null +++ b/erpnext/erpnext_integrations/doctype/plaid_settings/test_plaid_settings.py @@ -0,0 +1,155 @@ +# -*- coding: utf-8 -*- +# Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors +# See license.txt +from __future__ import unicode_literals + +import unittest +import frappe +from erpnext.erpnext_integrations.doctype.plaid_settings.plaid_settings import plaid_configuration, add_account_type, add_account_subtype, new_bank_transaction, add_bank_accounts +import json +from frappe.utils.response import json_handler +from erpnext.accounts.doctype.journal_entry.journal_entry import get_default_bank_cash_account + +class TestPlaidSettings(unittest.TestCase): + def setUp(self): + pass + + def tearDown(self): + for bt in frappe.get_all("Bank Transaction"): + doc = frappe.get_doc("Bank Transaction", bt.name) + doc.cancel() + doc.delete() + + for ba in frappe.get_all("Bank Account"): + frappe.get_doc("Bank Account", ba.name).delete() + + for at in frappe.get_all("Account Type"): + frappe.get_doc("Account Type", at.name).delete() + + for ast in frappe.get_all("Account Subtype"): + frappe.get_doc("Account Subtype", ast.name).delete() + + def test_plaid_disabled(self): + frappe.db.set_value("Plaid Settings", None, "enabled", 0) + self.assertTrue(plaid_configuration() == "disabled") + + def test_add_account_type(self): + add_account_type("brokerage") + self.assertEqual(frappe.get_doc("Account Type", "brokerage").name, "brokerage") + + def test_add_account_subtype(self): + add_account_subtype("loan") + self.assertEqual(frappe.get_doc("Account Subtype", "loan").name, "loan") + + def test_default_bank_account(self): + if not frappe.db.exists("Bank", "Citi"): + frappe.get_doc({ + "doctype": "Bank", + "bank_name": "Citi" + }).insert() + + bank_accounts = { + 'account': { + 'subtype': 'checking', + 'mask': '0000', + 'type': 'depository', + 'id': '6GbM6RRQgdfy3lAqGz4JUnpmR948WZFg8DjQK', + 'name': 'Plaid Checking' + }, + 'account_id': '6GbM6RRQgdfy3lAqGz4JUnpmR948WZFg8DjQK', + 'link_session_id': 'db673d75-61aa-442a-864f-9b3f174f3725', + 'accounts': [{ + 'type': 'depository', + 'subtype': 'checking', + 'mask': '0000', + 'id': '6GbM6RRQgdfy3lAqGz4JUnpmR948WZFg8DjQK', + 'name': 'Plaid Checking' + }], + 'institution': { + 'institution_id': 'ins_6', + 'name': 'Citi' + } + } + + bank = json.dumps(frappe.get_doc("Bank", "Citi").as_dict(), default=json_handler) + company = frappe.db.get_single_value('Global Defaults', 'default_company') + frappe.db.set_value("Company", company, "default_bank_account", None) + + self.assertRaises(frappe.ValidationError, add_bank_accounts, response=bank_accounts, bank=bank, company=company) + + def test_new_transaction(self): + if not frappe.db.exists("Bank", "Citi"): + frappe.get_doc({ + "doctype": "Bank", + "bank_name": "Citi" + }).insert() + + bank_accounts = { + 'account': { + 'subtype': 'checking', + 'mask': '0000', + 'type': 'depository', + 'id': '6GbM6RRQgdfy3lAqGz4JUnpmR948WZFg8DjQK', + 'name': 'Plaid Checking' + }, + 'account_id': '6GbM6RRQgdfy3lAqGz4JUnpmR948WZFg8DjQK', + 'link_session_id': 'db673d75-61aa-442a-864f-9b3f174f3725', + 'accounts': [{ + 'type': 'depository', + 'subtype': 'checking', + 'mask': '0000', + 'id': '6GbM6RRQgdfy3lAqGz4JUnpmR948WZFg8DjQK', + 'name': 'Plaid Checking' + }], + 'institution': { + 'institution_id': 'ins_6', + 'name': 'Citi' + } + } + + bank = json.dumps(frappe.get_doc("Bank", "Citi").as_dict(), default=json_handler) + company = frappe.db.get_single_value('Global Defaults', 'default_company') + + if frappe.db.get_value("Company", company, "default_bank_account") is None: + frappe.db.set_value("Company", company, "default_bank_account", get_default_bank_cash_account(company, "Cash").get("account")) + + add_bank_accounts(bank_accounts, bank, company) + + transactions = { + 'account_owner': None, + 'category': ['Food and Drink', 'Restaurants'], + 'account_id': 'b4Jkp1LJDZiPgojpr1ansXJrj5Q6w9fVmv6ov', + 'pending_transaction_id': None, + 'transaction_id': 'x374xPa7DvUewqlR5mjNIeGK8r8rl3Sn647LM', + 'unofficial_currency_code': None, + 'name': 'INTRST PYMNT', + 'transaction_type': 'place', + 'amount': -4.22, + 'location': { + 'city': None, + 'zip': None, + 'store_number': None, + 'lon': None, + 'state': None, + 'address': None, + 'lat': None + }, + 'payment_meta': { + 'reference_number': None, + 'payer': None, + 'payment_method': None, + 'reason': None, + 'payee': None, + 'ppd_id': None, + 'payment_processor': None, + 'by_order_of': None + }, + 'date': '2017-12-22', + 'category_id': '13005000', + 'pending': False, + 'iso_currency_code': 'USD' + } + + new_bank_transaction(transactions) + + self.assertTrue(len(frappe.get_all("Bank Transaction")) == 1) \ No newline at end of file diff --git a/erpnext/healthcare/doctype/clinical_procedure_template/clinical_procedure_template.py b/erpnext/healthcare/doctype/clinical_procedure_template/clinical_procedure_template.py index 90bf95770f..141329b3db 100644 --- a/erpnext/healthcare/doctype/clinical_procedure_template/clinical_procedure_template.py +++ b/erpnext/healthcare/doctype/clinical_procedure_template/clinical_procedure_template.py @@ -30,7 +30,7 @@ class ClinicalProcedureTemplate(Document): try: frappe.delete_doc("Item",self.item) except Exception: - frappe.throw("""Not permitted. Please disable the Procedure Template""") + frappe.throw(_("""Not permitted. Please disable the Procedure Template""")) def get_item_details(self, args=None): item = frappe.db.sql("""select stock_uom, item_name diff --git a/erpnext/healthcare/doctype/patient/patient.js b/erpnext/healthcare/doctype/patient/patient.js index de5bce0aa6..169281430c 100644 --- a/erpnext/healthcare/doctype/patient/patient.js +++ b/erpnext/healthcare/doctype/patient/patient.js @@ -123,13 +123,13 @@ var btn_invoice_registration = function (frm) { frappe.ui.form.on('Patient Relation', { patient_relation_add: function(frm){ - frm.fields_dict['patient_relation'].grid.get_field('patient').get_query = function(frm){ + frm.fields_dict['patient_relation'].grid.get_field('patient').get_query = function(doc){ var patient_list = []; - if(!frm.doc.__islocal) patient_list.push(frm.doc.name); - $.each(frm.doc.patient_relation, function(idx, val){ + if(!doc.__islocal) patient_list.push(doc.name); + $.each(doc.patient_relation, function(idx, val){ if (val.patient) patient_list.push(val.patient); }); return { filters: [['Patient', 'name', 'not in', patient_list]] }; }; } -}); \ No newline at end of file +}); diff --git a/erpnext/healthcare/doctype/patient_appointment/patient_appointment.js b/erpnext/healthcare/doctype/patient_appointment/patient_appointment.js index 2f328de1bc..b3cbd1f753 100644 --- a/erpnext/healthcare/doctype/patient_appointment/patient_appointment.js +++ b/erpnext/healthcare/doctype/patient_appointment/patient_appointment.js @@ -298,7 +298,7 @@ var get_procedure_prescribed = function(frm){ }); } else{ - frappe.msgprint("Please select Patient to get prescribed procedure"); + frappe.msgprint(__("Please select Patient to get prescribed procedure")); } }; diff --git a/erpnext/healthcare/doctype/patient_encounter/patient_encounter.js b/erpnext/healthcare/doctype/patient_encounter/patient_encounter.js index c7df5b7cd9..7ea45688fd 100644 --- a/erpnext/healthcare/doctype/patient_encounter/patient_encounter.js +++ b/erpnext/healthcare/doctype/patient_encounter/patient_encounter.js @@ -160,7 +160,7 @@ var btn_create_vital_signs = function (frm) { var btn_create_procedure = function (frm) { if(!frm.doc.patient){ - frappe.throw("Please select patient"); + frappe.throw(__("Please select patient")); } frappe.route_options = { "patient": frm.doc.patient, diff --git a/erpnext/healthcare/utils.py b/erpnext/healthcare/utils.py index 0987eb5403..6a226d9c6b 100644 --- a/erpnext/healthcare/utils.py +++ b/erpnext/healthcare/utils.py @@ -82,7 +82,7 @@ def get_healthcare_services_to_invoice(patient): 'service': service_item, 'rate': practitioner_charge, 'income_account': income_account}) - lab_tests = frappe.get_list("Lab Test", {'patient': patient.name, 'invoiced': False}) + lab_tests = frappe.get_list("Lab Test", {'patient': patient.name, 'invoiced': False, 'docstatus': 1}) if lab_tests: for lab_test in lab_tests: lab_test_obj = frappe.get_doc("Lab Test", lab_test['name']) diff --git a/erpnext/hooks.py b/erpnext/hooks.py index 756f6ba8ca..d814700a45 100644 --- a/erpnext/hooks.py +++ b/erpnext/hooks.py @@ -245,6 +245,7 @@ scheduler_events = { "erpnext.accounts.doctype.subscription.subscription.process_all", "erpnext.erpnext_integrations.doctype.amazon_mws_settings.amazon_mws_settings.schedule_get_order_details", "erpnext.accounts.doctype.gl_entry.gl_entry.rename_gle_sle_docs", + "erpnext.erpnext_integrations.doctype.plaid_settings.plaid_settings.automatic_synchronization", "erpnext.projects.doctype.project.project.hourly_reminder", "erpnext.projects.doctype.project.project.collect_project_status", "erpnext.hr.doctype.shift_type.shift_type.process_auto_attendance_for_all_shifts", diff --git a/erpnext/hr/doctype/employee/employee.py b/erpnext/hr/doctype/employee/employee.py index 63ba57385a..af87f85743 100755 --- a/erpnext/hr/doctype/employee/employee.py +++ b/erpnext/hr/doctype/employee/employee.py @@ -78,7 +78,15 @@ class Employee(NestedSet): def update_user_permissions(self): if not self.create_user_permission: return - if not has_permission('User Permission', ptype='write'): return + if not has_permission('User Permission', ptype='write', raise_exception=False): return + + employee_user_permission_exists = frappe.db.exists('User Permission', { + 'allow': 'Employee', + 'for_value': self.name, + 'user': self.user_id + }) + + if employee_user_permission_exists: return employee_user_permission_exists = frappe.db.exists('User Permission', { 'allow': 'Employee', @@ -237,7 +245,7 @@ def validate_employee_role(doc, method): def update_user_permissions(doc, method): # called via User hook if "Employee" in [d.role for d in doc.get("roles")]: - if not has_permission('User Permission', ptype='write'): return + if not has_permission('User Permission', ptype='write', raise_exception=False): return employee = frappe.get_doc("Employee", {"user_id": doc.name}) employee.update_user_permissions() diff --git a/erpnext/hr/doctype/employee_benefit_claim/employee_benefit_claim.py b/erpnext/hr/doctype/employee_benefit_claim/employee_benefit_claim.py index 3a80b30365..abb82f2cdd 100644 --- a/erpnext/hr/doctype/employee_benefit_claim/employee_benefit_claim.py +++ b/erpnext/hr/doctype/employee_benefit_claim/employee_benefit_claim.py @@ -84,7 +84,7 @@ def get_benefit_pro_rata_ratio_amount(employee, on_date, sal_struct): pay_against_benefit_claim, max_benefit_amount = frappe.db.get_value("Salary Component", sal_struct_row.salary_component, ["pay_against_benefit_claim", "max_benefit_amount"]) except TypeError: # show the error in tests? - frappe.throw("Unable to find Salary Component {0}".format(sal_struct_row.salary_component)) + frappe.throw(_("Unable to find Salary Component {0}".format(sal_struct_row.salary_component))) if sal_struct_row.is_flexible_benefit == 1 and pay_against_benefit_claim != 1: total_pro_rata_max += max_benefit_amount if total_pro_rata_max > 0: diff --git a/erpnext/hr/doctype/employee_onboarding/test_employee_onboarding.py b/erpnext/hr/doctype/employee_onboarding/test_employee_onboarding.py index b7085fa268..5e7f276ccc 100644 --- a/erpnext/hr/doctype/employee_onboarding/test_employee_onboarding.py +++ b/erpnext/hr/doctype/employee_onboarding/test_employee_onboarding.py @@ -39,6 +39,7 @@ class TestEmployeeOnboarding(unittest.TestCase): # complete the task project = frappe.get_doc('Project', onboarding.project) + project.load_tasks() project.tasks[0].status = 'Completed' project.save() diff --git a/erpnext/hr/doctype/employee_separation/test_employee_separation.py b/erpnext/hr/doctype/employee_separation/test_employee_separation.py index 4c3e566713..2fa114d345 100644 --- a/erpnext/hr/doctype/employee_separation/test_employee_separation.py +++ b/erpnext/hr/doctype/employee_separation/test_employee_separation.py @@ -10,9 +10,9 @@ test_dependencies = ["Employee Onboarding"] class TestEmployeeSeparation(unittest.TestCase): def test_employee_separation(self): - employee = get_employee() + employee = frappe.db.get_value("Employee", {"status": "Active"}) separation = frappe.new_doc('Employee Separation') - separation.employee = employee.name + separation.employee = employee separation.company = '_Test Company' separation.append('activities', { 'activity_name': 'Deactivate Employee', @@ -23,7 +23,4 @@ class TestEmployeeSeparation(unittest.TestCase): separation.submit() self.assertEqual(separation.docstatus, 1) separation.cancel() - self.assertEqual(separation.project, "") - -def get_employee(): - return frappe.get_doc('Employee', {'employee_name': 'Test Researcher'}) \ No newline at end of file + self.assertEqual(separation.project, "") \ No newline at end of file diff --git a/erpnext/hr/doctype/expense_claim/expense_claim.json b/erpnext/hr/doctype/expense_claim/expense_claim.json index f0bc268e5d..4e2778f48d 100644 --- a/erpnext/hr/doctype/expense_claim/expense_claim.json +++ b/erpnext/hr/doctype/expense_claim/expense_claim.json @@ -1,429 +1,435 @@ { - "allow_import": 1, - "autoname": "naming_series:", - "creation": "2013-01-10 16:34:14", - "doctype": "DocType", - "document_type": "Setup", - "engine": "InnoDB", - "field_order": [ - "naming_series", - "employee", - "employee_name", - "department", - "column_break_5", - "expense_approver", - "approval_status", - "is_paid", - "expense_details", - "expenses", - "sb1", - "taxes", - "transactions_section", - "total_sanctioned_amount", - "total_taxes_and_charges", - "total_advance_amount", - "column_break_17", - "grand_total", - "total_claimed_amount", - "total_amount_reimbursed", - "section_break_16", - "posting_date", - "vehicle_log", - "task", - "cb1", - "remark", - "title", - "email_id", - "accounting_details", - "company", - "mode_of_payment", - "column_break_24", - "payable_account", - "accounting_dimensions_section", - "project", - "dimension_col_break", - "cost_center", - "more_details", - "status", - "amended_from", - "advance_payments", - "advances" - ], - "fields": [ - { - "fieldname": "naming_series", - "fieldtype": "Select", - "label": "Series", - "no_copy": 1, - "options": "HR-EXP-.YYYY.-", - "print_hide": 1, - "reqd": 1, - "set_only_once": 1 - }, - { - "fieldname": "employee", - "fieldtype": "Link", - "in_global_search": 1, - "label": "From Employee", - "oldfieldname": "employee", - "oldfieldtype": "Link", - "options": "Employee", - "reqd": 1, - "search_index": 1 - }, - { - "fetch_from": "employee.employee_name", - "fieldname": "employee_name", - "fieldtype": "Data", - "in_global_search": 1, - "label": "Employee Name", - "oldfieldname": "employee_name", - "oldfieldtype": "Data", - "read_only": 1, - "width": "150px" - }, - { - "fetch_from": "employee.department", - "fieldname": "department", - "fieldtype": "Link", - "label": "Department", - "options": "Department", - "read_only": 1 - }, - { - "fieldname": "column_break_5", - "fieldtype": "Column Break" - }, - { - "fieldname": "expense_approver", - "fieldtype": "Link", - "label": "Expense Approver", - "options": "User" - }, - { - "default": "Draft", - "fieldname": "approval_status", - "fieldtype": "Select", - "label": "Approval Status", - "no_copy": 1, - "options": "Draft\nApproved\nRejected", - "search_index": 1 - }, - { - "fieldname": "total_claimed_amount", - "fieldtype": "Currency", - "in_list_view": 1, - "label": "Total Claimed Amount", - "no_copy": 1, - "oldfieldname": "total_claimed_amount", - "oldfieldtype": "Currency", - "options": "Company:company:default_currency", - "read_only": 1, - "width": "160px" - }, - { - "fieldname": "total_sanctioned_amount", - "fieldtype": "Currency", - "label": "Total Sanctioned Amount", - "no_copy": 1, - "oldfieldname": "total_sanctioned_amount", - "oldfieldtype": "Currency", - "options": "Company:company:default_currency", - "read_only": 1, - "width": "160px" - }, - { - "default": "0", - "depends_on": "eval:(doc.docstatus==0 || doc.is_paid)", - "fieldname": "is_paid", - "fieldtype": "Check", - "label": "Is Paid" - }, - { - "fieldname": "expense_details", - "fieldtype": "Section Break", - "oldfieldtype": "Section Break" - }, - { - "fieldname": "expenses", - "fieldtype": "Table", - "label": "Expenses", - "oldfieldname": "expense_voucher_details", - "oldfieldtype": "Table", - "options": "Expense Claim Detail", - "reqd": 1 - }, - { - "fieldname": "sb1", - "fieldtype": "Section Break", - "options": "Simple" - }, - { - "default": "Today", - "fieldname": "posting_date", - "fieldtype": "Date", - "label": "Posting Date", - "oldfieldname": "posting_date", - "oldfieldtype": "Date", - "reqd": 1 - }, - { - "fieldname": "vehicle_log", - "fieldtype": "Link", - "label": "Vehicle Log", - "options": "Vehicle Log", - "read_only": 1 - }, - { - "fieldname": "project", - "fieldtype": "Link", - "label": "Project", - "options": "Project" - }, - { - "fieldname": "task", - "fieldtype": "Link", - "label": "Task", - "options": "Task", - "remember_last_selected_value": 1 - }, - { - "fieldname": "cb1", - "fieldtype": "Column Break" - }, - { - "fieldname": "total_amount_reimbursed", - "fieldtype": "Currency", - "in_list_view": 1, - "label": "Total Amount Reimbursed", - "no_copy": 1, - "options": "Company:company:default_currency", - "read_only": 1 - }, - { - "fieldname": "remark", - "fieldtype": "Small Text", - "label": "Remark", - "no_copy": 1, - "oldfieldname": "remark", - "oldfieldtype": "Small Text" - }, - { - "allow_on_submit": 1, - "default": "{employee_name}", - "fieldname": "title", - "fieldtype": "Data", - "hidden": 1, - "label": "Title", - "no_copy": 1 - }, - { - "fieldname": "email_id", - "fieldtype": "Data", - "hidden": 1, - "label": "Employees Email Id", - "oldfieldname": "email_id", - "oldfieldtype": "Data", - "print_hide": 1 - }, - { - "fieldname": "accounting_details", - "fieldtype": "Section Break", - "label": "Accounting Details" - }, - { - "fieldname": "company", - "fieldtype": "Link", - "label": "Company", - "oldfieldname": "company", - "oldfieldtype": "Link", - "options": "Company", - "remember_last_selected_value": 1, - "reqd": 1 - }, - { - "depends_on": "is_paid", - "fieldname": "mode_of_payment", - "fieldtype": "Link", - "label": "Mode of Payment", - "options": "Mode of Payment" - }, - { - "fieldname": "column_break_24", - "fieldtype": "Column Break" - }, - { - "fieldname": "payable_account", - "fieldtype": "Link", - "label": "Payable Account", - "options": "Account" - }, - { - "fieldname": "cost_center", - "fieldtype": "Link", - "label": "Cost Center", - "options": "Cost Center" - }, - { - "collapsible": 1, - "fieldname": "more_details", - "fieldtype": "Section Break", - "label": "More Details" - }, - { - "default": "Draft", - "fieldname": "status", - "fieldtype": "Select", - "in_list_view": 1, - "label": "Status", - "no_copy": 1, - "options": "Draft\nPaid\nUnpaid\nRejected\nSubmitted\nCancelled", - "print_hide": 1, - "read_only": 1 - }, - { - "fieldname": "amended_from", - "fieldtype": "Link", - "ignore_user_permissions": 1, - "label": "Amended From", - "no_copy": 1, - "oldfieldname": "amended_from", - "oldfieldtype": "Data", - "options": "Expense Claim", - "print_hide": 1, - "read_only": 1, - "report_hide": 1, - "width": "160px" - }, - { - "fieldname": "advance_payments", - "fieldtype": "Section Break", - "label": "Advance Payments" - }, - { - "fieldname": "advances", - "fieldtype": "Table", - "label": "Advances", - "options": "Expense Claim Advance" - }, - { - "fieldname": "total_advance_amount", - "fieldtype": "Currency", - "label": "Total Advance Amount", - "options": "Company:company:default_currency", - "read_only": 1 - }, - { - "fieldname": "accounting_dimensions_section", - "fieldtype": "Section Break", - "label": "Accounting Dimensions" - }, - { - "fieldname": "dimension_col_break", - "fieldtype": "Column Break" - }, - { - "fieldname": "taxes", - "fieldtype": "Table", - "label": "Expense Taxes and Charges", - "options": "Expense Taxes and Charges" - }, - { - "fieldname": "section_break_16", - "fieldtype": "Section Break" - }, - { - "fieldname": "transactions_section", - "fieldtype": "Section Break" - }, - { - "fieldname": "grand_total", - "fieldtype": "Currency", - "in_list_view": 1, - "label": "Grand Total", - "options": "Company:company:default_currency", - "read_only": 1 - }, - { - "fieldname": "column_break_17", - "fieldtype": "Column Break" - }, - { - "fieldname": "total_taxes_and_charges", - "fieldtype": "Currency", - "label": "Total Taxes and Charges", - "options": "Company:company:default_currency", - "read_only": 1 - } - ], - "icon": "fa fa-money", - "idx": 1, - "is_submittable": 1, - "modified": "2019-06-13 18:05:52.530462", - "modified_by": "Administrator", - "module": "HR", - "name": "Expense Claim", - "name_case": "Title Case", - "owner": "harshada@webnotestech.com", - "permissions": [ - { - "amend": 1, - "cancel": 1, - "create": 1, - "delete": 1, - "email": 1, - "export": 1, - "print": 1, - "read": 1, - "report": 1, - "role": "HR Manager", - "share": 1, - "submit": 1, - "write": 1 - }, - { - "create": 1, - "email": 1, - "print": 1, - "read": 1, - "report": 1, - "role": "Employee", - "share": 1, - "write": 1 - }, - { - "amend": 1, - "cancel": 1, - "create": 1, - "delete": 1, - "email": 1, - "print": 1, - "read": 1, - "report": 1, - "role": "Expense Approver", - "share": 1, - "submit": 1, - "write": 1 - }, - { - "amend": 1, - "cancel": 1, - "create": 1, - "delete": 1, - "email": 1, - "print": 1, - "read": 1, - "report": 1, - "role": "HR User", - "share": 1, - "submit": 1, - "write": 1 - } - ], - "search_fields": "employee,employee_name", - "show_name_in_global_search": 1, - "sort_field": "modified", - "sort_order": "DESC", - "timeline_field": "employee", - "title_field": "title" -} \ No newline at end of file + "allow_import": 1, + "autoname": "naming_series:", + "creation": "2013-01-10 16:34:14", + "doctype": "DocType", + "document_type": "Setup", + "engine": "InnoDB", + "field_order": [ + "naming_series", + "employee", + "employee_name", + "department", + "column_break_5", + "expense_approver", + "approval_status", + "is_paid", + "expense_details", + "expenses", + "sb1", + "taxes", + "transactions_section", + "total_sanctioned_amount", + "total_taxes_and_charges", + "total_advance_amount", + "column_break_17", + "grand_total", + "total_claimed_amount", + "total_amount_reimbursed", + "section_break_16", + "posting_date", + "vehicle_log", + "task", + "cb1", + "remark", + "title", + "email_id", + "accounting_details", + "company", + "mode_of_payment", + "clearance_date", + "column_break_24", + "payable_account", + "accounting_dimensions_section", + "project", + "dimension_col_break", + "cost_center", + "more_details", + "status", + "amended_from", + "advance_payments", + "advances" + ], + "fields": [ + { + "fieldname": "naming_series", + "fieldtype": "Select", + "label": "Series", + "no_copy": 1, + "options": "HR-EXP-.YYYY.-", + "print_hide": 1, + "reqd": 1, + "set_only_once": 1 + }, + { + "fieldname": "employee", + "fieldtype": "Link", + "in_global_search": 1, + "label": "From Employee", + "oldfieldname": "employee", + "oldfieldtype": "Link", + "options": "Employee", + "reqd": 1, + "search_index": 1 + }, + { + "fetch_from": "employee.employee_name", + "fieldname": "employee_name", + "fieldtype": "Data", + "in_global_search": 1, + "label": "Employee Name", + "oldfieldname": "employee_name", + "oldfieldtype": "Data", + "read_only": 1, + "width": "150px" + }, + { + "fetch_from": "employee.department", + "fieldname": "department", + "fieldtype": "Link", + "label": "Department", + "options": "Department", + "read_only": 1 + }, + { + "fieldname": "column_break_5", + "fieldtype": "Column Break" + }, + { + "fieldname": "expense_approver", + "fieldtype": "Link", + "label": "Expense Approver", + "options": "User" + }, + { + "default": "Draft", + "fieldname": "approval_status", + "fieldtype": "Select", + "label": "Approval Status", + "no_copy": 1, + "options": "Draft\nApproved\nRejected", + "search_index": 1 + }, + { + "fieldname": "total_claimed_amount", + "fieldtype": "Currency", + "in_list_view": 1, + "label": "Total Claimed Amount", + "no_copy": 1, + "oldfieldname": "total_claimed_amount", + "oldfieldtype": "Currency", + "options": "Company:company:default_currency", + "read_only": 1, + "width": "160px" + }, + { + "fieldname": "total_sanctioned_amount", + "fieldtype": "Currency", + "label": "Total Sanctioned Amount", + "no_copy": 1, + "oldfieldname": "total_sanctioned_amount", + "oldfieldtype": "Currency", + "options": "Company:company:default_currency", + "read_only": 1, + "width": "160px" + }, + { + "default": "0", + "depends_on": "eval:(doc.docstatus==0 || doc.is_paid)", + "fieldname": "is_paid", + "fieldtype": "Check", + "label": "Is Paid" + }, + { + "fieldname": "expense_details", + "fieldtype": "Section Break", + "oldfieldtype": "Section Break" + }, + { + "fieldname": "expenses", + "fieldtype": "Table", + "label": "Expenses", + "oldfieldname": "expense_voucher_details", + "oldfieldtype": "Table", + "options": "Expense Claim Detail", + "reqd": 1 + }, + { + "fieldname": "sb1", + "fieldtype": "Section Break", + "options": "Simple" + }, + { + "default": "Today", + "fieldname": "posting_date", + "fieldtype": "Date", + "label": "Posting Date", + "oldfieldname": "posting_date", + "oldfieldtype": "Date", + "reqd": 1 + }, + { + "fieldname": "vehicle_log", + "fieldtype": "Link", + "label": "Vehicle Log", + "options": "Vehicle Log", + "read_only": 1 + }, + { + "fieldname": "project", + "fieldtype": "Link", + "label": "Project", + "options": "Project" + }, + { + "fieldname": "task", + "fieldtype": "Link", + "label": "Task", + "options": "Task", + "remember_last_selected_value": 1 + }, + { + "fieldname": "cb1", + "fieldtype": "Column Break" + }, + { + "fieldname": "total_amount_reimbursed", + "fieldtype": "Currency", + "in_list_view": 1, + "label": "Total Amount Reimbursed", + "no_copy": 1, + "options": "Company:company:default_currency", + "read_only": 1 + }, + { + "fieldname": "remark", + "fieldtype": "Small Text", + "label": "Remark", + "no_copy": 1, + "oldfieldname": "remark", + "oldfieldtype": "Small Text" + }, + { + "allow_on_submit": 1, + "default": "{employee_name}", + "fieldname": "title", + "fieldtype": "Data", + "hidden": 1, + "label": "Title", + "no_copy": 1 + }, + { + "fieldname": "email_id", + "fieldtype": "Data", + "hidden": 1, + "label": "Employees Email Id", + "oldfieldname": "email_id", + "oldfieldtype": "Data", + "print_hide": 1 + }, + { + "fieldname": "accounting_details", + "fieldtype": "Section Break", + "label": "Accounting Details" + }, + { + "fieldname": "company", + "fieldtype": "Link", + "label": "Company", + "oldfieldname": "company", + "oldfieldtype": "Link", + "options": "Company", + "remember_last_selected_value": 1, + "reqd": 1 + }, + { + "depends_on": "is_paid", + "fieldname": "mode_of_payment", + "fieldtype": "Link", + "label": "Mode of Payment", + "options": "Mode of Payment" + }, + { + "fieldname": "clearance_date", + "fieldtype": "Date", + "label": "Clearance Date" + }, + { + "fieldname": "column_break_24", + "fieldtype": "Column Break" + }, + { + "fieldname": "payable_account", + "fieldtype": "Link", + "label": "Payable Account", + "options": "Account" + }, + { + "fieldname": "cost_center", + "fieldtype": "Link", + "label": "Cost Center", + "options": "Cost Center" + }, + { + "collapsible": 1, + "fieldname": "more_details", + "fieldtype": "Section Break", + "label": "More Details" + }, + { + "default": "Draft", + "fieldname": "status", + "fieldtype": "Select", + "in_list_view": 1, + "label": "Status", + "no_copy": 1, + "options": "Draft\nPaid\nUnpaid\nRejected\nSubmitted\nCancelled", + "print_hide": 1, + "read_only": 1 + }, + { + "fieldname": "amended_from", + "fieldtype": "Link", + "ignore_user_permissions": 1, + "label": "Amended From", + "no_copy": 1, + "oldfieldname": "amended_from", + "oldfieldtype": "Data", + "options": "Expense Claim", + "print_hide": 1, + "read_only": 1, + "report_hide": 1, + "width": "160px" + }, + { + "fieldname": "advance_payments", + "fieldtype": "Section Break", + "label": "Advance Payments" + }, + { + "fieldname": "advances", + "fieldtype": "Table", + "label": "Advances", + "options": "Expense Claim Advance" + }, + { + "fieldname": "total_advance_amount", + "fieldtype": "Currency", + "label": "Total Advance Amount", + "options": "Company:company:default_currency", + "read_only": 1 + }, + { + "fieldname": "accounting_dimensions_section", + "fieldtype": "Section Break", + "label": "Accounting Dimensions" + }, + { + "fieldname": "dimension_col_break", + "fieldtype": "Column Break" + }, + { + "fieldname": "taxes", + "fieldtype": "Table", + "label": "Expense Taxes and Charges", + "options": "Expense Taxes and Charges" + }, + { + "fieldname": "section_break_16", + "fieldtype": "Section Break" + }, + { + "fieldname": "transactions_section", + "fieldtype": "Section Break" + }, + { + "fieldname": "grand_total", + "fieldtype": "Currency", + "in_list_view": 1, + "label": "Grand Total", + "options": "Company:company:default_currency", + "read_only": 1 + }, + { + "fieldname": "column_break_17", + "fieldtype": "Column Break" + }, + { + "fieldname": "total_taxes_and_charges", + "fieldtype": "Currency", + "label": "Total Taxes and Charges", + "options": "Company:company:default_currency", + "read_only": 1 + } + ], + "icon": "fa fa-money", + "idx": 1, + "is_submittable": 1, + "modified": "2019-06-26 18:05:52.530462", + "modified_by": "Administrator", + "module": "HR", + "name": "Expense Claim", + "name_case": "Title Case", + "owner": "harshada@webnotestech.com", + "permissions": [ + { + "amend": 1, + "cancel": 1, + "create": 1, + "delete": 1, + "email": 1, + "export": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "HR Manager", + "share": 1, + "submit": 1, + "write": 1 + }, + { + "create": 1, + "email": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "Employee", + "share": 1, + "write": 1 + }, + { + "amend": 1, + "cancel": 1, + "create": 1, + "delete": 1, + "email": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "Expense Approver", + "share": 1, + "submit": 1, + "write": 1 + }, + { + "amend": 1, + "cancel": 1, + "create": 1, + "delete": 1, + "email": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "HR User", + "share": 1, + "submit": 1, + "write": 1 + } + ], + "search_fields": "employee,employee_name", + "show_name_in_global_search": 1, + "sort_field": "modified", + "sort_order": "DESC", + "timeline_field": "employee", + "title_field": "title" + } \ No newline at end of file diff --git a/erpnext/hr/doctype/expense_claim/test_expense_claim.py b/erpnext/hr/doctype/expense_claim/test_expense_claim.py index a42209f6ad..92fdc09443 100644 --- a/erpnext/hr/doctype/expense_claim/test_expense_claim.py +++ b/erpnext/hr/doctype/expense_claim/test_expense_claim.py @@ -14,20 +14,24 @@ test_dependencies = ['Employee'] class TestExpenseClaim(unittest.TestCase): def test_total_expense_claim_for_project(self): frappe.db.sql("""delete from `tabTask` where project = "_Test Project 1" """) + frappe.db.sql("""delete from `tabProject Task` where parent = "_Test Project 1" """) frappe.db.sql("""delete from `tabProject` where name = "_Test Project 1" """) - + frappe.db.sql("delete from `tabExpense Claim` where project='_Test Project 1'") frappe.get_doc({ "project_name": "_Test Project 1", "doctype": "Project", - "tasks" : - [{ "title": "_Test Project Task 1", "status": "Open" }] + }).save() + + task = frappe.get_doc({ + "doctype": "Task", + "subject": "_Test Project Task 1", + "project": "_Test Project 1" }).save() task_name = frappe.db.get_value("Task", {"project": "_Test Project 1"}) payable_account = get_payable_account("Wind Power LLC") - - make_expense_claim(payable_account, 300, 200, "Wind Power LLC", "Travel Expenses - WP", "_Test Project 1", task_name) + make_expense_claim(payable_account, 300, 200, "Wind Power LLC","Travel Expenses - WP", "_Test Project 1", task_name) self.assertEqual(frappe.db.get_value("Task", task_name, "total_expense_claim"), 200) self.assertEqual(frappe.db.get_value("Project", "_Test Project 1", "total_expense_claim"), 200) @@ -119,9 +123,10 @@ def generate_taxes(): }]} def make_expense_claim(payable_account, amount, sanctioned_amount, company, account, project=None, task_name=None, do_not_submit=False, taxes=None): + employee = frappe.db.get_value("Employee", {"status": "Active"}) expense_claim = { "doctype": "Expense Claim", - "employee": "_T-Employee-00001", + "employee": employee, "payable_account": payable_account, "approval_status": "Approved", "company": company, diff --git a/erpnext/hr/doctype/hr_settings/hr_settings.js b/erpnext/hr/doctype/hr_settings/hr_settings.js index d8be46bee7..9e5effe6a3 100644 --- a/erpnext/hr/doctype/hr_settings/hr_settings.js +++ b/erpnext/hr/doctype/hr_settings/hr_settings.js @@ -15,7 +15,7 @@ frappe.ui.form.on('HR Settings', { let policy = frm.doc.password_policy; if (policy) { if (policy.includes(' ') || policy.includes('--')) { - frappe.msgprint("Password policy cannot contain spaces or simultaneous hyphens. The format will be restructured automatically"); + frappe.msgprint(_("Password policy cannot contain spaces or simultaneous hyphens. The format will be restructured automatically")); } frm.set_value('password_policy', policy.split(new RegExp(" |-", 'g')).filter((token) => token).join('-')); } diff --git a/erpnext/hr/doctype/leave_application/leave_application.py b/erpnext/hr/doctype/leave_application/leave_application.py index 113dcad8ae..1ef8ee00ae 100755 --- a/erpnext/hr/doctype/leave_application/leave_application.py +++ b/erpnext/hr/doctype/leave_application/leave_application.py @@ -135,6 +135,7 @@ class LeaveApplication(Document): # make new attendance and submit it doc = frappe.new_doc("Attendance") doc.employee = self.employee + doc.employee_name = self.employee_name doc.attendance_date = date doc.company = self.company doc.leave_type = self.leave_type diff --git a/erpnext/hr/doctype/payroll_period/payroll_period.py b/erpnext/hr/doctype/payroll_period/payroll_period.py index cb4264ba4e..c1769591ea 100644 --- a/erpnext/hr/doctype/payroll_period/payroll_period.py +++ b/erpnext/hr/doctype/payroll_period/payroll_period.py @@ -102,4 +102,4 @@ def get_period_factor(employee, start_date, end_date, payroll_frequency, payroll remaining_days_in_payroll_period = date_diff(period_end, start_date) + 1 remaining_sub_periods = flt(remaining_days_in_payroll_period) / flt(salary_days) - return total_sub_periods, remaining_sub_periods \ No newline at end of file + return total_sub_periods, remaining_sub_periods diff --git a/erpnext/hr/doctype/salary_component/salary_component.json b/erpnext/hr/doctype/salary_component/salary_component.json index e117a20fcc..986030d8c5 100644 --- a/erpnext/hr/doctype/salary_component/salary_component.json +++ b/erpnext/hr/doctype/salary_component/salary_component.json @@ -1,264 +1,264 @@ { - "allow_import": 1, - "allow_rename": 1, - "autoname": "field:salary_component", - "creation": "2016-06-30 15:42:43.631931", - "doctype": "DocType", - "document_type": "Setup", - "editable_grid": 1, - "engine": "InnoDB", - "field_order": [ - "salary_component", - "salary_component_abbr", - "type", - "description", - "column_break_4", - "is_payable", - "depends_on_payment_days", - "is_tax_applicable", - "deduct_full_tax_on_selected_payroll_date", - "round_to_the_nearest_integer", - "statistical_component", - "do_not_include_in_total", - "disabled", - "flexible_benefits", - "is_flexible_benefit", - "max_benefit_amount", - "column_break_9", - "pay_against_benefit_claim", - "only_tax_impact", - "create_separate_payment_entry_against_benefit_claim", - "section_break_11", - "variable_based_on_taxable_salary", - "section_break_5", - "accounts", - "condition_and_formula", - "condition", - "amount", - "amount_based_on_formula", - "formula", - "column_break_28", - "help" - ], - "fields": [ - { - "fieldname": "salary_component", - "fieldtype": "Data", - "in_list_view": 1, - "label": "Name", - "reqd": 1, - "unique": 1 - }, - { - "fieldname": "salary_component_abbr", - "fieldtype": "Data", - "in_list_view": 1, - "label": "Abbr", - "print_width": "120px", - "reqd": 1, - "width": "120px" - }, - { - "fieldname": "type", - "fieldtype": "Select", - "in_standard_filter": 1, - "label": "Type", - "options": "Earning\nDeduction", - "reqd": 1 - }, - { - "default": "1", - "depends_on": "eval:doc.type == \"Earning\"", - "fieldname": "is_tax_applicable", - "fieldtype": "Check", - "label": "Is Tax Applicable" - }, - { - "default": "1", - "fieldname": "is_payable", - "fieldtype": "Check", - "label": "Is Payable" - }, - { - "default": "1", - "fieldname": "depends_on_payment_days", - "fieldtype": "Check", - "label": "Depends on Payment Days", - "print_hide": 1 - }, - { - "default": "0", - "fieldname": "do_not_include_in_total", - "fieldtype": "Check", - "label": "Do Not Include in Total" - }, - { - "default": "0", - "depends_on": "is_tax_applicable", - "fieldname": "deduct_full_tax_on_selected_payroll_date", - "fieldtype": "Check", - "label": "Deduct Full Tax on Selected Payroll Date" - }, - { - "fieldname": "column_break_4", - "fieldtype": "Column Break" - }, - { - "default": "0", - "fieldname": "disabled", - "fieldtype": "Check", - "label": "Disabled" - }, - { - "fieldname": "description", - "fieldtype": "Small Text", - "in_list_view": 1, - "label": "Description" - }, - { - "default": "0", - "description": "If selected, the value specified or calculated in this component will not contribute to the earnings or deductions. However, it's value can be referenced by other components that can be added or deducted. ", - "fieldname": "statistical_component", - "fieldtype": "Check", - "label": "Statistical Component" - }, - { - "depends_on": "eval:doc.type==\"Earning\" && doc.statistical_component!=1", - "fieldname": "flexible_benefits", - "fieldtype": "Section Break", - "label": "Flexible Benefits" - }, - { - "default": "0", - "fieldname": "is_flexible_benefit", - "fieldtype": "Check", - "label": "Is Flexible Benefit" - }, - { - "depends_on": "is_flexible_benefit", - "fieldname": "max_benefit_amount", - "fieldtype": "Currency", - "label": "Max Benefit Amount (Yearly)" - }, - { - "fieldname": "column_break_9", - "fieldtype": "Column Break" - }, - { - "default": "0", - "depends_on": "is_flexible_benefit", - "fieldname": "pay_against_benefit_claim", - "fieldtype": "Check", - "label": "Pay Against Benefit Claim" - }, - { - "default": "0", - "depends_on": "eval:doc.is_flexible_benefit == 1 & doc.create_separate_payment_entry_against_benefit_claim !=1", - "fieldname": "only_tax_impact", - "fieldtype": "Check", - "label": "Only Tax Impact (Cannot Claim But Part of Taxable Income)" - }, - { - "default": "0", - "depends_on": "eval:doc.is_flexible_benefit == 1 & doc.only_tax_impact !=1", - "fieldname": "create_separate_payment_entry_against_benefit_claim", - "fieldtype": "Check", - "label": "Create Separate Payment Entry Against Benefit Claim" - }, - { - "depends_on": "eval:doc.type=='Deduction'", - "fieldname": "section_break_11", - "fieldtype": "Section Break" - }, - { - "default": "0", - "fieldname": "variable_based_on_taxable_salary", - "fieldtype": "Check", - "label": "Variable Based On Taxable Salary" - }, - { - "depends_on": "eval:doc.statistical_component != 1", - "fieldname": "section_break_5", - "fieldtype": "Section Break", - "label": "Accounts" - }, - { - "fieldname": "accounts", - "fieldtype": "Table", - "label": "Accounts", - "options": "Salary Component Account" - }, - { - "collapsible": 1, - "depends_on": "eval:doc.is_flexible_benefit != 1 && doc.variable_based_on_taxable_salary != 1", - "fieldname": "condition_and_formula", - "fieldtype": "Section Break", - "label": "Condition and Formula" - }, - { - "fieldname": "condition", - "fieldtype": "Code", - "label": "Condition" - }, - { - "default": "0", - "fieldname": "amount_based_on_formula", - "fieldtype": "Check", - "label": "Amount based on formula" - }, - { - "depends_on": "amount_based_on_formula", - "fieldname": "formula", - "fieldtype": "Code", - "label": "Formula" - }, - { - "depends_on": "eval:doc.amount_based_on_formula!==1", - "fieldname": "amount", - "fieldtype": "Currency", - "label": "Amount" - }, - { - "fieldname": "column_break_28", - "fieldtype": "Column Break" - }, - { - "fieldname": "help", - "fieldtype": "HTML", - "label": "Help", - "options": "

Help

\n\n

Notes:

\n\n
    \n
  1. Use field base for using base salary of the Employee
  2. \n
  3. Use Salary Component abbreviations in conditions and formulas. BS = Basic Salary
  4. \n
  5. Use field name for employee details in conditions and formulas. Employment Type = employment_typeBranch = branch
  6. \n
  7. Use field name from Salary Slip in conditions and formulas. Payment Days = payment_daysLeave without pay = leave_without_pay
  8. \n
  9. Direct Amount can also be entered based on Condtion. See example 3
\n\n

Examples

\n
    \n
  1. Calculating Basic Salary based on base\n
    Condition: base < 10000
    \n
    Formula: base * .2
  2. \n
  3. Calculating HRA based on Basic SalaryBS \n
    Condition: BS > 2000
    \n
    Formula: BS * .1
  4. \n
  5. Calculating TDS based on Employment Typeemployment_type \n
    Condition: employment_type==\"Intern\"
    \n
    Amount: 1000
  6. \n
" - }, - { - "default": "0", - "fieldname": "round_to_the_nearest_integer", - "fieldtype": "Check", - "label": "Round to the Nearest Integer" - } - ], - "icon": "fa fa-flag", - "modified": "2019-06-05 11:34:14.231228", - "modified_by": "Administrator", - "module": "HR", - "name": "Salary Component", - "owner": "Administrator", - "permissions": [ - { - "create": 1, - "delete": 1, - "email": 1, - "export": 1, - "print": 1, - "read": 1, - "report": 1, - "role": "HR User", - "share": 1, - "write": 1 - }, - { - "read": 1, - "role": "Employee" - } - ], - "sort_field": "modified", - "sort_order": "DESC" -} \ No newline at end of file + "allow_import": 1, + "allow_rename": 1, + "autoname": "field:salary_component", + "creation": "2016-06-30 15:42:43.631931", + "doctype": "DocType", + "document_type": "Setup", + "editable_grid": 1, + "engine": "InnoDB", + "field_order": [ + "salary_component", + "salary_component_abbr", + "type", + "description", + "column_break_4", + "is_payable", + "depends_on_payment_days", + "is_tax_applicable", + "deduct_full_tax_on_selected_payroll_date", + "round_to_the_nearest_integer", + "statistical_component", + "do_not_include_in_total", + "disabled", + "flexible_benefits", + "is_flexible_benefit", + "max_benefit_amount", + "column_break_9", + "pay_against_benefit_claim", + "only_tax_impact", + "create_separate_payment_entry_against_benefit_claim", + "section_break_11", + "variable_based_on_taxable_salary", + "section_break_5", + "accounts", + "condition_and_formula", + "condition", + "amount", + "amount_based_on_formula", + "formula", + "column_break_28", + "help" + ], + "fields": [ + { + "fieldname": "salary_component", + "fieldtype": "Data", + "in_list_view": 1, + "label": "Name", + "reqd": 1, + "unique": 1 + }, + { + "fieldname": "salary_component_abbr", + "fieldtype": "Data", + "in_list_view": 1, + "label": "Abbr", + "print_width": "120px", + "reqd": 1, + "width": "120px" + }, + { + "fieldname": "type", + "fieldtype": "Select", + "in_standard_filter": 1, + "label": "Type", + "options": "Earning\nDeduction", + "reqd": 1 + }, + { + "default": "1", + "depends_on": "eval:doc.type == \"Earning\"", + "fieldname": "is_tax_applicable", + "fieldtype": "Check", + "label": "Is Tax Applicable" + }, + { + "default": "1", + "fieldname": "is_payable", + "fieldtype": "Check", + "label": "Is Payable" + }, + { + "default": "1", + "fieldname": "depends_on_payment_days", + "fieldtype": "Check", + "label": "Depends on Payment Days", + "print_hide": 1 + }, + { + "default": "0", + "fieldname": "do_not_include_in_total", + "fieldtype": "Check", + "label": "Do Not Include in Total" + }, + { + "default": "0", + "depends_on": "is_tax_applicable", + "fieldname": "deduct_full_tax_on_selected_payroll_date", + "fieldtype": "Check", + "label": "Deduct Full Tax on Selected Payroll Date" + }, + { + "fieldname": "column_break_4", + "fieldtype": "Column Break" + }, + { + "default": "0", + "fieldname": "disabled", + "fieldtype": "Check", + "label": "Disabled" + }, + { + "fieldname": "description", + "fieldtype": "Small Text", + "in_list_view": 1, + "label": "Description" + }, + { + "default": "0", + "description": "If selected, the value specified or calculated in this component will not contribute to the earnings or deductions. However, it's value can be referenced by other components that can be added or deducted. ", + "fieldname": "statistical_component", + "fieldtype": "Check", + "label": "Statistical Component" + }, + { + "depends_on": "eval:doc.type==\"Earning\" && doc.statistical_component!=1", + "fieldname": "flexible_benefits", + "fieldtype": "Section Break", + "label": "Flexible Benefits" + }, + { + "default": "0", + "fieldname": "is_flexible_benefit", + "fieldtype": "Check", + "label": "Is Flexible Benefit" + }, + { + "depends_on": "is_flexible_benefit", + "fieldname": "max_benefit_amount", + "fieldtype": "Currency", + "label": "Max Benefit Amount (Yearly)" + }, + { + "fieldname": "column_break_9", + "fieldtype": "Column Break" + }, + { + "default": "0", + "depends_on": "is_flexible_benefit", + "fieldname": "pay_against_benefit_claim", + "fieldtype": "Check", + "label": "Pay Against Benefit Claim" + }, + { + "default": "0", + "depends_on": "eval:doc.is_flexible_benefit == 1 & doc.create_separate_payment_entry_against_benefit_claim !=1", + "fieldname": "only_tax_impact", + "fieldtype": "Check", + "label": "Only Tax Impact (Cannot Claim But Part of Taxable Income)" + }, + { + "default": "0", + "depends_on": "eval:doc.is_flexible_benefit == 1 & doc.only_tax_impact !=1", + "fieldname": "create_separate_payment_entry_against_benefit_claim", + "fieldtype": "Check", + "label": "Create Separate Payment Entry Against Benefit Claim" + }, + { + "depends_on": "eval:doc.type=='Deduction'", + "fieldname": "section_break_11", + "fieldtype": "Section Break" + }, + { + "default": "0", + "fieldname": "variable_based_on_taxable_salary", + "fieldtype": "Check", + "label": "Variable Based On Taxable Salary" + }, + { + "depends_on": "eval:doc.statistical_component != 1", + "fieldname": "section_break_5", + "fieldtype": "Section Break", + "label": "Accounts" + }, + { + "fieldname": "accounts", + "fieldtype": "Table", + "label": "Accounts", + "options": "Salary Component Account" + }, + { + "collapsible": 1, + "depends_on": "eval:doc.is_flexible_benefit != 1 && doc.variable_based_on_taxable_salary != 1", + "fieldname": "condition_and_formula", + "fieldtype": "Section Break", + "label": "Condition and Formula" + }, + { + "fieldname": "condition", + "fieldtype": "Code", + "label": "Condition" + }, + { + "default": "0", + "fieldname": "amount_based_on_formula", + "fieldtype": "Check", + "label": "Amount based on formula" + }, + { + "depends_on": "amount_based_on_formula", + "fieldname": "formula", + "fieldtype": "Code", + "label": "Formula" + }, + { + "depends_on": "eval:doc.amount_based_on_formula!==1", + "fieldname": "amount", + "fieldtype": "Currency", + "label": "Amount" + }, + { + "fieldname": "column_break_28", + "fieldtype": "Column Break" + }, + { + "fieldname": "help", + "fieldtype": "HTML", + "label": "Help", + "options": "

Help

\n\n

Notes:

\n\n
    \n
  1. Use field base for using base salary of the Employee
  2. \n
  3. Use Salary Component abbreviations in conditions and formulas. BS = Basic Salary
  4. \n
  5. Use field name for employee details in conditions and formulas. Employment Type = employment_typeBranch = branch
  6. \n
  7. Use field name from Salary Slip in conditions and formulas. Payment Days = payment_daysLeave without pay = leave_without_pay
  8. \n
  9. Direct Amount can also be entered based on Condtion. See example 3
\n\n

Examples

\n
    \n
  1. Calculating Basic Salary based on base\n
    Condition: base < 10000
    \n
    Formula: base * .2
  2. \n
  3. Calculating HRA based on Basic SalaryBS \n
    Condition: BS > 2000
    \n
    Formula: BS * .1
  4. \n
  5. Calculating TDS based on Employment Typeemployment_type \n
    Condition: employment_type==\"Intern\"
    \n
    Amount: 1000
  6. \n
" + }, + { + "default": "0", + "fieldname": "round_to_the_nearest_integer", + "fieldtype": "Check", + "label": "Round to the Nearest Integer" + } + ], + "icon": "fa fa-flag", + "modified": "2019-06-05 11:34:14.231228", + "modified_by": "Administrator", + "module": "HR", + "name": "Salary Component", + "owner": "Administrator", + "permissions": [ + { + "create": 1, + "delete": 1, + "email": 1, + "export": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "HR User", + "share": 1, + "write": 1 + }, + { + "read": 1, + "role": "Employee" + } + ], + "sort_field": "modified", + "sort_order": "DESC" + } \ No newline at end of file diff --git a/erpnext/hr/doctype/salary_slip/salary_slip.json b/erpnext/hr/doctype/salary_slip/salary_slip.json index 681b008d02..fa3114cdaa 100644 --- a/erpnext/hr/doctype/salary_slip/salary_slip.json +++ b/erpnext/hr/doctype/salary_slip/salary_slip.json @@ -1,1955 +1,1955 @@ { - "allow_copy": 0, - "allow_events_in_timeline": 0, - "allow_guest_to_view": 0, - "allow_import": 0, - "allow_rename": 0, - "beta": 0, - "creation": "2013-01-10 16:34:15", - "custom": 0, - "default_print_format": "", - "docstatus": 0, - "doctype": "DocType", - "document_type": "Setup", - "editable_grid": 0, - "fields": [ - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "default": "Today", - "fieldname": "posting_date", - "fieldtype": "Date", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "Posting Date", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, + "allow_copy": 0, + "allow_events_in_timeline": 0, + "allow_guest_to_view": 0, + "allow_import": 1, + "allow_rename": 0, + "beta": 0, + "creation": "2013-01-10 16:34:15", + "custom": 0, + "default_print_format": "", + "docstatus": 0, + "doctype": "DocType", + "document_type": "Setup", + "editable_grid": 0, + "fields": [ + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "default": "Today", + "fieldname": "posting_date", + "fieldtype": "Date", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 1, + "in_standard_filter": 0, + "label": "Posting Date", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 1, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "employee", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 1, + "in_list_view": 1, + "in_standard_filter": 1, + "label": "Employee", + "length": 0, + "no_copy": 0, + "oldfieldname": "employee", + "oldfieldtype": "Link", + "options": "Employee", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 1, + "search_index": 1, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_from": "employee.employee_name", + "fieldname": "employee_name", + "fieldtype": "Read Only", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 1, + "in_list_view": 1, + "in_standard_filter": 0, + "label": "Employee Name", + "length": 0, + "no_copy": 0, + "oldfieldname": "employee_name", + "oldfieldtype": "Data", + "options": "", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 1, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_from": "employee.department", + "fieldname": "department", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 1, + "label": "Department", + "length": 0, + "no_copy": 0, + "oldfieldname": "department", + "oldfieldtype": "Link", + "options": "Department", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "eval:doc.designation", + "fetch_from": "employee.designation", + "fieldname": "designation", + "fieldtype": "Read Only", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Designation", + "length": 0, + "no_copy": 0, + "oldfieldname": "designation", + "oldfieldtype": "Link", + "options": "", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_from": "employee.branch", + "fieldname": "branch", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 1, + "label": "Branch", + "length": 0, + "no_copy": 0, + "oldfieldname": "branch", + "oldfieldtype": "Link", + "options": "Branch", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "column_break1", + "fieldtype": "Column Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "length": 0, + "no_copy": 0, + "oldfieldtype": "Column Break", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0, + "width": "50%" + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "status", + "fieldtype": "Select", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Status", + "length": 0, + "no_copy": 0, + "options": "Draft\nSubmitted\nCancelled", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "journal_entry", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Journal Entry", + "length": 0, + "no_copy": 0, + "options": "Journal Entry", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "payroll_entry", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Payroll Entry", + "length": 0, + "no_copy": 0, + "options": "Payroll Entry", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "company", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 1, + "in_standard_filter": 1, + "label": "Company", + "length": 0, + "no_copy": 0, + "options": "Company", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 1, + "report_hide": 0, + "reqd": 1, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 1, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "letter_head", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 1, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Letter Head", + "length": 0, + "no_copy": 0, + "options": "Letter Head", + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "section_break_10", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "", + "fieldname": "salary_slip_based_on_timesheet", + "fieldtype": "Check", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Salary Slip Based on Timesheet", + "length": 0, + "no_copy": 0, + "options": "", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "default": "", + "fieldname": "start_date", + "fieldtype": "Date", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Start Date", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "default": "", + "depends_on": "", + "fieldname": "end_date", + "fieldtype": "Date", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "End Date", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "column_break_15", + "fieldtype": "Column Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "", + "fieldname": "salary_structure", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Salary Structure", + "length": 0, + "no_copy": 0, + "options": "Salary Structure", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "default": "", + "depends_on": "eval:(!doc.salary_slip_based_on_timesheet)", + "fieldname": "payroll_frequency", + "fieldtype": "Select", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Payroll Frequency", + "length": 0, + "no_copy": 0, + "options": "\nMonthly\nFortnightly\nBimonthly\nWeekly\nDaily", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "", + "fieldname": "total_working_days", + "fieldtype": "Float", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Working Days", + "length": 0, + "no_copy": 0, + "oldfieldname": "total_days_in_month", + "oldfieldtype": "Int", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 1, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "", + "fieldname": "leave_without_pay", + "fieldtype": "Float", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Leave Without Pay", + "length": 0, + "no_copy": 0, + "oldfieldname": "leave_without_pay", + "oldfieldtype": "Currency", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "", + "fieldname": "payment_days", + "fieldtype": "Float", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Payment Days", + "length": 0, + "no_copy": 0, + "oldfieldname": "payment_days", + "oldfieldtype": "Float", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 1, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "", + "fieldname": "hourly_wages", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "", + "fieldname": "timesheets", + "fieldtype": "Table", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Salary Slip Timesheet", + "length": 0, + "no_copy": 0, + "options": "Salary Slip Timesheet", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "column_break_20", + "fieldtype": "Column Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "total_working_hours", + "fieldtype": "Float", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Total Working Hours", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 1, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "hour_rate", + "fieldtype": "Currency", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Hour Rate", + "length": 0, + "no_copy": 0, + "options": "Company:company:default_currency", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 1, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "", + "fieldname": "section_break_26", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "bank_name", + "fieldtype": "Data", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Bank Name", + "length": 0, + "no_copy": 0, + "oldfieldname": "bank_name", + "oldfieldtype": "Data", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "bank_account_no", + "fieldtype": "Data", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Bank Account No.", + "length": 0, + "no_copy": 0, + "oldfieldname": "bank_account_no", + "oldfieldtype": "Data", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "section_break_32", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "deduct_tax_for_unclaimed_employee_benefits", + "fieldtype": "Check", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Deduct Tax For Unclaimed Employee Benefits", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "deduct_tax_for_unsubmitted_tax_exemption_proof", + "fieldtype": "Check", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Deduct Tax For Unsubmitted Tax Exemption Proof", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "earning_deduction", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Earning & Deduction", + "length": 0, + "no_copy": 0, + "oldfieldtype": "Section Break", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "earning", + "fieldtype": "Column Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Earning", + "length": 0, + "no_copy": 0, + "oldfieldtype": "Column Break", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0, + "width": "50%" + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "", + "fieldname": "earnings", + "fieldtype": "Table", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Earnings", + "length": 0, + "no_copy": 0, + "oldfieldname": "earning_details", + "oldfieldtype": "Table", + "options": "Salary Detail", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "deduction", + "fieldtype": "Column Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Deduction", + "length": 0, + "no_copy": 0, + "oldfieldtype": "Column Break", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0, + "width": "50%" + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "deductions", + "fieldtype": "Table", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Deductions", + "length": 0, + "no_copy": 0, + "oldfieldname": "deduction_details", + "oldfieldtype": "Table", + "options": "Salary Detail", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "totals", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "", + "length": 0, + "no_copy": 0, + "oldfieldtype": "Section Break", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "gross_pay", + "fieldtype": "Currency", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Gross Pay", + "length": 0, + "no_copy": 0, + "oldfieldname": "gross_pay", + "oldfieldtype": "Currency", + "options": "Company:company:default_currency", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "column_break_25", + "fieldtype": "Column Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "length": 0, + "no_copy": 0, + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "total_deduction", + "fieldtype": "Currency", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Total Deduction", + "length": 0, + "no_copy": 0, + "oldfieldname": "total_deduction", + "oldfieldtype": "Currency", + "options": "Company:company:default_currency", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "total_loan_repayment", + "fieldname": "loan_repayment", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Loan repayment", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "loans", + "fieldtype": "Table", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Employee Loan", + "length": 0, + "no_copy": 0, + "options": "Salary Slip Loan", + "permlevel": 0, + "precision": "", + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "section_break_43", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "default": "0", + "fieldname": "total_principal_amount", + "fieldtype": "Currency", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Total Principal Amount", + "length": 0, + "no_copy": 0, + "options": "Company:company:default_currency", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "default": "0", + "fieldname": "total_interest_amount", + "fieldtype": "Currency", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Total Interest Amount", + "length": 0, + "no_copy": 0, + "options": "Company:company:default_currency", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "column_break_45", + "fieldtype": "Column Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "default": "0", + "fieldname": "total_loan_repayment", + "fieldtype": "Currency", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Total Loan Repayment", + "length": 0, + "no_copy": 0, + "options": "Company:company:default_currency", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "net_pay_info", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "net pay info", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "description": "Gross Pay - Total Deduction - Loan Repayment", + "fieldname": "net_pay", + "fieldtype": "Currency", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Net Pay", + "length": 0, + "no_copy": 0, + "oldfieldname": "net_pay", + "oldfieldtype": "Currency", + "options": "Company:company:default_currency", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "column_break_53", + "fieldtype": "Column Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 1, + "collapsible": 0, + "columns": 0, + "fieldname": "rounded_total", + "fieldtype": "Currency", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Rounded Total", + "length": 0, + "no_copy": 0, + "options": "Company:company:default_currency", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "section_break_55", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "description": "Net Pay (in words) will be visible once you save the Salary Slip.", + "fieldname": "total_in_words", + "fieldtype": "Data", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Total in words", + "length": 0, + "no_copy": 0, + "oldfieldname": "net_pay_in_words", + "oldfieldtype": "Data", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "amended_from", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 1, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Amended From", + "length": 0, + "no_copy": 1, + "oldfieldname": "amended_from", + "oldfieldtype": "Data", + "options": "Salary Slip", + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + } + ], + "has_web_view": 0, + "hide_heading": 0, + "hide_toolbar": 0, + "icon": "fa fa-file-text", + "idx": 9, + "image_view": 0, + "in_create": 0, + "is_submittable": 1, + "issingle": 0, + "istable": 0, + "max_attachments": 0, + "modified": "2019-06-19 13:10:14.524119", + "modified_by": "Administrator", + "module": "HR", + "name": "Salary Slip", + "owner": "Administrator", + "permissions": [ + { + "amend": 0, + "cancel": 0, + "create": 1, + "delete": 0, + "email": 1, + "export": 0, + "if_owner": 0, + "import": 0, + "permlevel": 0, + "print": 1, + "read": 1, + "report": 1, + "role": "HR User", + "set_user_permissions": 0, + "share": 1, + "submit": 1, + "write": 1 + }, + { + "amend": 1, + "cancel": 1, + "create": 1, + "delete": 1, + "email": 1, + "export": 0, + "if_owner": 0, + "import": 0, + "permlevel": 0, + "print": 1, + "read": 1, + "report": 1, + "role": "HR Manager", + "set_user_permissions": 0, + "share": 1, + "submit": 1, + "write": 1 + }, + { + "amend": 0, + "cancel": 0, + "create": 0, + "delete": 0, + "email": 0, + "export": 0, + "if_owner": 0, + "import": 0, + "permlevel": 0, + "print": 0, + "read": 1, + "report": 0, + "role": "Employee", + "set_user_permissions": 0, + "share": 0, + "submit": 0, + "write": 0 + } + ], + "quick_entry": 0, "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 1, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "employee", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 1, - "in_list_view": 1, - "in_standard_filter": 1, - "label": "Employee", - "length": 0, - "no_copy": 0, - "oldfieldname": "employee", - "oldfieldtype": "Link", - "options": "Employee", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 1, - "search_index": 1, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_from": "employee.employee_name", - "fieldname": "employee_name", - "fieldtype": "Read Only", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 1, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "Employee Name", - "length": 0, - "no_copy": 0, - "oldfieldname": "employee_name", - "oldfieldtype": "Data", - "options": "", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 1, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_from": "employee.department", - "fieldname": "department", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 1, - "label": "Department", - "length": 0, - "no_copy": 0, - "oldfieldname": "department", - "oldfieldtype": "Link", - "options": "Department", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 1, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "eval:doc.designation", - "fetch_from": "employee.designation", - "fieldname": "designation", - "fieldtype": "Read Only", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Designation", - "length": 0, - "no_copy": 0, - "oldfieldname": "designation", - "oldfieldtype": "Link", - "options": "", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_from": "employee.branch", - "fieldname": "branch", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 1, - "label": "Branch", - "length": 0, - "no_copy": 0, - "oldfieldname": "branch", - "oldfieldtype": "Link", - "options": "Branch", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 1, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "column_break1", - "fieldtype": "Column Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "length": 0, - "no_copy": 0, - "oldfieldtype": "Column Break", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0, - "width": "50%" - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "status", - "fieldtype": "Select", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Status", - "length": 0, - "no_copy": 0, - "options": "Draft\nSubmitted\nCancelled", - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 1, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "journal_entry", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Journal Entry", - "length": 0, - "no_copy": 0, - "options": "Journal Entry", - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 1, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "payroll_entry", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Payroll Entry", - "length": 0, - "no_copy": 0, - "options": "Payroll Entry", - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 1, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "company", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 1, - "label": "Company", - "length": 0, - "no_copy": 0, - "options": "Company", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 1, - "report_hide": 0, - "reqd": 1, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 1, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "letter_head", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 1, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Letter Head", - "length": 0, - "no_copy": 0, - "options": "Letter Head", - "permlevel": 0, - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "section_break_10", - "fieldtype": "Section Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "", - "fieldname": "salary_slip_based_on_timesheet", - "fieldtype": "Check", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Salary Slip Based on Timesheet", - "length": 0, - "no_copy": 0, - "options": "", - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 1, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "default": "", - "fieldname": "start_date", - "fieldtype": "Date", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Start Date", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "default": "", - "depends_on": "", - "fieldname": "end_date", - "fieldtype": "Date", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "End Date", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "column_break_15", - "fieldtype": "Column Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "", - "fieldname": "salary_structure", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Salary Structure", - "length": 0, - "no_copy": 0, - "options": "Salary Structure", - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 1, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "default": "", - "depends_on": "eval:(!doc.salary_slip_based_on_timesheet)", - "fieldname": "payroll_frequency", - "fieldtype": "Select", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Payroll Frequency", - "length": 0, - "no_copy": 0, - "options": "\nMonthly\nFortnightly\nBimonthly\nWeekly\nDaily", - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "", - "fieldname": "total_working_days", - "fieldtype": "Float", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Working Days", - "length": 0, - "no_copy": 0, - "oldfieldname": "total_days_in_month", - "oldfieldtype": "Int", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 1, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 1, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "", - "fieldname": "leave_without_pay", - "fieldtype": "Float", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Leave Without Pay", - "length": 0, - "no_copy": 0, - "oldfieldname": "leave_without_pay", - "oldfieldtype": "Currency", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "", - "fieldname": "payment_days", - "fieldtype": "Float", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Payment Days", - "length": 0, - "no_copy": 0, - "oldfieldname": "payment_days", - "oldfieldtype": "Float", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 1, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 1, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "", - "fieldname": "hourly_wages", - "fieldtype": "Section Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "", - "fieldname": "timesheets", - "fieldtype": "Table", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Salary Slip Timesheet", - "length": 0, - "no_copy": 0, - "options": "Salary Slip Timesheet", - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "column_break_20", - "fieldtype": "Column Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "total_working_hours", - "fieldtype": "Float", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Total Working Hours", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 1, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "hour_rate", - "fieldtype": "Currency", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Hour Rate", - "length": 0, - "no_copy": 0, - "options": "Company:company:default_currency", - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 1, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "", - "fieldname": "section_break_26", - "fieldtype": "Section Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "bank_name", - "fieldtype": "Data", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Bank Name", - "length": 0, - "no_copy": 0, - "oldfieldname": "bank_name", - "oldfieldtype": "Data", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 1, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "bank_account_no", - "fieldtype": "Data", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Bank Account No.", - "length": 0, - "no_copy": 0, - "oldfieldname": "bank_account_no", - "oldfieldtype": "Data", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 1, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "section_break_32", - "fieldtype": "Section Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "deduct_tax_for_unclaimed_employee_benefits", - "fieldtype": "Check", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Deduct Tax For Unclaimed Employee Benefits", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "deduct_tax_for_unsubmitted_tax_exemption_proof", - "fieldtype": "Check", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Deduct Tax For Unsubmitted Tax Exemption Proof", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "earning_deduction", - "fieldtype": "Section Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Earning & Deduction", - "length": 0, - "no_copy": 0, - "oldfieldtype": "Section Break", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "earning", - "fieldtype": "Column Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Earning", - "length": 0, - "no_copy": 0, - "oldfieldtype": "Column Break", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0, - "width": "50%" - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "", - "fieldname": "earnings", - "fieldtype": "Table", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Earnings", - "length": 0, - "no_copy": 0, - "oldfieldname": "earning_details", - "oldfieldtype": "Table", - "options": "Salary Detail", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "deduction", - "fieldtype": "Column Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Deduction", - "length": 0, - "no_copy": 0, - "oldfieldtype": "Column Break", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0, - "width": "50%" - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "deductions", - "fieldtype": "Table", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Deductions", - "length": 0, - "no_copy": 0, - "oldfieldname": "deduction_details", - "oldfieldtype": "Table", - "options": "Salary Detail", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "totals", - "fieldtype": "Section Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "", - "length": 0, - "no_copy": 0, - "oldfieldtype": "Section Break", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "gross_pay", - "fieldtype": "Currency", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Gross Pay", - "length": 0, - "no_copy": 0, - "oldfieldname": "gross_pay", - "oldfieldtype": "Currency", - "options": "Company:company:default_currency", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 1, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "column_break_25", - "fieldtype": "Column Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "length": 0, - "no_copy": 0, - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "total_deduction", - "fieldtype": "Currency", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Total Deduction", - "length": 0, - "no_copy": 0, - "oldfieldname": "total_deduction", - "oldfieldtype": "Currency", - "options": "Company:company:default_currency", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 1, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "total_loan_repayment", - "fieldname": "loan_repayment", - "fieldtype": "Section Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Loan repayment", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "loans", - "fieldtype": "Table", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Employee Loan", - "length": 0, - "no_copy": 0, - "options": "Salary Slip Loan", - "permlevel": 0, - "precision": "", - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 1, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "section_break_43", - "fieldtype": "Section Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "default": "0", - "fieldname": "total_principal_amount", - "fieldtype": "Currency", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Total Principal Amount", - "length": 0, - "no_copy": 0, - "options": "Company:company:default_currency", - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 1, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "default": "0", - "fieldname": "total_interest_amount", - "fieldtype": "Currency", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Total Interest Amount", - "length": 0, - "no_copy": 0, - "options": "Company:company:default_currency", - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 1, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "column_break_45", - "fieldtype": "Column Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "default": "0", - "fieldname": "total_loan_repayment", - "fieldtype": "Currency", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Total Loan Repayment", - "length": 0, - "no_copy": 0, - "options": "Company:company:default_currency", - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 1, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "net_pay_info", - "fieldtype": "Section Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "net pay info", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "description": "Gross Pay - Total Deduction - Loan Repayment", - "fieldname": "net_pay", - "fieldtype": "Currency", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Net Pay", - "length": 0, - "no_copy": 0, - "oldfieldname": "net_pay", - "oldfieldtype": "Currency", - "options": "Company:company:default_currency", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 1, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "column_break_53", - "fieldtype": "Column Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 1, - "collapsible": 0, - "columns": 0, - "fieldname": "rounded_total", - "fieldtype": "Currency", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Rounded Total", - "length": 0, - "no_copy": 0, - "options": "Company:company:default_currency", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 1, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "section_break_55", - "fieldtype": "Section Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "description": "Net Pay (in words) will be visible once you save the Salary Slip.", - "fieldname": "total_in_words", - "fieldtype": "Data", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Total in words", - "length": 0, - "no_copy": 0, - "oldfieldname": "net_pay_in_words", - "oldfieldtype": "Data", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 1, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "amended_from", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 1, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Amended From", - "length": 0, - "no_copy": 1, - "oldfieldname": "amended_from", - "oldfieldtype": "Data", - "options": "Salary Slip", - "permlevel": 0, - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 1, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - } - ], - "has_web_view": 0, - "hide_heading": 0, - "hide_toolbar": 0, - "icon": "fa fa-file-text", - "idx": 9, - "image_view": 0, - "in_create": 0, - "is_submittable": 1, - "issingle": 0, - "istable": 0, - "max_attachments": 0, - "modified": "2019-05-13 13:10:14.524119", - "modified_by": "Administrator", - "module": "HR", - "name": "Salary Slip", - "owner": "Administrator", - "permissions": [ - { - "amend": 0, - "cancel": 0, - "create": 1, - "delete": 0, - "email": 1, - "export": 0, - "if_owner": 0, - "import": 0, - "permlevel": 0, - "print": 1, - "read": 1, - "report": 1, - "role": "HR User", - "set_user_permissions": 0, - "share": 1, - "submit": 1, - "write": 1 - }, - { - "amend": 1, - "cancel": 1, - "create": 1, - "delete": 1, - "email": 1, - "export": 0, - "if_owner": 0, - "import": 0, - "permlevel": 0, - "print": 1, - "read": 1, - "report": 1, - "role": "HR Manager", - "set_user_permissions": 0, - "share": 1, - "submit": 1, - "write": 1 - }, - { - "amend": 0, - "cancel": 0, - "create": 0, - "delete": 0, - "email": 0, - "export": 0, - "if_owner": 0, - "import": 0, - "permlevel": 0, - "print": 0, - "read": 1, - "report": 0, - "role": "Employee", - "set_user_permissions": 0, - "share": 0, - "submit": 0, - "write": 0 - } - ], - "quick_entry": 0, - "read_only": 0, - "read_only_onload": 0, - "show_name_in_global_search": 1, - "sort_field": "modified", - "sort_order": "DESC", - "timeline_field": "employee", - "title_field": "employee_name", - "track_changes": 0, - "track_seen": 0, - "track_views": 0 -} \ No newline at end of file + "read_only_onload": 0, + "show_name_in_global_search": 1, + "sort_field": "modified", + "sort_order": "DESC", + "timeline_field": "employee", + "title_field": "employee_name", + "track_changes": 0, + "track_seen": 0, + "track_views": 0 + } \ No newline at end of file diff --git a/erpnext/hr/doctype/salary_slip/salary_slip.py b/erpnext/hr/doctype/salary_slip/salary_slip.py index 62382b691e..db0a3a5ece 100644 --- a/erpnext/hr/doctype/salary_slip/salary_slip.py +++ b/erpnext/hr/doctype/salary_slip/salary_slip.py @@ -296,10 +296,7 @@ class SalarySlip(TransactionBase): self.set_loan_repayment() - self.net_pay = 0 - if self.total_working_days: - self.net_pay = flt(self.gross_pay) - (flt(self.total_deduction) + flt(self.total_loan_repayment)) - + self.net_pay = flt(self.gross_pay) - (flt(self.total_deduction) + flt(self.total_loan_repayment)) self.rounded_total = rounded(self.net_pay) def calculate_component_amounts(self): diff --git a/erpnext/hr/report/salary_register/salary_register.py b/erpnext/hr/report/salary_register/salary_register.py index be4b501c6e..ea7fc06cff 100644 --- a/erpnext/hr/report/salary_register/salary_register.py +++ b/erpnext/hr/report/salary_register/salary_register.py @@ -125,4 +125,4 @@ def get_ss_ded_map(salary_slips): ss_ded_map.setdefault(d.parent, frappe._dict()).setdefault(d.salary_component, []) ss_ded_map[d.parent][d.salary_component] = flt(d.amount) - return ss_ded_map \ No newline at end of file + return ss_ded_map diff --git a/erpnext/hub_node/api.py b/erpnext/hub_node/api.py index 0c94df3159..0d01c67650 100644 --- a/erpnext/hub_node/api.py +++ b/erpnext/hub_node/api.py @@ -120,7 +120,7 @@ def get_valid_items(search_value=''): def publish_selected_items(items_to_publish): items_to_publish = json.loads(items_to_publish) if not len(items_to_publish): - frappe.throw('No items to publish') + frappe.throw(_('No items to publish')) for item in items_to_publish: item_code = item.get('item_code') @@ -165,7 +165,7 @@ def item_sync_preprocess(intended_item_publish_count): frappe.db.set_value("Marketplace Settings", "Marketplace Settings", "sync_in_progress", 1) return response else: - frappe.throw('Unable to update remote activity') + frappe.throw(_('Unable to update remote activity')) def item_sync_postprocess(): @@ -173,7 +173,7 @@ def item_sync_postprocess(): if response: frappe.db.set_value('Marketplace Settings', 'Marketplace Settings', 'last_sync_datetime', frappe.utils.now()) else: - frappe.throw('Unable to update remote activity') + frappe.throw(_('Unable to update remote activity')) frappe.db.set_value('Marketplace Settings', 'Marketplace Settings', 'sync_in_progress', 0) diff --git a/erpnext/hub_node/legacy.py b/erpnext/hub_node/legacy.py index 9daee2752f..95ada76a6a 100644 --- a/erpnext/hub_node/legacy.py +++ b/erpnext/hub_node/legacy.py @@ -28,7 +28,7 @@ def make_opportunity(buyer_name, email_id): lead.save(ignore_permissions=True) o = frappe.new_doc("Opportunity") - o.enquiry_from = "Lead" + o.opportunity_from = "Lead" o.lead = frappe.get_all("Lead", filters={"email_id": email_id}, fields = ["name"])[0]["name"] o.save(ignore_permissions=True) diff --git a/erpnext/manufacturing/doctype/job_card/job_card.py b/erpnext/manufacturing/doctype/job_card/job_card.py index 23a4e5105c..a8faa13241 100644 --- a/erpnext/manufacturing/doctype/job_card/job_card.py +++ b/erpnext/manufacturing/doctype/job_card/job_card.py @@ -18,21 +18,22 @@ class JobCard(Document): self.total_completed_qty = 0.0 self.total_time_in_mins = 0.0 - for d in self.get('time_logs'): - if get_datetime(d.from_time) > get_datetime(d.to_time): - frappe.throw(_("Row {0}: From time must be less than to time").format(d.idx)) + if self.get('time_logs'): + for d in self.get('time_logs'): + if get_datetime(d.from_time) > get_datetime(d.to_time): + frappe.throw(_("Row {0}: From time must be less than to time").format(d.idx)) - data = self.get_overlap_for(d) - if data: - frappe.throw(_("Row {0}: From Time and To Time of {1} is overlapping with {2}") - .format(d.idx, self.name, data.name)) + data = self.get_overlap_for(d) + if data: + frappe.throw(_("Row {0}: From Time and To Time of {1} is overlapping with {2}") + .format(d.idx, self.name, data.name)) - if d.from_time and d.to_time: - d.time_in_mins = time_diff_in_hours(d.to_time, d.from_time) * 60 - self.total_time_in_mins += d.time_in_mins + if d.from_time and d.to_time: + d.time_in_mins = time_diff_in_hours(d.to_time, d.from_time) * 60 + self.total_time_in_mins += d.time_in_mins - if d.completed_qty: - self.total_completed_qty += d.completed_qty + if d.completed_qty: + self.total_completed_qty += d.completed_qty def get_overlap_for(self, args): existing = frappe.db.sql("""select jc.name as name from @@ -112,8 +113,10 @@ class JobCard(Document): for_quantity += doc.total_completed_qty time_in_mins += doc.total_time_in_mins for time_log in doc.time_logs: - from_time_list.append(time_log.from_time) - to_time_list.append(time_log.to_time) + if time_log.from_time: + from_time_list.append(time_log.from_time) + if time_log.to_time: + to_time_list.append(time_log.to_time) if for_quantity: wo = frappe.get_doc('Work Order', self.work_order) diff --git a/erpnext/manufacturing/doctype/work_order/work_order.json b/erpnext/manufacturing/doctype/work_order/work_order.json index 3bc2899cc9..1534b5929d 100644 --- a/erpnext/manufacturing/doctype/work_order/work_order.json +++ b/erpnext/manufacturing/doctype/work_order/work_order.json @@ -1,484 +1,484 @@ { - "allow_import": 1, - "autoname": "naming_series:", - "creation": "2013-01-10 16:34:16", - "doctype": "DocType", - "document_type": "Setup", - "field_order": [ - "item", - "naming_series", - "status", - "production_item", - "item_name", - "image", - "bom_no", - "allow_alternative_item", - "use_multi_level_bom", - "skip_transfer", - "column_break1", - "company", - "qty", - "material_transferred_for_manufacturing", - "produced_qty", - "sales_order", - "project", - "from_wip_warehouse", - "warehouses", - "wip_warehouse", - "fg_warehouse", - "column_break_12", - "scrap_warehouse", - "required_items_section", - "required_items", - "time", - "planned_start_date", - "actual_start_date", - "column_break_13", - "planned_end_date", - "actual_end_date", - "expected_delivery_date", - "operations_section", - "transfer_material_against", - "operations", - "section_break_22", - "planned_operating_cost", - "actual_operating_cost", - "additional_operating_cost", - "column_break_24", - "total_operating_cost", - "more_info", - "description", - "stock_uom", - "column_break2", - "material_request", - "material_request_item", - "sales_order_item", - "production_plan", - "production_plan_item", - "product_bundle_item", - "amended_from" - ], - "fields": [ - { - "fieldname": "item", - "fieldtype": "Section Break", - "options": "fa fa-gift" - }, - { - "fieldname": "naming_series", - "fieldtype": "Select", - "label": "Series", - "options": "MFG-WO-.YYYY.-", - "print_hide": 1, - "reqd": 1, - "set_only_once": 1 - }, - { - "default": "Draft", - "depends_on": "eval:!doc.__islocal", - "fieldname": "status", - "fieldtype": "Select", - "label": "Status", - "no_copy": 1, - "oldfieldname": "status", - "oldfieldtype": "Select", - "options": "\nDraft\nSubmitted\nNot Started\nIn Process\nCompleted\nStopped\nCancelled", - "read_only": 1, - "reqd": 1, - "search_index": 1 - }, - { - "fieldname": "production_item", - "fieldtype": "Link", - "in_global_search": 1, - "in_list_view": 1, - "in_standard_filter": 1, - "label": "Item To Manufacture", - "oldfieldname": "production_item", - "oldfieldtype": "Link", - "options": "Item", - "reqd": 1 - }, - { - "depends_on": "eval:doc.production_item", - "fieldname": "item_name", - "fieldtype": "Data", - "label": "Item Name", - "read_only": 1 - }, - { - "fetch_from": "production_item.image", - "fieldname": "image", - "fieldtype": "Attach Image", - "hidden": 1, - "label": "Image", - "options": "image", - "print_hide": 1, - "read_only": 1 - }, - { - "fieldname": "bom_no", - "fieldtype": "Link", - "label": "BOM No", - "oldfieldname": "bom_no", - "oldfieldtype": "Link", - "options": "BOM", - "reqd": 1 - }, - { - "default": "0", - "fieldname": "allow_alternative_item", - "fieldtype": "Check", - "label": "Allow Alternative Item" - }, - { - "default": "1", - "description": "Plan material for sub-assemblies", - "fieldname": "use_multi_level_bom", - "fieldtype": "Check", - "label": "Use Multi-Level BOM", - "print_hide": 1 - }, - { - "default": "0", - "description": "Check if material transfer entry is not required", - "fieldname": "skip_transfer", - "fieldtype": "Check", - "label": "Skip Material Transfer to WIP Warehouse" - }, - { - "fieldname": "column_break1", - "fieldtype": "Column Break", - "oldfieldtype": "Column Break", - "width": "50%" - }, - { - "fieldname": "company", - "fieldtype": "Link", - "label": "Company", - "oldfieldname": "company", - "oldfieldtype": "Link", - "options": "Company", - "remember_last_selected_value": 1, - "reqd": 1 - }, - { - "fieldname": "qty", - "fieldtype": "Float", - "label": "Qty To Manufacture", - "oldfieldname": "qty", - "oldfieldtype": "Currency", - "reqd": 1 - }, - { - "default": "0", - "depends_on": "eval:doc.docstatus==1 && doc.skip_transfer==0", - "fieldname": "material_transferred_for_manufacturing", - "fieldtype": "Float", - "label": "Material Transferred for Manufacturing", - "no_copy": 1, - "read_only": 1 - }, - { - "default": "0", - "depends_on": "eval:doc.docstatus==1", - "fieldname": "produced_qty", - "fieldtype": "Float", - "label": "Manufactured Qty", - "no_copy": 1, - "oldfieldname": "produced_qty", - "oldfieldtype": "Currency", - "read_only": 1 - }, - { - "allow_on_submit": 1, - "fieldname": "sales_order", - "fieldtype": "Link", - "in_global_search": 1, - "label": "Sales Order", - "options": "Sales Order" - }, - { - "fieldname": "project", - "fieldtype": "Link", - "label": "Project", - "oldfieldname": "project", - "oldfieldtype": "Link", - "options": "Project" - }, - { - "default": "0", - "depends_on": "skip_transfer", - "fieldname": "from_wip_warehouse", - "fieldtype": "Check", - "label": "Backflush Raw Materials From Work-in-Progress Warehouse" - }, - { - "fieldname": "warehouses", - "fieldtype": "Section Break", - "label": "Warehouses", - "options": "fa fa-building" - }, - { - "fieldname": "wip_warehouse", - "fieldtype": "Link", - "label": "Work-in-Progress Warehouse", - "options": "Warehouse" - }, - { - "fieldname": "fg_warehouse", - "fieldtype": "Link", - "label": "Target Warehouse", - "options": "Warehouse" - }, - { - "fieldname": "column_break_12", - "fieldtype": "Column Break" - }, - { - "fieldname": "scrap_warehouse", - "fieldtype": "Link", - "label": "Scrap Warehouse", - "options": "Warehouse" - }, - { - "fieldname": "required_items_section", - "fieldtype": "Section Break", - "label": "Required Items" - }, - { - "fieldname": "required_items", - "fieldtype": "Table", - "label": "Required Items", - "no_copy": 1, - "options": "Work Order Item", - "print_hide": 1 - }, - { - "fieldname": "time", - "fieldtype": "Section Break", - "label": "Time", - "options": "fa fa-time" - }, - { - "allow_on_submit": 1, - "default": "now", - "fieldname": "planned_start_date", - "fieldtype": "Datetime", - "label": "Planned Start Date", - "reqd": 1 - }, - { - "fieldname": "actual_start_date", - "fieldtype": "Datetime", - "label": "Actual Start Date", - "read_only": 1 - }, - { - "fieldname": "column_break_13", - "fieldtype": "Column Break" - }, - { - "fieldname": "planned_end_date", - "fieldtype": "Datetime", - "label": "Planned End Date", - "no_copy": 1, - "read_only": 1 - }, - { - "fieldname": "actual_end_date", - "fieldtype": "Datetime", - "label": "Actual End Date", - "read_only": 1 - }, - { - "allow_on_submit": 1, - "fieldname": "expected_delivery_date", - "fieldtype": "Date", - "label": "Expected Delivery Date" - }, - { - "fieldname": "operations_section", - "fieldtype": "Section Break", - "label": "Operations", - "options": "fa fa-wrench" - }, - { - "default": "Work Order", - "depends_on": "operations", - "fieldname": "transfer_material_against", - "fieldtype": "Select", - "label": "Transfer Material Against", - "options": "\nWork Order\nJob Card" - }, - { - "fieldname": "operations", - "fieldtype": "Table", - "label": "Operations", - "options": "Work Order Operation", - "read_only": 1 - }, - { - "depends_on": "operations", - "fieldname": "section_break_22", - "fieldtype": "Section Break", - "label": "Operation Cost" - }, - { - "fieldname": "planned_operating_cost", - "fieldtype": "Currency", - "label": "Planned Operating Cost", - "options": "Company:company:default_currency", - "read_only": 1 - }, - { - "fieldname": "actual_operating_cost", - "fieldtype": "Currency", - "label": "Actual Operating Cost", - "no_copy": 1, - "options": "Company:company:default_currency", - "read_only": 1 - }, - { - "fieldname": "additional_operating_cost", - "fieldtype": "Currency", - "label": "Additional Operating Cost", - "no_copy": 1, - "options": "Company:company:default_currency" - }, - { - "fieldname": "column_break_24", - "fieldtype": "Column Break" - }, - { - "fieldname": "total_operating_cost", - "fieldtype": "Currency", - "label": "Total Operating Cost", - "no_copy": 1, - "options": "Company:company:default_currency", - "read_only": 1 - }, - { - "collapsible": 1, - "fieldname": "more_info", - "fieldtype": "Section Break", - "label": "More Information", - "options": "fa fa-file-text" - }, - { - "fieldname": "description", - "fieldtype": "Small Text", - "label": "Item Description", - "read_only": 1 - }, - { - "fieldname": "stock_uom", - "fieldtype": "Link", - "label": "Stock UOM", - "oldfieldname": "stock_uom", - "oldfieldtype": "Data", - "options": "UOM", - "read_only": 1 - }, - { - "fieldname": "column_break2", - "fieldtype": "Column Break", - "width": "50%" - }, - { - "description": "Manufacture against Material Request", - "fieldname": "material_request", - "fieldtype": "Link", - "label": "Material Request", - "options": "Material Request" - }, - { - "fieldname": "material_request_item", - "fieldtype": "Data", - "hidden": 1, - "label": "Material Request Item", - "read_only": 1 - }, - { - "fieldname": "sales_order_item", - "fieldtype": "Data", - "hidden": 1, - "label": "Sales Order Item", - "read_only": 1 - }, - { - "fieldname": "production_plan", - "fieldtype": "Link", - "label": "Production Plan", - "no_copy": 1, - "options": "Production Plan", - "print_hide": 1, - "read_only": 1 - }, - { - "fieldname": "production_plan_item", - "fieldtype": "Data", - "label": "Production Plan Item", - "no_copy": 1, - "print_hide": 1, - "read_only": 1 - }, - { - "fieldname": "product_bundle_item", - "fieldtype": "Link", - "label": "Product Bundle Item", - "no_copy": 1, - "options": "Item", - "print_hide": 1, - "read_only": 1 - }, - { - "fieldname": "amended_from", - "fieldtype": "Link", - "ignore_user_permissions": 1, - "label": "Amended From", - "no_copy": 1, - "oldfieldname": "amended_from", - "oldfieldtype": "Data", - "options": "Work Order", - "read_only": 1 - } - ], - "icon": "fa fa-cogs", - "idx": 1, - "image_field": "image", - "is_submittable": 1, - "modified": "2019-05-27 09:36:16.707719", - "modified_by": "Administrator", - "module": "Manufacturing", - "name": "Work Order", - "owner": "Administrator", - "permissions": [ - { - "amend": 1, - "cancel": 1, - "create": 1, - "delete": 1, - "email": 1, - "export": 1, - "import": 1, - "print": 1, - "read": 1, - "report": 1, - "role": "Manufacturing User", - "set_user_permissions": 1, - "share": 1, - "submit": 1, - "write": 1 - }, - { - "read": 1, - "report": 1, - "role": "Stock User" - } - ], - "sort_order": "ASC", - "title_field": "production_item", - "track_changes": 1, - "track_seen": 1 -} \ No newline at end of file + "allow_import": 1, + "autoname": "naming_series:", + "creation": "2013-01-10 16:34:16", + "doctype": "DocType", + "document_type": "Setup", + "field_order": [ + "item", + "naming_series", + "status", + "production_item", + "item_name", + "image", + "bom_no", + "allow_alternative_item", + "use_multi_level_bom", + "skip_transfer", + "column_break1", + "company", + "qty", + "material_transferred_for_manufacturing", + "produced_qty", + "sales_order", + "project", + "from_wip_warehouse", + "warehouses", + "wip_warehouse", + "fg_warehouse", + "column_break_12", + "scrap_warehouse", + "required_items_section", + "required_items", + "time", + "planned_start_date", + "actual_start_date", + "column_break_13", + "planned_end_date", + "actual_end_date", + "expected_delivery_date", + "operations_section", + "transfer_material_against", + "operations", + "section_break_22", + "planned_operating_cost", + "actual_operating_cost", + "additional_operating_cost", + "column_break_24", + "total_operating_cost", + "more_info", + "description", + "stock_uom", + "column_break2", + "material_request", + "material_request_item", + "sales_order_item", + "production_plan", + "production_plan_item", + "product_bundle_item", + "amended_from" + ], + "fields": [ + { + "fieldname": "item", + "fieldtype": "Section Break", + "options": "fa fa-gift" + }, + { + "fieldname": "naming_series", + "fieldtype": "Select", + "label": "Series", + "options": "MFG-WO-.YYYY.-", + "print_hide": 1, + "reqd": 1, + "set_only_once": 1 + }, + { + "default": "Draft", + "depends_on": "eval:!doc.__islocal", + "fieldname": "status", + "fieldtype": "Select", + "label": "Status", + "no_copy": 1, + "oldfieldname": "status", + "oldfieldtype": "Select", + "options": "\nDraft\nSubmitted\nNot Started\nIn Process\nCompleted\nStopped\nCancelled", + "read_only": 1, + "reqd": 1, + "search_index": 1 + }, + { + "fieldname": "production_item", + "fieldtype": "Link", + "in_global_search": 1, + "in_list_view": 1, + "in_standard_filter": 1, + "label": "Item To Manufacture", + "oldfieldname": "production_item", + "oldfieldtype": "Link", + "options": "Item", + "reqd": 1 + }, + { + "depends_on": "eval:doc.production_item", + "fieldname": "item_name", + "fieldtype": "Data", + "label": "Item Name", + "read_only": 1 + }, + { + "fetch_from": "production_item.image", + "fieldname": "image", + "fieldtype": "Attach Image", + "hidden": 1, + "label": "Image", + "options": "image", + "print_hide": 1, + "read_only": 1 + }, + { + "fieldname": "bom_no", + "fieldtype": "Link", + "label": "BOM No", + "oldfieldname": "bom_no", + "oldfieldtype": "Link", + "options": "BOM", + "reqd": 1 + }, + { + "default": "0", + "fieldname": "allow_alternative_item", + "fieldtype": "Check", + "label": "Allow Alternative Item" + }, + { + "default": "1", + "description": "Plan material for sub-assemblies", + "fieldname": "use_multi_level_bom", + "fieldtype": "Check", + "label": "Use Multi-Level BOM", + "print_hide": 1 + }, + { + "default": "0", + "description": "Check if material transfer entry is not required", + "fieldname": "skip_transfer", + "fieldtype": "Check", + "label": "Skip Material Transfer to WIP Warehouse" + }, + { + "fieldname": "column_break1", + "fieldtype": "Column Break", + "oldfieldtype": "Column Break", + "width": "50%" + }, + { + "fieldname": "company", + "fieldtype": "Link", + "label": "Company", + "oldfieldname": "company", + "oldfieldtype": "Link", + "options": "Company", + "remember_last_selected_value": 1, + "reqd": 1 + }, + { + "fieldname": "qty", + "fieldtype": "Float", + "label": "Qty To Manufacture", + "oldfieldname": "qty", + "oldfieldtype": "Currency", + "reqd": 1 + }, + { + "default": "0", + "depends_on": "eval:doc.docstatus==1 && doc.skip_transfer==0", + "fieldname": "material_transferred_for_manufacturing", + "fieldtype": "Float", + "label": "Material Transferred for Manufacturing", + "no_copy": 1, + "read_only": 1 + }, + { + "default": "0", + "depends_on": "eval:doc.docstatus==1", + "fieldname": "produced_qty", + "fieldtype": "Float", + "label": "Manufactured Qty", + "no_copy": 1, + "oldfieldname": "produced_qty", + "oldfieldtype": "Currency", + "read_only": 1 + }, + { + "allow_on_submit": 1, + "fieldname": "sales_order", + "fieldtype": "Link", + "in_global_search": 1, + "label": "Sales Order", + "options": "Sales Order" + }, + { + "fieldname": "project", + "fieldtype": "Link", + "label": "Project", + "oldfieldname": "project", + "oldfieldtype": "Link", + "options": "Project" + }, + { + "default": "0", + "depends_on": "skip_transfer", + "fieldname": "from_wip_warehouse", + "fieldtype": "Check", + "label": "Backflush Raw Materials From Work-in-Progress Warehouse" + }, + { + "fieldname": "warehouses", + "fieldtype": "Section Break", + "label": "Warehouses", + "options": "fa fa-building" + }, + { + "fieldname": "wip_warehouse", + "fieldtype": "Link", + "label": "Work-in-Progress Warehouse", + "options": "Warehouse" + }, + { + "fieldname": "fg_warehouse", + "fieldtype": "Link", + "label": "Target Warehouse", + "options": "Warehouse" + }, + { + "fieldname": "column_break_12", + "fieldtype": "Column Break" + }, + { + "fieldname": "scrap_warehouse", + "fieldtype": "Link", + "label": "Scrap Warehouse", + "options": "Warehouse" + }, + { + "fieldname": "required_items_section", + "fieldtype": "Section Break", + "label": "Required Items" + }, + { + "fieldname": "required_items", + "fieldtype": "Table", + "label": "Required Items", + "no_copy": 1, + "options": "Work Order Item", + "print_hide": 1 + }, + { + "fieldname": "time", + "fieldtype": "Section Break", + "label": "Time", + "options": "fa fa-time" + }, + { + "allow_on_submit": 1, + "default": "now", + "fieldname": "planned_start_date", + "fieldtype": "Datetime", + "label": "Planned Start Date", + "reqd": 1 + }, + { + "fieldname": "actual_start_date", + "fieldtype": "Datetime", + "label": "Actual Start Date", + "read_only": 1 + }, + { + "fieldname": "column_break_13", + "fieldtype": "Column Break" + }, + { + "fieldname": "planned_end_date", + "fieldtype": "Datetime", + "label": "Planned End Date", + "no_copy": 1, + "read_only": 1 + }, + { + "fieldname": "actual_end_date", + "fieldtype": "Datetime", + "label": "Actual End Date", + "read_only": 1 + }, + { + "allow_on_submit": 1, + "fieldname": "expected_delivery_date", + "fieldtype": "Date", + "label": "Expected Delivery Date" + }, + { + "fieldname": "operations_section", + "fieldtype": "Section Break", + "label": "Operations", + "options": "fa fa-wrench" + }, + { + "default": "Work Order", + "depends_on": "operations", + "fieldname": "transfer_material_against", + "fieldtype": "Select", + "label": "Transfer Material Against", + "options": "\nWork Order\nJob Card" + }, + { + "fieldname": "operations", + "fieldtype": "Table", + "label": "Operations", + "options": "Work Order Operation", + "read_only": 1 + }, + { + "depends_on": "operations", + "fieldname": "section_break_22", + "fieldtype": "Section Break", + "label": "Operation Cost" + }, + { + "fieldname": "planned_operating_cost", + "fieldtype": "Currency", + "label": "Planned Operating Cost", + "options": "Company:company:default_currency", + "read_only": 1 + }, + { + "fieldname": "actual_operating_cost", + "fieldtype": "Currency", + "label": "Actual Operating Cost", + "no_copy": 1, + "options": "Company:company:default_currency", + "read_only": 1 + }, + { + "fieldname": "additional_operating_cost", + "fieldtype": "Currency", + "label": "Additional Operating Cost", + "no_copy": 1, + "options": "Company:company:default_currency" + }, + { + "fieldname": "column_break_24", + "fieldtype": "Column Break" + }, + { + "fieldname": "total_operating_cost", + "fieldtype": "Currency", + "label": "Total Operating Cost", + "no_copy": 1, + "options": "Company:company:default_currency", + "read_only": 1 + }, + { + "collapsible": 1, + "fieldname": "more_info", + "fieldtype": "Section Break", + "label": "More Information", + "options": "fa fa-file-text" + }, + { + "fieldname": "description", + "fieldtype": "Small Text", + "label": "Item Description", + "read_only": 1 + }, + { + "fieldname": "stock_uom", + "fieldtype": "Link", + "label": "Stock UOM", + "oldfieldname": "stock_uom", + "oldfieldtype": "Data", + "options": "UOM", + "read_only": 1 + }, + { + "fieldname": "column_break2", + "fieldtype": "Column Break", + "width": "50%" + }, + { + "description": "Manufacture against Material Request", + "fieldname": "material_request", + "fieldtype": "Link", + "label": "Material Request", + "options": "Material Request" + }, + { + "fieldname": "material_request_item", + "fieldtype": "Data", + "hidden": 1, + "label": "Material Request Item", + "read_only": 1 + }, + { + "fieldname": "sales_order_item", + "fieldtype": "Data", + "hidden": 1, + "label": "Sales Order Item", + "read_only": 1 + }, + { + "fieldname": "production_plan", + "fieldtype": "Link", + "label": "Production Plan", + "no_copy": 1, + "options": "Production Plan", + "print_hide": 1, + "read_only": 1 + }, + { + "fieldname": "production_plan_item", + "fieldtype": "Data", + "label": "Production Plan Item", + "no_copy": 1, + "print_hide": 1, + "read_only": 1 + }, + { + "fieldname": "product_bundle_item", + "fieldtype": "Link", + "label": "Product Bundle Item", + "no_copy": 1, + "options": "Item", + "print_hide": 1, + "read_only": 1 + }, + { + "fieldname": "amended_from", + "fieldtype": "Link", + "ignore_user_permissions": 1, + "label": "Amended From", + "no_copy": 1, + "oldfieldname": "amended_from", + "oldfieldtype": "Data", + "options": "Work Order", + "read_only": 1 + } + ], + "icon": "fa fa-cogs", + "idx": 1, + "image_field": "image", + "is_submittable": 1, + "modified": "2019-05-27 09:36:16.707719", + "modified_by": "Administrator", + "module": "Manufacturing", + "name": "Work Order", + "owner": "Administrator", + "permissions": [ + { + "amend": 1, + "cancel": 1, + "create": 1, + "delete": 1, + "email": 1, + "export": 1, + "import": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "Manufacturing User", + "set_user_permissions": 1, + "share": 1, + "submit": 1, + "write": 1 + }, + { + "read": 1, + "report": 1, + "role": "Stock User" + } + ], + "sort_order": "ASC", + "title_field": "production_item", + "track_changes": 1, + "track_seen": 1 + } \ No newline at end of file diff --git a/erpnext/patches.txt b/erpnext/patches.txt index 36a31cfadc..72db8ad063 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -533,7 +533,7 @@ erpnext.patches.v11_0.create_department_records_for_each_company erpnext.patches.v11_0.make_location_from_warehouse erpnext.patches.v11_0.make_asset_finance_book_against_old_entries erpnext.patches.v11_0.check_buying_selling_in_currency_exchange -erpnext.patches.v11_0.move_item_defaults_to_child_table_for_multicompany #02-07-2018 +erpnext.patches.v11_0.move_item_defaults_to_child_table_for_multicompany #02-07-2018 #19-06-2019 erpnext.patches.v11_0.refactor_erpnext_shopify #2018-09-07 erpnext.patches.v11_0.rename_overproduction_percent_field erpnext.patches.v11_0.update_backflush_subcontract_rm_based_on_bom @@ -569,7 +569,7 @@ execute:frappe.delete_doc_if_exists("Page", "sales-analytics") execute:frappe.delete_doc_if_exists("Page", "purchase-analytics") execute:frappe.delete_doc_if_exists("Page", "stock-analytics") execute:frappe.delete_doc_if_exists("Page", "production-analytics") -erpnext.patches.v11_0.ewaybill_fields_gst_india #2019-05-01 +erpnext.patches.v11_0.ewaybill_fields_gst_india #2018-11-13 #2019-01-09 #2019-04-01 #2019-04-26 #2019-05-03 erpnext.patches.v11_0.drop_column_max_days_allowed erpnext.patches.v10_0.update_user_image_in_employee erpnext.patches.v10_0.repost_gle_for_purchase_receipts_with_rejected_items @@ -605,6 +605,13 @@ erpnext.patches.v11_1.delete_scheduling_tool erpnext.patches.v12_0.make_custom_fields_for_bank_remittance #14-06-2019 execute:frappe.delete_doc_if_exists("Page", "support-analytics") erpnext.patches.v12_0.make_item_manufacturer +erpnext.patches.v11_1.move_customer_lead_to_dynamic_column +erpnext.patches.v11_1.set_default_action_for_quality_inspection +erpnext.patches.v11_1.delete_bom_browser +erpnext.patches.v11_1.set_missing_title_for_quotation +erpnext.patches.v11_1.update_bank_transaction_status +erpnext.patches.v11_1.renamed_delayed_item_report +erpnext.patches.v11_1.set_missing_opportunity_from erpnext.patches.v12_0.set_quotation_status erpnext.patches.v12_0.set_priority_for_support erpnext.patches.v12_0.delete_priority_property_setter diff --git a/erpnext/patches/v11_0/move_item_defaults_to_child_table_for_multicompany.py b/erpnext/patches/v11_0/move_item_defaults_to_child_table_for_multicompany.py index 01f84a0313..c7c7635540 100644 --- a/erpnext/patches/v11_0/move_item_defaults_to_child_table_for_multicompany.py +++ b/erpnext/patches/v11_0/move_item_defaults_to_child_table_for_multicompany.py @@ -17,10 +17,8 @@ def execute(): frappe.reload_doc('stock', 'doctype', 'item_default') frappe.reload_doc('stock', 'doctype', 'item') - if frappe.db.a_row_exists('Item Default'): return - companies = frappe.get_all("Company") - if len(companies) == 1: + if len(companies) == 1 and not frappe.get_all("Item Default", limit=1): try: frappe.db.sql(''' INSERT INTO `tabItem Default` @@ -35,32 +33,64 @@ def execute(): except: pass else: - item_details = frappe.get_all("Item", fields=["name", "default_warehouse", "buying_cost_center", - "expense_account", "selling_cost_center", "income_account"], limit=100) + item_details = frappe.db.sql(""" SELECT name, default_warehouse, + buying_cost_center, expense_account, selling_cost_center, income_account + FROM tabItem + WHERE + name not in (select distinct parent from `tabItem Default`) and ifnull(disabled, 0) = 0""" + , as_dict=1) - for item in item_details: - item_defaults = [] + items_default_data = {} + for item_data in item_details: + for d in [["default_warehouse", "Warehouse"], ["expense_account", "Account"], + ["income_account", "Account"], ["buying_cost_center", "Cost Center"], + ["selling_cost_center", "Cost Center"]]: + if item_data.get(d[0]): + company = frappe.get_value(d[1], item_data.get(d[0]), "company", cache=True) - def insert_into_item_defaults(doc_field_name, doc_field_value, company): - for d in item_defaults: - if d.get("company") == company: - d[doc_field_name] = doc_field_value - return - item_defaults.append({ - "company": company, - doc_field_name: doc_field_value - }) + if item_data.name not in items_default_data: + items_default_data[item_data.name] = {} - for d in [ - ["default_warehouse", "Warehouse"], ["expense_account", "Account"], ["income_account", "Account"], - ["buying_cost_center", "Cost Center"], ["selling_cost_center", "Cost Center"] - ]: - if item.get(d[0]): - company = frappe.get_value(d[1], item.get(d[0]), "company", cache=True) - insert_into_item_defaults(d[0], item.get(d[0]), company) + company_wise_data = items_default_data[item_data.name] - doc = frappe.get_doc("Item", item.name) - doc.extend("item_defaults", item_defaults) + if company not in company_wise_data: + company_wise_data[company] = {} - for child_doc in doc.item_defaults: - child_doc.db_insert() \ No newline at end of file + default_data = company_wise_data[company] + default_data[d[0]] = item_data.get(d[0]) + + to_insert_data = [] + + # items_default_data data structure will be as follow + # { + # 'item_code 1': {'company 1': {'default_warehouse': 'Test Warehouse 1'}}, + # 'item_code 2': { + # 'company 1': {'default_warehouse': 'Test Warehouse 1'}, + # 'company 2': {'default_warehouse': 'Test Warehouse 1'} + # } + # } + + for item_code, companywise_item_data in items_default_data.items(): + for company, item_default_data in companywise_item_data.items(): + to_insert_data.append(( + frappe.generate_hash("", 10), + item_code, + 'Item', + 'item_defaults', + company, + item_default_data.get('default_warehouse'), + item_default_data.get('expense_account'), + item_default_data.get('income_account'), + item_default_data.get('buying_cost_center'), + item_default_data.get('selling_cost_center'), + )) + + if to_insert_data: + frappe.db.sql(''' + INSERT INTO `tabItem Default` + ( + `name`, `parent`, `parenttype`, `parentfield`, `company`, `default_warehouse`, + `expense_account`, `income_account`, `buying_cost_center`, `selling_cost_center` + ) + VALUES {} + '''.format(', '.join(['%s'] * len(to_insert_data))), tuple(to_insert_data)) \ No newline at end of file diff --git a/erpnext/patches/v11_1/delete_bom_browser.py b/erpnext/patches/v11_1/delete_bom_browser.py new file mode 100644 index 0000000000..457f511667 --- /dev/null +++ b/erpnext/patches/v11_1/delete_bom_browser.py @@ -0,0 +1,8 @@ +# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors +# License: GNU General Public License v3. See license.txt + +from __future__ import unicode_literals +import frappe + +def execute(): + frappe.delete_doc_if_exists('Page', 'bom-browser') \ No newline at end of file diff --git a/erpnext/patches/v11_1/move_customer_lead_to_dynamic_column.py b/erpnext/patches/v11_1/move_customer_lead_to_dynamic_column.py new file mode 100644 index 0000000000..5b1251c31c --- /dev/null +++ b/erpnext/patches/v11_1/move_customer_lead_to_dynamic_column.py @@ -0,0 +1,14 @@ +# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors +# License: GNU General Public License v3. See license.txt + +from __future__ import unicode_literals +import frappe + +def execute(): + frappe.reload_doctype("Quotation") + frappe.db.sql(""" UPDATE `tabQuotation` set party_name = lead WHERE quotation_to = 'Lead' """) + frappe.db.sql(""" UPDATE `tabQuotation` set party_name = customer WHERE quotation_to = 'Customer' """) + + frappe.reload_doctype("Opportunity") + frappe.db.sql(""" UPDATE `tabOpportunity` set party_name = lead WHERE opportunity_from = 'Lead' """) + frappe.db.sql(""" UPDATE `tabOpportunity` set party_name = customer WHERE opportunity_from = 'Customer' """) \ No newline at end of file diff --git a/erpnext/patches/v11_1/renamed_delayed_item_report.py b/erpnext/patches/v11_1/renamed_delayed_item_report.py new file mode 100644 index 0000000000..222b9a0b17 --- /dev/null +++ b/erpnext/patches/v11_1/renamed_delayed_item_report.py @@ -0,0 +1,10 @@ +# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors +# License: GNU General Public License v3. See license.txt + +from __future__ import unicode_literals +import frappe + +def execute(): + for report in ["Delayed Order Item Summary", "Delayed Order Summary"]: + if frappe.db.exists("Report", report): + frappe.delete_doc("Report", report) \ No newline at end of file diff --git a/erpnext/patches/v11_1/set_default_action_for_quality_inspection.py b/erpnext/patches/v11_1/set_default_action_for_quality_inspection.py new file mode 100644 index 0000000000..b13239f7d1 --- /dev/null +++ b/erpnext/patches/v11_1/set_default_action_for_quality_inspection.py @@ -0,0 +1,15 @@ +# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors +# License: GNU General Public License v3. See license.txt + +from __future__ import unicode_literals +import frappe + +def execute(): + stock_settings = frappe.get_doc('Stock Settings') + if stock_settings.default_warehouse and not frappe.db.exists("Warehouse", stock_settings.default_warehouse): + stock_settings.default_warehouse = None + if stock_settings.stock_uom and not frappe.db.exists("UOM", stock_settings.stock_uom): + stock_settings.stock_uom = None + stock_settings.flags.ignore_mandatory = True + stock_settings.action_if_quality_inspection_is_not_submitted = "Stop" + stock_settings.save() diff --git a/erpnext/patches/v11_1/set_missing_opportunity_from.py b/erpnext/patches/v11_1/set_missing_opportunity_from.py new file mode 100644 index 0000000000..cb444b2e5d --- /dev/null +++ b/erpnext/patches/v11_1/set_missing_opportunity_from.py @@ -0,0 +1,17 @@ +from __future__ import unicode_literals +import frappe + +def execute(): + + frappe.reload_doctype("Opportunity") + if frappe.db.has_column("Opportunity", "enquiry_from"): + frappe.db.sql(""" UPDATE `tabOpportunity` set opportunity_from = enquiry_from + where ifnull(opportunity_from, '') = '' and ifnull(enquiry_from, '') != ''""") + + if frappe.db.has_column("Opportunity", "lead") and frappe.db.has_column("Opportunity", "enquiry_from"): + frappe.db.sql(""" UPDATE `tabOpportunity` set party_name = lead + where enquiry_from = 'Lead' and ifnull(party_name, '') = '' and ifnull(lead, '') != ''""") + + if frappe.db.has_column("Opportunity", "customer") and frappe.db.has_column("Opportunity", "enquiry_from"): + frappe.db.sql(""" UPDATE `tabOpportunity` set party_name = customer + where enquiry_from = 'Customer' and ifnull(party_name, '') = '' and ifnull(customer, '') != ''""") diff --git a/erpnext/patches/v11_1/set_missing_title_for_quotation.py b/erpnext/patches/v11_1/set_missing_title_for_quotation.py new file mode 100644 index 0000000000..e2ef3433d3 --- /dev/null +++ b/erpnext/patches/v11_1/set_missing_title_for_quotation.py @@ -0,0 +1,28 @@ +import frappe + +def execute(): + frappe.reload_doctype("Quotation") + # update customer_name from Customer document if quotation_to is set to Customer + frappe.db.sql(''' + update tabQuotation, tabCustomer + set + tabQuotation.customer_name = tabCustomer.customer_name, + tabQuotation.title = tabCustomer.customer_name + where + tabQuotation.customer_name is null + and tabQuotation.party_name = tabCustomer.name + and tabQuotation.quotation_to = 'Customer' + ''') + + # update customer_name from Lead document if quotation_to is set to Lead + + frappe.db.sql(''' + update tabQuotation, tabLead + set + tabQuotation.customer_name = case when ifnull(tabLead.company_name, '') != '' then tabLead.company_name else tabLead.lead_name end, + tabQuotation.title = case when ifnull(tabLead.company_name, '') != '' then tabLead.company_name else tabLead.lead_name end + where + tabQuotation.customer_name is null + and tabQuotation.party_name = tabLead.name + and tabQuotation.quotation_to = 'Lead' + ''') diff --git a/erpnext/patches/v11_1/update_bank_transaction_status.py b/erpnext/patches/v11_1/update_bank_transaction_status.py new file mode 100644 index 0000000000..1acdfcccf9 --- /dev/null +++ b/erpnext/patches/v11_1/update_bank_transaction_status.py @@ -0,0 +1,15 @@ +# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors +# License: GNU General Public License v3. See license.txt + +from __future__ import unicode_literals +import frappe + +def execute(): + frappe.reload_doc("accounts", "doctype", "bank_transaction") + + frappe.db.sql(""" UPDATE `tabBank Transaction` + SET status = 'Reconciled' + WHERE + status = 'Settled' and (debit = allocated_amount or credit = allocated_amount) + and ifnull(allocated_amount, 0) > 0 + """) \ No newline at end of file diff --git a/erpnext/patches/v8_7/sync_india_custom_fields.py b/erpnext/patches/v8_7/sync_india_custom_fields.py index e1ae0b738a..80d66c2ab1 100644 --- a/erpnext/patches/v8_7/sync_india_custom_fields.py +++ b/erpnext/patches/v8_7/sync_india_custom_fields.py @@ -8,10 +8,10 @@ def execute(): return frappe.reload_doc('hr', 'doctype', 'payroll_period') - frappe.reload_doc('hr', 'doctype', 'employee_tax_exemption_declaration_category') - frappe.reload_doc('hr', 'doctype', 'employee_tax_exemption_proof_submission_detail') frappe.reload_doc('hr', 'doctype', 'employee_tax_exemption_declaration') frappe.reload_doc('hr', 'doctype', 'employee_tax_exemption_proof_submission') + frappe.reload_doc('hr', 'doctype', 'employee_tax_exemption_declaration_category') + frappe.reload_doc('hr', 'doctype', 'employee_tax_exemption_proof_submission_detail') for doctype in ["Sales Invoice", "Delivery Note", "Purchase Invoice"]: frappe.db.sql("""delete from `tabCustom Field` where dt = %s diff --git a/erpnext/projects/doctype/project/project.py b/erpnext/projects/doctype/project/project.py index 75847d5167..55a689259a 100644 --- a/erpnext/projects/doctype/project/project.py +++ b/erpnext/projects/doctype/project/project.py @@ -30,13 +30,14 @@ class Project(Document): self.update_costing() - def __setup__(self): + def before_print(self): self.onload() def load_tasks(self): """Load `tasks` from the database""" if frappe.flags.in_import: return + project_task_custom_fields = frappe.get_all("Custom Field", {"dt": "Project Task"}, "fieldname") self.tasks = [] for task in self.get_tasks(): @@ -50,7 +51,7 @@ class Project(Document): "task_weight": task.task_weight } - self.map_custom_fields(task, task_map) + self.map_custom_fields(task, task_map, project_task_custom_fields) self.append("tasks", task_map) @@ -76,7 +77,7 @@ class Project(Document): self.copy_from_template() self.validate_dates() self.send_welcome_email() - self.update_percent_complete() + self.update_percent_complete(from_validate=True) def copy_from_template(self): ''' @@ -181,7 +182,7 @@ class Project(Document): "task_weight": t.task_weight }) - self.map_custom_fields(t, task) + self.map_custom_fields(t, task, custom_fields) task.flags.ignore_links = True task.flags.from_project = True @@ -205,10 +206,6 @@ class Project(Document): for t in frappe.get_all("Task", ["name"], {"project": self.name, "name": ("not in", task_names)}): self.deleted_task_list.append(t.name) - def update_costing_and_percentage_complete(self): - self.update_percent_complete() - self.update_costing() - def is_row_updated(self, row, existing_task_data, fields): if self.get("__islocal") or not existing_task_data: return True @@ -218,10 +215,8 @@ class Project(Document): if row.get(field) != d.get(field): return True - def map_custom_fields(self, source, target): - project_task_custom_fields = frappe.get_all("Custom Field", {"dt": "Project Task"}, "fieldname") - - for field in project_task_custom_fields: + def map_custom_fields(self, source, target, custom_fields): + for field in custom_fields: target.update({ field.fieldname: source.get(field.fieldname) }) @@ -229,15 +224,13 @@ class Project(Document): def update_project(self): self.update_percent_complete() self.update_costing() - self.flags.dont_sync_tasks = True - self.save(ignore_permissions=True) def after_insert(self): self.copy_from_template() if self.sales_order: frappe.db.set_value("Sales Order", self.sales_order, "project", self.name) - def update_percent_complete(self): + def update_percent_complete(self, from_validate=False): if not self.tasks: return total = frappe.db.sql("""select count(name) from tabTask where project=%s""", self.name)[0][0] @@ -275,6 +268,9 @@ class Project(Document): else: self.status = "Open" + if not from_validate: + self.db_update() + def update_costing(self): from_time_sheet = frappe.db.sql("""select sum(costing_amount) as costing_amount, @@ -301,6 +297,7 @@ class Project(Document): self.update_sales_amount() self.update_billed_amount() self.calculate_gross_margin() + self.db_update() def calculate_gross_margin(self): expense_amount = (flt(self.total_costing_amount) + flt(self.total_expense_claim) @@ -354,7 +351,7 @@ class Project(Document): def on_update(self): self.delete_task() self.load_tasks() - self.update_costing_and_percentage_complete() + self.update_project() self.update_dependencies_on_duplicated_project() def delete_task(self): @@ -648,7 +645,7 @@ def set_project_status(project, status): set status for project and all related tasks ''' if not status in ('Completed', 'Cancelled'): - frappe.throw('Status must be Cancelled or Completed') + frappe.throw(_('Status must be Cancelled or Completed')) project = frappe.get_doc('Project', project) frappe.has_permission(doc = project, throw = True) @@ -658,4 +655,3 @@ def set_project_status(project, status): project.status = status project.save() - diff --git a/erpnext/projects/doctype/project/test_project.py b/erpnext/projects/doctype/project/test_project.py index f0a3656c20..beb1f130f5 100644 --- a/erpnext/projects/doctype/project/test_project.py +++ b/erpnext/projects/doctype/project/test_project.py @@ -32,23 +32,6 @@ class TestProject(unittest.TestCase): self.assertEqual(task4.title, 'Task 4') self.assertEqual(getdate(task4.end_date), getdate('2019-01-06')) - def test_bulk_complete_and_cancel(self): - frappe.db.sql('delete from tabTask where project = "Test Project for Bulk Actions"') - frappe.delete_doc('Project', 'Test Project for Bulk Actions') - - project = get_project('Test Project for Bulk Actions') - set_project_status(project.name, 'Completed') - - # check all tasks are completed - self.assertTrue(all([d.status=='Completed' for d in - frappe.get_all('Task', ['name', 'status'], dict(project = project.name))])) - - # check all tasks are cancelled - set_project_status(project.name, 'Cancelled') - self.assertTrue(all([d.status=='Cancelled' for d in - frappe.get_all('Task', ['name', 'status'], dict(project = project.name))])) - - def get_project(name): template = get_project_template() diff --git a/erpnext/projects/doctype/task/task.js b/erpnext/projects/doctype/task/task.js index 298efbf236..489c7a3b32 100644 --- a/erpnext/projects/doctype/task/task.js +++ b/erpnext/projects/doctype/task/task.js @@ -19,7 +19,7 @@ frappe.ui.form.on("Task", { }, refresh: function(frm) { - frm.fields_dict['parent_task'].get_query = function() { + frm.fields_dict['parent_task'].get_query = function () { return { filters: { "is_group": 1, @@ -27,8 +27,22 @@ frappe.ui.form.on("Task", { } } - if(!frm.doc.is_group){ + if (!frm.doc.is_group) { if (!frm.is_new()) { + if (frappe.model.can_read("Timesheet")) { + frm.add_custom_button(__("Timesheet"), () => { + frappe.route_options = { "project": frm.doc.project, "task": frm.doc.name } + frappe.set_route("List", "Timesheet"); + }, __("View"), true); + } + + if (frappe.model.can_read("Expense Claim")) { + frm.add_custom_button(__("Expense Claims"), () => { + frappe.route_options = { "project": frm.doc.project, "task": frm.doc.name }; + frappe.set_route("List", "Expense Claim"); + }, __("View"), true); + } + if (frm.perm[0].write) { if (!["Closed", "Cancelled"].includes(frm.doc.status)) { frm.add_custom_button(__("Close"), () => { diff --git a/erpnext/projects/doctype/task/task.json b/erpnext/projects/doctype/task/task.json index 269d417800..c5131c70d9 100644 --- a/erpnext/projects/doctype/task/task.json +++ b/erpnext/projects/doctype/task/task.json @@ -1,380 +1,381 @@ { - "allow_import": 1, - "autoname": "TASK-.YYYY.-.#####", - "creation": "2013-01-29 19:25:50", - "doctype": "DocType", - "document_type": "Setup", - "field_order": [ - "subject", - "project", - "issue", - "type", - "is_group", - "column_break0", - "status", - "priority", - "task_weight", - "color", - "parent_task", - "sb_timeline", - "exp_start_date", - "expected_time", - "column_break_11", - "exp_end_date", - "progress", - "is_milestone", - "sb_details", - "description", - "sb_depends_on", - "depends_on", - "depends_on_tasks", - "sb_actual", - "act_start_date", - "actual_time", - "column_break_15", - "act_end_date", - "sb_costing", - "total_costing_amount", - "total_expense_claim", - "column_break_20", - "total_billing_amount", - "sb_more_info", - "review_date", - "closing_date", - "column_break_22", - "department", - "company", - "lft", - "rgt", - "old_parent" - ], - "fields": [ - { - "fieldname": "subject", - "fieldtype": "Data", - "in_global_search": 1, - "label": "Subject", - "reqd": 1, - "search_index": 1 - }, - { - "bold": 1, - "fieldname": "project", - "fieldtype": "Link", - "in_global_search": 1, - "in_list_view": 1, - "in_standard_filter": 1, - "label": "Project", - "oldfieldname": "project", - "oldfieldtype": "Link", - "options": "Project", - "remember_last_selected_value": 1, - "search_index": 1 - }, - { - "fieldname": "issue", - "fieldtype": "Link", - "label": "Issue", - "options": "Issue" - }, - { - "fieldname": "type", - "fieldtype": "Link", - "label": "Type", - "options": "Task Type" - }, - { - "bold": 1, - "default": "0", - "fieldname": "is_group", - "fieldtype": "Check", - "in_list_view": 1, - "label": "Is Group" - }, - { - "fieldname": "column_break0", - "fieldtype": "Column Break", - "oldfieldtype": "Column Break", - "print_width": "50%", - "width": "50%" - }, - { - "bold": 1, - "fieldname": "status", - "fieldtype": "Select", - "in_list_view": 1, - "in_standard_filter": 1, - "label": "Status", - "no_copy": 1, - "oldfieldname": "status", - "oldfieldtype": "Select", - "options": "Open\nWorking\nPending Review\nOverdue\nCompleted\nCancelled" - }, - { - "fieldname": "priority", - "fieldtype": "Select", - "in_list_view": 1, - "in_standard_filter": 1, - "label": "Priority", - "oldfieldname": "priority", - "oldfieldtype": "Select", - "options": "Low\nMedium\nHigh\nUrgent", - "search_index": 1 - }, - { - "fieldname": "color", - "fieldtype": "Color", - "label": "Color" - }, - { - "bold": 1, - "fieldname": "parent_task", - "fieldtype": "Link", - "ignore_user_permissions": 1, - "label": "Parent Task", - "options": "Task", - "search_index": 1 - }, - { - "collapsible": 1, - "collapsible_depends_on": "eval:doc.__islocal", - "fieldname": "sb_timeline", - "fieldtype": "Section Break", - "label": "Timeline" - }, - { - "fieldname": "exp_start_date", - "fieldtype": "Date", - "label": "Expected Start Date", - "oldfieldname": "exp_start_date", - "oldfieldtype": "Date" - }, - { - "default": "0", - "fieldname": "expected_time", - "fieldtype": "Float", - "label": "Expected Time (in hours)", - "oldfieldname": "exp_total_hrs", - "oldfieldtype": "Data" - }, - { - "fetch_from": "type.weight", - "fieldname": "task_weight", - "fieldtype": "Float", - "label": "Weight" - }, - { - "fieldname": "column_break_11", - "fieldtype": "Column Break" - }, - { - "bold": 1, - "fieldname": "exp_end_date", - "fieldtype": "Date", - "label": "Expected End Date", - "oldfieldname": "exp_end_date", - "oldfieldtype": "Date", - "search_index": 1 - }, - { - "fieldname": "progress", - "fieldtype": "Percent", - "label": "% Progress" - }, - { - "fieldname": "is_milestone", - "fieldtype": "Check", - "in_list_view": 1, - "label": "Is Milestone" - }, - { - "fieldname": "sb_details", - "fieldtype": "Section Break", - "label": "Details", - "oldfieldtype": "Section Break" - }, - { - "fieldname": "description", - "fieldtype": "Text Editor", - "in_preview": 1, - "label": "Task Description", - "oldfieldname": "description", - "oldfieldtype": "Text Editor", - "print_width": "300px", - "width": "300px" - }, - { - "fieldname": "sb_depends_on", - "fieldtype": "Section Break", - "label": "Dependencies", - "oldfieldtype": "Section Break" - }, - { - "fieldname": "depends_on", - "fieldtype": "Table", - "label": "Dependent Tasks", - "options": "Task Depends On" - }, - { - "fieldname": "depends_on_tasks", - "fieldtype": "Code", - "hidden": 1, - "label": "Depends on Tasks", - "read_only": 1 - }, - { - "fieldname": "sb_actual", - "fieldtype": "Section Break", - "oldfieldtype": "Column Break", - "print_width": "50%", - "width": "50%" - }, - { - "fieldname": "act_start_date", - "fieldtype": "Date", - "label": "Actual Start Date (via Time Sheet)", - "oldfieldname": "act_start_date", - "oldfieldtype": "Date", - "read_only": 1 - }, - { - "fieldname": "actual_time", - "fieldtype": "Float", - "label": "Actual Time (in hours)", - "read_only": 1 - }, - { - "fieldname": "column_break_15", - "fieldtype": "Column Break" - }, - { - "fieldname": "act_end_date", - "fieldtype": "Date", - "label": "Actual End Date (via Time Sheet)", - "oldfieldname": "act_end_date", - "oldfieldtype": "Date", - "read_only": 1 - }, - { - "collapsible": 1, - "fieldname": "sb_costing", - "fieldtype": "Section Break", - "label": "Costing" - }, - { - "fieldname": "total_costing_amount", - "fieldtype": "Currency", - "label": "Total Costing Amount (via Time Sheet)", - "oldfieldname": "actual_budget", - "oldfieldtype": "Currency", - "options": "Company:company:default_currency", - "read_only": 1 - }, - { - "fieldname": "total_expense_claim", - "fieldtype": "Currency", - "label": "Total Expense Claim (via Expense Claim)", - "options": "Company:company:default_currency", - "read_only": 1 - }, - { - "fieldname": "column_break_20", - "fieldtype": "Column Break" - }, - { - "fieldname": "total_billing_amount", - "fieldtype": "Currency", - "label": "Total Billing Amount (via Time Sheet)", - "read_only": 1 - }, - { - "collapsible": 1, - "fieldname": "sb_more_info", - "fieldtype": "Section Break", - "label": "More Info" - }, - { - "depends_on": "eval:doc.status == \"Closed\" || doc.status == \"Pending Review\"", - "fieldname": "review_date", - "fieldtype": "Date", - "label": "Review Date", - "oldfieldname": "review_date", - "oldfieldtype": "Date" - }, - { - "depends_on": "eval:doc.status == \"Closed\"", - "fieldname": "closing_date", - "fieldtype": "Date", - "label": "Closing Date", - "oldfieldname": "closing_date", - "oldfieldtype": "Date" - }, - { - "fieldname": "column_break_22", - "fieldtype": "Column Break" - }, - { - "fieldname": "department", - "fieldtype": "Link", - "label": "Department", - "options": "Department" - }, - { - "fieldname": "company", - "fieldtype": "Link", - "label": "Company", - "options": "Company", - "remember_last_selected_value": 1 - }, - { - "fieldname": "lft", - "fieldtype": "Int", - "hidden": 1, - "label": "lft", - "read_only": 1 - }, - { - "fieldname": "rgt", - "fieldtype": "Int", - "hidden": 1, - "label": "rgt", - "read_only": 1 - }, - { - "fieldname": "old_parent", - "fieldtype": "Data", - "hidden": 1, - "ignore_user_permissions": 1, - "label": "Old Parent", - "read_only": 1 - } - ], - "icon": "fa fa-check", - "idx": 1, - "max_attachments": 5, - "modified": "2019-05-16 09:51:15.599416", - "modified_by": "Administrator", - "module": "Projects", - "name": "Task", - "owner": "Administrator", - "permissions": [ - { - "create": 1, - "delete": 1, - "email": 1, - "print": 1, - "read": 1, - "report": 1, - "role": "Projects User", - "share": 1, - "write": 1 - } - ], - "search_fields": "subject", - "show_name_in_global_search": 1, - "show_preview_popup": 1, - "sort_order": "DESC", - "timeline_field": "project", - "title_field": "subject", - "track_seen": 1 -} \ No newline at end of file + "allow_import": 1, + "autoname": "TASK-.YYYY.-.#####", + "creation": "2013-01-29 19:25:50", + "doctype": "DocType", + "document_type": "Setup", + "field_order": [ + "subject", + "project", + "issue", + "type", + "is_group", + "column_break0", + "status", + "priority", + "task_weight", + "color", + "parent_task", + "sb_timeline", + "exp_start_date", + "expected_time", + "column_break_11", + "exp_end_date", + "progress", + "is_milestone", + "sb_details", + "description", + "sb_depends_on", + "depends_on", + "depends_on_tasks", + "sb_actual", + "act_start_date", + "actual_time", + "column_break_15", + "act_end_date", + "sb_costing", + "total_costing_amount", + "total_expense_claim", + "column_break_20", + "total_billing_amount", + "sb_more_info", + "review_date", + "closing_date", + "column_break_22", + "department", + "company", + "lft", + "rgt", + "old_parent" + ], + "fields": [ + { + "fieldname": "subject", + "fieldtype": "Data", + "in_global_search": 1, + "label": "Subject", + "reqd": 1, + "search_index": 1, + "in_standard_filter": 1 + }, + { + "bold": 1, + "fieldname": "project", + "fieldtype": "Link", + "in_global_search": 1, + "in_list_view": 1, + "in_standard_filter": 1, + "label": "Project", + "oldfieldname": "project", + "oldfieldtype": "Link", + "options": "Project", + "remember_last_selected_value": 1, + "search_index": 1 + }, + { + "fieldname": "issue", + "fieldtype": "Link", + "label": "Issue", + "options": "Issue" + }, + { + "fieldname": "type", + "fieldtype": "Link", + "label": "Type", + "options": "Task Type" + }, + { + "bold": 1, + "default": "0", + "fieldname": "is_group", + "fieldtype": "Check", + "in_list_view": 1, + "label": "Is Group" + }, + { + "fieldname": "column_break0", + "fieldtype": "Column Break", + "oldfieldtype": "Column Break", + "print_width": "50%", + "width": "50%" + }, + { + "bold": 1, + "fieldname": "status", + "fieldtype": "Select", + "in_list_view": 1, + "in_standard_filter": 1, + "label": "Status", + "no_copy": 1, + "oldfieldname": "status", + "oldfieldtype": "Select", + "options": "Open\nWorking\nPending Review\nOverdue\nCompleted\nCancelled" + }, + { + "fieldname": "priority", + "fieldtype": "Select", + "in_list_view": 1, + "in_standard_filter": 1, + "label": "Priority", + "oldfieldname": "priority", + "oldfieldtype": "Select", + "options": "Low\nMedium\nHigh\nUrgent", + "search_index": 1 + }, + { + "fieldname": "color", + "fieldtype": "Color", + "label": "Color" + }, + { + "bold": 1, + "fieldname": "parent_task", + "fieldtype": "Link", + "ignore_user_permissions": 1, + "label": "Parent Task", + "options": "Task", + "search_index": 1 + }, + { + "collapsible": 1, + "collapsible_depends_on": "eval:doc.__islocal", + "fieldname": "sb_timeline", + "fieldtype": "Section Break", + "label": "Timeline" + }, + { + "fieldname": "exp_start_date", + "fieldtype": "Date", + "label": "Expected Start Date", + "oldfieldname": "exp_start_date", + "oldfieldtype": "Date" + }, + { + "default": "0", + "fieldname": "expected_time", + "fieldtype": "Float", + "label": "Expected Time (in hours)", + "oldfieldname": "exp_total_hrs", + "oldfieldtype": "Data" + }, + { + "fetch_from": "type.weight", + "fieldname": "task_weight", + "fieldtype": "Float", + "label": "Weight" + }, + { + "fieldname": "column_break_11", + "fieldtype": "Column Break" + }, + { + "bold": 1, + "fieldname": "exp_end_date", + "fieldtype": "Date", + "label": "Expected End Date", + "oldfieldname": "exp_end_date", + "oldfieldtype": "Date", + "search_index": 1 + }, + { + "fieldname": "progress", + "fieldtype": "Percent", + "label": "% Progress" + }, + { + "fieldname": "is_milestone", + "fieldtype": "Check", + "in_list_view": 1, + "label": "Is Milestone" + }, + { + "fieldname": "sb_details", + "fieldtype": "Section Break", + "label": "Details", + "oldfieldtype": "Section Break" + }, + { + "fieldname": "description", + "fieldtype": "Text Editor", + "in_preview": 1, + "label": "Task Description", + "oldfieldname": "description", + "oldfieldtype": "Text Editor", + "print_width": "300px", + "width": "300px" + }, + { + "fieldname": "sb_depends_on", + "fieldtype": "Section Break", + "label": "Dependencies", + "oldfieldtype": "Section Break" + }, + { + "fieldname": "depends_on", + "fieldtype": "Table", + "label": "Dependent Tasks", + "options": "Task Depends On" + }, + { + "fieldname": "depends_on_tasks", + "fieldtype": "Code", + "hidden": 1, + "label": "Depends on Tasks", + "read_only": 1 + }, + { + "fieldname": "sb_actual", + "fieldtype": "Section Break", + "oldfieldtype": "Column Break", + "print_width": "50%", + "width": "50%" + }, + { + "fieldname": "act_start_date", + "fieldtype": "Date", + "label": "Actual Start Date (via Time Sheet)", + "oldfieldname": "act_start_date", + "oldfieldtype": "Date", + "read_only": 1 + }, + { + "fieldname": "actual_time", + "fieldtype": "Float", + "label": "Actual Time (in hours)", + "read_only": 1 + }, + { + "fieldname": "column_break_15", + "fieldtype": "Column Break" + }, + { + "fieldname": "act_end_date", + "fieldtype": "Date", + "label": "Actual End Date (via Time Sheet)", + "oldfieldname": "act_end_date", + "oldfieldtype": "Date", + "read_only": 1 + }, + { + "collapsible": 1, + "fieldname": "sb_costing", + "fieldtype": "Section Break", + "label": "Costing" + }, + { + "fieldname": "total_costing_amount", + "fieldtype": "Currency", + "label": "Total Costing Amount (via Time Sheet)", + "oldfieldname": "actual_budget", + "oldfieldtype": "Currency", + "options": "Company:company:default_currency", + "read_only": 1 + }, + { + "fieldname": "total_expense_claim", + "fieldtype": "Currency", + "label": "Total Expense Claim (via Expense Claim)", + "options": "Company:company:default_currency", + "read_only": 1 + }, + { + "fieldname": "column_break_20", + "fieldtype": "Column Break" + }, + { + "fieldname": "total_billing_amount", + "fieldtype": "Currency", + "label": "Total Billing Amount (via Time Sheet)", + "read_only": 1 + }, + { + "collapsible": 1, + "fieldname": "sb_more_info", + "fieldtype": "Section Break", + "label": "More Info" + }, + { + "depends_on": "eval:doc.status == \"Closed\" || doc.status == \"Pending Review\"", + "fieldname": "review_date", + "fieldtype": "Date", + "label": "Review Date", + "oldfieldname": "review_date", + "oldfieldtype": "Date" + }, + { + "depends_on": "eval:doc.status == \"Closed\"", + "fieldname": "closing_date", + "fieldtype": "Date", + "label": "Closing Date", + "oldfieldname": "closing_date", + "oldfieldtype": "Date" + }, + { + "fieldname": "column_break_22", + "fieldtype": "Column Break" + }, + { + "fieldname": "department", + "fieldtype": "Link", + "label": "Department", + "options": "Department" + }, + { + "fieldname": "company", + "fieldtype": "Link", + "label": "Company", + "options": "Company", + "remember_last_selected_value": 1 + }, + { + "fieldname": "lft", + "fieldtype": "Int", + "hidden": 1, + "label": "lft", + "read_only": 1 + }, + { + "fieldname": "rgt", + "fieldtype": "Int", + "hidden": 1, + "label": "rgt", + "read_only": 1 + }, + { + "fieldname": "old_parent", + "fieldtype": "Data", + "hidden": 1, + "ignore_user_permissions": 1, + "label": "Old Parent", + "read_only": 1 + } + ], + "icon": "fa fa-check", + "idx": 1, + "max_attachments": 5, + "modified": "2019-06-19 09:51:15.599416", + "modified_by": "Administrator", + "module": "Projects", + "name": "Task", + "owner": "Administrator", + "permissions": [ + { + "create": 1, + "delete": 1, + "email": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "Projects User", + "share": 1, + "write": 1 + } + ], + "search_fields": "subject", + "show_name_in_global_search": 1, + "show_preview_popup": 1, + "sort_order": "DESC", + "timeline_field": "project", + "title_field": "subject", + "track_seen": 1 + } \ No newline at end of file diff --git a/erpnext/projects/doctype/task/task.py b/erpnext/projects/doctype/task/task.py index b5e4ff84af..d8fc199ec2 100755 --- a/erpnext/projects/doctype/task/task.py +++ b/erpnext/projects/doctype/task/task.py @@ -164,7 +164,6 @@ class Task(NestedSet): if task.get('task_id') == self.name: frappe.delete_doc('Project Task', task.name) - self.update_nsm_model() def update_status(self): diff --git a/erpnext/public/build.json b/erpnext/public/build.json index f6137d5871..1490374d2d 100644 --- a/erpnext/public/build.json +++ b/erpnext/public/build.json @@ -14,38 +14,38 @@ "css/erpnext-web.css": [ "public/scss/website.scss" ], - "js/marketplace.min.js": [ - "public/js/hub/marketplace.js" - ], - "js/erpnext.min.js": [ - "public/js/conf.js", - "public/js/utils.js", - "public/js/queries.js", - "public/js/sms_manager.js", - "public/js/utils/party.js", - "public/js/templates/address_list.html", - "public/js/templates/contact_list.html", - "public/js/controllers/stock_controller.js", - "public/js/payment/payments.js", - "public/js/controllers/taxes_and_totals.js", - "public/js/controllers/transaction.js", - "public/js/pos/pos.html", - "public/js/pos/pos_bill_item.html", - "public/js/pos/pos_bill_item_new.html", - "public/js/pos/pos_selected_item.html", - "public/js/pos/pos_item.html", - "public/js/pos/pos_tax_row.html", - "public/js/pos/customer_toolbar.html", - "public/js/pos/pos_invoice_list.html", - "public/js/payment/pos_payment.html", - "public/js/payment/payment_details.html", - "public/js/templates/item_selector.html", + "js/marketplace.min.js": [ + "public/js/hub/marketplace.js" + ], + "js/erpnext.min.js": [ + "public/js/conf.js", + "public/js/utils.js", + "public/js/queries.js", + "public/js/sms_manager.js", + "public/js/utils/party.js", + "public/js/templates/address_list.html", + "public/js/templates/contact_list.html", + "public/js/controllers/stock_controller.js", + "public/js/payment/payments.js", + "public/js/controllers/taxes_and_totals.js", + "public/js/controllers/transaction.js", + "public/js/pos/pos.html", + "public/js/pos/pos_bill_item.html", + "public/js/pos/pos_bill_item_new.html", + "public/js/pos/pos_selected_item.html", + "public/js/pos/pos_item.html", + "public/js/pos/pos_tax_row.html", + "public/js/pos/customer_toolbar.html", + "public/js/pos/pos_invoice_list.html", + "public/js/payment/pos_payment.html", + "public/js/payment/payment_details.html", + "public/js/templates/item_selector.html", "public/js/templates/employees_to_mark_attendance.html", - "public/js/utils/item_selector.js", - "public/js/help_links.js", - "public/js/agriculture/ternary_plot.js", - "public/js/templates/item_quick_entry.html", - "public/js/utils/item_quick_entry.js", + "public/js/utils/item_selector.js", + "public/js/help_links.js", + "public/js/agriculture/ternary_plot.js", + "public/js/templates/item_quick_entry.html", + "public/js/utils/item_quick_entry.js", "public/js/utils/customer_quick_entry.js", "public/js/education/student_button.html", "public/js/education/assessment_result_tool.html", diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js index bbd1f1c17b..8fb21bccc3 100644 --- a/erpnext/public/js/controllers/transaction.js +++ b/erpnext/public/js/controllers/transaction.js @@ -298,7 +298,7 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({ args: { search_value: this.frm.doc.scan_barcode } }).then(r => { const data = r && r.message; - if (!data) { + if (!data || Object.keys(data).length === 0) { scan_barcode_field.set_new_description(__('Cannot find Item with this barcode')); return; } @@ -437,7 +437,8 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({ serial_no: item.serial_no, set_warehouse: me.frm.doc.set_warehouse, warehouse: item.warehouse, - customer: me.frm.doc.customer, + customer: me.frm.doc.customer || me.frm.doc.party_name, + quotation_to: me.frm.doc.quotation_to, supplier: me.frm.doc.supplier, currency: me.frm.doc.currency, update_stock: update_stock, @@ -1179,7 +1180,8 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({ var me = this; return { "items": this._get_item_list(item), - "customer": me.frm.doc.customer, + "customer": me.frm.doc.customer || me.frm.doc.party_name, + "quotation_to": me.frm.doc.quotation_to, "customer_group": me.frm.doc.customer_group, "territory": me.frm.doc.territory, "supplier": me.frm.doc.supplier, diff --git a/erpnext/public/js/education/lms/quiz.js b/erpnext/public/js/education/lms/quiz.js index 1b520eb9f5..52481291e0 100644 --- a/erpnext/public/js/education/lms/quiz.js +++ b/erpnext/public/js/education/lms/quiz.js @@ -68,7 +68,7 @@ class Quiz { }).then(res => { this.submit_btn.remove() if (!res.message) { - frappe.throw("Something went wrong while evaluating the quiz.") + frappe.throw(__("Something went wrong while evaluating the quiz.")) } let indicator = 'red' diff --git a/erpnext/public/js/utils.js b/erpnext/public/js/utils.js index dd8abfbdd1..cf48be4128 100755 --- a/erpnext/public/js/utils.js +++ b/erpnext/public/js/utils.js @@ -266,6 +266,16 @@ $.extend(erpnext.utils, { refresh_field(table_fieldname); }, + create_new_doc: function (doctype, update_fields) { + frappe.model.with_doctype(doctype, function() { + var new_doc = frappe.model.get_new_doc(doctype); + for (let [key, value] of Object.entries(update_fields)) { + new_doc[key] = value; + } + frappe.ui.form.make_quick_entry(doctype, null, null, new_doc); + }); + } + }); erpnext.utils.select_alternate_items = function(opts) { diff --git a/erpnext/public/js/utils/party.js b/erpnext/public/js/utils/party.js index 44f9f24a91..35185c90b6 100644 --- a/erpnext/public/js/utils/party.js +++ b/erpnext/public/js/utils/party.js @@ -8,10 +8,17 @@ erpnext.utils.get_party_details = function(frm, method, args, callback) { method = "erpnext.accounts.party.get_party_details"; } if(!args) { - if(frm.doctype != "Purchase Order" && frm.doc.customer) { + if((frm.doctype != "Purchase Order" && frm.doc.customer) + || (frm.doc.party_name && in_list(['Quotation', 'Opportunity'], frm.doc.doctype))) { + + let party_type = "Customer"; + if(frm.doc.quotation_to && frm.doc.quotation_to === "Lead") { + party_type = "Lead"; + } + args = { - party: frm.doc.customer, - party_type: "Customer", + party: frm.doc.customer || frm.doc.party_name, + party_type: party_type, price_list: frm.doc.selling_price_list }; } else if(frm.doc.supplier) { @@ -104,7 +111,7 @@ erpnext.utils.set_taxes_from_address = function(frm, triggered_from_field, billi if(frappe.meta.get_docfield(frm.doc.doctype, "taxes")) { if(!erpnext.utils.validate_mandatory(frm, "Lead/Customer/Supplier", - frm.doc.customer || frm.doc.supplier || frm.doc.lead, triggered_from_field)) { + frm.doc.customer || frm.doc.supplier || frm.doc.lead || frm.doc.party_name, triggered_from_field)) { return; } @@ -160,6 +167,9 @@ erpnext.utils.set_taxes = function(frm, triggered_from_field) { } else if (frm.doc.supplier) { party_type = 'Supplier'; party = frm.doc.supplier; + } else if (frm.doc.quotation_to){ + party_type = frm.doc.quotation_to; + party = frm.doc.party_name; } frappe.call({ diff --git a/erpnext/public/less/erpnext.less b/erpnext/public/less/erpnext.less index b746cc138f..8ed5f1adb0 100644 --- a/erpnext/public/less/erpnext.less +++ b/erpnext/public/less/erpnext.less @@ -25,10 +25,10 @@ .app-icon-svg { display: inline-block; - margin: auto; - text-align: center; - border-radius: 16px; - cursor: pointer; + margin: auto; + text-align: center; + border-radius: 16px; + cursor: pointer; box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.15); } @@ -458,4 +458,4 @@ body[data-route="pos"] { .list-item_content { padding-right: 45px; } -} +} \ No newline at end of file diff --git a/erpnext/regional/doctype/gstr_3b_report/gstr_3b_report.html b/erpnext/regional/doctype/gstr_3b_report/gstr_3b_report.html index 77a9b63dfe..2da79a6364 100644 --- a/erpnext/regional/doctype/gstr_3b_report/gstr_3b_report.html +++ b/erpnext/regional/doctype/gstr_3b_report/gstr_3b_report.html @@ -222,17 +222,17 @@   (1) {{__("As per rules 42 & 43 of CGST Rules")}} - - - - + {{ flt(data.itc_elg.itc_rev[0].iamt, 2) }} + {{ flt(data.itc_elg.itc_rev[0].camt, 2) }} + {{ flt(data.itc_elg.itc_rev[0].samt, 2) }} + {{ flt(data.itc_elg.itc_rev[0].csamt, 2) }}   (2) {{__("Others")}} - - - - + {{ flt(data.itc_elg.itc_rev[1].iamt, 2) }} + {{ flt(data.itc_elg.itc_rev[1].camt, 2) }} + {{ flt(data.itc_elg.itc_rev[1].samt, 2) }} + {{ flt(data.itc_elg.itc_rev[1].csamt, 2) }} (C) {{__("Net ITC Available(A) - (B)")}} diff --git a/erpnext/regional/doctype/gstr_3b_report/gstr_3b_report.py b/erpnext/regional/doctype/gstr_3b_report/gstr_3b_report.py index 6569833659..aad267e90a 100644 --- a/erpnext/regional/doctype/gstr_3b_report/gstr_3b_report.py +++ b/erpnext/regional/doctype/gstr_3b_report/gstr_3b_report.py @@ -4,6 +4,7 @@ from __future__ import unicode_literals import frappe +from frappe import _ from frappe.model.document import Document import json from six import iteritems @@ -91,10 +92,10 @@ class GSTR3BReport(Document): }, { "ty": "ISD", - "iamt": 1, - "camt": 1, - "samt": 1, - "csamt": 1 + "iamt": 0, + "camt": 0, + "samt": 0, + "csamt": 0 }, { "samt": 0, @@ -104,6 +105,22 @@ class GSTR3BReport(Document): "iamt": 0 } ], + "itc_rev": [ + { + "ty": "RUL", + "iamt": 0, + "camt": 0, + "samt": 0, + "csamt": 0 + }, + { + "ty": "OTH", + "iamt": 0, + "camt": 0, + "samt": 0, + "csamt": 0 + } + ], "itc_net": { "samt": 0, "csamt": 0, @@ -173,6 +190,10 @@ class GSTR3BReport(Document): net_itc = self.report_dict["itc_elg"]["itc_net"] for d in self.report_dict["itc_elg"]["itc_avl"]: + + itc_type = itc_type_map.get(d["ty"]) + gst_category = "Registered Regular" + if d["ty"] == 'ISRC': reverse_charge = "Y" else: @@ -180,24 +201,22 @@ class GSTR3BReport(Document): for account_head in self.account_heads: - d["iamt"] = flt(itc_details.get((itc_type_map.get(d["ty"]), reverse_charge, account_head.get('igst_account')), {}).get("amount"), 2) - net_itc["iamt"] += flt(d["iamt"], 2) + d["iamt"] += flt(itc_details.get((gst_category, itc_type, reverse_charge, account_head.get('igst_account')), {}).get("amount"), 2) + d["camt"] += flt(itc_details.get((gst_category, itc_type, reverse_charge, account_head.get('cgst_account')), {}).get("amount"), 2) + d["samt"] += flt(itc_details.get((gst_category, itc_type, reverse_charge, account_head.get('sgst_account')), {}).get("amount"), 2) + d["csamt"] += flt(itc_details.get((gst_category, itc_type, reverse_charge, account_head.get('cess_account')), {}).get("amount"), 2) - d["camt"] = flt(itc_details.get((itc_type_map.get(d["ty"]), reverse_charge, account_head.get('cgst_account')), {}).get("amount"), 2) - net_itc["camt"] += flt(d["camt"], 2) - - d["samt"] = flt(itc_details.get((itc_type_map.get(d["ty"]), reverse_charge, account_head.get('sgst_account')), {}).get("amount"), 2) - net_itc["samt"] += flt(d["samt"], 2) - - d["csamt"] = flt(itc_details.get((itc_type_map.get(d["ty"]), reverse_charge, account_head.get('cess_account')), {}).get("amount"), 2) - net_itc["csamt"] += flt(d["csamt"], 2) + net_itc["iamt"] += flt(d["iamt"], 2) + net_itc["camt"] += flt(d["camt"], 2) + net_itc["samt"] += flt(d["samt"], 2) + net_itc["csamt"] += flt(d["csamt"], 2) for account_head in self.account_heads: - - self.report_dict["itc_elg"]["itc_inelg"][1]["iamt"] = flt(itc_details.get(("Ineligible", "N", account_head.get("igst_account")), {}).get("amount"), 2) - self.report_dict["itc_elg"]["itc_inelg"][1]["camt"] = flt(itc_details.get(("Ineligible", "N", account_head.get("cgst_account")), {}).get("amount"), 2) - self.report_dict["itc_elg"]["itc_inelg"][1]["samt"] = flt(itc_details.get(("Ineligible", "N", account_head.get("sgst_account")), {}).get("amount"), 2) - self.report_dict["itc_elg"]["itc_inelg"][1]["csamt"] = flt(itc_details.get(("Ineligible", "N", account_head.get("cess_account")), {}).get("amount"), 2) + itc_inelg = self.report_dict["itc_elg"]["itc_inelg"][1] + itc_inelg["iamt"] = flt(itc_details.get(("Ineligible", "N", account_head.get("igst_account")), {}).get("amount"), 2) + itc_inelg["camt"] = flt(itc_details.get(("Ineligible", "N", account_head.get("cgst_account")), {}).get("amount"), 2) + itc_inelg["samt"] = flt(itc_details.get(("Ineligible", "N", account_head.get("sgst_account")), {}).get("amount"), 2) + itc_inelg["csamt"] = flt(itc_details.get(("Ineligible", "N", account_head.get("cess_account")), {}).get("amount"), 2) def prepare_data(self, doctype, tax_details, supply_type, supply_category, gst_category_list, reverse_charge="N"): @@ -226,20 +245,22 @@ class GSTR3BReport(Document): def set_inter_state_supply(self, inter_state_supply): + osup_det = self.report_dict["sup_details"]["osup_det"] + for d in inter_state_supply.get("Unregistered", []): self.report_dict["inter_sup"]["unreg_details"].append(d) - self.report_dict["sup_details"]["osup_det"]["txval"] += flt(d["txval"], 2) - self.report_dict["sup_details"]["osup_det"]["iamt"] += flt(d["iamt"], 2) + osup_det["txval"] = flt(osup_det["txval"] + d["txval"], 2) + osup_det["iamt"] = flt(osup_det["iamt"] + d["iamt"], 2) for d in inter_state_supply.get("Registered Composition", []): self.report_dict["inter_sup"]["comp_details"].append(d) - self.report_dict["sup_details"]["osup_det"]["txval"] += flt(d["txval"], 2) - self.report_dict["sup_details"]["osup_det"]["iamt"] += flt(d["iamt"], 2) + osup_det["txval"] = flt(osup_det["txval"] + d["txval"], 2) + osup_det["iamt"] = flt(osup_det["iamt"] + d["iamt"], 2) for d in inter_state_supply.get("UIN Holders", []): self.report_dict["inter_sup"]["uin_details"].append(d) - self.report_dict["sup_details"]["osup_det"]["txval"] += flt(d["txval"], 2) - self.report_dict["sup_details"]["osup_det"]["iamt"] += flt(d["iamt"], 2) + osup_det["txval"] = flt(osup_det["txval"] + d["txval"], 2) + osup_det["iamt"] = flt(osup_det["iamt"] + d["iamt"], 2) def get_total_taxable_value(self, doctype, reverse_charge): @@ -268,7 +289,7 @@ class GSTR3BReport(Document): itc_details = {} for d in itc_amount: - itc_details.setdefault((d.eligibility_for_itc, d.reverse_charge, d.account_head),{ + itc_details.setdefault((d.gst_category, d.eligibility_for_itc, d.reverse_charge, d.account_head),{ "amount": d.tax_amount }) @@ -315,9 +336,10 @@ class GSTR3BReport(Document): "iamt": flt(inter_state_supply_tax_mapping.get(d.place_of_supply), 2) }) else: - self.report_dict["sup_details"]["osup_det"]["txval"] += flt(d.total, 2) - self.report_dict["sup_details"]["osup_det"]["camt"] += flt(inter_state_supply_tax_mapping.get(d.place_of_supply)/2, 2) - self.report_dict["sup_details"]["osup_det"]["samt"] += flt(inter_state_supply_tax_mapping.get(d.place_of_supply)/2, 2) + osup_det = self.report_dict["sup_details"]["osup_det"] + osup_det["txval"] = flt(osup_det["txval"] + d.total, 2) + osup_det["camt"] = flt(osup_det["camt"] + inter_state_supply_tax_mapping.get(d.place_of_supply)/2, 2) + osup_det["samt"] = flt(osup_det["samt"] + inter_state_supply_tax_mapping.get(d.place_of_supply)/2, 2) return inter_state_supply_details @@ -393,7 +415,7 @@ class GSTR3BReport(Document): if gst_details: return gst_details[0] else: - frappe.throw("Please enter GSTIN and state for the Company Address {0}".format(self.company_address)) + frappe.throw(_("Please enter GSTIN and state for the Company Address {0}".format(self.company_address))) def get_account_heads(self): @@ -406,7 +428,7 @@ class GSTR3BReport(Document): if account_heads: return account_heads else: - frappe.throw("Please set account heads in GST Settings for Compnay {0}".format(self.company)) + frappe.throw(_("Please set account heads in GST Settings for Compnay {0}".format(self.company))) def get_missing_field_invoices(self): diff --git a/erpnext/regional/india/setup.py b/erpnext/regional/india/setup.py index 26fdb1a904..eeb314cd25 100644 --- a/erpnext/regional/india/setup.py +++ b/erpnext/regional/india/setup.py @@ -209,9 +209,10 @@ def make_custom_fields(update=True): 'fieldname': 'gst_transporter_id', 'label': 'GST Transporter ID', 'fieldtype': 'Data', - 'insert_after': 'transporter_name', + 'insert_after': 'transporter', 'fetch_from': 'transporter.gst_transporter_id', - 'print_hide': 1 + 'print_hide': 1, + 'translatable': 0 }, { 'fieldname': 'mode_of_transport', @@ -219,18 +220,142 @@ def make_custom_fields(update=True): 'fieldtype': 'Select', 'options': '\nRoad\nAir\nRail\nShip', 'default': 'Road', + 'insert_after': 'transporter_name', + 'print_hide': 1, + 'translatable': 0 + }, + { + 'fieldname': 'gst_vehicle_type', + 'label': 'GST Vehicle Type', + 'fieldtype': 'Select', + 'options': 'Regular\nOver Dimensional Cargo (ODC)', + 'depends_on': 'eval:(doc.mode_of_transport === "Road")', + 'default': 'Regular', 'insert_after': 'lr_date', + 'print_hide': 1, + 'translatable': 0 + } + ] + + si_ewaybill_fields = [ + { + 'fieldname': 'transporter_info', + 'label': 'Transporter Info', + 'fieldtype': 'Section Break', + 'insert_after': 'terms', + 'collapsible': 1, + 'collapsible_depends_on': 'transporter', + 'print_hide': 1 + }, + { + 'fieldname': 'transporter', + 'label': 'Transporter', + 'fieldtype': 'Link', + 'insert_after': 'transporter_info', + 'options': 'Supplier', + 'print_hide': 1 + }, + { + 'fieldname': 'gst_transporter_id', + 'label': 'GST Transporter ID', + 'fieldtype': 'Data', + 'insert_after': 'transporter', + 'fetch_from': 'transporter.gst_transporter_id', + 'print_hide': 1, + 'translatable': 0 + }, + { + 'fieldname': 'driver', + 'label': 'Driver', + 'fieldtype': 'Link', + 'insert_after': 'gst_transporter_id', + 'options': 'Driver', + 'print_hide': 1 + }, + { + 'fieldname': 'lr_no', + 'label': 'Transport Receipt No', + 'fieldtype': 'Data', + 'insert_after': 'driver', + 'print_hide': 1, + 'translatable': 0 + }, + { + 'fieldname': 'vehicle_no', + 'label': 'Vehicle No', + 'fieldtype': 'Data', + 'insert_after': 'lr_no', + 'print_hide': 1, + 'translatable': 0 + }, + { + 'fieldname': 'distance', + 'label': 'Distance (in km)', + 'fieldtype': 'Float', + 'insert_after': 'vehicle_no', + 'print_hide': 1 + }, + { + 'fieldname': 'transporter_col_break', + 'fieldtype': 'Column Break', + 'insert_after': 'distance' + }, + { + 'fieldname': 'transporter_name', + 'label': 'Transporter Name', + 'fieldtype': 'Data', + 'insert_after': 'transporter_col_break', + 'fetch_from': 'transporter.name', + 'read_only': 1, + 'print_hide': 1, + 'translatable': 0 + }, + { + 'fieldname': 'mode_of_transport', + 'label': 'Mode of Transport', + 'fieldtype': 'Select', + 'options': '\nRoad\nAir\nRail\nShip', + 'default': 'Road', + 'insert_after': 'transporter_name', + 'print_hide': 1, + 'translatable': 0 + }, + { + 'fieldname': 'driver_name', + 'label': 'Driver Name', + 'fieldtype': 'Data', + 'insert_after': 'mode_of_transport', + 'fetch_from': 'driver.full_name', + 'print_hide': 1, + 'translatable': 0 + }, + { + 'fieldname': 'lr_date', + 'label': 'Transport Receipt Date', + 'fieldtype': 'Date', + 'insert_after': 'driver_name', + 'default': 'Today', 'print_hide': 1 }, { 'fieldname': 'gst_vehicle_type', 'label': 'GST Vehicle Type', 'fieldtype': 'Select', - 'options': '\nRegular\nOver Dimensional Cargo (ODC)', - 'default': 'Regular', + 'options': 'Regular\nOver Dimensional Cargo (ODC)', 'depends_on': 'eval:(doc.mode_of_transport === "Road")', - 'insert_after': 'mode_of_transport', - 'print_hide': 1 + 'default': 'Regular', + 'insert_after': 'lr_date', + 'print_hide': 1, + 'translatable': 0 + }, + { + 'fieldname': 'ewaybill', + 'label': 'e-Way Bill No.', + 'fieldtype': 'Data', + 'depends_on': 'eval:(doc.docstatus === 1)', + 'allow_on_submit': 1, + 'insert_after': 'project', + 'translatable': 0 } ] @@ -246,8 +371,8 @@ def make_custom_fields(update=True): 'Purchase Invoice': purchase_invoice_gst_category + invoice_gst_fields + purchase_invoice_itc_fields + purchase_invoice_gst_fields, 'Purchase Order': purchase_invoice_gst_fields, 'Purchase Receipt': purchase_invoice_gst_fields, - 'Sales Invoice': sales_invoice_gst_category + invoice_gst_fields + sales_invoice_shipping_fields + sales_invoice_gst_fields, - 'Delivery Note': sales_invoice_gst_fields + ewaybill_fields, + 'Sales Invoice': sales_invoice_gst_category + invoice_gst_fields + sales_invoice_shipping_fields + sales_invoice_gst_fields + si_ewaybill_fields, + 'Delivery Note': sales_invoice_gst_fields + ewaybill_fields + sales_invoice_shipping_fields, 'Sales Order': sales_invoice_gst_fields, 'Sales Taxes and Charges Template': inter_state_gst_field, 'Purchase Taxes and Charges Template': inter_state_gst_field, diff --git a/erpnext/regional/india/utils.py b/erpnext/regional/india/utils.py index 19022e18fa..0bc277f4af 100644 --- a/erpnext/regional/india/utils.py +++ b/erpnext/regional/india/utils.py @@ -1,5 +1,5 @@ from __future__ import unicode_literals -import frappe, re +import frappe, re, json from frappe import _ from frappe.utils import cstr, flt, date_diff, nowdate from erpnext.regional.india import states, state_numbers @@ -40,23 +40,26 @@ def validate_gstin_for_india(doc, method): frappe.throw(_("Invalid GSTIN! The input you've entered doesn't match the format of GSTIN.")) validate_gstin_check_digit(doc.gstin) + set_gst_state_and_state_number(doc) - if not doc.gst_state: - if not doc.state: - return - state = doc.state.lower() - states_lowercase = {s.lower():s for s in states} - if state in states_lowercase: - doc.gst_state = states_lowercase[state] - else: - return - - doc.gst_state_number = state_numbers[doc.gst_state] if doc.gst_state_number != doc.gstin[:2]: frappe.throw(_("Invalid GSTIN! First 2 digits of GSTIN should match with State number {0}.") .format(doc.gst_state_number)) -def validate_gstin_check_digit(gstin): +def set_gst_state_and_state_number(doc): + if not doc.gst_state: + if not doc.state: + return + state = doc.state.lower() + states_lowercase = {s.lower():s for s in states} + if state in states_lowercase: + doc.gst_state = states_lowercase[state] + else: + return + + doc.gst_state_number = state_numbers[doc.gst_state] + +def validate_gstin_check_digit(gstin, label='GSTIN'): ''' Function to validate the check digit of the GSTIN.''' factor = 1 total = 0 @@ -69,8 +72,8 @@ def validate_gstin_check_digit(gstin): total += digit factor = 2 if factor == 1 else 1 if gstin[-1] != code_point_chars[((mod - (total % mod)) % mod)]: - frappe.throw(_("Invalid GSTIN! The check digit validation has failed. " + - "Please ensure you've typed the GSTIN correctly.")) + frappe.throw(_("Invalid {0}! The check digit validation has failed. " + + "Please ensure you've typed the {0} correctly.".format(label))) def get_itemised_tax_breakup_header(item_doctype, tax_accounts): if frappe.get_meta(item_doctype).has_field('gst_hsn_code'): @@ -78,8 +81,8 @@ def get_itemised_tax_breakup_header(item_doctype, tax_accounts): else: return [_("Item"), _("Taxable Amount")] + tax_accounts -def get_itemised_tax_breakup_data(doc): - itemised_tax = get_itemised_tax(doc.taxes) +def get_itemised_tax_breakup_data(doc, account_wise=False): + itemised_tax = get_itemised_tax(doc.taxes, with_tax_account=account_wise) itemised_taxable_amount = get_itemised_taxable_amount(doc.items) @@ -94,14 +97,17 @@ def get_itemised_tax_breakup_data(doc): for item, taxes in itemised_tax.items(): hsn_code = item_hsn_map.get(item) hsn_tax.setdefault(hsn_code, frappe._dict()) - for tax_account, tax_detail in taxes.items(): - hsn_tax[hsn_code].setdefault(tax_account, {"tax_rate": 0, "tax_amount": 0}) - hsn_tax[hsn_code][tax_account]["tax_rate"] = tax_detail.get("tax_rate") - hsn_tax[hsn_code][tax_account]["tax_amount"] += tax_detail.get("tax_amount") + for tax_desc, tax_detail in taxes.items(): + key = tax_desc + if account_wise: + key = tax_detail.get('tax_account') + hsn_tax[hsn_code].setdefault(key, {"tax_rate": 0, "tax_amount": 0}) + hsn_tax[hsn_code][key]["tax_rate"] = tax_detail.get("tax_rate") + hsn_tax[hsn_code][key]["tax_amount"] += tax_detail.get("tax_amount") # set taxable amount hsn_taxable_amount = frappe._dict() - for item, taxable_amount in itemised_taxable_amount.items(): + for item in itemised_taxable_amount: hsn_code = item_hsn_map.get(item) hsn_taxable_amount.setdefault(hsn_code, 0) hsn_taxable_amount[hsn_code] += itemised_taxable_amount.get(item) @@ -276,6 +282,102 @@ def calculate_hra_exemption_for_period(doc): exemptions["total_eligible_hra_exemption"] = eligible_hra return exemptions +def get_ewb_data(dt, dn): + if dt != 'Sales Invoice': + frappe.throw(_('e-Way Bill JSON can only be generated from Sales Invoice')) + + dn = dn.split(',') + + ewaybills = [] + for doc_name in dn: + doc = frappe.get_doc(dt, doc_name) + + validate_sales_invoice(doc) + + data = frappe._dict({ + "transporterId": "", + "TotNonAdvolVal": 0, + }) + + data.userGstin = data.fromGstin = doc.company_gstin + data.supplyType = 'O' + + if doc.gst_category in ['Registered Regular', 'SEZ']: + data.subSupplyType = 1 + elif doc.gst_category in ['Overseas', 'Deemed Export']: + data.subSupplyType = 3 + else: + frappe.throw(_('Unsupported GST Category for e-Way Bill JSON generation')) + + data.docType = 'INV' + data.docDate = frappe.utils.formatdate(doc.posting_date, 'dd/mm/yyyy') + + company_address = frappe.get_doc('Address', doc.company_address) + billing_address = frappe.get_doc('Address', doc.customer_address) + + shipping_address = frappe.get_doc('Address', doc.shipping_address_name) + + data = get_address_details(data, doc, company_address, billing_address) + + data.itemList = [] + data.totalValue = doc.total + + data = get_item_list(data, doc) + + disable_rounded = frappe.db.get_single_value('Global Defaults', 'disable_rounded_total') + data.totInvValue = doc.grand_total if disable_rounded else doc.rounded_total + + data = get_transport_details(data, doc) + + fields = { + "/. -": { + 'docNo': doc.name, + 'fromTrdName': doc.company, + 'toTrdName': doc.customer_name, + 'transDocNo': doc.lr_no, + }, + "@#/,&. -": { + 'fromAddr1': company_address.address_line1, + 'fromAddr2': company_address.address_line2, + 'fromPlace': company_address.city, + 'toAddr1': shipping_address.address_line1, + 'toAddr2': shipping_address.address_line2, + 'toPlace': shipping_address.city, + 'transporterName': doc.transporter_name + } + } + + for allowed_chars, field_map in fields.items(): + for key, value in field_map.items(): + if not value: + data[key] = '' + else: + data[key] = re.sub(r'[^\w' + allowed_chars + ']', '', value) + + ewaybills.append(data) + + data = { + 'version': '1.0.1118', + 'billLists': ewaybills + } + + return data + +@frappe.whitelist() +def generate_ewb_json(dt, dn): + + data = get_ewb_data(dt, dn) + + frappe.local.response.filecontent = json.dumps(data, indent=4, sort_keys=True) + frappe.local.response.type = 'download' + + if len(data['billLists']) > 1: + doc_name = 'Bulk' + else: + doc_name = dn + + frappe.local.response.filename = '{0}_e-WayBill_Data_{1}.json'.format(doc_name, frappe.utils.random_string(5)) + @frappe.whitelist() def get_gstins_for_company(company): company_gstins =[] @@ -291,3 +393,177 @@ def get_gstins_for_company(company): `tabDynamic Link`.link_name = '{0}'""".format(company)) return company_gstins +def get_address_details(data, doc, company_address, billing_address): + data.fromPincode = validate_pincode(company_address.pincode, 'Company Address') + data.fromStateCode = data.actualFromStateCode = validate_state_code( + company_address.gst_state_number, 'Company Address') + + if not doc.billing_address_gstin or len(doc.billing_address_gstin) < 15: + data.toGstin = 'URP' + set_gst_state_and_state_number(billing_address) + else: + data.toGstin = doc.billing_address_gstin + + data.toPincode = validate_pincode(billing_address.pincode, 'Customer Address') + data.toStateCode = validate_state_code(billing_address.gst_state_number, 'Customer Address') + + if doc.customer_address != doc.shipping_address_name: + data.transType = 2 + shipping_address = frappe.get_doc('Address', doc.shipping_address_name) + set_gst_state_and_state_number(shipping_address) + data.toPincode = validate_pincode(shipping_address.pincode, 'Shipping Address') + data.actualToStateCode = validate_state_code(shipping_address.gst_state_number, 'Shipping Address') + else: + data.transType = 1 + data.actualToStateCode = data.toStateCode + shipping_address = billing_address + + return data + +def get_item_list(data, doc): + for attr in ['cgstValue', 'sgstValue', 'igstValue', 'cessValue', 'OthValue']: + data[attr] = 0 + + gst_accounts = get_gst_accounts(doc.company, account_wise=True) + tax_map = { + 'sgst_account': ['sgstRate', 'sgstValue'], + 'cgst_account': ['cgstRate', 'cgstValue'], + 'igst_account': ['igstRate', 'igstValue'], + 'cess_account': ['cessRate', 'cessValue'] + } + item_data_attrs = ['sgstRate', 'cgstRate', 'igstRate', 'cessRate', 'cessNonAdvol'] + hsn_wise_charges, hsn_taxable_amount = get_itemised_tax_breakup_data(doc, account_wise=True) + for hsn_code, taxable_amount in hsn_taxable_amount.items(): + item_data = frappe._dict() + if not hsn_code: + frappe.throw(_('GST HSN Code does not exist for one or more items')) + item_data.hsnCode = int(hsn_code) + item_data.taxableAmount = taxable_amount + item_data.qtyUnit = "" + for attr in item_data_attrs: + item_data[attr] = 0 + + for account, tax_detail in hsn_wise_charges.get(hsn_code, {}).items(): + account_type = gst_accounts.get(account, '') + for tax_acc, attrs in tax_map.items(): + if account_type == tax_acc: + item_data[attrs[0]] = tax_detail.get('tax_rate') + data[attrs[1]] += tax_detail.get('tax_amount') + break + else: + data.OthValue += tax_detail.get('tax_amount') + + data.itemList.append(item_data) + + # Tax amounts rounded to 2 decimals to avoid exceeding max character limit + for attr in ['sgstValue', 'cgstValue', 'igstValue', 'cessValue']: + data[attr] = flt(data[attr], 2) + + return data + +def validate_sales_invoice(doc): + if doc.docstatus != 1: + frappe.throw(_('e-Way Bill JSON can only be generated from submitted document')) + + if doc.is_return: + frappe.throw(_('e-Way Bill JSON cannot be generated for Sales Return as of now')) + + if doc.ewaybill: + frappe.throw(_('e-Way Bill already exists for this document')) + + reqd_fields = ['company_gstin', 'company_address', 'customer_address', + 'shipping_address_name', 'mode_of_transport', 'distance'] + + for fieldname in reqd_fields: + if not doc.get(fieldname): + frappe.throw(_('{} is required to generate e-Way Bill JSON'.format( + doc.meta.get_label(fieldname) + ))) + + if len(doc.company_gstin) < 15: + frappe.throw(_('You must be a registered supplier to generate e-Way Bill')) + +def get_transport_details(data, doc): + if doc.distance > 4000: + frappe.throw(_('Distance cannot be greater than 4000 kms')) + + data.transDistance = int(round(doc.distance)) + + transport_modes = { + 'Road': 1, + 'Rail': 2, + 'Air': 3, + 'Ship': 4 + } + + vehicle_types = { + 'Regular': 'R', + 'Over Dimensional Cargo (ODC)': 'O' + } + + data.transMode = transport_modes.get(doc.mode_of_transport) + + if doc.mode_of_transport == 'Road': + if not doc.gst_transporter_id and not doc.vehicle_no: + frappe.throw(_('Either GST Transporter ID or Vehicle No is required if Mode of Transport is Road')) + if doc.vehicle_no: + data.vehicleNo = doc.vehicle_no.replace(' ', '') + if not doc.gst_vehicle_type: + frappe.throw(_('Vehicle Type is required if Mode of Transport is Road')) + else: + data.vehicleType = vehicle_types.get(doc.gst_vehicle_type) + else: + if not doc.lr_no or not doc.lr_date: + frappe.throw(_('Transport Receipt No and Date are mandatory for your chosen Mode of Transport')) + + if doc.lr_no: + data.transDocNo = doc.lr_no + + if doc.lr_date: + data.transDocDate = frappe.utils.formatdate(doc.lr_date, 'dd/mm/yyyy') + + if doc.gst_transporter_id: + validate_gstin_check_digit(doc.gst_transporter_id, label='GST Transporter ID') + data.transporterId = doc.gst_transporter_id + + return data + + +def validate_pincode(pincode, address): + pin_not_found = "Pin Code doesn't exist for {}" + incorrect_pin = "Pin Code for {} is incorrecty formatted. It must be 6 digits (without spaces)" + + if not pincode: + frappe.throw(_(pin_not_found.format(address))) + + pincode = pincode.replace(' ', '') + if not pincode.isdigit() or len(pincode) != 6: + frappe.throw(_(incorrect_pin.format(address))) + else: + return int(pincode) + +def validate_state_code(state_code, address): + no_state_code = "GST State Code not found for {0}. Please set GST State in {0}" + if not state_code: + frappe.throw(_(no_state_code.format(address))) + else: + return int(state_code) + +def get_gst_accounts(company, account_wise=False): + gst_accounts = frappe._dict() + gst_settings_accounts = frappe.get_all("GST Account", + filters={"parent": "GST Settings", "company": company}, + fields=["cgst_account", "sgst_account", "igst_account", "cess_account"]) + + if not gst_settings_accounts: + frappe.throw(_("Please set GST Accounts in GST Settings")) + + for d in gst_settings_accounts: + for acc, val in d.items(): + if not account_wise: + gst_accounts.setdefault(acc, []).append(val) + elif val: + gst_accounts[val] = acc + + + return gst_accounts diff --git a/erpnext/regional/italy/e-invoice.xml b/erpnext/regional/italy/e-invoice.xml index b725b964f2..9a588d1666 100644 --- a/erpnext/regional/italy/e-invoice.xml +++ b/erpnext/regional/italy/e-invoice.xml @@ -118,7 +118,7 @@ {{ doc.type_of_document }} - EUR + {{ doc.currency }} {{ doc.posting_date }} {{ doc.unamended_name }} {%- if doc.stamp_duty %} diff --git a/erpnext/regional/italy/utils.py b/erpnext/regional/italy/utils.py index 0c421244ca..407677f976 100644 --- a/erpnext/regional/italy/utils.py +++ b/erpnext/regional/italy/utils.py @@ -80,7 +80,7 @@ def prepare_invoice(invoice, progressive_number): invoice.stamp_duty = stamp_duty_charge_row.tax_amount for item in invoice.e_invoice_items: - if item.tax_rate == 0.0 and item.tax_amount == 0.0: + if item.tax_rate == 0.0 and item.tax_amount == 0.0 and tax_data.get("0.0"): item.tax_exemption_reason = tax_data["0.0"]["tax_exemption_reason"] customer_po_data = {} @@ -326,6 +326,9 @@ def get_company_country(company): return frappe.get_cached_value('Company', company, 'country') def get_e_invoice_attachments(invoice): + if not invoice.company_tax_id: + return [] + out = [] attachments = get_attachments(invoice.doctype, invoice.name) company_tax_id = invoice.company_tax_id if invoice.company_tax_id.startswith("IT") else "IT" + invoice.company_tax_id diff --git a/erpnext/regional/report/fichier_des_ecritures_comptables_[fec]/fichier_des_ecritures_comptables_[fec].py b/erpnext/regional/report/fichier_des_ecritures_comptables_[fec]/fichier_des_ecritures_comptables_[fec].py index a257ed2c6e..e903c9f00a 100644 --- a/erpnext/regional/report/fichier_des_ecritures_comptables_[fec]/fichier_des_ecritures_comptables_[fec].py +++ b/erpnext/regional/report/fichier_des_ecritures_comptables_[fec]/fichier_des_ecritures_comptables_[fec].py @@ -80,7 +80,10 @@ def get_gl_entries(filters): jnl.cheque_no as JnlRef, jnl.posting_date as JnlPostDate, jnl.title as JnlTitle, pay.name as PayName, pay.posting_date as PayPostDate, pay.title as PayTitle, cus.customer_name, cus.name as cusName, - sup.supplier_name, sup.name as supName + sup.supplier_name, sup.name as supName, + emp.employee_name, emp.name as empName, + stu.title as student_name, stu.name as stuName, + member_name, mem.name as memName from `tabGL Entry` gl left join `tabSales Invoice` inv on gl.voucher_no = inv.name @@ -89,6 +92,9 @@ def get_gl_entries(filters): left join `tabPayment Entry` pay on gl.voucher_no = pay.name left join `tabCustomer` cus on gl.party = cus.name left join `tabSupplier` sup on gl.party = sup.name + left join `tabEmployee` emp on gl.party = emp.name + left join `tabStudent` stu on gl.party = stu.name + left join `tabMember` mem on gl.party = mem.name where gl.company=%(company)s and gl.fiscal_year=%(fiscal_year)s {group_by_condition} order by GlPostDate, voucher_no"""\ @@ -128,6 +134,18 @@ def get_result_as_list(data, filters): CompAuxNum = d.get("supName") CompAuxLib = d.get("supplier_name") + elif d.get("party_type") == "Employee": + CompAuxNum = d.get("empName") + CompAuxLib = d.get("employee_name") + + elif d.get("party_type") == "Student": + CompAuxNum = d.get("stuName") + CompAuxLib = d.get("student_name") + + elif d.get("party_type") == "Member": + CompAuxNum = d.get("memName") + CompAuxLib = d.get("member_name") + else: CompAuxNum = "" CompAuxLib = "" diff --git a/erpnext/regional/report/gstr_1/gstr_1.json b/erpnext/regional/report/gstr_1/gstr_1.json index 4ef8d534e5..2012bb8840 100644 --- a/erpnext/regional/report/gstr_1/gstr_1.json +++ b/erpnext/regional/report/gstr_1/gstr_1.json @@ -1,29 +1,30 @@ { - "add_total_row": 0, - "apply_user_permissions": 1, - "creation": "2018-01-02 15:54:41.424225", - "disabled": 0, - "docstatus": 0, - "doctype": "Report", - "idx": 0, - "is_standard": "Yes", - "modified": "2018-01-02 17:56:15.379347", - "modified_by": "Administrator", - "module": "Regional", - "name": "GSTR-1", - "owner": "Administrator", - "ref_doctype": "GL Entry", - "report_name": "GSTR-1", - "report_type": "Script Report", + "add_total_row": 1, + "creation": "2018-01-02 15:54:41.424225", + "disable_prepared_report": 0, + "disabled": 0, + "docstatus": 0, + "doctype": "Report", + "idx": 0, + "is_standard": "Yes", + "modified": "2019-06-30 19:33:59.769385", + "modified_by": "Administrator", + "module": "Regional", + "name": "GSTR-1", + "owner": "Administrator", + "prepared_report": 0, + "ref_doctype": "GL Entry", + "report_name": "GSTR-1", + "report_type": "Script Report", "roles": [ { "role": "Accounts User" - }, + }, { "role": "Accounts Manager" - }, + }, { "role": "Auditor" } ] -} +} \ No newline at end of file diff --git a/erpnext/regional/report/gstr_1/gstr_1.py b/erpnext/regional/report/gstr_1/gstr_1.py index 3a8149d1cf..eff578001f 100644 --- a/erpnext/regional/report/gstr_1/gstr_1.py +++ b/erpnext/regional/report/gstr_1/gstr_1.py @@ -8,6 +8,7 @@ from frappe.utils import flt, formatdate, now_datetime, getdate from datetime import date from six import iteritems from erpnext.regional.doctype.gstr_3b_report.gstr_3b_report import get_period +from erpnext.regional.india.utils import get_gst_accounts def execute(filters=None): return Gstr1Report(filters).run() @@ -29,10 +30,9 @@ class Gstr1Report(object): place_of_supply, ecommerce_gstin, reverse_charge, - invoice_type, return_against, is_return, - invoice_type, + gst_category, export_type, port_code, shipping_bill_number, @@ -42,7 +42,7 @@ class Gstr1Report(object): def run(self): self.get_columns() - self.get_gst_accounts() + self.gst_accounts = get_gst_accounts(self.filters.company) self.get_invoice_data() if self.invoices: @@ -54,7 +54,6 @@ class Gstr1Report(object): return self.columns, self.data def get_data(self): - if self.filters.get("type_of_business") == "B2C Small": self.get_b2cs_data() else: @@ -266,19 +265,6 @@ class Gstr1Report(object): and frappe.db.get_value(self.doctype, invoice, "export_type") == "Without Payment of Tax": self.items_based_on_tax_rate.setdefault(invoice, {}).setdefault(0, items.keys()) - def get_gst_accounts(self): - self.gst_accounts = frappe._dict() - gst_settings_accounts = frappe.get_all("GST Account", - filters={"parent": "GST Settings", "company": self.filters.company}, - fields=["cgst_account", "sgst_account", "igst_account", "cess_account"]) - - if not gst_settings_accounts: - frappe.throw(_("Please set GST Accounts in GST Settings")) - - for d in gst_settings_accounts: - for acc, val in d.items(): - self.gst_accounts.setdefault(acc, []).append(val) - def get_columns(self): self.tax_columns = [ { @@ -573,19 +559,19 @@ def get_json(): res = {} if filters["type_of_business"] == "B2B": - for item in report_data: + for item in report_data[:-1]: res.setdefault(item["customer_gstin"], {}).setdefault(item["invoice_number"],[]).append(item) out = get_b2b_json(res, gstin) gst_json["b2b"] = out elif filters["type_of_business"] == "B2C Large": - for item in report_data: + for item in report_data[:-1]: res.setdefault(item["place_of_supply"], []).append(item) out = get_b2cl_json(res, gstin) gst_json["b2cl"] = out elif filters["type_of_business"] == "EXPORT": - for item in report_data: + for item in report_data[:-1]: res.setdefault(item["export_type"], []).append(item) out = get_export_json(res) @@ -594,7 +580,7 @@ def get_json(): download_json_file(report_name, filters["type_of_business"], gst_json) def get_b2b_json(res, gstin): - inv_type, out = {"Regular": "R", "Deemed Export": "DE", "URD": "URD", "SEZ": "SEZ"}, [] + inv_type, out = {"Registered Regular": "R", "Deemed Export": "DE", "URD": "URD", "SEZ": "SEZ"}, [] for gst_in in res: b2b_item, inv = {"ctin": gst_in, "inv": []}, [] if not gst_in: continue @@ -603,7 +589,7 @@ def get_b2b_json(res, gstin): inv_item = get_basic_invoice_detail(invoice[0]) inv_item["pos"] = "%02d" % int(invoice[0]["place_of_supply"].split('-')[0]) inv_item["rchrg"] = invoice[0]["reverse_charge"] - inv_item["inv_typ"] = inv_type.get(invoice[0].get("invoice_type", ""),"") + inv_item["inv_typ"] = inv_type.get(invoice[0].get("gst_category", ""),"") if inv_item["pos"]=="00": continue inv_item["itms"] = [] diff --git a/erpnext/selling/doctype/customer/customer.js b/erpnext/selling/doctype/customer/customer.js index 178a21d474..458a56c9e7 100644 --- a/erpnext/selling/doctype/customer/customer.js +++ b/erpnext/selling/doctype/customer/customer.js @@ -3,6 +3,18 @@ frappe.ui.form.on("Customer", { setup: function(frm) { + + frm.make_methods = { + 'Quotation': () => erpnext.utils.create_new_doc('Quotation', { + 'quotation_to': frm.doc.doctype, + 'party_name': frm.doc.name + }), + 'Opportunity': () => erpnext.utils.create_new_doc('Opportunity', { + 'opportunity_from': frm.doc.doctype, + 'party_name': frm.doc.name + }) + } + frm.add_fetch('lead_name', 'company_name', 'customer_name'); frm.add_fetch('default_sales_partner','commission_rate','default_commission_rate'); frm.set_query('customer_group', {'is_group': 0}); diff --git a/erpnext/selling/doctype/customer/customer.py b/erpnext/selling/doctype/customer/customer.py index 365c2ed249..c946c47c59 100644 --- a/erpnext/selling/doctype/customer/customer.py +++ b/erpnext/selling/doctype/customer/customer.py @@ -61,7 +61,7 @@ class Customer(TransactionBase): self.loyalty_program_tier = customer.loyalty_program_tier if self.sales_team: - if sum([member.allocated_percentage for member in self.sales_team]) != 100: + if sum([member.allocated_percentage or 0 for member in self.sales_team]) != 100: frappe.throw(_("Total contribution percentage should be equal to 100")) def check_customer_group_change(self): @@ -108,10 +108,6 @@ class Customer(TransactionBase): if self.lead_name: frappe.db.set_value('Lead', self.lead_name, 'status', 'Converted', update_modified=False) - for doctype in ('Opportunity', 'Quotation'): - for d in frappe.get_all(doctype, {'lead': self.lead_name}): - frappe.db.set_value(doctype, d.name, 'customer', self.name, update_modified=False) - def create_lead_address_contact(self): if self.lead_name: # assign lead address to customer (if already not set) diff --git a/erpnext/selling/doctype/customer/customer_dashboard.py b/erpnext/selling/doctype/customer/customer_dashboard.py index 243c1ebb9e..87ca6a76bc 100644 --- a/erpnext/selling/doctype/customer/customer_dashboard.py +++ b/erpnext/selling/doctype/customer/customer_dashboard.py @@ -9,7 +9,12 @@ def get_data(): 'heatmap_message': _('This is based on transactions against this Customer. See timeline below for details'), 'fieldname': 'customer', 'non_standard_fieldnames': { - 'Payment Entry': 'party_name' + 'Payment Entry': 'party_name', + 'Quotation': 'party_name', + 'Opportunity': 'party_name' + }, + 'dynamic_links': { + 'party_name': ['Customer', 'quotation_to'] }, 'transactions': [ { diff --git a/erpnext/selling/doctype/quotation/quotation.js b/erpnext/selling/doctype/quotation/quotation.js index d8e940ba6a..12f32602f5 100644 --- a/erpnext/selling/doctype/quotation/quotation.js +++ b/erpnext/selling/doctype/quotation/quotation.js @@ -8,15 +8,27 @@ frappe.ui.form.on('Quotation', { setup: function(frm) { frm.custom_make_buttons = { 'Sales Order': 'Make Sales Order' - } + }, + + frm.set_query("quotation_to", function() { + return{ + "filters": { + "name": ["in", ["Customer", "Lead"]], + } + } + }); + }, refresh: function(frm) { frm.trigger("set_label"); + frm.trigger("set_dynamic_field_label"); }, quotation_to: function(frm) { frm.trigger("set_label"); + frm.trigger("toggle_reqd_lead_customer"); + frm.trigger("set_dynamic_field_label"); }, set_label: function(frm) { @@ -28,16 +40,22 @@ erpnext.selling.QuotationController = erpnext.selling.SellingController.extend({ onload: function(doc, dt, dn) { var me = this; this._super(doc, dt, dn); - if(doc.customer && !doc.quotation_to) - doc.quotation_to = "Customer"; - else if(doc.lead && !doc.quotation_to) - doc.quotation_to = "Lead"; }, + party_name: function() { + var me = this; + erpnext.utils.get_party_details(this.frm, null, null, function() { + me.apply_price_list(); + }); + + if(me.frm.doc.quotation_to=="Lead" && me.frm.doc.party_name) { + me.frm.trigger("get_lead_details"); + } + }, refresh: function(doc, dt, dn) { this._super(doc, dt, dn); doctype = doc.quotation_to == 'Customer' ? 'Customer':'Lead'; - frappe.dynamic_link = {doc: this.frm.doc, fieldname: doctype.toLowerCase(), doctype: doctype} + frappe.dynamic_link = {doc: this.frm.doc, fieldname: 'party_name', doctype: doctype} var me = this; @@ -73,22 +91,29 @@ erpnext.selling.QuotationController = erpnext.selling.SellingController.extend({ if (this.frm.doc.docstatus===0) { this.frm.add_custom_button(__('Opportunity'), function() { - var setters = {}; - if(me.frm.doc.customer) { - setters.customer = me.frm.doc.customer || undefined; - } else if (me.frm.doc.lead) { - setters.lead = me.frm.doc.lead || undefined; - } erpnext.utils.map_current_doc({ method: "erpnext.crm.doctype.opportunity.opportunity.make_quotation", source_doctype: "Opportunity", target: me.frm, - setters: setters, + setters: [ + { + label: "Party", + fieldname: "party_name", + fieldtype: "Link", + options: me.frm.doc.quotation_to, + default: me.frm.doc.party_name || undefined + }, + { + label: "Opportunity Type", + fieldname: "opportunity_type", + fieldtype: "Link", + options: "Opportunity Type", + default: me.frm.doc.order_type || undefined + } + ], get_query_filters: { status: ["not in", ["Lost", "Closed"]], - company: me.frm.doc.company, - // cannot set opportunity_type as setter, as the fieldname is order_type - opportunity_type: me.frm.doc.order_type, + company: me.frm.doc.company } }) }, __("Get items from"), "btn-default"); @@ -98,33 +123,46 @@ erpnext.selling.QuotationController = erpnext.selling.SellingController.extend({ }, - quotation_to: function() { - var me = this; - if (this.frm.doc.quotation_to == "Lead") { - this.frm.set_value("customer", null); - this.frm.set_value("contact_person", null); - } else if (this.frm.doc.quotation_to == "Customer") { - this.frm.set_value("lead", null); + set_dynamic_field_label: function(){ + if (this.frm.doc.quotation_to == "Customer") + { + this.frm.set_df_property("party_name", "label", "Customer"); + this.frm.fields_dict.party_name.get_query = null; } - this.toggle_reqd_lead_customer(); + if (this.frm.doc.quotation_to == "Lead") + { + this.frm.set_df_property("party_name", "label", "Lead"); + + this.frm.fields_dict.party_name.get_query = function() { + return{ query: "erpnext.controllers.queries.lead_query" } + } + } }, toggle_reqd_lead_customer: function() { var me = this; - this.frm.toggle_reqd("lead", this.frm.doc.quotation_to == "Lead"); - this.frm.toggle_reqd("customer", this.frm.doc.quotation_to == "Customer"); - // to overwrite the customer_filter trigger from queries.js - this.frm.set_query('customer_address', erpnext.queries.address_query); - this.frm.set_query('shipping_address_name', erpnext.queries.address_query); + this.frm.toggle_reqd("party_name", this.frm.doc.quotation_to); + this.frm.set_query('customer_address', this.address_query); + this.frm.set_query('shipping_address_name', this.address_query); }, tc_name: function() { this.get_terms(); }, + address_query: function(doc) { + return { + query: 'frappe.contacts.doctype.address.address.address_query', + filters: { + link_doctype: frappe.dynamic_link.doctype, + link_name: doc.party_name + } + }; + }, + validate_company_and_party: function(party_field) { if(!this.frm.doc.quotation_to) { frappe.msgprint(__("Please select a value for {0} quotation_to {1}", [this.frm.doc.doctype, this.frm.doc.name])); @@ -136,16 +174,16 @@ erpnext.selling.QuotationController = erpnext.selling.SellingController.extend({ } }, - lead: function() { + get_lead_details: function() { var me = this; - if(!this.frm.doc.lead) { + if(!this.frm.doc.quotation_to === "Lead") { return; } frappe.call({ method: "erpnext.crm.doctype.lead.lead.get_lead_details", args: { - 'lead': this.frm.doc.lead, + 'lead': this.frm.doc.party_name, 'posting_date': this.frm.doc.transaction_date, 'company': this.frm.doc.company, }, @@ -164,10 +202,6 @@ erpnext.selling.QuotationController = erpnext.selling.SellingController.extend({ cur_frm.script_manager.make(erpnext.selling.QuotationController); -cur_frm.fields_dict.lead.get_query = function(doc,cdt,cdn) { - return{ query: "erpnext.controllers.queries.lead_query" } -} - cur_frm.cscript['Make Sales Order'] = function() { frappe.model.open_mapped_doc({ method: "erpnext.selling.doctype.quotation.quotation.make_sales_order", diff --git a/erpnext/selling/doctype/quotation/quotation.json b/erpnext/selling/doctype/quotation/quotation.json index ef5abdb67f..1b8954578f 100644 --- a/erpnext/selling/doctype/quotation/quotation.json +++ b/erpnext/selling/doctype/quotation/quotation.json @@ -1,1028 +1,3441 @@ { - "allow_import": 1, - "autoname": "naming_series:", - "creation": "2013-05-24 19:29:08", - "doctype": "DocType", - "document_type": "Document", - "editable_grid": 1, - "engine": "InnoDB", - "field_order": [ - "customer_section", - "title", - "naming_series", - "quotation_to", - "customer", - "lead", - "customer_name", - "column_break1", - "amended_from", - "company", - "transaction_date", - "valid_till", - "order_type", - "contact_section", - "customer_address", - "address_display", - "contact_person", - "contact_display", - "contact_mobile", - "contact_email", - "col_break98", - "shipping_address_name", - "shipping_address", - "customer_group", - "territory", - "currency_and_price_list", - "currency", - "conversion_rate", - "column_break2", - "selling_price_list", - "price_list_currency", - "plc_conversion_rate", - "ignore_pricing_rule", - "items_section", - "items", - "pricing_rule_details", - "pricing_rules", - "sec_break23", - "total_qty", - "base_total", - "base_net_total", - "column_break_28", - "total", - "net_total", - "total_net_weight", - "taxes_section", - "tax_category", - "column_break_34", - "shipping_rule", - "section_break_36", - "taxes_and_charges", - "taxes", - "sec_tax_breakup", - "other_charges_calculation", - "section_break_39", - "base_total_taxes_and_charges", - "column_break_42", - "total_taxes_and_charges", - "section_break_44", - "apply_discount_on", - "base_discount_amount", - "column_break_46", - "additional_discount_percentage", - "discount_amount", - "totals", - "base_grand_total", - "base_rounding_adjustment", - "base_in_words", - "base_rounded_total", - "column_break3", - "grand_total", - "rounding_adjustment", - "rounded_total", - "in_words", - "payment_schedule_section", - "payment_terms_template", - "payment_schedule", - "terms_section_break", - "tc_name", - "terms", - "print_settings", - "letter_head", - "group_same_items", - "column_break_73", - "select_print_heading", - "language", - "subscription_section", - "auto_repeat", - "update_auto_repeat_reference", - "more_info", - "campaign", - "source", - "order_lost_reason", - "column_break4", - "status", - "enq_det", - "supplier_quotation", - "opportunity", - "lost_reasons" - ], - "fields": [ - { - "fieldname": "customer_section", - "fieldtype": "Section Break", - "options": "fa fa-user" - }, - { - "allow_on_submit": 1, - "default": "{customer_name}", - "fieldname": "title", - "fieldtype": "Data", - "hidden": 1, - "label": "Title", - "no_copy": 1, - "print_hide": 1 - }, - { - "fieldname": "naming_series", - "fieldtype": "Select", - "label": "Series", - "no_copy": 1, - "oldfieldname": "naming_series", - "oldfieldtype": "Select", - "options": "SAL-QTN-.YYYY.-", - "print_hide": 1, - "reqd": 1, - "set_only_once": 1 - }, - { - "default": "Customer", - "fieldname": "quotation_to", - "fieldtype": "Select", - "label": "Quotation To", - "oldfieldname": "quotation_to", - "oldfieldtype": "Select", - "options": "\nLead\nCustomer", - "print_hide": 1, - "reqd": 1 - }, - { - "bold": 1, - "depends_on": "eval:doc.quotation_to == \"Customer\"", - "fieldname": "customer", - "fieldtype": "Link", - "in_global_search": 1, - "in_standard_filter": 1, - "label": "Customer", - "oldfieldname": "customer", - "oldfieldtype": "Link", - "options": "Customer", - "print_hide": 1, - "search_index": 1 - }, - { - "bold": 1, - "depends_on": "eval:doc.quotation_to == \"Lead\"", - "fieldname": "lead", - "fieldtype": "Link", - "in_standard_filter": 1, - "label": "Lead", - "oldfieldname": "lead", - "oldfieldtype": "Link", - "options": "Lead", - "print_hide": 1 - }, - { - "bold": 1, - "fetch_from": "customer.customer_name", - "fieldname": "customer_name", - "fieldtype": "Data", - "hidden": 1, - "in_global_search": 1, - "label": "Customer Name", - "read_only": 1 - }, - { - "fieldname": "column_break1", - "fieldtype": "Column Break", - "oldfieldtype": "Column Break", - "width": "50%" - }, - { - "fieldname": "amended_from", - "fieldtype": "Link", - "ignore_user_permissions": 1, - "label": "Amended From", - "no_copy": 1, - "oldfieldname": "amended_from", - "oldfieldtype": "Data", - "options": "Quotation", - "print_hide": 1, - "read_only": 1, - "width": "150px" - }, - { - "fieldname": "company", - "fieldtype": "Link", - "label": "Company", - "oldfieldname": "company", - "oldfieldtype": "Link", - "options": "Company", - "print_hide": 1, - "remember_last_selected_value": 1, - "reqd": 1, - "width": "150px" - }, - { - "default": "Today", - "fieldname": "transaction_date", - "fieldtype": "Date", - "in_list_view": 1, - "in_standard_filter": 1, - "label": "Date", - "no_copy": 1, - "oldfieldname": "transaction_date", - "oldfieldtype": "Date", - "reqd": 1, - "search_index": 1, - "width": "100px" - }, - { - "fieldname": "valid_till", - "fieldtype": "Date", - "label": "Valid Till" - }, - { - "default": "Sales", - "fieldname": "order_type", - "fieldtype": "Select", - "in_standard_filter": 1, - "label": "Order Type", - "oldfieldname": "order_type", - "oldfieldtype": "Select", - "options": "\nSales\nMaintenance\nShopping Cart", - "print_hide": 1, - "reqd": 1 - }, - { - "collapsible": 1, - "depends_on": "eval:(doc.customer || doc.lead)", - "fieldname": "contact_section", - "fieldtype": "Section Break", - "label": "Address and Contact", - "options": "fa fa-bullhorn" - }, - { - "fieldname": "customer_address", - "fieldtype": "Link", - "label": "Customer Address", - "options": "Address", - "print_hide": 1 - }, - { - "fieldname": "address_display", - "fieldtype": "Small Text", - "label": "Address", - "oldfieldname": "customer_address", - "oldfieldtype": "Small Text", - "read_only": 1 - }, - { - "depends_on": "eval:doc.customer", - "fieldname": "contact_person", - "fieldtype": "Link", - "label": "Contact Person", - "oldfieldname": "contact_person", - "oldfieldtype": "Link", - "options": "Contact", - "print_hide": 1 - }, - { - "fieldname": "contact_display", - "fieldtype": "Small Text", - "in_global_search": 1, - "label": "Contact", - "read_only": 1 - }, - { - "fieldname": "contact_mobile", - "fieldtype": "Small Text", - "label": "Mobile No", - "read_only": 1 - }, - { - "fieldname": "contact_email", - "fieldtype": "Data", - "hidden": 1, - "label": "Contact Email", - "options": "Email", - "print_hide": 1, - "read_only": 1 - }, - { - "depends_on": "customer", - "fieldname": "col_break98", - "fieldtype": "Column Break", - "width": "50%" - }, - { - "fieldname": "shipping_address_name", - "fieldtype": "Link", - "label": "Shipping Address", - "options": "Address", - "print_hide": 1 - }, - { - "fieldname": "shipping_address", - "fieldtype": "Small Text", - "label": "Shipping Address", - "print_hide": 1, - "read_only": 1 - }, - { - "depends_on": "customer", - "fieldname": "customer_group", - "fieldtype": "Link", - "hidden": 1, - "label": "Customer Group", - "oldfieldname": "customer_group", - "oldfieldtype": "Link", - "options": "Customer Group", - "print_hide": 1 - }, - { - "fieldname": "territory", - "fieldtype": "Link", - "label": "Territory", - "options": "Territory", - "print_hide": 1 - }, - { - "collapsible": 1, - "fieldname": "currency_and_price_list", - "fieldtype": "Section Break", - "label": "Currency and Price List", - "options": "fa fa-tag" - }, - { - "fieldname": "currency", - "fieldtype": "Link", - "label": "Currency", - "oldfieldname": "currency", - "oldfieldtype": "Select", - "options": "Currency", - "print_hide": 1, - "reqd": 1, - "width": "100px" - }, - { - "description": "Rate at which customer's currency is converted to company's base currency", - "fieldname": "conversion_rate", - "fieldtype": "Float", - "label": "Exchange Rate", - "oldfieldname": "conversion_rate", - "oldfieldtype": "Currency", - "precision": "9", - "print_hide": 1, - "reqd": 1, - "width": "100px" - }, - { - "fieldname": "column_break2", - "fieldtype": "Column Break", - "width": "50%" - }, - { - "fieldname": "selling_price_list", - "fieldtype": "Link", - "label": "Price List", - "oldfieldname": "price_list_name", - "oldfieldtype": "Select", - "options": "Price List", - "print_hide": 1, - "reqd": 1, - "width": "100px" - }, - { - "fieldname": "price_list_currency", - "fieldtype": "Link", - "label": "Price List Currency", - "options": "Currency", - "print_hide": 1, - "read_only": 1, - "reqd": 1 - }, - { - "description": "Rate at which Price list currency is converted to company's base currency", - "fieldname": "plc_conversion_rate", - "fieldtype": "Float", - "label": "Price List Exchange Rate", - "precision": "9", - "print_hide": 1, - "reqd": 1 - }, - { - "default": "0", - "fieldname": "ignore_pricing_rule", - "fieldtype": "Check", - "label": "Ignore Pricing Rule", - "no_copy": 1, - "permlevel": 1, - "print_hide": 1 - }, - { - "fieldname": "items_section", - "fieldtype": "Section Break", - "oldfieldtype": "Section Break", - "options": "fa fa-shopping-cart" - }, - { - "allow_bulk_edit": 1, - "fieldname": "items", - "fieldtype": "Table", - "label": "Items", - "oldfieldname": "quotation_details", - "oldfieldtype": "Table", - "options": "Quotation Item", - "reqd": 1, - "width": "40px" - }, - { - "fieldname": "pricing_rule_details", - "fieldtype": "Section Break", - "label": "Pricing Rules" - }, - { - "fieldname": "pricing_rules", - "fieldtype": "Table", - "label": "Pricing Rule Detail", - "options": "Pricing Rule Detail", - "read_only": 1 - }, - { - "fieldname": "sec_break23", - "fieldtype": "Section Break" - }, - { - "fieldname": "total_qty", - "fieldtype": "Float", - "label": "Total Quantity", - "read_only": 1 - }, - { - "fieldname": "base_total", - "fieldtype": "Currency", - "label": "Total (Company Currency)", - "options": "Company:company:default_currency", - "print_hide": 1, - "read_only": 1 - }, - { - "fieldname": "base_net_total", - "fieldtype": "Currency", - "label": "Net Total (Company Currency)", - "oldfieldname": "net_total", - "oldfieldtype": "Currency", - "options": "Company:company:default_currency", - "print_hide": 1, - "read_only": 1, - "width": "100px" - }, - { - "fieldname": "column_break_28", - "fieldtype": "Column Break" - }, - { - "fieldname": "total", - "fieldtype": "Currency", - "label": "Total", - "options": "currency", - "read_only": 1 - }, - { - "fieldname": "net_total", - "fieldtype": "Currency", - "label": "Net Total", - "options": "currency", - "print_hide": 1, - "read_only": 1 - }, - { - "fieldname": "total_net_weight", - "fieldtype": "Float", - "label": "Total Net Weight", - "print_hide": 1, - "read_only": 1 - }, - { - "fieldname": "taxes_section", - "fieldtype": "Section Break", - "label": "Taxes and Charges", - "oldfieldtype": "Section Break", - "options": "fa fa-money" - }, - { - "fieldname": "tax_category", - "fieldtype": "Link", - "label": "Tax Category", - "options": "Tax Category", - "print_hide": 1 - }, - { - "fieldname": "column_break_34", - "fieldtype": "Column Break" - }, - { - "fieldname": "shipping_rule", - "fieldtype": "Link", - "label": "Shipping Rule", - "oldfieldtype": "Button", - "options": "Shipping Rule", - "print_hide": 1 - }, - { - "fieldname": "section_break_36", - "fieldtype": "Section Break" - }, - { - "fieldname": "taxes_and_charges", - "fieldtype": "Link", - "label": "Sales Taxes and Charges Template", - "oldfieldname": "charge", - "oldfieldtype": "Link", - "options": "Sales Taxes and Charges Template", - "print_hide": 1 - }, - { - "fieldname": "taxes", - "fieldtype": "Table", - "label": "Sales Taxes and Charges", - "oldfieldname": "other_charges", - "oldfieldtype": "Table", - "options": "Sales Taxes and Charges" - }, - { - "collapsible": 1, - "fieldname": "sec_tax_breakup", - "fieldtype": "Section Break", - "label": "Tax Breakup" - }, - { - "fieldname": "other_charges_calculation", - "fieldtype": "Text", - "label": "Taxes and Charges Calculation", - "no_copy": 1, - "oldfieldtype": "HTML", - "print_hide": 1, - "read_only": 1 - }, - { - "fieldname": "section_break_39", - "fieldtype": "Section Break" - }, - { - "fieldname": "base_total_taxes_and_charges", - "fieldtype": "Currency", - "label": "Total Taxes and Charges (Company Currency)", - "oldfieldname": "other_charges_total", - "oldfieldtype": "Currency", - "options": "Company:company:default_currency", - "print_hide": 1, - "read_only": 1 - }, - { - "fieldname": "column_break_42", - "fieldtype": "Column Break" - }, - { - "fieldname": "total_taxes_and_charges", - "fieldtype": "Currency", - "label": "Total Taxes and Charges", - "options": "currency", - "print_hide": 1, - "read_only": 1 - }, - { - "collapsible": 1, - "collapsible_depends_on": "discount_amount", - "fieldname": "section_break_44", - "fieldtype": "Section Break", - "label": "Additional Discount" - }, - { - "default": "Grand Total", - "fieldname": "apply_discount_on", - "fieldtype": "Select", - "label": "Apply Additional Discount On", - "options": "\nGrand Total\nNet Total", - "print_hide": 1 - }, - { - "fieldname": "base_discount_amount", - "fieldtype": "Currency", - "label": "Additional Discount Amount (Company Currency)", - "options": "Company:company:default_currency", - "print_hide": 1, - "read_only": 1 - }, - { - "fieldname": "column_break_46", - "fieldtype": "Column Break" - }, - { - "fieldname": "additional_discount_percentage", - "fieldtype": "Float", - "label": "Additional Discount Percentage", - "print_hide": 1 - }, - { - "fieldname": "discount_amount", - "fieldtype": "Currency", - "label": "Additional Discount Amount", - "options": "currency", - "print_hide": 1 - }, - { - "fieldname": "totals", - "fieldtype": "Section Break", - "oldfieldtype": "Section Break", - "options": "fa fa-money", - "print_hide": 1 - }, - { - "fieldname": "base_grand_total", - "fieldtype": "Currency", - "label": "Grand Total (Company Currency)", - "oldfieldname": "grand_total", - "oldfieldtype": "Currency", - "options": "Company:company:default_currency", - "print_hide": 1, - "read_only": 1, - "width": "200px" - }, - { - "fieldname": "base_rounding_adjustment", - "fieldtype": "Currency", - "label": "Rounding Adjustment (Company Currency)", - "no_copy": 1, - "options": "Company:company:default_currency", - "print_hide": 1, - "read_only": 1 - }, - { - "description": "In Words will be visible once you save the Quotation.", - "fieldname": "base_in_words", - "fieldtype": "Data", - "label": "In Words (Company Currency)", - "oldfieldname": "in_words", - "oldfieldtype": "Data", - "print_hide": 1, - "read_only": 1, - "width": "200px" - }, - { - "fieldname": "base_rounded_total", - "fieldtype": "Currency", - "label": "Rounded Total (Company Currency)", - "oldfieldname": "rounded_total", - "oldfieldtype": "Currency", - "options": "Company:company:default_currency", - "print_hide": 1, - "read_only": 1, - "width": "200px" - }, - { - "fieldname": "column_break3", - "fieldtype": "Column Break", - "oldfieldtype": "Column Break", - "print_hide": 1, - "width": "50%" - }, - { - "fieldname": "grand_total", - "fieldtype": "Currency", - "in_list_view": 1, - "label": "Grand Total", - "oldfieldname": "grand_total_export", - "oldfieldtype": "Currency", - "options": "currency", - "read_only": 1, - "width": "200px" - }, - { - "fieldname": "rounding_adjustment", - "fieldtype": "Currency", - "label": "Rounding Adjustment", - "no_copy": 1, - "options": "currency", - "print_hide": 1, - "read_only": 1 - }, - { - "bold": 1, - "fieldname": "rounded_total", - "fieldtype": "Currency", - "label": "Rounded Total", - "oldfieldname": "rounded_total_export", - "oldfieldtype": "Currency", - "options": "currency", - "read_only": 1, - "width": "200px" - }, - { - "fieldname": "in_words", - "fieldtype": "Data", - "label": "In Words", - "oldfieldname": "in_words_export", - "oldfieldtype": "Data", - "print_hide": 1, - "read_only": 1, - "width": "200px" - }, - { - "fieldname": "payment_schedule_section", - "fieldtype": "Section Break", - "label": "Payment Terms" - }, - { - "fieldname": "payment_terms_template", - "fieldtype": "Link", - "label": "Payment Terms Template", - "options": "Payment Terms Template", - "print_hide": 1 - }, - { - "fieldname": "payment_schedule", - "fieldtype": "Table", - "label": "Payment Schedule", - "no_copy": 1, - "options": "Payment Schedule", - "print_hide": 1 - }, - { - "collapsible": 1, - "collapsible_depends_on": "terms", - "fieldname": "terms_section_break", - "fieldtype": "Section Break", - "label": "Terms and Conditions", - "oldfieldtype": "Section Break", - "options": "fa fa-legal" - }, - { - "fieldname": "tc_name", - "fieldtype": "Link", - "label": "Terms", - "oldfieldname": "tc_name", - "oldfieldtype": "Link", - "options": "Terms and Conditions", - "print_hide": 1, - "report_hide": 1 - }, - { - "fieldname": "terms", - "fieldtype": "Text Editor", - "label": "Term Details", - "oldfieldname": "terms", - "oldfieldtype": "Text Editor" - }, - { - "collapsible": 1, - "fieldname": "print_settings", - "fieldtype": "Section Break", - "label": "Print Settings" - }, - { - "allow_on_submit": 1, - "fieldname": "letter_head", - "fieldtype": "Link", - "label": "Letter Head", - "oldfieldname": "letter_head", - "oldfieldtype": "Select", - "options": "Letter Head", - "print_hide": 1 - }, - { - "allow_on_submit": 1, - "default": "0", - "fieldname": "group_same_items", - "fieldtype": "Check", - "label": "Group same items", - "print_hide": 1 - }, - { - "fieldname": "column_break_73", - "fieldtype": "Column Break" - }, - { - "allow_on_submit": 1, - "fieldname": "select_print_heading", - "fieldtype": "Link", - "label": "Print Heading", - "no_copy": 1, - "oldfieldname": "select_print_heading", - "oldfieldtype": "Link", - "options": "Print Heading", - "print_hide": 1, - "report_hide": 1 - }, - { - "fieldname": "language", - "fieldtype": "Data", - "label": "Print Language", - "print_hide": 1, - "read_only": 1 - }, - { - "fieldname": "subscription_section", - "fieldtype": "Section Break", - "label": "Auto Repeat Section" - }, - { - "fieldname": "auto_repeat", - "fieldtype": "Link", - "label": "Auto Repeat", - "no_copy": 1, - "options": "Auto Repeat", - "print_hide": 1, - "read_only": 1 - }, - { - "allow_on_submit": 1, - "depends_on": "eval: doc.auto_repeat", - "fieldname": "update_auto_repeat_reference", - "fieldtype": "Button", - "label": "Update Auto Repeat Reference" - }, - { - "collapsible": 1, - "fieldname": "more_info", - "fieldtype": "Section Break", - "label": "More Information", - "oldfieldtype": "Section Break", - "options": "fa fa-file-text", - "print_hide": 1 - }, - { - "fieldname": "campaign", - "fieldtype": "Link", - "label": "Campaign", - "oldfieldname": "campaign", - "oldfieldtype": "Link", - "options": "Campaign", - "print_hide": 1 - }, - { - "fieldname": "source", - "fieldtype": "Link", - "label": "Source", - "oldfieldname": "source", - "oldfieldtype": "Select", - "options": "Lead Source", - "print_hide": 1 - }, - { - "allow_on_submit": 1, - "depends_on": "eval:doc.status===\"Lost\"", - "fieldname": "order_lost_reason", - "fieldtype": "Small Text", - "label": "Detailed Reason", - "no_copy": 1, - "oldfieldname": "order_lost_reason", - "oldfieldtype": "Small Text", - "print_hide": 1 - }, - { - "fieldname": "column_break4", - "fieldtype": "Column Break", - "oldfieldtype": "Column Break", - "print_hide": 1, - "width": "50%" - }, - { - "default": "Draft", - "fieldname": "status", - "fieldtype": "Select", - "in_list_view": 1, - "label": "Status", - "no_copy": 1, - "oldfieldname": "status", - "oldfieldtype": "Select", - "options": "Draft\nOpen\nReplied\nOrdered\nLost\nCancelled", - "print_hide": 1, - "read_only": 1, - "reqd": 1 - }, - { - "fieldname": "enq_det", - "fieldtype": "Text", - "hidden": 1, - "label": "Opportunity Item", - "oldfieldname": "enq_det", - "oldfieldtype": "Text", - "print_hide": 1, - "read_only": 1 - }, - { - "fieldname": "supplier_quotation", - "fieldtype": "Link", - "label": "Supplier Quotation", - "options": "Supplier Quotation" - }, - { - "fieldname": "opportunity", - "fieldtype": "Link", - "label": "Opportunity", - "options": "Opportunity", - "print_hide": 1, - "read_only": 1 - }, - { - "allow_on_submit": 1, - "fieldname": "lost_reasons", - "fieldtype": "Table MultiSelect", - "label": "Lost Reasons", - "options": "Lost Reason Detail", - "read_only": 1 + "allow_copy": 0, + "allow_events_in_timeline": 0, + "allow_guest_to_view": 0, + "allow_import": 1, + "allow_rename": 0, + "autoname": "naming_series:", + "beta": 0, + "creation": "2013-05-24 19:29:08", + "custom": 0, + "docstatus": 0, + "doctype": "DocType", + "document_type": "Document", + "editable_grid": 1, + "fields": [ + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "customer_section", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "", + "length": 0, + "no_copy": 0, + "options": "fa fa-user", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 1, + "bold": 0, + "collapsible": 0, + "columns": 0, + "default": "{customer_name}", + "fieldname": "title", + "fieldtype": "Data", + "hidden": 1, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Title", + "length": 0, + "no_copy": 1, + "permlevel": 0, + "precision": "", + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "default": "", + "fieldname": "naming_series", + "fieldtype": "Select", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Series", + "length": 0, + "no_copy": 1, + "oldfieldname": "naming_series", + "oldfieldtype": "Select", + "options": "SAL-QTN-.YYYY.-", + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 1, + "search_index": 0, + "set_only_once": 1, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "default": "Customer", + "fetch_if_empty": 0, + "fieldname": "quotation_to", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 1, + "label": "Quotation To", + "length": 0, + "no_copy": 0, + "oldfieldname": "quotation_to", + "oldfieldtype": "Select", + "options": "DocType", + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 1, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 1, + "collapsible": 0, + "columns": 0, + "depends_on": "", + "fetch_if_empty": 0, + "fieldname": "party_name", + "fieldtype": "Dynamic Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 1, + "in_list_view": 0, + "in_standard_filter": 1, + "label": "Party", + "length": 0, + "no_copy": 0, + "oldfieldname": "customer", + "oldfieldtype": "Link", + "options": "quotation_to", + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 1, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 1, + "collapsible": 0, + "columns": 0, + "fetch_from": "", + "fieldname": "customer_name", + "fieldtype": "Data", + "hidden": 1, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 1, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Customer Name", + "length": 0, + "no_copy": 0, + "options": "", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "column_break1", + "fieldtype": "Column Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "length": 0, + "no_copy": 0, + "oldfieldtype": "Column Break", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0, + "width": "50%" + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "amended_from", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 1, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Amended From", + "length": 0, + "no_copy": 1, + "oldfieldname": "amended_from", + "oldfieldtype": "Data", + "options": "Quotation", + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0, + "width": "150px" + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "description": "", + "fieldname": "company", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Company", + "length": 0, + "no_copy": 0, + "oldfieldname": "company", + "oldfieldtype": "Link", + "options": "Company", + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 1, + "report_hide": 0, + "reqd": 1, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0, + "width": "150px" + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "default": "Today", + "fieldname": "transaction_date", + "fieldtype": "Date", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 1, + "in_standard_filter": 1, + "label": "Date", + "length": 0, + "no_copy": 1, + "oldfieldname": "transaction_date", + "oldfieldtype": "Date", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 1, + "search_index": 1, + "set_only_once": 0, + "translatable": 0, + "unique": 0, + "width": "100px" + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "valid_till", + "fieldtype": "Date", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Valid Till", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "default": "Sales", + "fieldname": "order_type", + "fieldtype": "Select", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 1, + "label": "Order Type", + "length": 0, + "no_copy": 0, + "oldfieldname": "order_type", + "oldfieldtype": "Select", + "options": "\nSales\nMaintenance\nShopping Cart", + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 1, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 1, + "collapsible_depends_on": "", + "columns": 0, + "depends_on": "party_name", + "fieldname": "contact_section", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Address and Contact", + "length": 0, + "no_copy": 0, + "options": "fa fa-bullhorn", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "customer_address", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Customer Address", + "length": 0, + "no_copy": 0, + "options": "Address", + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "address_display", + "fieldtype": "Small Text", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Address", + "length": 0, + "no_copy": 0, + "oldfieldname": "customer_address", + "oldfieldtype": "Small Text", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "", + "fieldname": "contact_person", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Contact Person", + "length": 0, + "no_copy": 0, + "oldfieldname": "contact_person", + "oldfieldtype": "Link", + "options": "Contact", + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "contact_display", + "fieldtype": "Small Text", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 1, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Contact", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "contact_mobile", + "fieldtype": "Small Text", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Mobile No", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "contact_email", + "fieldtype": "Data", + "hidden": 1, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Contact Email", + "length": 0, + "no_copy": 0, + "options": "Email", + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "eval:doc.quotaion_to=='Customer' && doc.party_name", + "fieldname": "col_break98", + "fieldtype": "Column Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "length": 0, + "no_copy": 0, + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0, + "width": "50%" + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "shipping_address_name", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Shipping Address", + "length": 0, + "no_copy": 0, + "options": "Address", + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "shipping_address", + "fieldtype": "Small Text", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Shipping Address", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "eval:doc.quotaion_to=='Customer' && doc.party_name", + "description": "", + "fieldname": "customer_group", + "fieldtype": "Link", + "hidden": 1, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Customer Group", + "length": 0, + "no_copy": 0, + "oldfieldname": "customer_group", + "oldfieldtype": "Link", + "options": "Customer Group", + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "description": "", + "fieldname": "territory", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Territory", + "length": 0, + "no_copy": 0, + "options": "Territory", + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 1, + "columns": 0, + "fieldname": "currency_and_price_list", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Currency and Price List", + "length": 0, + "no_copy": 0, + "options": "fa fa-tag", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "currency", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Currency", + "length": 0, + "no_copy": 0, + "oldfieldname": "currency", + "oldfieldtype": "Select", + "options": "Currency", + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 1, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0, + "width": "100px" + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "description": "Rate at which customer's currency is converted to company's base currency", + "fieldname": "conversion_rate", + "fieldtype": "Float", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Exchange Rate", + "length": 0, + "no_copy": 0, + "oldfieldname": "conversion_rate", + "oldfieldtype": "Currency", + "permlevel": 0, + "precision": "9", + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 1, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0, + "width": "100px" + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "column_break2", + "fieldtype": "Column Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "length": 0, + "no_copy": 0, + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0, + "width": "50%" + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "selling_price_list", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Price List", + "length": 0, + "no_copy": 0, + "oldfieldname": "price_list_name", + "oldfieldtype": "Select", + "options": "Price List", + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 1, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0, + "width": "100px" + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "price_list_currency", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Price List Currency", + "length": 0, + "no_copy": 0, + "options": "Currency", + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 1, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "description": "Rate at which Price list currency is converted to company's base currency", + "fieldname": "plc_conversion_rate", + "fieldtype": "Float", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Price List Exchange Rate", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "9", + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 1, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "ignore_pricing_rule", + "fieldtype": "Check", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Ignore Pricing Rule", + "length": 0, + "no_copy": 1, + "permlevel": 1, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "items_section", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "", + "length": 0, + "no_copy": 0, + "oldfieldtype": "Section Break", + "options": "fa fa-shopping-cart", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 1, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "items", + "fieldtype": "Table", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Items", + "length": 0, + "no_copy": 0, + "oldfieldname": "quotation_details", + "oldfieldtype": "Table", + "options": "Quotation Item", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 1, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0, + "width": "40px" + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "pricing_rule_details", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Pricing Rules", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "pricing_rules", + "fieldtype": "Table", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Pricing Rule Detail", + "length": 0, + "no_copy": 0, + "options": "Pricing Rule Detail", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "sec_break23", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "length": 0, + "no_copy": 0, + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "total_qty", + "fieldtype": "Float", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Total Quantity", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "base_total", + "fieldtype": "Currency", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Total (Company Currency)", + "length": 0, + "no_copy": 0, + "options": "Company:company:default_currency", + "permlevel": 0, + "precision": "", + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "base_net_total", + "fieldtype": "Currency", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Net Total (Company Currency)", + "length": 0, + "no_copy": 0, + "oldfieldname": "net_total", + "oldfieldtype": "Currency", + "options": "Company:company:default_currency", + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0, + "width": "100px" + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "column_break_28", + "fieldtype": "Column Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "length": 0, + "no_copy": 0, + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "total", + "fieldtype": "Currency", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Total", + "length": 0, + "no_copy": 0, + "options": "currency", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "net_total", + "fieldtype": "Currency", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Net Total", + "length": 0, + "no_copy": 0, + "options": "currency", + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "total_net_weight", + "fieldtype": "Float", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Total Net Weight", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "taxes_section", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Taxes and Charges", + "length": 0, + "no_copy": 0, + "oldfieldtype": "Section Break", + "options": "fa fa-money", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "tax_category", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Tax Category", + "length": 0, + "no_copy": 0, + "options": "Tax Category", + "permlevel": 0, + "precision": "", + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "column_break_34", + "fieldtype": "Column Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "length": 0, + "no_copy": 0, + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "shipping_rule", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Shipping Rule", + "length": 0, + "no_copy": 0, + "oldfieldtype": "Button", + "options": "Shipping Rule", + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "section_break_36", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "length": 0, + "no_copy": 0, + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "taxes_and_charges", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Sales Taxes and Charges Template", + "length": 0, + "no_copy": 0, + "oldfieldname": "charge", + "oldfieldtype": "Link", + "options": "Sales Taxes and Charges Template", + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "taxes", + "fieldtype": "Table", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Sales Taxes and Charges", + "length": 0, + "no_copy": 0, + "oldfieldname": "other_charges", + "oldfieldtype": "Table", + "options": "Sales Taxes and Charges", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 1, + "columns": 0, + "fieldname": "sec_tax_breakup", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Tax Breakup", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "other_charges_calculation", + "fieldtype": "Text", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Taxes and Charges Calculation", + "length": 0, + "no_copy": 1, + "oldfieldtype": "HTML", + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "section_break_39", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "length": 0, + "no_copy": 0, + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "base_total_taxes_and_charges", + "fieldtype": "Currency", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Total Taxes and Charges (Company Currency)", + "length": 0, + "no_copy": 0, + "oldfieldname": "other_charges_total", + "oldfieldtype": "Currency", + "options": "Company:company:default_currency", + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "column_break_42", + "fieldtype": "Column Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "length": 0, + "no_copy": 0, + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "total_taxes_and_charges", + "fieldtype": "Currency", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Total Taxes and Charges", + "length": 0, + "no_copy": 0, + "options": "currency", + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 1, + "collapsible_depends_on": "discount_amount", + "columns": 0, + "fieldname": "section_break_44", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Additional Discount", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "default": "Grand Total", + "fieldname": "apply_discount_on", + "fieldtype": "Select", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Apply Additional Discount On", + "length": 0, + "no_copy": 0, + "options": "\nGrand Total\nNet Total", + "permlevel": 0, + "precision": "", + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "base_discount_amount", + "fieldtype": "Currency", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Additional Discount Amount (Company Currency)", + "length": 0, + "no_copy": 0, + "options": "Company:company:default_currency", + "permlevel": 0, + "precision": "", + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "column_break_46", + "fieldtype": "Column Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "additional_discount_percentage", + "fieldtype": "Float", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Additional Discount Percentage", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "discount_amount", + "fieldtype": "Currency", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Additional Discount Amount", + "length": 0, + "no_copy": 0, + "options": "currency", + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "totals", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "", + "length": 0, + "no_copy": 0, + "oldfieldtype": "Section Break", + "options": "fa fa-money", + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "base_grand_total", + "fieldtype": "Currency", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Grand Total (Company Currency)", + "length": 0, + "no_copy": 0, + "oldfieldname": "grand_total", + "oldfieldtype": "Currency", + "options": "Company:company:default_currency", + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0, + "width": "200px" + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "base_rounding_adjustment", + "fieldtype": "Currency", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Rounding Adjustment (Company Currency)", + "length": 0, + "no_copy": 1, + "options": "Company:company:default_currency", + "permlevel": 0, + "precision": "", + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "description": "In Words will be visible once you save the Quotation.", + "fieldname": "base_in_words", + "fieldtype": "Data", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "In Words (Company Currency)", + "length": 0, + "no_copy": 0, + "oldfieldname": "in_words", + "oldfieldtype": "Data", + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0, + "width": "200px" + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "base_rounded_total", + "fieldtype": "Currency", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Rounded Total (Company Currency)", + "length": 0, + "no_copy": 0, + "oldfieldname": "rounded_total", + "oldfieldtype": "Currency", + "options": "Company:company:default_currency", + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0, + "width": "200px" + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "column_break3", + "fieldtype": "Column Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "length": 0, + "no_copy": 0, + "oldfieldtype": "Column Break", + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0, + "width": "50%" + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "grand_total", + "fieldtype": "Currency", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 1, + "in_standard_filter": 0, + "label": "Grand Total", + "length": 0, + "no_copy": 0, + "oldfieldname": "grand_total_export", + "oldfieldtype": "Currency", + "options": "currency", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0, + "width": "200px" + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "rounding_adjustment", + "fieldtype": "Currency", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Rounding Adjustment", + "length": 0, + "no_copy": 1, + "options": "currency", + "permlevel": 0, + "precision": "", + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 1, + "collapsible": 0, + "columns": 0, + "fieldname": "rounded_total", + "fieldtype": "Currency", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Rounded Total", + "length": 0, + "no_copy": 0, + "oldfieldname": "rounded_total_export", + "oldfieldtype": "Currency", + "options": "currency", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0, + "width": "200px" + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "in_words", + "fieldtype": "Data", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "In Words", + "length": 0, + "no_copy": 0, + "oldfieldname": "in_words_export", + "oldfieldtype": "Data", + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0, + "width": "200px" + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "collapsible_depends_on": "", + "columns": 0, + "depends_on": "", + "fieldname": "payment_schedule_section", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Payment Terms", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "payment_terms_template", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Payment Terms Template", + "length": 0, + "no_copy": 0, + "options": "Payment Terms Template", + "permlevel": 0, + "precision": "", + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "payment_schedule", + "fieldtype": "Table", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Payment Schedule", + "length": 0, + "no_copy": 1, + "options": "Payment Schedule", + "permlevel": 0, + "precision": "", + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 1, + "collapsible_depends_on": "terms", + "columns": 0, + "fieldname": "terms_section_break", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Terms and Conditions", + "length": 0, + "no_copy": 0, + "oldfieldtype": "Section Break", + "options": "fa fa-legal", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "tc_name", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Terms", + "length": 0, + "no_copy": 0, + "oldfieldname": "tc_name", + "oldfieldtype": "Link", + "options": "Terms and Conditions", + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 1, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "terms", + "fieldtype": "Text Editor", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Term Details", + "length": 0, + "no_copy": 0, + "oldfieldname": "terms", + "oldfieldtype": "Text Editor", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 1, + "columns": 0, + "fieldname": "print_settings", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Print Settings", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 1, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "letter_head", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Letter Head", + "length": 0, + "no_copy": 0, + "oldfieldname": "letter_head", + "oldfieldtype": "Select", + "options": "Letter Head", + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 1, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "group_same_items", + "fieldtype": "Check", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Group same items", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "column_break_73", + "fieldtype": "Column Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 1, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "select_print_heading", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Print Heading", + "length": 0, + "no_copy": 1, + "oldfieldname": "select_print_heading", + "oldfieldtype": "Link", + "options": "Print Heading", + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 1, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "language", + "fieldtype": "Data", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Print Language", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "subscription_section", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Auto Repeat Section", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "auto_repeat", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Auto Repeat", + "length": 0, + "no_copy": 1, + "options": "Auto Repeat", + "permlevel": 0, + "precision": "", + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 1, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "eval: doc.auto_repeat", + "fieldname": "update_auto_repeat_reference", + "fieldtype": "Button", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Update Auto Repeat Reference", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 1, + "columns": 0, + "fieldname": "more_info", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "More Information", + "length": 0, + "no_copy": 0, + "oldfieldtype": "Section Break", + "options": "fa fa-file-text", + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "campaign", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Campaign", + "length": 0, + "no_copy": 0, + "oldfieldname": "campaign", + "oldfieldtype": "Link", + "options": "Campaign", + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "source", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Source", + "length": 0, + "no_copy": 0, + "oldfieldname": "source", + "oldfieldtype": "Select", + "options": "Lead Source", + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 1, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "eval:doc.status===\"Lost\"", + "fieldname": "order_lost_reason", + "fieldtype": "Small Text", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Detailed Reason", + "length": 0, + "no_copy": 1, + "oldfieldname": "order_lost_reason", + "oldfieldtype": "Small Text", + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "column_break4", + "fieldtype": "Column Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "length": 0, + "no_copy": 0, + "oldfieldtype": "Column Break", + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0, + "width": "50%" + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "default": "Draft", + "fieldname": "status", + "fieldtype": "Select", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 1, + "in_standard_filter": 0, + "label": "Status", + "length": 0, + "no_copy": 1, + "oldfieldname": "status", + "oldfieldtype": "Select", + "options": "Draft\nOpen\nReplied\nOrdered\nLost\nCancelled", + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 1, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "enq_det", + "fieldtype": "Text", + "hidden": 1, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Opportunity Item", + "length": 0, + "no_copy": 0, + "oldfieldname": "enq_det", + "oldfieldtype": "Text", + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "supplier_quotation", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Supplier Quotation", + "length": 0, + "no_copy": 0, + "options": "Supplier Quotation", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "opportunity", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Opportunity", + "length": 0, + "no_copy": 0, + "options": "Opportunity", + "permlevel": 0, + "precision": "", + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 1, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "lost_reasons", + "fieldtype": "Table MultiSelect", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Lost Reasons", + "length": 0, + "no_copy": 0, + "options": "Lost Reason Detail", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + } + ], + "has_web_view": 0, + "hide_heading": 0, + "hide_toolbar": 0, + "icon": "fa fa-shopping-cart", + "idx": 82, + "image_view": 0, + "in_create": 0, + "is_submittable": 1, + "issingle": 0, + "istable": 0, + "max_attachments": 1, + "menu_index": 0, + "modified": "2019-06-26 01:00:21.545591", + "modified_by": "Administrator", + "module": "Selling", + "name": "Quotation", + "owner": "Administrator", + "permissions": [ + { + "amend": 1, + "cancel": 1, + "create": 1, + "delete": 1, + "email": 1, + "export": 0, + "if_owner": 0, + "import": 0, + "permlevel": 0, + "print": 1, + "read": 1, + "report": 1, + "role": "Sales User", + "set_user_permissions": 0, + "share": 1, + "submit": 1, + "write": 1 + }, + { + "amend": 0, + "cancel": 0, + "create": 0, + "delete": 0, + "email": 0, + "export": 0, + "if_owner": 0, + "import": 0, + "match": "", + "permlevel": 1, + "print": 0, + "read": 1, + "report": 1, + "role": "Sales User", + "set_user_permissions": 0, + "share": 0, + "submit": 0, + "write": 0 + }, + { + "amend": 0, + "cancel": 0, + "create": 0, + "delete": 0, + "email": 0, + "export": 0, + "if_owner": 0, + "import": 0, + "match": "", + "permlevel": 1, + "print": 0, + "read": 1, + "report": 1, + "role": "Sales Manager", + "set_user_permissions": 0, + "share": 0, + "submit": 0, + "write": 1 + }, + { + "amend": 1, + "cancel": 1, + "create": 1, + "delete": 1, + "email": 1, + "export": 1, + "if_owner": 0, + "import": 1, + "permlevel": 0, + "print": 1, + "read": 1, + "report": 1, + "role": "Sales Manager", + "set_user_permissions": 0, + "share": 1, + "submit": 1, + "write": 1 + }, + { + "amend": 1, + "cancel": 1, + "create": 1, + "delete": 1, + "email": 1, + "export": 0, + "if_owner": 0, + "import": 0, + "permlevel": 0, + "print": 1, + "read": 1, + "report": 1, + "role": "Maintenance Manager", + "set_user_permissions": 0, + "share": 1, + "submit": 1, + "write": 1 + }, + { + "amend": 0, + "cancel": 0, + "create": 0, + "delete": 0, + "email": 0, + "export": 0, + "if_owner": 0, + "import": 0, + "match": "", + "permlevel": 1, + "print": 0, + "read": 1, + "report": 1, + "role": "Maintenance Manager", + "set_user_permissions": 0, + "share": 0, + "submit": 0, + "write": 0 + }, + { + "amend": 1, + "cancel": 1, + "create": 1, + "delete": 1, + "email": 1, + "export": 0, + "if_owner": 0, + "import": 0, + "permlevel": 0, + "print": 1, + "read": 1, + "report": 1, + "role": "Maintenance User", + "set_user_permissions": 0, + "share": 1, + "submit": 1, + "write": 1 + }, + { + "amend": 0, + "cancel": 0, + "create": 0, + "delete": 0, + "email": 0, + "export": 0, + "if_owner": 0, + "import": 0, + "match": "", + "permlevel": 1, + "print": 0, + "read": 1, + "report": 1, + "role": "Maintenance User", + "set_user_permissions": 0, + "share": 0, + "submit": 0, + "write": 0 + } + ], + "quick_entry": 0, + "read_only": 0, + "read_only_onload": 1, + "search_fields": "status,transaction_date,party_name,order_type", + "show_name_in_global_search": 1, + "sort_field": "modified", + "sort_order": "DESC", + "timeline_field": "party_name", + "title_field": "title", + "track_changes": 0, + "track_seen": 0, + "track_views": 0 } - ], - "icon": "fa fa-shopping-cart", - "idx": 82, - "is_submittable": 1, - "max_attachments": 1, - "modified": "2019-06-25 16:03:17.603222", - "modified_by": "Administrator", - "module": "Selling", - "name": "Quotation", - "owner": "Administrator", - "permissions": [ - { - "amend": 1, - "cancel": 1, - "create": 1, - "delete": 1, - "email": 1, - "print": 1, - "read": 1, - "report": 1, - "role": "Sales User", - "share": 1, - "submit": 1, - "write": 1 - }, - { - "permlevel": 1, - "read": 1, - "report": 1, - "role": "Sales User" - }, - { - "permlevel": 1, - "read": 1, - "report": 1, - "role": "Sales Manager", - "write": 1 - }, - { - "amend": 1, - "cancel": 1, - "create": 1, - "delete": 1, - "email": 1, - "export": 1, - "import": 1, - "print": 1, - "read": 1, - "report": 1, - "role": "Sales Manager", - "share": 1, - "submit": 1, - "write": 1 - }, - { - "amend": 1, - "cancel": 1, - "create": 1, - "delete": 1, - "email": 1, - "print": 1, - "read": 1, - "report": 1, - "role": "Maintenance Manager", - "share": 1, - "submit": 1, - "write": 1 - }, - { - "permlevel": 1, - "read": 1, - "report": 1, - "role": "Maintenance Manager" - }, - { - "amend": 1, - "cancel": 1, - "create": 1, - "delete": 1, - "email": 1, - "print": 1, - "read": 1, - "report": 1, - "role": "Maintenance User", - "share": 1, - "submit": 1, - "write": 1 - }, - { - "permlevel": 1, - "read": 1, - "report": 1, - "role": "Maintenance User" - } - ], - "search_fields": "status,transaction_date,customer,lead,order_type", - "show_name_in_global_search": 1, - "sort_field": "modified", - "sort_order": "DESC", - "timeline_field": "customer", - "title_field": "title" -} \ No newline at end of file diff --git a/erpnext/selling/doctype/quotation/quotation.py b/erpnext/selling/doctype/quotation/quotation.py index 4e6c8336ea..cc73e76bf3 100644 --- a/erpnext/selling/doctype/quotation/quotation.py +++ b/erpnext/selling/doctype/quotation/quotation.py @@ -28,8 +28,8 @@ class Quotation(SellingController): self.update_opportunity() self.validate_order_type() self.validate_uom_is_integer("stock_uom", "qty") - self.validate_quotation_to() self.validate_valid_till() + self.set_customer_name() if self.items: self.with_items = 1 @@ -43,16 +43,16 @@ class Quotation(SellingController): def validate_order_type(self): super(Quotation, self).validate_order_type() - def validate_quotation_to(self): - if self.customer: - self.quotation_to = "Customer" - self.lead = None - elif self.lead: - self.quotation_to = "Lead" - def update_lead(self): - if self.lead: - frappe.get_doc("Lead", self.lead).set_status(update=True) + if self.quotation_to == "Lead" and self.party_name: + frappe.get_doc("Lead", self.party_name).set_status(update=True) + + def set_customer_name(self): + if self.party_name and self.quotation_to == 'Customer': + self.customer_name = frappe.db.get_value("Customer", self.party_name, "customer_name") + elif self.party_name and self.quotation_to == 'Lead': + lead_name, company_name = frappe.db.get_value("Lead", self.party_name, ["lead_name", "company_name"]) + self.customer_name = company_name or lead_name def update_opportunity(self): for opportunity in list(set([d.prevdoc_docname for d in self.get("items")])): @@ -226,33 +226,38 @@ def _make_sales_invoice(source_name, target_doc=None, ignore_permissions=False): return doclist def _make_customer(source_name, ignore_permissions=False): - quotation = frappe.db.get_value("Quotation", source_name, ["lead", "order_type", "customer"]) - if quotation and quotation[0] and not quotation[2]: - lead_name = quotation[0] - customer_name = frappe.db.get_value("Customer", {"lead_name": lead_name}, - ["name", "customer_name"], as_dict=True) - if not customer_name: - from erpnext.crm.doctype.lead.lead import _make_customer - customer_doclist = _make_customer(lead_name, ignore_permissions=ignore_permissions) - customer = frappe.get_doc(customer_doclist) - customer.flags.ignore_permissions = ignore_permissions - if quotation[1] == "Shopping Cart": - customer.customer_group = frappe.db.get_value("Shopping Cart Settings", None, - "default_customer_group") + quotation = frappe.db.get_value("Quotation", + source_name, ["order_type", "party_name", "customer_name"], as_dict=1) - try: - customer.insert() - return customer - except frappe.NameError: - if frappe.defaults.get_global_default('cust_master_name') == "Customer Name": - customer.run_method("autoname") - customer.name += "-" + lead_name + if quotation and quotation.get('party_name'): + if not frappe.db.exists("Customer", quotation.get("party_name")): + lead_name = quotation.get("party_name") + customer_name = frappe.db.get_value("Customer", {"lead_name": lead_name}, + ["name", "customer_name"], as_dict=True) + if not customer_name: + from erpnext.crm.doctype.lead.lead import _make_customer + customer_doclist = _make_customer(lead_name, ignore_permissions=ignore_permissions) + customer = frappe.get_doc(customer_doclist) + customer.flags.ignore_permissions = ignore_permissions + if quotation.get("party_name") == "Shopping Cart": + customer.customer_group = frappe.db.get_value("Shopping Cart Settings", None, + "default_customer_group") + + try: customer.insert() return customer - else: - raise - except frappe.MandatoryError: - frappe.local.message_log = [] - frappe.throw(_("Please create Customer from Lead {0}").format(lead_name)) + except frappe.NameError: + if frappe.defaults.get_global_default('cust_master_name') == "Customer Name": + customer.run_method("autoname") + customer.name += "-" + lead_name + customer.insert() + return customer + else: + raise + except frappe.MandatoryError: + frappe.local.message_log = [] + frappe.throw(_("Please create Customer from Lead {0}").format(lead_name)) + else: + return customer_name else: - return customer_name + return frappe.get_doc("Customer", quotation.get("party_name")) diff --git a/erpnext/selling/doctype/quotation/quotation_list.js b/erpnext/selling/doctype/quotation/quotation_list.js index aa6038cbc8..5f4e2546fb 100644 --- a/erpnext/selling/doctype/quotation/quotation_list.js +++ b/erpnext/selling/doctype/quotation/quotation_list.js @@ -1,6 +1,17 @@ frappe.listview_settings['Quotation'] = { add_fields: ["customer_name", "base_grand_total", "status", "company", "currency", 'valid_till'], + + onload: function(listview) { + listview.page.fields_dict.quotation_to.get_query = function() { + return { + "filters": { + "name": ["in", ["Customer", "Lead"]], + } + }; + }; + }, + get_indicator: function(doc) { if(doc.status==="Open") { if (doc.valid_till && doc.valid_till < frappe.datetime.nowdate()) { diff --git a/erpnext/selling/doctype/quotation/test_quotation.py b/erpnext/selling/doctype/quotation/test_quotation.py index 7f88cf9ffc..7ee4a76ca6 100644 --- a/erpnext/selling/doctype/quotation/test_quotation.py +++ b/erpnext/selling/doctype/quotation/test_quotation.py @@ -203,15 +203,15 @@ class TestQuotation(unittest.TestCase): test_records = frappe.get_test_records('Quotation') -def get_quotation_dict(customer=None, item_code=None): - if not customer: - customer = '_Test Customer' +def get_quotation_dict(party_name=None, item_code=None): + if not party_name: + party_name = '_Test Customer' if not item_code: item_code = '_Test Item' return { 'doctype': 'Quotation', - 'customer': customer, + 'party_name': party_name, 'items': [ { 'item_code': item_code, @@ -229,7 +229,7 @@ def make_quotation(**args): qo.transaction_date = args.transaction_date qo.company = args.company or "_Test Company" - qo.customer = args.customer or "_Test Customer" + qo.party_name = args.party_name or "_Test Customer" qo.currency = args.currency or "INR" if args.selling_price_list: qo.selling_price_list = args.selling_price_list diff --git a/erpnext/selling/doctype/quotation/test_records.json b/erpnext/selling/doctype/quotation/test_records.json index 7a9d3eb1e2..1564f7de0c 100644 --- a/erpnext/selling/doctype/quotation/test_records.json +++ b/erpnext/selling/doctype/quotation/test_records.json @@ -1,37 +1,37 @@ [ - { - "company": "_Test Company", - "conversion_rate": 1.0, - "currency": "INR", - "customer": "_Test Customer", - "customer_group": "_Test Customer Group", - "customer_name": "_Test Customer", - "doctype": "Quotation", - "base_grand_total": 1000.0, - "grand_total": 1000.0, - "order_type": "Sales", - "plc_conversion_rate": 1.0, - "price_list_currency": "INR", - "items": [ - { - "base_amount": 1000.0, - "base_rate": 100.0, - "description": "CPU", - "doctype": "Quotation Item", - "item_code": "_Test Item Home Desktop 100", - "item_name": "CPU", - "parentfield": "items", - "qty": 10.0, - "rate": 100.0, - "uom": "_Test UOM 1", - "stock_uom": "_Test UOM 1", - "conversion_factor": 1.0 - } - ], - "quotation_to": "Customer", - "selling_price_list": "_Test Price List", - "territory": "_Test Territory", - "transaction_date": "2013-02-21", - "valid_till": "2013-03-21" - } + { + "company": "_Test Company", + "conversion_rate": 1.0, + "currency": "INR", + "party_name": "_Test Customer", + "customer_group": "_Test Customer Group", + "customer_name": "_Test Customer", + "doctype": "Quotation", + "base_grand_total": 1000.0, + "grand_total": 1000.0, + "order_type": "Sales", + "plc_conversion_rate": 1.0, + "price_list_currency": "INR", + "items": [ + { + "base_amount": 1000.0, + "base_rate": 100.0, + "description": "CPU", + "doctype": "Quotation Item", + "item_code": "_Test Item Home Desktop 100", + "item_name": "CPU", + "parentfield": "items", + "qty": 10.0, + "rate": 100.0, + "uom": "_Test UOM 1", + "stock_uom": "_Test UOM 1", + "conversion_factor": 1.0 + } + ], + "quotation_to": "Customer", + "selling_price_list": "_Test Price List", + "territory": "_Test Territory", + "transaction_date": "2013-02-21", + "valid_till": "2013-03-21" + } ] \ No newline at end of file diff --git a/erpnext/selling/doctype/sales_order/sales_order.js b/erpnext/selling/doctype/sales_order/sales_order.js index 38b7b566aa..f4bb0709a5 100644 --- a/erpnext/selling/doctype/sales_order/sales_order.js +++ b/erpnext/selling/doctype/sales_order/sales_order.js @@ -231,13 +231,19 @@ erpnext.selling.SalesOrderController = erpnext.selling.SellingController.extend( method: "erpnext.selling.doctype.quotation.quotation.make_sales_order", source_doctype: "Quotation", target: me.frm, - setters: { - customer: me.frm.doc.customer || undefined - }, + setters: [ + { + label: "Customer", + fieldname: "party_name", + fieldtype: "Link", + options: "Customer", + default: me.frm.doc.customer || undefined + } + ], get_query_filters: { company: me.frm.doc.company, docstatus: 1, - status: ["!=", "Lost"], + status: ["!=", "Lost"] } }) }, __("Get items from")); diff --git a/erpnext/selling/doctype/sales_order/sales_order.json b/erpnext/selling/doctype/sales_order/sales_order.json index 95c803d8f4..2481f31ffd 100644 --- a/erpnext/selling/doctype/sales_order/sales_order.json +++ b/erpnext/selling/doctype/sales_order/sales_order.json @@ -1,4472 +1,4472 @@ { - "allow_copy": 0, - "allow_events_in_timeline": 0, - "allow_guest_to_view": 0, - "allow_import": 1, - "allow_rename": 0, - "autoname": "naming_series:", - "beta": 0, - "creation": "2013-06-18 12:39:59", - "custom": 0, - "docstatus": 0, - "doctype": "DocType", - "document_type": "Document", - "editable_grid": 1, - "engine": "InnoDB", - "fields": [ - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "customer_section", - "fieldtype": "Section Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "", - "length": 0, - "no_copy": 0, - "options": "fa fa-user", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, + "allow_copy": 0, + "allow_events_in_timeline": 0, + "allow_guest_to_view": 0, + "allow_import": 1, + "allow_rename": 0, + "autoname": "naming_series:", + "beta": 0, + "creation": "2013-06-18 12:39:59", + "custom": 0, + "docstatus": 0, + "doctype": "DocType", + "document_type": "Document", + "editable_grid": 1, + "engine": "InnoDB", + "fields": [ + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "customer_section", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "", + "length": 0, + "no_copy": 0, + "options": "fa fa-user", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "column_break0", + "fieldtype": "Column Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "length": 0, + "no_copy": 0, + "oldfieldtype": "Column Break", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0, + "width": "50%" + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 1, + "bold": 0, + "collapsible": 0, + "columns": 0, + "default": "{customer_name}", + "fetch_if_empty": 0, + "fieldname": "title", + "fieldtype": "Data", + "hidden": 1, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Title", + "length": 0, + "no_copy": 1, + "permlevel": 0, + "precision": "", + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "default": "", + "fetch_if_empty": 0, + "fieldname": "naming_series", + "fieldtype": "Select", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Series", + "length": 0, + "no_copy": 1, + "oldfieldname": "naming_series", + "oldfieldtype": "Select", + "options": "SAL-ORD-.YYYY.-", + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 1, + "search_index": 0, + "set_only_once": 1, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 1, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "customer", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 1, + "in_list_view": 0, + "in_standard_filter": 1, + "label": "Customer", + "length": 0, + "no_copy": 0, + "oldfieldname": "customer", + "oldfieldtype": "Link", + "options": "Customer", + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 1, + "search_index": 1, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 1, + "collapsible": 0, + "columns": 0, + "fetch_from": "customer.customer_name", + "fetch_if_empty": 0, + "fieldname": "customer_name", + "fieldtype": "Data", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 1, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Customer Name", + "length": 0, + "no_copy": 0, + "options": "", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "default": "Sales", + "depends_on": "", + "fetch_if_empty": 0, + "fieldname": "order_type", + "fieldtype": "Select", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Order Type", + "length": 0, + "no_copy": 0, + "oldfieldname": "order_type", + "oldfieldtype": "Select", + "options": "\nSales\nMaintenance\nShopping Cart", + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 1, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "column_break1", + "fieldtype": "Column Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "length": 0, + "no_copy": 0, + "oldfieldtype": "Column Break", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0, + "width": "50%" + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "amended_from", + "fieldtype": "Link", + "hidden": 1, + "ignore_user_permissions": 1, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Amended From", + "length": 0, + "no_copy": 1, + "oldfieldname": "amended_from", + "oldfieldtype": "Data", + "options": "Sales Order", + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0, + "width": "150px" + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "description": "", + "fetch_if_empty": 0, + "fieldname": "company", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 1, + "label": "Company", + "length": 0, + "no_copy": 0, + "oldfieldname": "company", + "oldfieldtype": "Link", + "options": "Company", + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 1, + "report_hide": 0, + "reqd": 1, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0, + "width": "150px" + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "default": "Today", + "fetch_if_empty": 0, + "fieldname": "transaction_date", + "fieldtype": "Date", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 1, + "label": "Date", + "length": 0, + "no_copy": 1, + "oldfieldname": "transaction_date", + "oldfieldtype": "Date", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 1, + "search_index": 1, + "set_only_once": 0, + "translatable": 0, + "unique": 0, + "width": "160px" + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 1, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "delivery_date", + "fieldtype": "Date", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 1, + "in_standard_filter": 0, + "label": "Delivery Date", + "length": 0, + "no_copy": 1, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 1, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "", + "description": "", + "fetch_if_empty": 0, + "fieldname": "po_no", + "fieldtype": "Data", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Customer's Purchase Order", + "length": 0, + "no_copy": 0, + "oldfieldname": "po_no", + "oldfieldtype": "Data", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0, + "width": "100px" + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 1, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "eval:doc.po_no", + "description": "", + "fetch_if_empty": 0, + "fieldname": "po_date", + "fieldtype": "Date", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Customer's Purchase Order Date", + "length": 0, + "no_copy": 0, + "oldfieldname": "po_date", + "oldfieldtype": "Date", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0, + "width": "100px" + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "tax_id", + "fieldtype": "Data", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Tax Id", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0, + "width": "100px" + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 1, + "collapsible_depends_on": "", + "columns": 0, + "depends_on": "customer", + "fetch_if_empty": 0, + "fieldname": "contact_info", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Address and Contact", + "length": 0, + "no_copy": 0, + "options": "fa fa-bullhorn", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 1, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "customer_address", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Customer Address", + "length": 0, + "no_copy": 0, + "options": "Address", + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 1, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "address_display", + "fieldtype": "Small Text", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Address", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "contact_person", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Contact Person", + "length": 0, + "no_copy": 0, + "options": "Contact", + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "contact_display", + "fieldtype": "Small Text", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 1, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Contact", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "contact_mobile", + "fieldtype": "Small Text", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Mobile No", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "contact_email", + "fieldtype": "Data", + "hidden": 1, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Contact Email", + "length": 0, + "no_copy": 0, + "options": "Email", + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "company_address_display", + "fieldtype": "Small Text", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "company_address", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Company Address", + "length": 0, + "no_copy": 0, + "options": "Address", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "col_break46", + "fieldtype": "Column Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "length": 0, + "no_copy": 0, + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0, + "width": "50%" + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 1, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "shipping_address_name", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Shipping Address Name", + "length": 0, + "no_copy": 0, + "options": "Address", + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 1, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "shipping_address", + "fieldtype": "Small Text", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Shipping Address", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "description": "", + "fetch_if_empty": 0, + "fieldname": "customer_group", + "fieldtype": "Link", + "hidden": 1, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Customer Group", + "length": 0, + "no_copy": 0, + "options": "Customer Group", + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "description": "", + "fetch_if_empty": 0, + "fieldname": "territory", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Territory", + "length": 0, + "no_copy": 0, + "options": "Territory", + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 1, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "currency_and_price_list", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Currency and Price List", + "length": 0, + "no_copy": 0, + "options": "fa fa-tag", + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "currency", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Currency", + "length": 0, + "no_copy": 0, + "oldfieldname": "currency", + "oldfieldtype": "Select", + "options": "Currency", + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 1, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0, + "width": "100px" + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "description": "Rate at which customer's currency is converted to company's base currency", + "fetch_if_empty": 0, + "fieldname": "conversion_rate", + "fieldtype": "Float", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Exchange Rate", + "length": 0, + "no_copy": 0, + "oldfieldname": "conversion_rate", + "oldfieldtype": "Currency", + "permlevel": 0, + "precision": "9", + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 1, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0, + "width": "100px" + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "column_break2", + "fieldtype": "Column Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "length": 0, + "no_copy": 0, + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0, + "width": "50%" + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "selling_price_list", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Price List", + "length": 0, + "no_copy": 0, + "oldfieldname": "price_list_name", + "oldfieldtype": "Select", + "options": "Price List", + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 1, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0, + "width": "100px" + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "price_list_currency", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Price List Currency", + "length": 0, + "no_copy": 0, + "options": "Currency", + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 1, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "description": "Rate at which Price list currency is converted to company's base currency", + "fetch_if_empty": 0, + "fieldname": "plc_conversion_rate", + "fieldtype": "Float", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Price List Exchange Rate", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "9", + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 1, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "ignore_pricing_rule", + "fieldtype": "Check", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Ignore Pricing Rule", + "length": 0, + "no_copy": 1, + "permlevel": 1, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "sec_warehouse", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "set_warehouse", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Set Source Warehouse", + "length": 0, + "no_copy": 0, + "options": "Warehouse", + "permlevel": 0, + "precision": "", + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "items_section", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "", + "length": 0, + "no_copy": 0, + "oldfieldtype": "Section Break", + "options": "fa fa-shopping-cart", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "scan_barcode", + "fieldtype": "Data", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Scan Barcode", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 1, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "items", + "fieldtype": "Table", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Items", + "length": 0, + "no_copy": 0, + "oldfieldname": "sales_order_details", + "oldfieldtype": "Table", + "options": "Sales Order Item", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 1, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "pricing_rule_details", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Pricing Rules", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "pricing_rules", + "fieldtype": "Table", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Pricing Rule Detail", + "length": 0, + "no_copy": 0, + "options": "Pricing Rule Detail", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "section_break_31", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "length": 0, + "no_copy": 0, + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "column_break_33a", + "fieldtype": "Column Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "length": 0, + "no_copy": 0, + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "total_qty", + "fieldtype": "Float", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Total Quantity", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "base_total", + "fieldtype": "Currency", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Total (Company Currency)", + "length": 0, + "no_copy": 0, + "options": "Company:company:default_currency", + "permlevel": 0, + "precision": "", + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "base_net_total", + "fieldtype": "Currency", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Net Total (Company Currency)", + "length": 0, + "no_copy": 0, + "oldfieldname": "net_total", + "oldfieldtype": "Currency", + "options": "Company:company:default_currency", + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0, + "width": "150px" + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "column_break_33", + "fieldtype": "Column Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "length": 0, + "no_copy": 0, + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "total", + "fieldtype": "Currency", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Total", + "length": 0, + "no_copy": 0, + "options": "currency", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "net_total", + "fieldtype": "Currency", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Net Total", + "length": 0, + "no_copy": 0, + "options": "currency", + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "total_net_weight", + "fieldtype": "Float", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Total Net Weight", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "taxes_section", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Taxes and Charges", + "length": 0, + "no_copy": 0, + "oldfieldtype": "Section Break", + "options": "fa fa-money", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "tax_category", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Tax Category", + "length": 0, + "no_copy": 0, + "options": "Tax Category", + "permlevel": 0, + "precision": "", + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "column_break_38", + "fieldtype": "Column Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "length": 0, + "no_copy": 0, + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "shipping_rule", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Shipping Rule", + "length": 0, + "no_copy": 0, + "oldfieldtype": "Button", + "options": "Shipping Rule", + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "section_break_40", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "length": 0, + "no_copy": 0, + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "taxes_and_charges", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Sales Taxes and Charges Template", + "length": 0, + "no_copy": 0, + "oldfieldname": "charge", + "oldfieldtype": "Link", + "options": "Sales Taxes and Charges Template", + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "taxes", + "fieldtype": "Table", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Sales Taxes and Charges", + "length": 0, + "no_copy": 0, + "oldfieldname": "other_charges", + "oldfieldtype": "Table", + "options": "Sales Taxes and Charges", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 1, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "sec_tax_breakup", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Tax Breakup", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "other_charges_calculation", + "fieldtype": "Text", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Taxes and Charges Calculation", + "length": 0, + "no_copy": 1, + "oldfieldtype": "HTML", + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "section_break_43", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "length": 0, + "no_copy": 0, + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "base_total_taxes_and_charges", + "fieldtype": "Currency", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Total Taxes and Charges (Company Currency)", + "length": 0, + "no_copy": 0, + "oldfieldname": "other_charges_total", + "oldfieldtype": "Currency", + "options": "Company:company:default_currency", + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0, + "width": "150px" + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "column_break_46", + "fieldtype": "Column Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "total_taxes_and_charges", + "fieldtype": "Currency", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Total Taxes and Charges", + "length": 0, + "no_copy": 0, + "options": "currency", + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "loyalty_points_redemption", + "fieldtype": "Section Break", + "hidden": 1, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Loyalty Points Redemption", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "loyalty_points", + "fieldtype": "Int", + "hidden": 1, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Loyalty Points", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "loyalty_amount", + "fieldtype": "Currency", + "hidden": 1, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Loyalty Amount", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 1, + "collapsible_depends_on": "discount_amount", + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "section_break_48", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Additional Discount", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "default": "Grand Total", + "fetch_if_empty": 0, + "fieldname": "apply_discount_on", + "fieldtype": "Select", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Apply Additional Discount On", + "length": 0, + "no_copy": 0, + "options": "\nGrand Total\nNet Total", + "permlevel": 0, + "precision": "", + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "base_discount_amount", + "fieldtype": "Currency", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Additional Discount Amount (Company Currency)", + "length": 0, + "no_copy": 0, + "options": "Company:company:default_currency", + "permlevel": 0, + "precision": "", + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "column_break_50", + "fieldtype": "Column Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "length": 0, + "no_copy": 0, + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "", + "fetch_if_empty": 0, + "fieldname": "additional_discount_percentage", + "fieldtype": "Float", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Additional Discount Percentage", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "", + "fetch_if_empty": 0, + "fieldname": "discount_amount", + "fieldtype": "Currency", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Additional Discount Amount", + "length": 0, + "no_copy": 0, + "options": "currency", + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "totals", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "", + "length": 0, + "no_copy": 0, + "oldfieldtype": "Section Break", + "options": "fa fa-money", + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "base_grand_total", + "fieldtype": "Currency", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Grand Total (Company Currency)", + "length": 0, + "no_copy": 0, + "oldfieldname": "grand_total", + "oldfieldtype": "Currency", + "options": "Company:company:default_currency", + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0, + "width": "150px" + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "base_rounding_adjustment", + "fieldtype": "Currency", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Rounding Adjustment (Company Currency)", + "length": 0, + "no_copy": 1, + "options": "Company:company:default_currency", + "permlevel": 0, + "precision": "", + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "base_rounded_total", + "fieldtype": "Currency", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Rounded Total (Company Currency)", + "length": 0, + "no_copy": 0, + "oldfieldname": "rounded_total", + "oldfieldtype": "Currency", + "options": "Company:company:default_currency", + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0, + "width": "150px" + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "description": "In Words will be visible once you save the Sales Order.", + "fetch_if_empty": 0, + "fieldname": "base_in_words", + "fieldtype": "Data", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "In Words (Company Currency)", + "length": 0, + "no_copy": 0, + "oldfieldname": "in_words", + "oldfieldtype": "Data", + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0, + "width": "200px" + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "column_break3", + "fieldtype": "Column Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "length": 0, + "no_copy": 0, + "oldfieldtype": "Column Break", + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0, + "width": "50%" + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "grand_total", + "fieldtype": "Currency", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 1, + "in_standard_filter": 0, + "label": "Grand Total", + "length": 0, + "no_copy": 0, + "oldfieldname": "grand_total_export", + "oldfieldtype": "Currency", + "options": "currency", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0, + "width": "150px" + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "", + "fetch_if_empty": 0, + "fieldname": "rounding_adjustment", + "fieldtype": "Currency", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Rounding Adjustment", + "length": 0, + "no_copy": 1, + "options": "currency", + "permlevel": 0, + "precision": "", + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 1, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "rounded_total", + "fieldtype": "Currency", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Rounded Total", + "length": 0, + "no_copy": 0, + "oldfieldname": "rounded_total_export", + "oldfieldtype": "Currency", + "options": "currency", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0, + "width": "150px" + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "in_words", + "fieldtype": "Data", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "In Words", + "length": 0, + "no_copy": 0, + "oldfieldname": "in_words_export", + "oldfieldtype": "Data", + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0, + "width": "200px" + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "advance_paid", + "fieldtype": "Currency", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Advance Paid", + "length": 0, + "no_copy": 1, + "options": "party_account_currency", + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 1, + "collapsible_depends_on": "packed_items", + "columns": 0, + "description": "", + "fetch_if_empty": 0, + "fieldname": "packing_list", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Packing List", + "length": 0, + "no_copy": 0, + "oldfieldtype": "Section Break", + "options": "fa fa-suitcase", + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "packed_items", + "fieldtype": "Table", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Packed Items", + "length": 0, + "no_copy": 0, + "options": "Packed Item", + "permlevel": 0, + "precision": "", + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "collapsible_depends_on": "", + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "payment_schedule_section", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Payment Terms", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "payment_terms_template", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Payment Terms Template", + "length": 0, + "no_copy": 0, + "options": "Payment Terms Template", + "permlevel": 0, + "precision": "", + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "payment_schedule", + "fieldtype": "Table", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Payment Schedule", + "length": 0, + "no_copy": 1, + "options": "Payment Schedule", + "permlevel": 0, + "precision": "", + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 1, + "collapsible_depends_on": "terms", + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "terms_section_break", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Terms and Conditions", + "length": 0, + "no_copy": 0, + "oldfieldtype": "Section Break", + "options": "fa fa-legal", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "tc_name", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Terms", + "length": 0, + "no_copy": 0, + "oldfieldname": "tc_name", + "oldfieldtype": "Link", + "options": "Terms and Conditions", + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "terms", + "fieldtype": "Text Editor", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Terms and Conditions Details", + "length": 0, + "no_copy": 0, + "oldfieldname": "terms", + "oldfieldtype": "Text Editor", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 1, + "collapsible_depends_on": "project", + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "more_info", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "More Information", + "length": 0, + "no_copy": 0, + "oldfieldtype": "Section Break", + "options": "fa fa-file-text", + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "inter_company_order_reference", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Inter Company Order Reference", + "length": 0, + "no_copy": 0, + "options": "Purchase Order", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "description": "Track this Sales Order against any Project", + "fetch_if_empty": 0, + "fieldname": "project", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Project", + "length": 0, + "no_copy": 0, + "oldfieldname": "project", + "oldfieldtype": "Link", + "options": "Project", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "party_account_currency", + "fieldtype": "Link", + "hidden": 1, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Party Account Currency", + "length": 0, + "no_copy": 1, + "options": "Currency", + "permlevel": 0, + "precision": "", + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "column_break_77", + "fieldtype": "Column Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "source", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Source", + "length": 0, + "no_copy": 0, + "oldfieldname": "source", + "oldfieldtype": "Select", + "options": "Lead Source", + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "", + "fetch_if_empty": 0, + "fieldname": "campaign", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Campaign", + "length": 0, + "no_copy": 0, + "oldfieldname": "campaign", + "oldfieldtype": "Link", + "options": "Campaign", + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 1, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "printing_details", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Printing Details", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "language", + "fieldtype": "Data", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Print Language", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 1, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "letter_head", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Letter Head", + "length": 0, + "no_copy": 0, + "oldfieldname": "letter_head", + "oldfieldtype": "Select", + "options": "Letter Head", + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "column_break4", + "fieldtype": "Column Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "length": 0, + "no_copy": 0, + "oldfieldtype": "Column Break", + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0, + "width": "50%" + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 1, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "select_print_heading", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Print Heading", + "length": 0, + "no_copy": 1, + "oldfieldname": "select_print_heading", + "oldfieldtype": "Link", + "options": "Print Heading", + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 1, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 1, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "group_same_items", + "fieldtype": "Check", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Group same items", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 1, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "section_break_78", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Billing and Delivery Status", + "length": 0, + "no_copy": 0, + "oldfieldtype": "Column Break", + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0, + "width": "50%" + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "default": "Draft", + "fetch_if_empty": 0, + "fieldname": "status", + "fieldtype": "Select", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 1, + "in_standard_filter": 0, + "label": "Status", + "length": 0, + "no_copy": 1, + "oldfieldname": "status", + "oldfieldtype": "Select", + "options": "\nDraft\nOn Hold\nTo Deliver and Bill\nTo Bill\nTo Deliver\nCompleted\nCancelled\nClosed", + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 1, + "search_index": 1, + "set_only_once": 0, + "translatable": 0, + "unique": 0, + "width": "100px" + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "delivery_status", + "fieldtype": "Select", + "hidden": 1, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 1, + "label": "Delivery Status", + "length": 0, + "no_copy": 1, + "options": "Not Delivered\nFully Delivered\nPartly Delivered\nClosed\nNot Applicable", + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "eval:!doc.__islocal", + "description": "% of materials delivered against this Sales Order", + "fetch_if_empty": 0, + "fieldname": "per_delivered", + "fieldtype": "Percent", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 1, + "in_standard_filter": 0, + "label": "% Delivered", + "length": 0, + "no_copy": 1, + "oldfieldname": "per_delivered", + "oldfieldtype": "Currency", + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0, + "width": "100px" + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "column_break_81", + "fieldtype": "Column Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "length": 0, + "no_copy": 0, + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "eval:!doc.__islocal", + "description": "% of materials billed against this Sales Order", + "fetch_if_empty": 0, + "fieldname": "per_billed", + "fieldtype": "Percent", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 1, + "in_standard_filter": 0, + "label": "% Amount Billed", + "length": 0, + "no_copy": 1, + "oldfieldname": "per_billed", + "oldfieldtype": "Currency", + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0, + "width": "100px" + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "", + "fetch_if_empty": 0, + "fieldname": "billing_status", + "fieldtype": "Select", + "hidden": 1, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 1, + "label": "Billing Status", + "length": 0, + "no_copy": 1, + "options": "Not Billed\nFully Billed\nPartly Billed\nClosed", + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 1, + "collapsible_depends_on": "commission_rate", + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "sales_team_section_break", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Commission", + "length": 0, + "no_copy": 0, + "oldfieldtype": "Section Break", + "options": "fa fa-group", + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "sales_partner", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Sales Partner", + "length": 0, + "no_copy": 0, + "oldfieldname": "sales_partner", + "oldfieldtype": "Link", + "options": "Sales Partner", + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0, + "width": "150px" + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "column_break7", + "fieldtype": "Column Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "length": 0, + "no_copy": 0, + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0, + "width": "50%" + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "commission_rate", + "fieldtype": "Float", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Commission Rate", + "length": 0, + "no_copy": 0, + "oldfieldname": "commission_rate", + "oldfieldtype": "Currency", + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0, + "width": "100px" + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "total_commission", + "fieldtype": "Currency", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Total Commission", + "length": 0, + "no_copy": 0, + "oldfieldname": "total_commission", + "oldfieldtype": "Currency", + "options": "Company:company:default_currency", + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 1, + "collapsible_depends_on": "sales_team", + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "section_break1", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Sales Team", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 1, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "sales_team", + "fieldtype": "Table", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Sales Team1", + "length": 0, + "no_copy": 0, + "oldfieldname": "sales_team", + "oldfieldtype": "Table", + "options": "Sales Team", + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 1, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "subscription_section", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Auto Repeat Section", + "length": 0, + "no_copy": 1, + "permlevel": 0, + "precision": "", + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 1, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "", + "description": "", + "fetch_if_empty": 0, + "fieldname": "from_date", + "fieldtype": "Date", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "From Date", + "length": 0, + "no_copy": 1, + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 1, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "", + "description": "", + "fetch_if_empty": 0, + "fieldname": "to_date", + "fieldtype": "Date", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "To Date", + "length": 0, + "no_copy": 1, + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "column_break_108", + "fieldtype": "Column Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "auto_repeat", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Auto Repeat", + "length": 0, + "no_copy": 0, + "options": "Auto Repeat", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 1, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "eval: doc.auto_repeat", + "fetch_if_empty": 0, + "fieldname": "update_auto_repeat_reference", + "fieldtype": "Button", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Update Auto Repeat Reference", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + } + ], + "has_web_view": 0, + "hide_toolbar": 0, + "icon": "fa fa-file-text", + "idx": 105, + "in_create": 0, + "is_submittable": 1, + "issingle": 0, + "istable": 0, + "max_attachments": 0, + "modified": "2019-04-18 12:05:23.464968", + "modified_by": "Administrator", + "module": "Selling", + "name": "Sales Order", + "owner": "Administrator", + "permissions": [ + { + "amend": 1, + "cancel": 1, + "create": 1, + "delete": 1, + "email": 1, + "export": 0, + "if_owner": 0, + "import": 0, + "permlevel": 0, + "print": 1, + "read": 1, + "report": 1, + "role": "Sales User", + "set_user_permissions": 0, + "share": 1, + "submit": 1, + "write": 1 + }, + { + "amend": 1, + "cancel": 1, + "create": 1, + "delete": 1, + "email": 1, + "export": 1, + "if_owner": 0, + "import": 1, + "permlevel": 0, + "print": 1, + "read": 1, + "report": 1, + "role": "Sales Manager", + "set_user_permissions": 1, + "share": 1, + "submit": 1, + "write": 1 + }, + { + "amend": 1, + "cancel": 1, + "create": 1, + "delete": 1, + "email": 1, + "export": 0, + "if_owner": 0, + "import": 0, + "permlevel": 0, + "print": 1, + "read": 1, + "report": 1, + "role": "Maintenance User", + "set_user_permissions": 0, + "share": 1, + "submit": 1, + "write": 1 + }, + { + "amend": 0, + "cancel": 0, + "create": 0, + "delete": 0, + "email": 1, + "export": 0, + "if_owner": 0, + "import": 0, + "permlevel": 0, + "print": 1, + "read": 1, + "report": 0, + "role": "Accounts User", + "set_user_permissions": 0, + "share": 0, + "submit": 0, + "write": 0 + }, + { + "amend": 0, + "cancel": 0, + "create": 0, + "delete": 0, + "email": 0, + "export": 0, + "if_owner": 0, + "import": 0, + "permlevel": 0, + "print": 0, + "read": 1, + "report": 1, + "role": "Stock User", + "set_user_permissions": 0, + "share": 0, + "submit": 0, + "write": 0 + }, + { + "amend": 0, + "cancel": 0, + "create": 0, + "delete": 0, + "email": 0, + "export": 0, + "if_owner": 0, + "import": 0, + "permlevel": 1, + "print": 0, + "read": 1, + "report": 0, + "role": "Sales Manager", + "set_user_permissions": 0, + "share": 0, + "submit": 0, + "write": 1 + } + ], + "quick_entry": 0, "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "column_break0", - "fieldtype": "Column Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "length": 0, - "no_copy": 0, - "oldfieldtype": "Column Break", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0, - "width": "50%" - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 1, - "bold": 0, - "collapsible": 0, - "columns": 0, - "default": "{customer_name}", - "fetch_if_empty": 0, - "fieldname": "title", - "fieldtype": "Data", - "hidden": 1, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Title", - "length": 0, - "no_copy": 1, - "permlevel": 0, - "precision": "", - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "default": "", - "fetch_if_empty": 0, - "fieldname": "naming_series", - "fieldtype": "Select", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Series", - "length": 0, - "no_copy": 1, - "oldfieldname": "naming_series", - "oldfieldtype": "Select", - "options": "SAL-ORD-.YYYY.-", - "permlevel": 0, - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 1, - "search_index": 0, - "set_only_once": 1, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 1, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "customer", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 1, - "in_list_view": 0, - "in_standard_filter": 1, - "label": "Customer", - "length": 0, - "no_copy": 0, - "oldfieldname": "customer", - "oldfieldtype": "Link", - "options": "Customer", - "permlevel": 0, - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 1, - "search_index": 1, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 1, - "collapsible": 0, - "columns": 0, - "fetch_from": "customer.customer_name", - "fetch_if_empty": 0, - "fieldname": "customer_name", - "fieldtype": "Data", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 1, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Customer Name", - "length": 0, - "no_copy": 0, - "options": "", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 1, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "default": "Sales", - "depends_on": "", - "fetch_if_empty": 0, - "fieldname": "order_type", - "fieldtype": "Select", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Order Type", - "length": 0, - "no_copy": 0, - "oldfieldname": "order_type", - "oldfieldtype": "Select", - "options": "\nSales\nMaintenance\nShopping Cart", - "permlevel": 0, - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 1, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "column_break1", - "fieldtype": "Column Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "length": 0, - "no_copy": 0, - "oldfieldtype": "Column Break", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0, - "width": "50%" - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "amended_from", - "fieldtype": "Link", - "hidden": 1, - "ignore_user_permissions": 1, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Amended From", - "length": 0, - "no_copy": 1, - "oldfieldname": "amended_from", - "oldfieldtype": "Data", - "options": "Sales Order", - "permlevel": 0, - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 1, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0, - "width": "150px" - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "description": "", - "fetch_if_empty": 0, - "fieldname": "company", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 1, - "label": "Company", - "length": 0, - "no_copy": 0, - "oldfieldname": "company", - "oldfieldtype": "Link", - "options": "Company", - "permlevel": 0, - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 1, - "report_hide": 0, - "reqd": 1, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0, - "width": "150px" - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "default": "Today", - "fetch_if_empty": 0, - "fieldname": "transaction_date", - "fieldtype": "Date", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 1, - "label": "Date", - "length": 0, - "no_copy": 1, - "oldfieldname": "transaction_date", - "oldfieldtype": "Date", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 1, - "search_index": 1, - "set_only_once": 0, - "translatable": 0, - "unique": 0, - "width": "160px" - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 1, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "delivery_date", - "fieldtype": "Date", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "Delivery Date", - "length": 0, - "no_copy": 1, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 1, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "", - "description": "", - "fetch_if_empty": 0, - "fieldname": "po_no", - "fieldtype": "Data", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Customer's Purchase Order", - "length": 0, - "no_copy": 0, - "oldfieldname": "po_no", - "oldfieldtype": "Data", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0, - "width": "100px" - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 1, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "eval:doc.po_no", - "description": "", - "fetch_if_empty": 0, - "fieldname": "po_date", - "fieldtype": "Date", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Customer's Purchase Order Date", - "length": 0, - "no_copy": 0, - "oldfieldname": "po_date", - "oldfieldtype": "Date", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0, - "width": "100px" - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "tax_id", - "fieldtype": "Data", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Tax Id", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 1, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0, - "width": "100px" - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 1, - "collapsible_depends_on": "", - "columns": 0, - "depends_on": "customer", - "fetch_if_empty": 0, - "fieldname": "contact_info", - "fieldtype": "Section Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Address and Contact", - "length": 0, - "no_copy": 0, - "options": "fa fa-bullhorn", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 1, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "customer_address", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Customer Address", - "length": 0, - "no_copy": 0, - "options": "Address", - "permlevel": 0, - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 1, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "address_display", - "fieldtype": "Small Text", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Address", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 1, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "contact_person", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Contact Person", - "length": 0, - "no_copy": 0, - "options": "Contact", - "permlevel": 0, - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "contact_display", - "fieldtype": "Small Text", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 1, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Contact", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 1, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "contact_mobile", - "fieldtype": "Small Text", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Mobile No", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 1, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "contact_email", - "fieldtype": "Data", - "hidden": 1, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Contact Email", - "length": 0, - "no_copy": 0, - "options": "Email", - "permlevel": 0, - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 1, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "company_address_display", - "fieldtype": "Small Text", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 1, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "company_address", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Company Address", - "length": 0, - "no_copy": 0, - "options": "Address", - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "col_break46", - "fieldtype": "Column Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "length": 0, - "no_copy": 0, - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0, - "width": "50%" - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 1, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "shipping_address_name", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Shipping Address Name", - "length": 0, - "no_copy": 0, - "options": "Address", - "permlevel": 0, - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 1, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "shipping_address", - "fieldtype": "Small Text", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Shipping Address", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 1, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "description": "", - "fetch_if_empty": 0, - "fieldname": "customer_group", - "fieldtype": "Link", - "hidden": 1, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Customer Group", - "length": 0, - "no_copy": 0, - "options": "Customer Group", - "permlevel": 0, - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "description": "", - "fetch_if_empty": 0, - "fieldname": "territory", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Territory", - "length": 0, - "no_copy": 0, - "options": "Territory", - "permlevel": 0, - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 1, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "currency_and_price_list", - "fieldtype": "Section Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Currency and Price List", - "length": 0, - "no_copy": 0, - "options": "fa fa-tag", - "permlevel": 0, - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "currency", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Currency", - "length": 0, - "no_copy": 0, - "oldfieldname": "currency", - "oldfieldtype": "Select", - "options": "Currency", - "permlevel": 0, - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 1, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0, - "width": "100px" - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "description": "Rate at which customer's currency is converted to company's base currency", - "fetch_if_empty": 0, - "fieldname": "conversion_rate", - "fieldtype": "Float", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Exchange Rate", - "length": 0, - "no_copy": 0, - "oldfieldname": "conversion_rate", - "oldfieldtype": "Currency", - "permlevel": 0, - "precision": "9", - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 1, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0, - "width": "100px" - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "column_break2", - "fieldtype": "Column Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "length": 0, - "no_copy": 0, - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0, - "width": "50%" - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "selling_price_list", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Price List", - "length": 0, - "no_copy": 0, - "oldfieldname": "price_list_name", - "oldfieldtype": "Select", - "options": "Price List", - "permlevel": 0, - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 1, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0, - "width": "100px" - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "price_list_currency", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Price List Currency", - "length": 0, - "no_copy": 0, - "options": "Currency", - "permlevel": 0, - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 1, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 1, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "description": "Rate at which Price list currency is converted to company's base currency", - "fetch_if_empty": 0, - "fieldname": "plc_conversion_rate", - "fieldtype": "Float", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Price List Exchange Rate", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "9", - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 1, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "ignore_pricing_rule", - "fieldtype": "Check", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Ignore Pricing Rule", - "length": 0, - "no_copy": 1, - "permlevel": 1, - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "sec_warehouse", - "fieldtype": "Section Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "set_warehouse", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Set Source Warehouse", - "length": 0, - "no_copy": 0, - "options": "Warehouse", - "permlevel": 0, - "precision": "", - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "items_section", - "fieldtype": "Section Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "", - "length": 0, - "no_copy": 0, - "oldfieldtype": "Section Break", - "options": "fa fa-shopping-cart", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "scan_barcode", - "fieldtype": "Data", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Scan Barcode", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 1, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "items", - "fieldtype": "Table", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Items", - "length": 0, - "no_copy": 0, - "oldfieldname": "sales_order_details", - "oldfieldtype": "Table", - "options": "Sales Order Item", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 1, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "pricing_rule_details", - "fieldtype": "Section Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Pricing Rules", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "pricing_rules", - "fieldtype": "Table", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Pricing Rule Detail", - "length": 0, - "no_copy": 0, - "options": "Pricing Rule Detail", - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 1, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "section_break_31", - "fieldtype": "Section Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "length": 0, - "no_copy": 0, - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "column_break_33a", - "fieldtype": "Column Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "length": 0, - "no_copy": 0, - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "total_qty", - "fieldtype": "Float", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Total Quantity", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 1, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "base_total", - "fieldtype": "Currency", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Total (Company Currency)", - "length": 0, - "no_copy": 0, - "options": "Company:company:default_currency", - "permlevel": 0, - "precision": "", - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 1, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "base_net_total", - "fieldtype": "Currency", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Net Total (Company Currency)", - "length": 0, - "no_copy": 0, - "oldfieldname": "net_total", - "oldfieldtype": "Currency", - "options": "Company:company:default_currency", - "permlevel": 0, - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 1, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0, - "width": "150px" - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "column_break_33", - "fieldtype": "Column Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "length": 0, - "no_copy": 0, - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "total", - "fieldtype": "Currency", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Total", - "length": 0, - "no_copy": 0, - "options": "currency", - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 1, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "net_total", - "fieldtype": "Currency", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Net Total", - "length": 0, - "no_copy": 0, - "options": "currency", - "permlevel": 0, - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 1, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "total_net_weight", - "fieldtype": "Float", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Total Net Weight", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 1, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "taxes_section", - "fieldtype": "Section Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Taxes and Charges", - "length": 0, - "no_copy": 0, - "oldfieldtype": "Section Break", - "options": "fa fa-money", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "tax_category", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Tax Category", - "length": 0, - "no_copy": 0, - "options": "Tax Category", - "permlevel": 0, - "precision": "", - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "column_break_38", - "fieldtype": "Column Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "length": 0, - "no_copy": 0, - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "shipping_rule", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Shipping Rule", - "length": 0, - "no_copy": 0, - "oldfieldtype": "Button", - "options": "Shipping Rule", - "permlevel": 0, - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "section_break_40", - "fieldtype": "Section Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "length": 0, - "no_copy": 0, - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "taxes_and_charges", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Sales Taxes and Charges Template", - "length": 0, - "no_copy": 0, - "oldfieldname": "charge", - "oldfieldtype": "Link", - "options": "Sales Taxes and Charges Template", - "permlevel": 0, - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "taxes", - "fieldtype": "Table", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Sales Taxes and Charges", - "length": 0, - "no_copy": 0, - "oldfieldname": "other_charges", - "oldfieldtype": "Table", - "options": "Sales Taxes and Charges", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 1, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "sec_tax_breakup", - "fieldtype": "Section Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Tax Breakup", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "other_charges_calculation", - "fieldtype": "Text", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Taxes and Charges Calculation", - "length": 0, - "no_copy": 1, - "oldfieldtype": "HTML", - "permlevel": 0, - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 1, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "section_break_43", - "fieldtype": "Section Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "length": 0, - "no_copy": 0, - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "base_total_taxes_and_charges", - "fieldtype": "Currency", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Total Taxes and Charges (Company Currency)", - "length": 0, - "no_copy": 0, - "oldfieldname": "other_charges_total", - "oldfieldtype": "Currency", - "options": "Company:company:default_currency", - "permlevel": 0, - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 1, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0, - "width": "150px" - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "column_break_46", - "fieldtype": "Column Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "total_taxes_and_charges", - "fieldtype": "Currency", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Total Taxes and Charges", - "length": 0, - "no_copy": 0, - "options": "currency", - "permlevel": 0, - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 1, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "loyalty_points_redemption", - "fieldtype": "Section Break", - "hidden": 1, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Loyalty Points Redemption", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "loyalty_points", - "fieldtype": "Int", - "hidden": 1, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Loyalty Points", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 1, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "loyalty_amount", - "fieldtype": "Currency", - "hidden": 1, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Loyalty Amount", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 1, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 1, - "collapsible_depends_on": "discount_amount", - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "section_break_48", - "fieldtype": "Section Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Additional Discount", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "default": "Grand Total", - "fetch_if_empty": 0, - "fieldname": "apply_discount_on", - "fieldtype": "Select", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Apply Additional Discount On", - "length": 0, - "no_copy": 0, - "options": "\nGrand Total\nNet Total", - "permlevel": 0, - "precision": "", - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "base_discount_amount", - "fieldtype": "Currency", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Additional Discount Amount (Company Currency)", - "length": 0, - "no_copy": 0, - "options": "Company:company:default_currency", - "permlevel": 0, - "precision": "", - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 1, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "column_break_50", - "fieldtype": "Column Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "length": 0, - "no_copy": 0, - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "", - "fetch_if_empty": 0, - "fieldname": "additional_discount_percentage", - "fieldtype": "Float", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Additional Discount Percentage", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "", - "fetch_if_empty": 0, - "fieldname": "discount_amount", - "fieldtype": "Currency", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Additional Discount Amount", - "length": 0, - "no_copy": 0, - "options": "currency", - "permlevel": 0, - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "totals", - "fieldtype": "Section Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "", - "length": 0, - "no_copy": 0, - "oldfieldtype": "Section Break", - "options": "fa fa-money", - "permlevel": 0, - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "base_grand_total", - "fieldtype": "Currency", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Grand Total (Company Currency)", - "length": 0, - "no_copy": 0, - "oldfieldname": "grand_total", - "oldfieldtype": "Currency", - "options": "Company:company:default_currency", - "permlevel": 0, - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 1, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0, - "width": "150px" - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "base_rounding_adjustment", - "fieldtype": "Currency", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Rounding Adjustment (Company Currency)", - "length": 0, - "no_copy": 1, - "options": "Company:company:default_currency", - "permlevel": 0, - "precision": "", - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 1, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "base_rounded_total", - "fieldtype": "Currency", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Rounded Total (Company Currency)", - "length": 0, - "no_copy": 0, - "oldfieldname": "rounded_total", - "oldfieldtype": "Currency", - "options": "Company:company:default_currency", - "permlevel": 0, - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 1, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0, - "width": "150px" - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "description": "In Words will be visible once you save the Sales Order.", - "fetch_if_empty": 0, - "fieldname": "base_in_words", - "fieldtype": "Data", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "In Words (Company Currency)", - "length": 0, - "no_copy": 0, - "oldfieldname": "in_words", - "oldfieldtype": "Data", - "permlevel": 0, - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 1, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0, - "width": "200px" - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "column_break3", - "fieldtype": "Column Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "length": 0, - "no_copy": 0, - "oldfieldtype": "Column Break", - "permlevel": 0, - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0, - "width": "50%" - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "grand_total", - "fieldtype": "Currency", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "Grand Total", - "length": 0, - "no_copy": 0, - "oldfieldname": "grand_total_export", - "oldfieldtype": "Currency", - "options": "currency", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 1, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0, - "width": "150px" - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "", - "fetch_if_empty": 0, - "fieldname": "rounding_adjustment", - "fieldtype": "Currency", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Rounding Adjustment", - "length": 0, - "no_copy": 1, - "options": "currency", - "permlevel": 0, - "precision": "", - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 1, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 1, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "rounded_total", - "fieldtype": "Currency", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Rounded Total", - "length": 0, - "no_copy": 0, - "oldfieldname": "rounded_total_export", - "oldfieldtype": "Currency", - "options": "currency", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 1, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0, - "width": "150px" - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "in_words", - "fieldtype": "Data", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "In Words", - "length": 0, - "no_copy": 0, - "oldfieldname": "in_words_export", - "oldfieldtype": "Data", - "permlevel": 0, - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 1, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0, - "width": "200px" - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "advance_paid", - "fieldtype": "Currency", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Advance Paid", - "length": 0, - "no_copy": 1, - "options": "party_account_currency", - "permlevel": 0, - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 1, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 1, - "collapsible_depends_on": "packed_items", - "columns": 0, - "description": "", - "fetch_if_empty": 0, - "fieldname": "packing_list", - "fieldtype": "Section Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Packing List", - "length": 0, - "no_copy": 0, - "oldfieldtype": "Section Break", - "options": "fa fa-suitcase", - "permlevel": 0, - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "packed_items", - "fieldtype": "Table", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Packed Items", - "length": 0, - "no_copy": 0, - "options": "Packed Item", - "permlevel": 0, - "precision": "", - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 1, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "collapsible_depends_on": "", - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "payment_schedule_section", - "fieldtype": "Section Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Payment Terms", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "payment_terms_template", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Payment Terms Template", - "length": 0, - "no_copy": 0, - "options": "Payment Terms Template", - "permlevel": 0, - "precision": "", - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "payment_schedule", - "fieldtype": "Table", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Payment Schedule", - "length": 0, - "no_copy": 1, - "options": "Payment Schedule", - "permlevel": 0, - "precision": "", - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 1, - "collapsible_depends_on": "terms", - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "terms_section_break", - "fieldtype": "Section Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Terms and Conditions", - "length": 0, - "no_copy": 0, - "oldfieldtype": "Section Break", - "options": "fa fa-legal", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "tc_name", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Terms", - "length": 0, - "no_copy": 0, - "oldfieldname": "tc_name", - "oldfieldtype": "Link", - "options": "Terms and Conditions", - "permlevel": 0, - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "terms", - "fieldtype": "Text Editor", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Terms and Conditions Details", - "length": 0, - "no_copy": 0, - "oldfieldname": "terms", - "oldfieldtype": "Text Editor", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 1, - "collapsible_depends_on": "project", - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "more_info", - "fieldtype": "Section Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "More Information", - "length": 0, - "no_copy": 0, - "oldfieldtype": "Section Break", - "options": "fa fa-file-text", - "permlevel": 0, - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "inter_company_order_reference", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Inter Company Order Reference", - "length": 0, - "no_copy": 0, - "options": "Purchase Order", - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "description": "Track this Sales Order against any Project", - "fetch_if_empty": 0, - "fieldname": "project", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Project", - "length": 0, - "no_copy": 0, - "oldfieldname": "project", - "oldfieldtype": "Link", - "options": "Project", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "party_account_currency", - "fieldtype": "Link", - "hidden": 1, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Party Account Currency", - "length": 0, - "no_copy": 1, - "options": "Currency", - "permlevel": 0, - "precision": "", - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 1, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "column_break_77", - "fieldtype": "Column Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "source", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Source", - "length": 0, - "no_copy": 0, - "oldfieldname": "source", - "oldfieldtype": "Select", - "options": "Lead Source", - "permlevel": 0, - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "", - "fetch_if_empty": 0, - "fieldname": "campaign", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Campaign", - "length": 0, - "no_copy": 0, - "oldfieldname": "campaign", - "oldfieldtype": "Link", - "options": "Campaign", - "permlevel": 0, - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 1, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "printing_details", - "fieldtype": "Section Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Printing Details", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "language", - "fieldtype": "Data", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Print Language", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 1, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 1, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "letter_head", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Letter Head", - "length": 0, - "no_copy": 0, - "oldfieldname": "letter_head", - "oldfieldtype": "Select", - "options": "Letter Head", - "permlevel": 0, - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "column_break4", - "fieldtype": "Column Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "length": 0, - "no_copy": 0, - "oldfieldtype": "Column Break", - "permlevel": 0, - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0, - "width": "50%" - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 1, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "select_print_heading", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Print Heading", - "length": 0, - "no_copy": 1, - "oldfieldname": "select_print_heading", - "oldfieldtype": "Link", - "options": "Print Heading", - "permlevel": 0, - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 1, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 1, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "group_same_items", - "fieldtype": "Check", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Group same items", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 1, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "section_break_78", - "fieldtype": "Section Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Billing and Delivery Status", - "length": 0, - "no_copy": 0, - "oldfieldtype": "Column Break", - "permlevel": 0, - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0, - "width": "50%" - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "default": "Draft", - "fetch_if_empty": 0, - "fieldname": "status", - "fieldtype": "Select", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "Status", - "length": 0, - "no_copy": 1, - "oldfieldname": "status", - "oldfieldtype": "Select", - "options": "\nDraft\nOn Hold\nTo Deliver and Bill\nTo Bill\nTo Deliver\nCompleted\nCancelled\nClosed", - "permlevel": 0, - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 1, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 1, - "search_index": 1, - "set_only_once": 0, - "translatable": 0, - "unique": 0, - "width": "100px" - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "delivery_status", - "fieldtype": "Select", - "hidden": 1, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 1, - "label": "Delivery Status", - "length": 0, - "no_copy": 1, - "options": "Not Delivered\nFully Delivered\nPartly Delivered\nClosed\nNot Applicable", - "permlevel": 0, - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "eval:!doc.__islocal", - "description": "% of materials delivered against this Sales Order", - "fetch_if_empty": 0, - "fieldname": "per_delivered", - "fieldtype": "Percent", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "% Delivered", - "length": 0, - "no_copy": 1, - "oldfieldname": "per_delivered", - "oldfieldtype": "Currency", - "permlevel": 0, - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 1, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0, - "width": "100px" - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "column_break_81", - "fieldtype": "Column Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "length": 0, - "no_copy": 0, - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "eval:!doc.__islocal", - "description": "% of materials billed against this Sales Order", - "fetch_if_empty": 0, - "fieldname": "per_billed", - "fieldtype": "Percent", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "% Amount Billed", - "length": 0, - "no_copy": 1, - "oldfieldname": "per_billed", - "oldfieldtype": "Currency", - "permlevel": 0, - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 1, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0, - "width": "100px" - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "", - "fetch_if_empty": 0, - "fieldname": "billing_status", - "fieldtype": "Select", - "hidden": 1, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 1, - "label": "Billing Status", - "length": 0, - "no_copy": 1, - "options": "Not Billed\nFully Billed\nPartly Billed\nClosed", - "permlevel": 0, - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 1, - "collapsible_depends_on": "commission_rate", - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "sales_team_section_break", - "fieldtype": "Section Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Commission", - "length": 0, - "no_copy": 0, - "oldfieldtype": "Section Break", - "options": "fa fa-group", - "permlevel": 0, - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "sales_partner", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Sales Partner", - "length": 0, - "no_copy": 0, - "oldfieldname": "sales_partner", - "oldfieldtype": "Link", - "options": "Sales Partner", - "permlevel": 0, - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0, - "width": "150px" - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "column_break7", - "fieldtype": "Column Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "length": 0, - "no_copy": 0, - "permlevel": 0, - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0, - "width": "50%" - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "commission_rate", - "fieldtype": "Float", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Commission Rate", - "length": 0, - "no_copy": 0, - "oldfieldname": "commission_rate", - "oldfieldtype": "Currency", - "permlevel": 0, - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0, - "width": "100px" - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "total_commission", - "fieldtype": "Currency", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Total Commission", - "length": 0, - "no_copy": 0, - "oldfieldname": "total_commission", - "oldfieldtype": "Currency", - "options": "Company:company:default_currency", - "permlevel": 0, - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 1, - "collapsible_depends_on": "sales_team", - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "section_break1", - "fieldtype": "Section Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Sales Team", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 1, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "sales_team", - "fieldtype": "Table", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Sales Team1", - "length": 0, - "no_copy": 0, - "oldfieldname": "sales_team", - "oldfieldtype": "Table", - "options": "Sales Team", - "permlevel": 0, - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 1, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "subscription_section", - "fieldtype": "Section Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Auto Repeat Section", - "length": 0, - "no_copy": 1, - "permlevel": 0, - "precision": "", - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 1, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 1, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "", - "description": "", - "fetch_if_empty": 0, - "fieldname": "from_date", - "fieldtype": "Date", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "From Date", - "length": 0, - "no_copy": 1, - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 1, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "", - "description": "", - "fetch_if_empty": 0, - "fieldname": "to_date", - "fieldtype": "Date", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "To Date", - "length": 0, - "no_copy": 1, - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "column_break_108", - "fieldtype": "Column Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "auto_repeat", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Auto Repeat", - "length": 0, - "no_copy": 0, - "options": "Auto Repeat", - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 1, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "eval: doc.auto_repeat", - "fetch_if_empty": 0, - "fieldname": "update_auto_repeat_reference", - "fieldtype": "Button", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Update Auto Repeat Reference", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - } - ], - "has_web_view": 0, - "hide_toolbar": 0, - "icon": "fa fa-file-text", - "idx": 105, - "in_create": 0, - "is_submittable": 1, - "issingle": 0, - "istable": 0, - "max_attachments": 0, - "modified": "2019-04-18 12:05:23.464968", - "modified_by": "Administrator", - "module": "Selling", - "name": "Sales Order", - "owner": "Administrator", - "permissions": [ - { - "amend": 1, - "cancel": 1, - "create": 1, - "delete": 1, - "email": 1, - "export": 0, - "if_owner": 0, - "import": 0, - "permlevel": 0, - "print": 1, - "read": 1, - "report": 1, - "role": "Sales User", - "set_user_permissions": 0, - "share": 1, - "submit": 1, - "write": 1 - }, - { - "amend": 1, - "cancel": 1, - "create": 1, - "delete": 1, - "email": 1, - "export": 1, - "if_owner": 0, - "import": 1, - "permlevel": 0, - "print": 1, - "read": 1, - "report": 1, - "role": "Sales Manager", - "set_user_permissions": 1, - "share": 1, - "submit": 1, - "write": 1 - }, - { - "amend": 1, - "cancel": 1, - "create": 1, - "delete": 1, - "email": 1, - "export": 0, - "if_owner": 0, - "import": 0, - "permlevel": 0, - "print": 1, - "read": 1, - "report": 1, - "role": "Maintenance User", - "set_user_permissions": 0, - "share": 1, - "submit": 1, - "write": 1 - }, - { - "amend": 0, - "cancel": 0, - "create": 0, - "delete": 0, - "email": 1, - "export": 0, - "if_owner": 0, - "import": 0, - "permlevel": 0, - "print": 1, - "read": 1, - "report": 0, - "role": "Accounts User", - "set_user_permissions": 0, - "share": 0, - "submit": 0, - "write": 0 - }, - { - "amend": 0, - "cancel": 0, - "create": 0, - "delete": 0, - "email": 0, - "export": 0, - "if_owner": 0, - "import": 0, - "permlevel": 0, - "print": 0, - "read": 1, - "report": 1, - "role": "Stock User", - "set_user_permissions": 0, - "share": 0, - "submit": 0, - "write": 0 - }, - { - "amend": 0, - "cancel": 0, - "create": 0, - "delete": 0, - "email": 0, - "export": 0, - "if_owner": 0, - "import": 0, - "permlevel": 1, - "print": 0, - "read": 1, - "report": 0, - "role": "Sales Manager", - "set_user_permissions": 0, - "share": 0, - "submit": 0, - "write": 1 - } - ], - "quick_entry": 0, - "read_only": 0, - "search_fields": "status,transaction_date,customer,customer_name, territory,order_type,company", - "show_name_in_global_search": 1, - "sort_field": "modified", - "sort_order": "DESC", - "timeline_field": "customer", - "title_field": "title", - "track_changes": 1, - "track_seen": 1, - "track_views": 0 -} \ No newline at end of file + "search_fields": "status,transaction_date,customer,customer_name, territory,order_type,company", + "show_name_in_global_search": 1, + "sort_field": "modified", + "sort_order": "DESC", + "timeline_field": "customer", + "title_field": "title", + "track_changes": 1, + "track_seen": 1, + "track_views": 0 + } \ No newline at end of file diff --git a/erpnext/selling/doctype/sales_order/sales_order.py b/erpnext/selling/doctype/sales_order/sales_order.py index b87ad031f5..493da99303 100755 --- a/erpnext/selling/doctype/sales_order/sales_order.py +++ b/erpnext/selling/doctype/sales_order/sales_order.py @@ -211,9 +211,8 @@ class SalesOrder(SellingController): if self.project: project = frappe.get_doc("Project", self.project) - project.flags.dont_sync_tasks = True project.update_sales_amount() - project.save() + project.db_update() def check_credit_limit(self): # if bypass credit limit check is set to true (1) at sales order level, diff --git a/erpnext/selling/doctype/sales_order/sales_order_list.js b/erpnext/selling/doctype/sales_order/sales_order_list.js index 0f288b9cc4..15c9eb550f 100644 --- a/erpnext/selling/doctype/sales_order/sales_order_list.js +++ b/erpnext/selling/doctype/sales_order/sales_order_list.js @@ -34,17 +34,25 @@ frappe.listview_settings['Sales Order'] = { "per_delivered,<,100|per_billed,=,100|status,!=,Closed"]; } - } else if ((doc.order_type === "Maintenance" || flt(doc.per_delivered, 6) == 100) + } else if ((flt(doc.per_delivered, 6) == 100) && flt(doc.grand_total) !== 0 && flt(doc.per_billed, 6) < 100 && doc.status !== "Closed") { // to bill return [__("To Bill"), "orange", "per_delivered,=,100|per_billed,<,100|status,!=,Closed"]; - } else if ((doc.order_type === "Maintenance" || flt(doc.per_delivered, 6) == 100) + } else if ((flt(doc.per_delivered, 6) === 100) && (flt(doc.grand_total) === 0 || flt(doc.per_billed, 6) == 100) && doc.status !== "Closed") { - return [__("Completed"), "green", "per_delivered,=,100|per_billed,=,100|status,!=,Closed"]; + + }else if (doc.order_type === "Maintenance" && flt(doc.per_delivered, 6) < 100 && doc.status !== "Closed"){ + + if(flt(doc.per_billed, 6) < 100 ){ + return [__("To Deliver and Bill"), "orange", "per_delivered,=,100|per_billed,<,100|status,!=,Closed"]; + }else if(flt(doc.per_billed, 6) == 100){ + return [__("To Deliver"), "orange", "per_delivered,=,100|per_billed,=,100|status,!=,Closed"]; + } } + }, onload: function(listview) { var method = "erpnext.selling.doctype.sales_order.sales_order.close_or_unclose_sales_orders"; diff --git a/erpnext/selling/report/available_stock_for_packing_items/available_stock_for_packing_items.py b/erpnext/selling/report/available_stock_for_packing_items/available_stock_for_packing_items.py index 1e45a73673..32711b2fce 100644 --- a/erpnext/selling/report/available_stock_for_packing_items/available_stock_for_packing_items.py +++ b/erpnext/selling/report/available_stock_for_packing_items/available_stock_for_packing_items.py @@ -11,8 +11,7 @@ def execute(filters=None): columns = get_columns() iwq_map = get_item_warehouse_quantity_map() item_map = get_item_details() - - data = [] + data = [] for sbom, warehouse in iwq_map.items(): total = 0 total_qty = 0 @@ -20,8 +19,8 @@ def execute(filters=None): for wh, item_qty in warehouse.items(): total += 1 row = [sbom, item_map.get(sbom).item_name, item_map.get(sbom).description, - item_map.get(sbom).stock_uom, wh] - available_qty = min(item_qty.values()) + item_map.get(sbom).stock_uom, wh] + available_qty = item_qty total_qty += flt(available_qty) row += [available_qty] @@ -30,51 +29,50 @@ def execute(filters=None): if (total == len(warehouse)): row = ["", "", "Total", "", "", total_qty] data.append(row) - return columns, data - + def get_columns(): columns = ["Item Code:Link/Item:100", "Item Name::100", "Description::120", \ - "UOM:Link/UOM:80", "Warehouse:Link/Warehouse:100", "Quantity::100"] + "UOM:Link/UOM:80", "Warehouse:Link/Warehouse:100", "Quantity::100"] return columns -def get_product_bundle_items(): - sbom_item_map = {} - for sbom in frappe.db.sql("""select pb.new_item_code as parent, pbi.item_code, pbi.qty - from `tabProduct Bundle Item` as pbi, `tabProduct Bundle` as pb - where pb.docstatus < 2 and pb.name = pbi.parent""", as_dict=1): - sbom_item_map.setdefault(sbom.parent, {}).setdefault(sbom.item_code, sbom.qty) - - return sbom_item_map - def get_item_details(): item_map = {} - for item in frappe.db.sql("""select name, item_name, description, stock_uom - from `tabItem`""", as_dict=1): - item_map.setdefault(item.name, item) - + for item in frappe.db.sql("""SELECT name, item_name, description, stock_uom + from `tabItem`""", as_dict=1): + item_map.setdefault(item.name, item) return item_map -def get_item_warehouse_quantity(): - iwq_map = {} - bin = frappe.db.sql("""select item_code, warehouse, actual_qty from `tabBin` - where actual_qty > 0""") - for item, wh, qty in bin: - iwq_map.setdefault(item, {}).setdefault(wh, qty) - - return iwq_map - def get_item_warehouse_quantity_map(): + query = """SELECT parent, warehouse, MIN(qty) AS qty + FROM (SELECT b.parent, bi.item_code, bi.warehouse, + sum(bi.projected_qty) / b.qty AS qty + FROM tabBin AS bi, (SELECT pb.new_item_code as parent, b.item_code, b.qty, w.name + FROM `tabProduct Bundle Item` b, `tabWarehouse` w, + `tabProduct Bundle` pb + where b.parent = pb.name) AS b + WHERE bi.item_code = b.item_code + AND bi.warehouse = b.name + GROUP BY b.parent, b.item_code, bi.warehouse + UNION ALL + SELECT b.parent, b.item_code, b.name, 0 AS qty + FROM (SELECT pb.new_item_code as parent, b.item_code, b.qty, w.name + FROM `tabProduct Bundle Item` b, `tabWarehouse` w, + `tabProduct Bundle` pb + where b.parent = pb.name) AS b + WHERE NOT EXISTS(SELECT * + FROM `tabBin` AS bi + WHERE bi.item_code = b.item_code + AND bi.warehouse = b.name)) AS r + GROUP BY parent, warehouse + HAVING MIN(qty) != 0""" + result = frappe.db.sql(query, as_dict=1) + last_sbom = "" sbom_map = {} - iwq_map = get_item_warehouse_quantity() - sbom_item_map = get_product_bundle_items() - - for sbom, sbom_items in sbom_item_map.items(): - for item, child_qty in sbom_items.items(): - for wh, qty in iwq_map.get(item, {}).items(): - avail_qty = flt(qty) / flt(child_qty) - sbom_map.setdefault(sbom, {}).setdefault(wh, {}) \ - .setdefault(item, avail_qty) - + for line in result: + if line.get("parent") != last_sbom: + last_sbom = line.get("parent") + actual_dict = sbom_map.setdefault(last_sbom, {}) + actual_dict.setdefault(line.get("warehouse"), line.get("qty")) return sbom_map \ No newline at end of file diff --git a/erpnext/setup/doctype/company/company.json b/erpnext/setup/doctype/company/company.json index d85fc45b46..bb652ca6bf 100644 --- a/erpnext/setup/doctype/company/company.json +++ b/erpnext/setup/doctype/company/company.json @@ -1,762 +1,769 @@ { - "allow_import": 1, - "allow_rename": 1, - "autoname": "field:company_name", - "creation": "2013-04-10 08:35:39", - "description": "Legal Entity / Subsidiary with a separate Chart of Accounts belonging to the Organization.", - "doctype": "DocType", - "document_type": "Setup", - "engine": "InnoDB", - "field_order": [ - "details", - "company_name", - "abbr", - "change_abbr", - "is_group", - "cb0", - "domain", - "parent_company", - "charts_section", - "default_currency", - "default_letter_head", - "default_holiday_list", - "default_finance_book", - "standard_working_hours", - "default_terms", - "column_break_10", - "country", - "create_chart_of_accounts_based_on", - "chart_of_accounts", - "existing_company", - "tax_id", - "date_of_establishment", - "sales_settings", - "monthly_sales_target", - "sales_monthly_history", - "column_break_goals", - "transactions_annual_history", - "total_monthly_sales", - "default_settings", - "default_bank_account", - "default_cash_account", - "default_receivable_account", - "round_off_account", - "round_off_cost_center", - "write_off_account", - "discount_allowed_account", - "discount_received_account", - "exchange_gain_loss_account", - "unrealized_exchange_gain_loss_account", - "column_break0", - "allow_account_creation_against_child_company", - "default_payable_account", - "default_employee_advance_account", - "default_expense_account", - "default_income_account", - "default_deferred_revenue_account", - "default_deferred_expense_account", - "default_payroll_payable_account", - "default_expense_claim_payable_account", - "section_break_22", - "cost_center", - "column_break_26", - "credit_limit", - "payment_terms", - "auto_accounting_for_stock_settings", - "enable_perpetual_inventory", - "default_inventory_account", - "stock_adjustment_account", - "column_break_32", - "stock_received_but_not_billed", - "expenses_included_in_valuation", - "fixed_asset_depreciation_settings", - "accumulated_depreciation_account", - "depreciation_expense_account", - "series_for_depreciation_entry", - "expenses_included_in_asset_valuation", - "column_break_40", - "disposal_account", - "depreciation_cost_center", - "capital_work_in_progress_account", - "asset_received_but_not_billed", - "budget_detail", - "exception_budget_approver_role", - "company_info", - "company_logo", - "date_of_incorporation", - "address_html", - "date_of_commencement", - "phone_no", - "fax", - "email", - "website", - "column_break1", - "company_description", - "registration_info", - "registration_details", - "delete_company_transactions", - "lft", - "rgt", - "old_parent" - ], - "fields": [ - { - "fieldname": "details", - "fieldtype": "Section Break", - "oldfieldtype": "Section Break" - }, - { - "fieldname": "company_name", - "fieldtype": "Data", - "label": "Company", - "oldfieldname": "company_name", - "oldfieldtype": "Data", - "reqd": 1, - "unique": 1 - }, - { - "fieldname": "abbr", - "fieldtype": "Data", - "label": "Abbr", - "oldfieldname": "abbr", - "oldfieldtype": "Data", - "reqd": 1 - }, - { - "depends_on": "eval:!doc.__islocal && in_list(frappe.user_roles, \"System Manager\")", - "fieldname": "change_abbr", - "fieldtype": "Button", - "label": "Change Abbreviation" - }, - { - "bold": 1, - "default": "0", - "fieldname": "is_group", - "fieldtype": "Check", - "label": "Is Group" - }, - { - "fieldname": "default_finance_book", - "fieldtype": "Link", - "label": "Default Finance Book", - "options": "Finance Book" - }, - { - "fieldname": "cb0", - "fieldtype": "Column Break" - }, - { - "fieldname": "domain", - "fieldtype": "Link", - "label": "Domain", - "options": "Domain" - }, - { - "fieldname": "parent_company", - "fieldtype": "Link", - "in_list_view": 1, - "label": "Parent Company", - "options": "Company" - }, - { - "fieldname": "company_logo", - "fieldtype": "Attach Image", - "hidden": 1, - "label": "Company Logo" - }, - { - "fieldname": "company_description", - "fieldtype": "Text Editor", - "label": "Company Description" - }, - { - "collapsible": 1, - "fieldname": "sales_settings", - "fieldtype": "Section Break", - "label": "Sales Settings" - }, - { - "fieldname": "sales_monthly_history", - "fieldtype": "Small Text", - "hidden": 1, - "label": "Sales Monthly History", - "no_copy": 1, - "read_only": 1 - }, - { - "fieldname": "transactions_annual_history", - "fieldtype": "Code", - "hidden": 1, - "label": "Transactions Annual History", - "no_copy": 1, - "read_only": 1 - }, - { - "fieldname": "monthly_sales_target", - "fieldtype": "Currency", - "label": "Monthly Sales Target", - "options": "default_currency" - }, - { - "fieldname": "column_break_goals", - "fieldtype": "Column Break" - }, - { - "fieldname": "total_monthly_sales", - "fieldtype": "Currency", - "label": "Total Monthly Sales", - "no_copy": 1, - "options": "default_currency", - "read_only": 1 - }, - { - "fieldname": "charts_section", - "fieldtype": "Section Break", - "label": "Default Values" - }, - { - "fieldname": "default_currency", - "fieldtype": "Link", - "ignore_user_permissions": 1, - "label": "Default Currency", - "options": "Currency", - "reqd": 1 - }, - { - "fieldname": "default_letter_head", - "fieldtype": "Link", - "label": "Default Letter Head", - "options": "Letter Head" - }, - { - "fieldname": "default_holiday_list", - "fieldtype": "Link", - "label": "Default Holiday List", - "options": "Holiday List" - }, - { - "fieldname": "standard_working_hours", - "fieldtype": "Float", - "label": "Standard Working Hours" - }, - { - "fieldname": "default_terms", - "fieldtype": "Link", - "label": "Default Terms", - "options": "Terms and Conditions" - }, - { - "fieldname": "column_break_10", - "fieldtype": "Column Break" - }, - { - "fieldname": "country", - "fieldtype": "Link", - "in_list_view": 1, - "label": "Country", - "options": "Country", - "reqd": 1 - }, - { - "fieldname": "create_chart_of_accounts_based_on", - "fieldtype": "Select", - "label": "Create Chart Of Accounts Based On", - "options": "\nStandard Template\nExisting Company" - }, - { - "depends_on": "eval:doc.create_chart_of_accounts_based_on===\"Standard Template\"", - "fieldname": "chart_of_accounts", - "fieldtype": "Select", - "label": "Chart Of Accounts Template", - "no_copy": 1 - }, - { - "depends_on": "eval:doc.create_chart_of_accounts_based_on===\"Existing Company\"", - "fieldname": "existing_company", - "fieldtype": "Link", - "label": "Existing Company ", - "no_copy": 1, - "options": "Company" - }, - { - "fieldname": "tax_id", - "fieldtype": "Data", - "label": "Tax ID" - }, - { - "fieldname": "date_of_establishment", - "fieldtype": "Date", - "label": "Date of Establishment" - }, - { - "fieldname": "default_settings", - "fieldtype": "Section Break", - "label": "Accounts Settings", - "oldfieldtype": "Section Break" - }, - { - "depends_on": "eval:!doc.__islocal", - "fieldname": "default_bank_account", - "fieldtype": "Link", - "ignore_user_permissions": 1, - "label": "Default Bank Account", - "no_copy": 1, - "oldfieldname": "default_bank_account", - "oldfieldtype": "Link", - "options": "Account" - }, - { - "depends_on": "eval:!doc.__islocal", - "fieldname": "default_cash_account", - "fieldtype": "Link", - "ignore_user_permissions": 1, - "label": "Default Cash Account", - "no_copy": 1, - "options": "Account" - }, - { - "depends_on": "eval:!doc.__islocal", - "fieldname": "default_receivable_account", - "fieldtype": "Link", - "ignore_user_permissions": 1, - "label": "Default Receivable Account", - "no_copy": 1, - "oldfieldname": "receivables_group", - "oldfieldtype": "Link", - "options": "Account" - }, - { - "fieldname": "round_off_account", - "fieldtype": "Link", - "label": "Round Off Account", - "options": "Account" - }, - { - "fieldname": "round_off_cost_center", - "fieldtype": "Link", - "label": "Round Off Cost Center", - "options": "Cost Center" - }, - { - "fieldname": "write_off_account", - "fieldtype": "Link", - "label": "Write Off Account", - "options": "Account" - }, - { - "fieldname": "discount_allowed_account", - "fieldtype": "Link", - "label": "Discount Allowed Account", - "options": "Account" - }, - { - "fieldname": "discount_received_account", - "fieldtype": "Link", - "label": "Discount Received Account", - "options": "Account" - }, - { - "fieldname": "exchange_gain_loss_account", - "fieldtype": "Link", - "label": "Exchange Gain / Loss Account", - "options": "Account" - }, - { - "fieldname": "unrealized_exchange_gain_loss_account", - "fieldtype": "Link", - "label": "Unrealized Exchange Gain/Loss Account", - "options": "Account" - }, - { - "fieldname": "column_break0", - "fieldtype": "Column Break", - "oldfieldtype": "Column Break", - "width": "50%" - }, - { - "default": "0", - "depends_on": "eval:doc.parent_company", - "fieldname": "allow_account_creation_against_child_company", - "fieldtype": "Check", - "label": "Allow Account Creation Against Child Company" - }, - { - "depends_on": "eval:!doc.__islocal", - "fieldname": "default_payable_account", - "fieldtype": "Link", - "ignore_user_permissions": 1, - "label": "Default Payable Account", - "no_copy": 1, - "oldfieldname": "payables_group", - "oldfieldtype": "Link", - "options": "Account" - }, - { - "fieldname": "default_employee_advance_account", - "fieldtype": "Link", - "label": "Default Employee Advance Account", - "no_copy": 1, - "options": "Account" - }, - { - "depends_on": "eval:!doc.__islocal", - "fieldname": "default_expense_account", - "fieldtype": "Link", - "ignore_user_permissions": 1, - "label": "Default Cost of Goods Sold Account", - "no_copy": 1, - "options": "Account" - }, - { - "depends_on": "eval:!doc.__islocal", - "fieldname": "default_income_account", - "fieldtype": "Link", - "ignore_user_permissions": 1, - "label": "Default Income Account", - "no_copy": 1, - "options": "Account" - }, - { - "depends_on": "eval:!doc.__islocal", - "fieldname": "default_deferred_revenue_account", - "fieldtype": "Link", - "ignore_user_permissions": 1, - "label": "Default Deferred Revenue Account", - "no_copy": 1, - "options": "Account" - }, - { - "depends_on": "eval:!doc.__islocal", - "fieldname": "default_deferred_expense_account", - "fieldtype": "Link", - "ignore_user_permissions": 1, - "label": "Default Deferred Expense Account", - "no_copy": 1, - "options": "Account" - }, - { - "depends_on": "eval:!doc.__islocal", - "fieldname": "default_payroll_payable_account", - "fieldtype": "Link", - "ignore_user_permissions": 1, - "label": "Default Payroll Payable Account", - "no_copy": 1, - "options": "Account" - }, - { - "depends_on": "eval:!doc.__islocal", - "fieldname": "default_expense_claim_payable_account", - "fieldtype": "Link", - "ignore_user_permissions": 1, - "label": "Default Expense Claim Payable Account", - "no_copy": 1, - "options": "Account" - }, - { - "fieldname": "section_break_22", - "fieldtype": "Section Break" - }, - { - "depends_on": "eval:!doc.__islocal", - "fieldname": "cost_center", - "fieldtype": "Link", - "ignore_user_permissions": 1, - "label": "Default Cost Center", - "no_copy": 1, - "options": "Cost Center" - }, - { - "fieldname": "column_break_26", - "fieldtype": "Column Break" - }, - { - "depends_on": "eval:!doc.__islocal", - "fieldname": "credit_limit", - "fieldtype": "Currency", - "label": "Credit Limit", - "oldfieldname": "credit_limit", - "oldfieldtype": "Currency", - "options": "default_currency" - }, - { - "fieldname": "payment_terms", - "fieldtype": "Link", - "label": "Default Payment Terms Template", - "options": "Payment Terms Template" - }, - { - "depends_on": "eval:!doc.__islocal", - "fieldname": "auto_accounting_for_stock_settings", - "fieldtype": "Section Break", - "label": "Stock Settings" - }, - { - "default": "1", - "fieldname": "enable_perpetual_inventory", - "fieldtype": "Check", - "label": "Enable Perpetual Inventory" - }, - { - "fieldname": "default_inventory_account", - "fieldtype": "Link", - "label": "Default Inventory Account", - "options": "Account" - }, - { - "fieldname": "stock_adjustment_account", - "fieldtype": "Link", - "ignore_user_permissions": 1, - "label": "Stock Adjustment Account", - "no_copy": 1, - "options": "Account" - }, - { - "fieldname": "column_break_32", - "fieldtype": "Column Break" - }, - { - "fieldname": "stock_received_but_not_billed", - "fieldtype": "Link", - "ignore_user_permissions": 1, - "label": "Stock Received But Not Billed", - "no_copy": 1, - "options": "Account" - }, - { - "fieldname": "expenses_included_in_valuation", - "fieldtype": "Link", - "ignore_user_permissions": 1, - "label": "Expenses Included In Valuation", - "no_copy": 1, - "options": "Account" - }, - { - "collapsible": 1, - "fieldname": "fixed_asset_depreciation_settings", - "fieldtype": "Section Break", - "label": "Fixed Asset Depreciation Settings" - }, - { - "fieldname": "accumulated_depreciation_account", - "fieldtype": "Link", - "label": "Accumulated Depreciation Account", - "no_copy": 1, - "options": "Account" - }, - { - "fieldname": "depreciation_expense_account", - "fieldtype": "Link", - "label": "Depreciation Expense Account", - "no_copy": 1, - "options": "Account" - }, - { - "fieldname": "series_for_depreciation_entry", - "fieldtype": "Data", - "label": "Series for Asset Depreciation Entry (Journal Entry)" - }, - { - "fieldname": "expenses_included_in_asset_valuation", - "fieldtype": "Link", - "label": "Expenses Included In Asset Valuation", - "options": "Account" - }, - { - "fieldname": "column_break_40", - "fieldtype": "Column Break" - }, - { - "fieldname": "disposal_account", - "fieldtype": "Link", - "label": "Gain/Loss Account on Asset Disposal", - "no_copy": 1, - "options": "Account" - }, - { - "fieldname": "depreciation_cost_center", - "fieldtype": "Link", - "label": "Asset Depreciation Cost Center", - "no_copy": 1, - "options": "Cost Center" - }, - { - "fieldname": "capital_work_in_progress_account", - "fieldtype": "Link", - "label": "Capital Work In Progress Account", - "options": "Account" - }, - { - "fieldname": "asset_received_but_not_billed", - "fieldtype": "Link", - "label": "Asset Received But Not Billed", - "options": "Account" - }, - { - "collapsible": 1, - "fieldname": "budget_detail", - "fieldtype": "Section Break", - "label": "Budget Detail" - }, - { - "fieldname": "exception_budget_approver_role", - "fieldtype": "Link", - "label": "Exception Budget Approver Role", - "options": "Role" - }, - { - "collapsible": 1, - "description": "For reference only.", - "fieldname": "company_info", - "fieldtype": "Section Break", - "label": "Company Info" - }, - { - "fieldname": "date_of_incorporation", - "fieldtype": "Date", - "label": "Date of Incorporation" - }, - { - "fieldname": "address_html", - "fieldtype": "HTML" - }, - { - "fieldname": "column_break1", - "fieldtype": "Column Break", - "oldfieldtype": "Column Break", - "width": "50%" - }, - { - "depends_on": "eval:doc.date_of_incorporation", - "fieldname": "date_of_commencement", - "fieldtype": "Date", - "label": "Date of Commencement" - }, - { - "fieldname": "phone_no", - "fieldtype": "Data", - "label": "Phone No", - "oldfieldname": "phone_no", - "oldfieldtype": "Data", - "options": "Phone" - }, - { - "fieldname": "fax", - "fieldtype": "Data", - "label": "Fax", - "oldfieldname": "fax", - "oldfieldtype": "Data", - "options": "Phone" - }, - { - "fieldname": "email", - "fieldtype": "Data", - "label": "Email", - "oldfieldname": "email", - "oldfieldtype": "Data", - "options": "Email" - }, - { - "fieldname": "website", - "fieldtype": "Data", - "label": "Website", - "oldfieldname": "website", - "oldfieldtype": "Data" - }, - { - "fieldname": "registration_info", - "fieldtype": "Section Break", - "oldfieldtype": "Section Break", - "width": "50%" - }, - { - "description": "Company registration numbers for your reference. Tax numbers etc.", - "fieldname": "registration_details", - "fieldtype": "Code", - "label": "Registration Details", - "oldfieldname": "registration_details", - "oldfieldtype": "Code" - }, - { - "fieldname": "delete_company_transactions", - "fieldtype": "Button", - "label": "Delete Company Transactions" - }, - { - "fieldname": "lft", - "fieldtype": "Int", - "hidden": 1, - "label": "Lft", - "print_hide": 1, - "read_only": 1, - "search_index": 1 - }, - { - "fieldname": "rgt", - "fieldtype": "Int", - "hidden": 1, - "label": "Rgt", - "print_hide": 1, - "read_only": 1, - "search_index": 1 - }, - { - "fieldname": "old_parent", - "fieldtype": "Data", - "hidden": 1, - "label": "old_parent", - "print_hide": 1, - "read_only": 1 - } - ], - "icon": "fa fa-building", - "idx": 1, - "image_field": "company_logo", - "modified": "2019-06-14 14:36:11.363309", - "modified_by": "Administrator", - "module": "Setup", - "name": "Company", - "owner": "Administrator", - "permissions": [ - { - "create": 1, - "delete": 1, - "email": 1, - "print": 1, - "read": 1, - "report": 1, - "role": "System Manager", - "share": 1, - "write": 1 - }, - { - "email": 1, - "print": 1, - "read": 1, - "role": "Accounts User" - }, - { - "read": 1, - "role": "Employee" - }, - { - "read": 1, - "role": "Sales User" - }, - { - "read": 1, - "role": "Purchase User" - }, - { - "read": 1, - "role": "Stock User" - }, - { - "read": 1, - "role": "Projects User" - } - ], - "show_name_in_global_search": 1, - "sort_field": "modified", - "sort_order": "ASC", - "track_changes": 1 -} \ No newline at end of file + "allow_import": 1, + "allow_rename": 1, + "autoname": "field:company_name", + "creation": "2013-04-10 08:35:39", + "description": "Legal Entity / Subsidiary with a separate Chart of Accounts belonging to the Organization.", + "doctype": "DocType", + "document_type": "Setup", + "engine": "InnoDB", + "field_order": [ + "details", + "company_name", + "abbr", + "change_abbr", + "is_group", + "cb0", + "domain", + "parent_company", + "charts_section", + "default_currency", + "default_letter_head", + "default_holiday_list", + "default_finance_book", + "standard_working_hours", + "default_terms", + "default_warehouse_for_sales_return", + "column_break_10", + "country", + "create_chart_of_accounts_based_on", + "chart_of_accounts", + "existing_company", + "tax_id", + "date_of_establishment", + "sales_settings", + "monthly_sales_target", + "sales_monthly_history", + "column_break_goals", + "transactions_annual_history", + "total_monthly_sales", + "default_settings", + "default_bank_account", + "default_cash_account", + "default_receivable_account", + "round_off_account", + "round_off_cost_center", + "write_off_account", + "discount_allowed_account", + "discount_received_account", + "exchange_gain_loss_account", + "unrealized_exchange_gain_loss_account", + "column_break0", + "allow_account_creation_against_child_company", + "default_payable_account", + "default_employee_advance_account", + "default_expense_account", + "default_income_account", + "default_deferred_revenue_account", + "default_deferred_expense_account", + "default_payroll_payable_account", + "default_expense_claim_payable_account", + "section_break_22", + "cost_center", + "column_break_26", + "credit_limit", + "payment_terms", + "auto_accounting_for_stock_settings", + "enable_perpetual_inventory", + "default_inventory_account", + "stock_adjustment_account", + "column_break_32", + "stock_received_but_not_billed", + "expenses_included_in_valuation", + "fixed_asset_depreciation_settings", + "accumulated_depreciation_account", + "depreciation_expense_account", + "series_for_depreciation_entry", + "expenses_included_in_asset_valuation", + "column_break_40", + "disposal_account", + "depreciation_cost_center", + "capital_work_in_progress_account", + "asset_received_but_not_billed", + "budget_detail", + "exception_budget_approver_role", + "company_info", + "company_logo", + "date_of_incorporation", + "address_html", + "date_of_commencement", + "phone_no", + "fax", + "email", + "website", + "column_break1", + "company_description", + "registration_info", + "registration_details", + "delete_company_transactions", + "lft", + "rgt", + "old_parent" + ], + "fields": [ + { + "fieldname": "details", + "fieldtype": "Section Break", + "oldfieldtype": "Section Break" + }, + { + "fieldname": "company_name", + "fieldtype": "Data", + "label": "Company", + "oldfieldname": "company_name", + "oldfieldtype": "Data", + "reqd": 1, + "unique": 1 + }, + { + "fieldname": "abbr", + "fieldtype": "Data", + "label": "Abbr", + "oldfieldname": "abbr", + "oldfieldtype": "Data", + "reqd": 1 + }, + { + "depends_on": "eval:!doc.__islocal && in_list(frappe.user_roles, \"System Manager\")", + "fieldname": "change_abbr", + "fieldtype": "Button", + "label": "Change Abbreviation" + }, + { + "bold": 1, + "default": "0", + "fieldname": "is_group", + "fieldtype": "Check", + "label": "Is Group" + }, + { + "fieldname": "default_finance_book", + "fieldtype": "Link", + "label": "Default Finance Book", + "options": "Finance Book" + }, + { + "fieldname": "cb0", + "fieldtype": "Column Break" + }, + { + "fieldname": "domain", + "fieldtype": "Link", + "label": "Domain", + "options": "Domain" + }, + { + "fieldname": "parent_company", + "fieldtype": "Link", + "in_list_view": 1, + "label": "Parent Company", + "options": "Company" + }, + { + "fieldname": "company_logo", + "fieldtype": "Attach Image", + "hidden": 1, + "label": "Company Logo" + }, + { + "fieldname": "company_description", + "fieldtype": "Text Editor", + "label": "Company Description" + }, + { + "collapsible": 1, + "fieldname": "sales_settings", + "fieldtype": "Section Break", + "label": "Sales Settings" + }, + { + "fieldname": "sales_monthly_history", + "fieldtype": "Small Text", + "hidden": 1, + "label": "Sales Monthly History", + "no_copy": 1, + "read_only": 1 + }, + { + "fieldname": "transactions_annual_history", + "fieldtype": "Code", + "hidden": 1, + "label": "Transactions Annual History", + "no_copy": 1, + "read_only": 1 + }, + { + "fieldname": "monthly_sales_target", + "fieldtype": "Currency", + "label": "Monthly Sales Target", + "options": "default_currency" + }, + { + "fieldname": "column_break_goals", + "fieldtype": "Column Break" + }, + { + "fieldname": "total_monthly_sales", + "fieldtype": "Currency", + "label": "Total Monthly Sales", + "no_copy": 1, + "options": "default_currency", + "read_only": 1 + }, + { + "fieldname": "charts_section", + "fieldtype": "Section Break", + "label": "Default Values" + }, + { + "fieldname": "default_currency", + "fieldtype": "Link", + "ignore_user_permissions": 1, + "label": "Default Currency", + "options": "Currency", + "reqd": 1 + }, + { + "fieldname": "default_letter_head", + "fieldtype": "Link", + "label": "Default Letter Head", + "options": "Letter Head" + }, + { + "fieldname": "default_holiday_list", + "fieldtype": "Link", + "label": "Default Holiday List", + "options": "Holiday List" + }, + { + "fieldname": "standard_working_hours", + "fieldtype": "Float", + "label": "Standard Working Hours" + }, + { + "fieldname": "default_terms", + "fieldtype": "Link", + "label": "Default Terms", + "options": "Terms and Conditions" + }, + { + "fieldname": "default_warehouse_for_sales_return", + "fieldtype": "Link", + "label": "Default warehouse for Sales Return", + "options": "Warehouse" + }, + { + "fieldname": "column_break_10", + "fieldtype": "Column Break" + }, + { + "fieldname": "country", + "fieldtype": "Link", + "in_list_view": 1, + "label": "Country", + "options": "Country", + "reqd": 1 + }, + { + "fieldname": "create_chart_of_accounts_based_on", + "fieldtype": "Select", + "label": "Create Chart Of Accounts Based On", + "options": "\nStandard Template\nExisting Company" + }, + { + "depends_on": "eval:doc.create_chart_of_accounts_based_on===\"Standard Template\"", + "fieldname": "chart_of_accounts", + "fieldtype": "Select", + "label": "Chart Of Accounts Template", + "no_copy": 1 + }, + { + "depends_on": "eval:doc.create_chart_of_accounts_based_on===\"Existing Company\"", + "fieldname": "existing_company", + "fieldtype": "Link", + "label": "Existing Company ", + "no_copy": 1, + "options": "Company" + }, + { + "fieldname": "tax_id", + "fieldtype": "Data", + "label": "Tax ID" + }, + { + "fieldname": "date_of_establishment", + "fieldtype": "Date", + "label": "Date of Establishment" + }, + { + "fieldname": "default_settings", + "fieldtype": "Section Break", + "label": "Accounts Settings", + "oldfieldtype": "Section Break" + }, + { + "depends_on": "eval:!doc.__islocal", + "fieldname": "default_bank_account", + "fieldtype": "Link", + "ignore_user_permissions": 1, + "label": "Default Bank Account", + "no_copy": 1, + "oldfieldname": "default_bank_account", + "oldfieldtype": "Link", + "options": "Account" + }, + { + "depends_on": "eval:!doc.__islocal", + "fieldname": "default_cash_account", + "fieldtype": "Link", + "ignore_user_permissions": 1, + "label": "Default Cash Account", + "no_copy": 1, + "options": "Account" + }, + { + "depends_on": "eval:!doc.__islocal", + "fieldname": "default_receivable_account", + "fieldtype": "Link", + "ignore_user_permissions": 1, + "label": "Default Receivable Account", + "no_copy": 1, + "oldfieldname": "receivables_group", + "oldfieldtype": "Link", + "options": "Account" + }, + { + "fieldname": "round_off_account", + "fieldtype": "Link", + "label": "Round Off Account", + "options": "Account" + }, + { + "fieldname": "round_off_cost_center", + "fieldtype": "Link", + "label": "Round Off Cost Center", + "options": "Cost Center" + }, + { + "fieldname": "write_off_account", + "fieldtype": "Link", + "label": "Write Off Account", + "options": "Account" + }, + { + "fieldname": "discount_allowed_account", + "fieldtype": "Link", + "label": "Discount Allowed Account", + "options": "Account" + }, + { + "fieldname": "discount_received_account", + "fieldtype": "Link", + "label": "Discount Received Account", + "options": "Account" + }, + { + "fieldname": "exchange_gain_loss_account", + "fieldtype": "Link", + "label": "Exchange Gain / Loss Account", + "options": "Account" + }, + { + "fieldname": "unrealized_exchange_gain_loss_account", + "fieldtype": "Link", + "label": "Unrealized Exchange Gain/Loss Account", + "options": "Account" + }, + { + "fieldname": "column_break0", + "fieldtype": "Column Break", + "oldfieldtype": "Column Break", + "width": "50%" + }, + { + "default": "0", + "depends_on": "eval:doc.parent_company", + "fieldname": "allow_account_creation_against_child_company", + "fieldtype": "Check", + "label": "Allow Account Creation Against Child Company" + }, + { + "depends_on": "eval:!doc.__islocal", + "fieldname": "default_payable_account", + "fieldtype": "Link", + "ignore_user_permissions": 1, + "label": "Default Payable Account", + "no_copy": 1, + "oldfieldname": "payables_group", + "oldfieldtype": "Link", + "options": "Account" + }, + { + "fieldname": "default_employee_advance_account", + "fieldtype": "Link", + "label": "Default Employee Advance Account", + "no_copy": 1, + "options": "Account" + }, + { + "depends_on": "eval:!doc.__islocal", + "fieldname": "default_expense_account", + "fieldtype": "Link", + "ignore_user_permissions": 1, + "label": "Default Cost of Goods Sold Account", + "no_copy": 1, + "options": "Account" + }, + { + "depends_on": "eval:!doc.__islocal", + "fieldname": "default_income_account", + "fieldtype": "Link", + "ignore_user_permissions": 1, + "label": "Default Income Account", + "no_copy": 1, + "options": "Account" + }, + { + "depends_on": "eval:!doc.__islocal", + "fieldname": "default_deferred_revenue_account", + "fieldtype": "Link", + "ignore_user_permissions": 1, + "label": "Default Deferred Revenue Account", + "no_copy": 1, + "options": "Account" + }, + { + "depends_on": "eval:!doc.__islocal", + "fieldname": "default_deferred_expense_account", + "fieldtype": "Link", + "ignore_user_permissions": 1, + "label": "Default Deferred Expense Account", + "no_copy": 1, + "options": "Account" + }, + { + "depends_on": "eval:!doc.__islocal", + "fieldname": "default_payroll_payable_account", + "fieldtype": "Link", + "ignore_user_permissions": 1, + "label": "Default Payroll Payable Account", + "no_copy": 1, + "options": "Account" + }, + { + "depends_on": "eval:!doc.__islocal", + "fieldname": "default_expense_claim_payable_account", + "fieldtype": "Link", + "ignore_user_permissions": 1, + "label": "Default Expense Claim Payable Account", + "no_copy": 1, + "options": "Account" + }, + { + "fieldname": "section_break_22", + "fieldtype": "Section Break" + }, + { + "depends_on": "eval:!doc.__islocal", + "fieldname": "cost_center", + "fieldtype": "Link", + "ignore_user_permissions": 1, + "label": "Default Cost Center", + "no_copy": 1, + "options": "Cost Center" + }, + { + "fieldname": "column_break_26", + "fieldtype": "Column Break" + }, + { + "depends_on": "eval:!doc.__islocal", + "fieldname": "credit_limit", + "fieldtype": "Currency", + "label": "Credit Limit", + "oldfieldname": "credit_limit", + "oldfieldtype": "Currency", + "options": "default_currency" + }, + { + "fieldname": "payment_terms", + "fieldtype": "Link", + "label": "Default Payment Terms Template", + "options": "Payment Terms Template" + }, + { + "depends_on": "eval:!doc.__islocal", + "fieldname": "auto_accounting_for_stock_settings", + "fieldtype": "Section Break", + "label": "Stock Settings" + }, + { + "default": "1", + "fieldname": "enable_perpetual_inventory", + "fieldtype": "Check", + "label": "Enable Perpetual Inventory" + }, + { + "fieldname": "default_inventory_account", + "fieldtype": "Link", + "label": "Default Inventory Account", + "options": "Account" + }, + { + "fieldname": "stock_adjustment_account", + "fieldtype": "Link", + "ignore_user_permissions": 1, + "label": "Stock Adjustment Account", + "no_copy": 1, + "options": "Account" + }, + { + "fieldname": "column_break_32", + "fieldtype": "Column Break" + }, + { + "fieldname": "stock_received_but_not_billed", + "fieldtype": "Link", + "ignore_user_permissions": 1, + "label": "Stock Received But Not Billed", + "no_copy": 1, + "options": "Account" + }, + { + "fieldname": "expenses_included_in_valuation", + "fieldtype": "Link", + "ignore_user_permissions": 1, + "label": "Expenses Included In Valuation", + "no_copy": 1, + "options": "Account" + }, + { + "collapsible": 1, + "fieldname": "fixed_asset_depreciation_settings", + "fieldtype": "Section Break", + "label": "Fixed Asset Depreciation Settings" + }, + { + "fieldname": "accumulated_depreciation_account", + "fieldtype": "Link", + "label": "Accumulated Depreciation Account", + "no_copy": 1, + "options": "Account" + }, + { + "fieldname": "depreciation_expense_account", + "fieldtype": "Link", + "label": "Depreciation Expense Account", + "no_copy": 1, + "options": "Account" + }, + { + "fieldname": "series_for_depreciation_entry", + "fieldtype": "Data", + "label": "Series for Asset Depreciation Entry (Journal Entry)" + }, + { + "fieldname": "expenses_included_in_asset_valuation", + "fieldtype": "Link", + "label": "Expenses Included In Asset Valuation", + "options": "Account" + }, + { + "fieldname": "column_break_40", + "fieldtype": "Column Break" + }, + { + "fieldname": "disposal_account", + "fieldtype": "Link", + "label": "Gain/Loss Account on Asset Disposal", + "no_copy": 1, + "options": "Account" + }, + { + "fieldname": "depreciation_cost_center", + "fieldtype": "Link", + "label": "Asset Depreciation Cost Center", + "no_copy": 1, + "options": "Cost Center" + }, + { + "fieldname": "capital_work_in_progress_account", + "fieldtype": "Link", + "label": "Capital Work In Progress Account", + "options": "Account" + }, + { + "fieldname": "asset_received_but_not_billed", + "fieldtype": "Link", + "label": "Asset Received But Not Billed", + "options": "Account" + }, + { + "collapsible": 1, + "fieldname": "budget_detail", + "fieldtype": "Section Break", + "label": "Budget Detail" + }, + { + "fieldname": "exception_budget_approver_role", + "fieldtype": "Link", + "label": "Exception Budget Approver Role", + "options": "Role" + }, + { + "collapsible": 1, + "description": "For reference only.", + "fieldname": "company_info", + "fieldtype": "Section Break", + "label": "Company Info" + }, + { + "fieldname": "date_of_incorporation", + "fieldtype": "Date", + "label": "Date of Incorporation" + }, + { + "fieldname": "address_html", + "fieldtype": "HTML" + }, + { + "fieldname": "column_break1", + "fieldtype": "Column Break", + "oldfieldtype": "Column Break", + "width": "50%" + }, + { + "depends_on": "eval:doc.date_of_incorporation", + "fieldname": "date_of_commencement", + "fieldtype": "Date", + "label": "Date of Commencement" + }, + { + "fieldname": "phone_no", + "fieldtype": "Data", + "label": "Phone No", + "oldfieldname": "phone_no", + "oldfieldtype": "Data", + "options": "Phone" + }, + { + "fieldname": "fax", + "fieldtype": "Data", + "label": "Fax", + "oldfieldname": "fax", + "oldfieldtype": "Data", + "options": "Phone" + }, + { + "fieldname": "email", + "fieldtype": "Data", + "label": "Email", + "oldfieldname": "email", + "oldfieldtype": "Data", + "options": "Email" + }, + { + "fieldname": "website", + "fieldtype": "Data", + "label": "Website", + "oldfieldname": "website", + "oldfieldtype": "Data" + }, + { + "fieldname": "registration_info", + "fieldtype": "Section Break", + "oldfieldtype": "Section Break", + "width": "50%" + }, + { + "description": "Company registration numbers for your reference. Tax numbers etc.", + "fieldname": "registration_details", + "fieldtype": "Code", + "label": "Registration Details", + "oldfieldname": "registration_details", + "oldfieldtype": "Code" + }, + { + "fieldname": "delete_company_transactions", + "fieldtype": "Button", + "label": "Delete Company Transactions" + }, + { + "fieldname": "lft", + "fieldtype": "Int", + "hidden": 1, + "label": "Lft", + "print_hide": 1, + "read_only": 1, + "search_index": 1 + }, + { + "fieldname": "rgt", + "fieldtype": "Int", + "hidden": 1, + "label": "Rgt", + "print_hide": 1, + "read_only": 1, + "search_index": 1 + }, + { + "fieldname": "old_parent", + "fieldtype": "Data", + "hidden": 1, + "label": "old_parent", + "print_hide": 1, + "read_only": 1 + } + ], + "icon": "fa fa-building", + "idx": 1, + "image_field": "company_logo", + "modified": "2019-06-14 14:36:11.363309", + "modified_by": "Administrator", + "module": "Setup", + "name": "Company", + "owner": "Administrator", + "permissions": [ + { + "create": 1, + "delete": 1, + "email": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "System Manager", + "share": 1, + "write": 1 + }, + { + "email": 1, + "print": 1, + "read": 1, + "role": "Accounts User" + }, + { + "read": 1, + "role": "Employee" + }, + { + "read": 1, + "role": "Sales User" + }, + { + "read": 1, + "role": "Purchase User" + }, + { + "read": 1, + "role": "Stock User" + }, + { + "read": 1, + "role": "Projects User" + } + ], + "show_name_in_global_search": 1, + "sort_field": "modified", + "sort_order": "ASC", + "track_changes": 1 + } \ No newline at end of file diff --git a/erpnext/setup/doctype/company/company.py b/erpnext/setup/doctype/company/company.py index 27c93ba419..da29d20503 100644 --- a/erpnext/setup/doctype/company/company.py +++ b/erpnext/setup/doctype/company/company.py @@ -252,7 +252,7 @@ class Company(NestedSet): def set_mode_of_payment_account(self): cash = frappe.db.get_value('Mode of Payment', {'type': 'Cash'}, 'name') if cash and self.default_cash_account \ - and not frappe.db.get_value('Mode of Payment Account', {'company': self.name}): + and not frappe.db.get_value('Mode of Payment Account', {'company': self.name, 'parent': 'Cash'}): mode_of_payment = frappe.get_doc('Mode of Payment', cash) mode_of_payment.append('accounts', { 'company': self.name, diff --git a/erpnext/setup/doctype/company/test_company.py b/erpnext/setup/doctype/company/test_company.py index 1b08a228b6..8debef5ff6 100644 --- a/erpnext/setup/doctype/company/test_company.py +++ b/erpnext/setup/doctype/company/test_company.py @@ -4,6 +4,8 @@ from __future__ import unicode_literals import frappe import unittest +import json +from frappe import _ from frappe.utils import random_string from erpnext.accounts.doctype.account.chart_of_accounts.chart_of_accounts import get_charts_for_country @@ -78,7 +80,10 @@ class TestCompany(unittest.TestCase): if account_type in ["Bank", "Cash"]: filters["is_group"] = 1 - self.assertTrue(frappe.get_all("Account", filters)) + has_matching_accounts = frappe.get_all("Account", filters) + error_message = _("No Account matched these filters: {}".format(json.dumps(filters))) + + self.assertTrue(has_matching_accounts, msg=error_message) finally: self.delete_mode_of_payment(template) frappe.delete_doc("Company", template) diff --git a/erpnext/setup/doctype/item_group/item_group.py b/erpnext/setup/doctype/item_group/item_group.py index cab21162c7..8fbeac8138 100644 --- a/erpnext/setup/doctype/item_group/item_group.py +++ b/erpnext/setup/doctype/item_group/item_group.py @@ -69,7 +69,8 @@ class ItemGroup(NestedSet, WebsiteGenerator): "items": get_product_list_for_group(product_group = self.name, start=start, limit=context.page_length + 1, search=frappe.form_dict.get("search")), "parents": get_parent_item_groups(self.parent_item_group), - "title": self.name + "title": self.name, + "products_as_list": cint(frappe.db.get_single_value('Products Settings', 'products_as_list')) }) if self.slideshow: diff --git a/erpnext/setup/setup_wizard/operations/sample_data.py b/erpnext/setup/setup_wizard/operations/sample_data.py index 3f78734739..c11a3885c9 100644 --- a/erpnext/setup/setup_wizard/operations/sample_data.py +++ b/erpnext/setup/setup_wizard/operations/sample_data.py @@ -33,7 +33,7 @@ def make_sample_data(domains, make_dependent = False): def make_opportunity(items, customer): b = frappe.get_doc({ "doctype": "Opportunity", - "enquiry_from": "Customer", + "opportunity_from": "Customer", "customer": customer, "opportunity_type": _("Sales"), "with_items": 1 @@ -52,7 +52,7 @@ def make_quote(items, customer): qtn = frappe.get_doc({ "doctype": "Quotation", "quotation_to": "Customer", - "customer": customer, + "party_name": customer, "order_type": "Sales" }) diff --git a/erpnext/shopping_cart/cart.py b/erpnext/shopping_cart/cart.py index 8e8c79c27a..95bd9ba636 100644 --- a/erpnext/shopping_cart/cart.py +++ b/erpnext/shopping_cart/cart.py @@ -52,7 +52,9 @@ def get_cart_quotation(doc=None): @frappe.whitelist() def place_order(): quotation = _get_cart_quotation() - quotation.company = frappe.db.get_value("Shopping Cart Settings", None, "company") + cart_settings = frappe.db.get_value("Shopping Cart Settings", None, + ["company", "allow_items_not_in_stock"], as_dict=1) + quotation.company = cart_settings.company if not quotation.get("customer_address"): throw(_("{0} is required").format(_(quotation.meta.get_label("customer_address")))) @@ -65,14 +67,16 @@ def place_order(): from erpnext.selling.doctype.quotation.quotation import _make_sales_order sales_order = frappe.get_doc(_make_sales_order(quotation.name, ignore_permissions=True)) - for item in sales_order.get("items"): - item.reserved_warehouse, is_stock_item = frappe.db.get_value("Item", - item.item_code, ["website_warehouse", "is_stock_item"]) - if is_stock_item: - item_stock = get_qty_in_stock(item.item_code, "website_warehouse") - if item.qty > item_stock.stock_qty[0][0]: - throw(_("Only {0} in stock for item {1}").format(item_stock.stock_qty[0][0], item.item_code)) + if not cart_settings.allow_items_not_in_stock: + for item in sales_order.get("items"): + item.reserved_warehouse, is_stock_item = frappe.db.get_value("Item", + item.item_code, ["website_warehouse", "is_stock_item"]) + + if is_stock_item: + item_stock = get_qty_in_stock(item.item_code, "website_warehouse") + if item.qty > item_stock.stock_qty[0][0]: + throw(_("Only {0} in stock for item {1}").format(item_stock.stock_qty[0][0], item.item_code)) sales_order.flags.ignore_permissions = True sales_order.insert() @@ -241,7 +245,7 @@ def _get_cart_quotation(party=None): party = get_party() quotation = frappe.get_all("Quotation", fields=["name"], filters= - {party.doctype.lower(): party.name, "order_type": "Shopping Cart", "docstatus": 0}, + {"party_name": party.name, "order_type": "Shopping Cart", "docstatus": 0}, order_by="modified desc", limit_page_length=1) if quotation: @@ -256,7 +260,7 @@ def _get_cart_quotation(party=None): "status": "Draft", "docstatus": 0, "__islocal": 1, - (party.doctype.lower()): party.name + "party_name": party.name }) qdoc.contact_person = frappe.db.get_value("Contact", {"email_id": frappe.session.user}) @@ -336,9 +340,9 @@ def _set_price_list(quotation, cart_settings): # check if customer price list exists selling_price_list = None - if quotation.customer: + if quotation.party_name: from erpnext.accounts.party import get_default_price_list - selling_price_list = get_default_price_list(frappe.get_doc("Customer", quotation.customer)) + selling_price_list = get_default_price_list(frappe.get_doc("Customer", quotation.party_name)) # else check for territory based price list if not selling_price_list: @@ -350,9 +354,9 @@ def set_taxes(quotation, cart_settings): """set taxes based on billing territory""" from erpnext.accounts.party import set_taxes - customer_group = frappe.db.get_value("Customer", quotation.customer, "customer_group") + customer_group = frappe.db.get_value("Customer", quotation.party_name, "customer_group") - quotation.taxes_and_charges = set_taxes(quotation.customer, "Customer", + quotation.taxes_and_charges = set_taxes(quotation.party_name, "Customer", quotation.transaction_date, quotation.company, customer_group=customer_group, supplier_group=None, tax_category=quotation.tax_category, billing_address=quotation.customer_address, shipping_address=quotation.shipping_address_name, use_for_shopping_cart=1) diff --git a/erpnext/shopping_cart/doctype/shopping_cart_settings/shopping_cart_settings.json b/erpnext/shopping_cart/doctype/shopping_cart_settings/shopping_cart_settings.json index e6b47a6e73..8b9299e42e 100644 --- a/erpnext/shopping_cart/doctype/shopping_cart_settings/shopping_cart_settings.json +++ b/erpnext/shopping_cart/doctype/shopping_cart_settings/shopping_cart_settings.json @@ -1,683 +1,716 @@ { - "allow_copy": 0, - "allow_events_in_timeline": 0, - "allow_guest_to_view": 0, - "allow_import": 0, - "allow_rename": 0, - "beta": 0, - "creation": "2013-06-19 15:57:32", - "custom": 0, - "description": "Default settings for Shopping Cart", - "docstatus": 0, - "doctype": "DocType", - "document_type": "System", - "editable_grid": 0, - "fields": [ - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "enabled", - "fieldtype": "Check", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "Enable Shopping Cart", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, + "allow_copy": 0, + "allow_events_in_timeline": 0, + "allow_guest_to_view": 0, + "allow_import": 0, + "allow_rename": 0, + "beta": 0, + "creation": "2013-06-19 15:57:32", + "custom": 0, + "description": "Default settings for Shopping Cart", + "docstatus": 0, + "doctype": "DocType", + "document_type": "System", + "editable_grid": 0, + "fields": [ + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "enabled", + "fieldtype": "Check", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 1, + "in_standard_filter": 0, + "label": "Enable Shopping Cart", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "", + "description": "", + "fieldname": "display_settings", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Display Settings", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "", + "description": "", + "fieldname": "show_attachments", + "fieldtype": "Check", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Show Public Attachments", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "", + "description": "", + "fieldname": "show_price", + "fieldtype": "Check", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Show Price", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "show_stock_availability", + "fieldtype": "Check", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Show Stock Availability", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "show_configure_button", + "fieldtype": "Check", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Show Configure Button", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "show_contact_us_button", + "fieldtype": "Check", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Show Contact Us Button", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "show_stock_availability", + "fieldname": "show_quantity_in_website", + "fieldtype": "Check", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Show Stock Quantity", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "allow_items_not_in_stock", + "fieldtype": "Check", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Allow items not in stock to be added to cart", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "enabled", + "fieldname": "section_break_2", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "length": 0, + "no_copy": 0, + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "", + "fieldname": "company", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 1, + "in_standard_filter": 0, + "label": "Company", + "length": 0, + "no_copy": 0, + "options": "Company", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 1, + "report_hide": 0, + "reqd": 1, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "description": "Prices will not be shown if Price List is not set", + "fieldname": "price_list", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Price List", + "length": 0, + "no_copy": 0, + "options": "Price List", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "column_break_4", + "fieldtype": "Column Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "length": 0, + "no_copy": 0, + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "description": "", + "fieldname": "default_customer_group", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 1, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Default Customer Group", + "length": 0, + "no_copy": 0, + "options": "Customer Group", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 1, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "quotation_series", + "fieldtype": "Select", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Quotation Series", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 1, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 1, + "collapsible_depends_on": "eval:doc.enable_checkout", + "columns": 0, + "depends_on": "enabled", + "fieldname": "section_break_8", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Checkout Settings", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "collapsible_depends_on": "", + "columns": 0, + "depends_on": "", + "fieldname": "enable_checkout", + "fieldtype": "Check", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Enable Checkout", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "default": "Orders", + "description": "After payment completion redirect user to selected page.", + "fieldname": "payment_success_url", + "fieldtype": "Select", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Payment Success Url", + "length": 0, + "no_copy": 0, + "options": "\nOrders\nInvoices\nMy Account", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "column_break_11", + "fieldtype": "Column Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "payment_gateway_account", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Payment Gateway Account", + "length": 0, + "no_copy": 0, + "options": "Payment Gateway Account", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + } + ], + "has_web_view": 0, + "hide_heading": 0, + "hide_toolbar": 0, + "icon": "fa fa-shopping-cart", + "idx": 1, + "image_view": 0, + "in_create": 0, + "is_submittable": 0, + "issingle": 1, + "istable": 0, + "max_attachments": 0, + "modified": "2019-01-26 13:54:24.575322", + "modified_by": "Administrator", + "module": "Shopping Cart", + "name": "Shopping Cart Settings", + "owner": "Administrator", + "permissions": [ + { + "amend": 0, + "cancel": 0, + "create": 1, + "delete": 0, + "email": 1, + "export": 0, + "if_owner": 0, + "import": 0, + "permlevel": 0, + "print": 1, + "read": 1, + "report": 0, + "role": "Website Manager", + "set_user_permissions": 0, + "share": 1, + "submit": 0, + "write": 1 + } + ], + "quick_entry": 0, "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "", - "description": "", - "fieldname": "display_settings", - "fieldtype": "Section Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Display Settings", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "", - "description": "", - "fieldname": "show_attachments", - "fieldtype": "Check", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Show Public Attachments", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "", - "description": "", - "fieldname": "show_price", - "fieldtype": "Check", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Show Price", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "show_stock_availability", - "fieldtype": "Check", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Show Stock Availability", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "show_configure_button", - "fieldtype": "Check", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Show Configure Button", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "show_contact_us_button", - "fieldtype": "Check", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Show Contact Us Button", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "show_stock_availability", - "fieldname": "show_quantity_in_website", - "fieldtype": "Check", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Show Stock Quantity", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "enabled", - "fieldname": "section_break_2", - "fieldtype": "Section Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "length": 0, - "no_copy": 0, - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "", - "fieldname": "company", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "Company", - "length": 0, - "no_copy": 0, - "options": "Company", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 1, - "report_hide": 0, - "reqd": 1, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "description": "Prices will not be shown if Price List is not set", - "fieldname": "price_list", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Price List", - "length": 0, - "no_copy": 0, - "options": "Price List", - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "column_break_4", - "fieldtype": "Column Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "length": 0, - "no_copy": 0, - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "description": "", - "fieldname": "default_customer_group", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 1, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Default Customer Group", - "length": 0, - "no_copy": 0, - "options": "Customer Group", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 1, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "quotation_series", - "fieldtype": "Select", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Quotation Series", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 1, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 1, - "collapsible_depends_on": "eval:doc.enable_checkout", - "columns": 0, - "depends_on": "enabled", - "fieldname": "section_break_8", - "fieldtype": "Section Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Checkout Settings", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "collapsible_depends_on": "", - "columns": 0, - "depends_on": "", - "fieldname": "enable_checkout", - "fieldtype": "Check", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Enable Checkout", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "default": "Orders", - "description": "After payment completion redirect user to selected page.", - "fieldname": "payment_success_url", - "fieldtype": "Select", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Payment Success Url", - "length": 0, - "no_copy": 0, - "options": "\nOrders\nInvoices\nMy Account", - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "column_break_11", - "fieldtype": "Column Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "payment_gateway_account", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Payment Gateway Account", - "length": 0, - "no_copy": 0, - "options": "Payment Gateway Account", - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - } - ], - "has_web_view": 0, - "hide_heading": 0, - "hide_toolbar": 0, - "icon": "fa fa-shopping-cart", - "idx": 1, - "image_view": 0, - "in_create": 0, - "is_submittable": 0, - "issingle": 1, - "istable": 0, - "max_attachments": 0, - "modified": "2019-01-26 13:54:24.575322", - "modified_by": "Administrator", - "module": "Shopping Cart", - "name": "Shopping Cart Settings", - "owner": "Administrator", - "permissions": [ - { - "amend": 0, - "cancel": 0, - "create": 1, - "delete": 0, - "email": 1, - "export": 0, - "if_owner": 0, - "import": 0, - "permlevel": 0, - "print": 1, - "read": 1, - "report": 0, - "role": "Website Manager", - "set_user_permissions": 0, - "share": 1, - "submit": 0, - "write": 1 - } - ], - "quick_entry": 0, - "read_only": 0, - "read_only_onload": 0, - "show_name_in_global_search": 0, - "sort_order": "ASC", - "track_changes": 0, - "track_seen": 0, - "track_views": 0 -} \ No newline at end of file + "read_only_onload": 0, + "show_name_in_global_search": 0, + "sort_order": "ASC", + "track_changes": 0, + "track_seen": 0, + "track_views": 0 + } \ No newline at end of file diff --git a/erpnext/shopping_cart/test_shopping_cart.py b/erpnext/shopping_cart/test_shopping_cart.py index daad799246..cf59a52b5b 100644 --- a/erpnext/shopping_cart/test_shopping_cart.py +++ b/erpnext/shopping_cart/test_shopping_cart.py @@ -33,7 +33,6 @@ class TestShoppingCart(unittest.TestCase): self.assertEqual(quotation.quotation_to, "Customer") self.assertEqual(quotation.contact_person, frappe.db.get_value("Contact", dict(email_id="test_cart_user@example.com"))) - self.assertEqual(quotation.lead, None) self.assertEqual(quotation.contact_email, frappe.session.user) return quotation @@ -44,8 +43,7 @@ class TestShoppingCart(unittest.TestCase): # test if quotation with customer is fetched quotation = _get_cart_quotation() self.assertEqual(quotation.quotation_to, "Customer") - self.assertEqual(quotation.customer, "_Test Customer") - self.assertEqual(quotation.lead, None) + self.assertEqual(quotation.party_name, "_Test Customer") self.assertEqual(quotation.contact_email, frappe.session.user) return quotation @@ -107,10 +105,11 @@ class TestShoppingCart(unittest.TestCase): from erpnext.accounts.party import set_taxes - tax_rule_master = set_taxes(quotation.customer, "Customer", + tax_rule_master = set_taxes(quotation.party_name, "Customer", quotation.transaction_date, quotation.company, customer_group=None, supplier_group=None, tax_category=quotation.tax_category, billing_address=quotation.customer_address, shipping_address=quotation.shipping_address_name, use_for_shopping_cart=1) + self.assertEqual(quotation.taxes_and_charges, tax_rule_master) self.assertEqual(quotation.total_taxes_and_charges, 1000.0) @@ -123,7 +122,7 @@ class TestShoppingCart(unittest.TestCase): "doctype": "Quotation", "quotation_to": "Customer", "order_type": "Shopping Cart", - "customer": get_party(frappe.session.user).name, + "party_name": get_party(frappe.session.user).name, "docstatus": 0, "contact_email": frappe.session.user, "selling_price_list": "_Test Price List Rest of the World", diff --git a/erpnext/stock/doctype/batch/batch.py b/erpnext/stock/doctype/batch/batch.py index 4881983b8e..bd24257065 100644 --- a/erpnext/stock/doctype/batch/batch.py +++ b/erpnext/stock/doctype/batch/batch.py @@ -10,6 +10,7 @@ from frappe.model.naming import make_autoname, revert_series_if_last from frappe.utils import flt, cint from frappe.utils.jinja import render_template from frappe.utils.data import add_days +from six import string_types class UnableToSelectBatchError(frappe.ValidationError): pass diff --git a/erpnext/stock/doctype/delivery_note/delivery_note.js b/erpnext/stock/doctype/delivery_note/delivery_note.js index 78bc06a47b..6bcdc2b6d1 100644 --- a/erpnext/stock/doctype/delivery_note/delivery_note.js +++ b/erpnext/stock/doctype/delivery_note/delivery_note.js @@ -101,8 +101,7 @@ erpnext.stock.DeliveryNoteController = erpnext.selling.SellingController.extend( refresh: function(doc, dt, dn) { var me = this; this._super(); - - if ((!doc.is_return) && (doc.status!="Closed" || doc.is_new())) { + if ((!doc.is_return) && (doc.status!="Closed" || this.frm.is_new())) { if (this.frm.doc.docstatus===0) { this.frm.add_custom_button(__('Sales Order'), function() { @@ -303,4 +302,3 @@ erpnext.stock.delivery_note.set_print_hide = function(doc, cdt, cdn){ dn_fields['taxes'].print_hide = 0; } } - diff --git a/erpnext/stock/doctype/item/item.json b/erpnext/stock/doctype/item/item.json index fc715c91c5..3936bf7524 100644 --- a/erpnext/stock/doctype/item/item.json +++ b/erpnext/stock/doctype/item/item.json @@ -1,1099 +1,1100 @@ { - "allow_guest_to_view": 1, - "allow_import": 1, - "allow_rename": 1, - "autoname": "field:item_code", - "creation": "2013-05-03 10:45:46", - "description": "A Product or a Service that is bought, sold or kept in stock.", - "doctype": "DocType", - "document_type": "Setup", - "editable_grid": 1, - "engine": "InnoDB", - "field_order": [ - "name_and_description_section", - "naming_series", - "item_code", - "variant_of", - "item_name", - "item_group", - "is_item_from_hub", - "stock_uom", - "column_break0", - "disabled", - "allow_alternative_item", - "is_stock_item", - "include_item_in_manufacturing", - "opening_stock", - "valuation_rate", - "standard_rate", - "is_fixed_asset", - "asset_category", - "asset_naming_series", - "tolerance", - "image", - "section_break_11", - "brand", - "description", - "sb_barcodes", - "barcodes", - "inventory_section", - "shelf_life_in_days", - "end_of_life", - "default_material_request_type", - "valuation_method", - "column_break1", - "warranty_period", - "weight_per_unit", - "weight_uom", - "reorder_section", - "reorder_levels", - "unit_of_measure_conversion", - "uoms", - "serial_nos_and_batches", - "has_batch_no", - "create_new_batch", - "batch_number_series", - "has_expiry_date", - "retain_sample", - "sample_quantity", - "column_break_37", - "has_serial_no", - "serial_no_series", - "variants_section", - "has_variants", - "variant_based_on", - "attributes", - "defaults", - "item_defaults", - "purchase_details", - "is_purchase_item", - "purchase_uom", - "min_order_qty", - "safety_stock", - "purchase_details_cb", - "lead_time_days", - "last_purchase_rate", - "is_customer_provided_item", - "customer", - "supplier_details", - "manufacturers", - "delivered_by_supplier", - "column_break2", - "supplier_items", - "foreign_trade_details", - "country_of_origin", - "column_break_59", - "customs_tariff_number", - "sales_details", - "sales_uom", - "is_sales_item", - "column_break3", - "max_discount", - "deferred_revenue", - "deferred_revenue_account", - "enable_deferred_revenue", - "column_break_85", - "no_of_months", - "deferred_expense_section", - "deferred_expense_account", - "enable_deferred_expense", - "column_break_88", - "no_of_months_exp", - "customer_details", - "customer_items", - "item_tax_section_break", - "taxes", - "inspection_criteria", - "inspection_required_before_purchase", - "inspection_required_before_delivery", - "quality_inspection_template", - "manufacturing", - "default_bom", - "is_sub_contracted_item", - "column_break_74", - "customer_code", - "website_section", - "show_in_website", - "show_variant_in_website", - "route", - "weightage", - "slideshow", - "website_image", - "thumbnail", - "cb72", - "website_warehouse", - "website_item_groups", - "set_meta_tags", - "sb72", - "copy_from_item_group", - "website_specifications", - "web_long_description", - "website_content", - "total_projected_qty", - "hub_publishing_sb", - "publish_in_hub", - "hub_category_to_publish", - "hub_warehouse", - "synced_with_hub" - ], - "fields": [ - { - "fieldname": "name_and_description_section", - "fieldtype": "Section Break", - "oldfieldtype": "Section Break", - "options": "fa fa-flag" - }, - { - "fieldname": "naming_series", - "fieldtype": "Select", - "label": "Series", - "options": "STO-ITEM-.YYYY.-", - "set_only_once": 1 - }, - { - "bold": 1, - "fieldname": "item_code", - "fieldtype": "Data", - "in_global_search": 1, - "label": "Item Code", - "oldfieldname": "item_code", - "oldfieldtype": "Data", - "unique": 1 - }, - { - "depends_on": "variant_of", - "description": "If item is a variant of another item then description, image, pricing, taxes etc will be set from the template unless explicitly specified", - "fieldname": "variant_of", - "fieldtype": "Link", - "ignore_user_permissions": 1, - "in_standard_filter": 1, - "label": "Variant Of", - "options": "Item", - "read_only": 1, - "search_index": 1, - "set_only_once": 1 - }, - { - "bold": 1, - "fieldname": "item_name", - "fieldtype": "Data", - "in_global_search": 1, - "label": "Item Name", - "oldfieldname": "item_name", - "oldfieldtype": "Data", - "search_index": 1 - }, - { - "fieldname": "item_group", - "fieldtype": "Link", - "in_list_view": 1, - "in_preview": 1, - "in_standard_filter": 1, - "label": "Item Group", - "oldfieldname": "item_group", - "oldfieldtype": "Link", - "options": "Item Group", - "reqd": 1, - "search_index": 1 - }, - { - "default": "0", - "fieldname": "is_item_from_hub", - "fieldtype": "Check", - "label": "Is Item from Hub", - "read_only": 1 - }, - { - "fieldname": "stock_uom", - "fieldtype": "Link", - "ignore_user_permissions": 1, - "label": "Default Unit of Measure", - "oldfieldname": "stock_uom", - "oldfieldtype": "Link", - "options": "UOM", - "reqd": 1 - }, - { - "fieldname": "column_break0", - "fieldtype": "Column Break" - }, - { - "default": "0", - "fieldname": "disabled", - "fieldtype": "Check", - "label": "Disabled" - }, - { - "default": "0", - "fieldname": "allow_alternative_item", - "fieldtype": "Check", - "label": "Allow Alternative Item" - }, - { - "bold": 1, - "default": "1", - "fieldname": "is_stock_item", - "fieldtype": "Check", - "label": "Maintain Stock", - "oldfieldname": "is_stock_item", - "oldfieldtype": "Select" - }, - { - "default": "1", - "fieldname": "include_item_in_manufacturing", - "fieldtype": "Check", - "label": "Include Item In Manufacturing" - }, - { - "bold": 1, - "depends_on": "eval:(doc.__islocal&&doc.is_stock_item && !doc.has_serial_no && !doc.has_batch_no)", - "fieldname": "opening_stock", - "fieldtype": "Float", - "label": "Opening Stock" - }, - { - "depends_on": "is_stock_item", - "fieldname": "valuation_rate", - "fieldtype": "Currency", - "label": "Valuation Rate" - }, - { - "bold": 1, - "depends_on": "eval:doc.__islocal", - "fieldname": "standard_rate", - "fieldtype": "Currency", - "label": "Standard Selling Rate" - }, - { - "default": "0", - "fieldname": "is_fixed_asset", - "fieldtype": "Check", - "label": "Is Fixed Asset", - "set_only_once": 1 - }, - { - "depends_on": "is_fixed_asset", - "fieldname": "asset_category", - "fieldtype": "Link", - "label": "Asset Category", - "options": "Asset Category" - }, - { - "depends_on": "is_fixed_asset", - "fieldname": "asset_naming_series", - "fieldtype": "Select", - "label": "Asset Naming Series" - }, - { - "depends_on": "eval:!doc.__islocal", - "fieldname": "tolerance", - "fieldtype": "Float", - "label": "Allow over delivery or receipt upto this percent", - "oldfieldname": "tolerance", - "oldfieldtype": "Currency" - }, - { - "fieldname": "image", - "fieldtype": "Attach Image", - "hidden": 1, - "in_preview": 1, - "label": "Image", - "options": "image", - "print_hide": 1 - }, - { - "collapsible": 1, - "fieldname": "section_break_11", - "fieldtype": "Section Break", - "label": "Description" - }, - { - "fieldname": "brand", - "fieldtype": "Link", - "label": "Brand", - "oldfieldname": "brand", - "oldfieldtype": "Link", - "options": "Brand", - "print_hide": 1 - }, - { - "fieldname": "description", - "fieldtype": "Text Editor", - "in_preview": 1, - "label": "Description", - "oldfieldname": "description", - "oldfieldtype": "Text" - }, - { - "fieldname": "sb_barcodes", - "fieldtype": "Section Break", - "label": "Barcodes" - }, - { - "fieldname": "barcodes", - "fieldtype": "Table", - "label": "Barcodes", - "options": "Item Barcode" - }, - { - "collapsible": 1, - "collapsible_depends_on": "is_stock_item", - "depends_on": "is_stock_item", - "fieldname": "inventory_section", - "fieldtype": "Section Break", - "label": "Inventory", - "oldfieldtype": "Section Break", - "options": "fa fa-truck" - }, - { - "fieldname": "shelf_life_in_days", - "fieldtype": "Int", - "label": "Shelf Life In Days" - }, - { - "default": "2099-12-31", - "depends_on": "is_stock_item", - "fieldname": "end_of_life", - "fieldtype": "Date", - "label": "End of Life", - "oldfieldname": "end_of_life", - "oldfieldtype": "Date" - }, - { - "default": "Purchase", - "fieldname": "default_material_request_type", - "fieldtype": "Select", - "label": "Default Material Request Type", - "options": "Purchase\nMaterial Transfer\nMaterial Issue\nManufacture\nCustomer Provided" - }, - { - "depends_on": "is_stock_item", - "fieldname": "valuation_method", - "fieldtype": "Select", - "label": "Valuation Method", - "options": "\nFIFO\nMoving Average", - "set_only_once": 1 - }, - { - "depends_on": "is_stock_item", - "fieldname": "column_break1", - "fieldtype": "Column Break", - "oldfieldtype": "Column Break", - "width": "50%" - }, - { - "depends_on": "eval:doc.is_stock_item", - "fieldname": "warranty_period", - "fieldtype": "Data", - "label": "Warranty Period (in days)", - "oldfieldname": "warranty_period", - "oldfieldtype": "Data" - }, - { - "depends_on": "is_stock_item", - "fieldname": "weight_per_unit", - "fieldtype": "Float", - "label": "Weight Per Unit" - }, - { - "depends_on": "eval:doc.is_stock_item", - "fieldname": "weight_uom", - "fieldtype": "Link", - "ignore_user_permissions": 1, - "label": "Weight UOM", - "options": "UOM" - }, - { - "collapsible": 1, - "depends_on": "is_stock_item", - "fieldname": "reorder_section", - "fieldtype": "Section Break", - "label": "Auto re-order", - "options": "fa fa-rss" - }, - { - "description": "Will also apply for variants unless overrridden", - "fieldname": "reorder_levels", - "fieldtype": "Table", - "label": "Reorder level based on Warehouse", - "options": "Item Reorder" - }, - { - "collapsible": 1, - "fieldname": "unit_of_measure_conversion", - "fieldtype": "Section Break", - "label": "Units of Measure" - }, - { - "description": "Will also apply for variants", - "fieldname": "uoms", - "fieldtype": "Table", - "label": "UOMs", - "oldfieldname": "uom_conversion_details", - "oldfieldtype": "Table", - "options": "UOM Conversion Detail" - }, - { - "collapsible": 1, - "collapsible_depends_on": "eval:doc.has_batch_no || doc.has_serial_no || doc.is_fixed_asset", - "depends_on": "eval:doc.is_stock_item || doc.is_fixed_asset", - "fieldname": "serial_nos_and_batches", - "fieldtype": "Section Break", - "label": "Serial Nos and Batches" - }, - { - "default": "0", - "depends_on": "eval:doc.is_stock_item", - "fieldname": "has_batch_no", - "fieldtype": "Check", - "label": "Has Batch No", - "no_copy": 1, - "oldfieldname": "has_batch_no", - "oldfieldtype": "Select" - }, - { - "default": "0", - "depends_on": "has_batch_no", - "fieldname": "create_new_batch", - "fieldtype": "Check", - "label": "Automatically Create New Batch" - }, - { - "depends_on": "eval:doc.has_batch_no==1 && doc.create_new_batch==1", - "description": "Example: ABCD.#####. If series is set and Batch No is not mentioned in transactions, then automatic batch number will be created based on this series. If you always want to explicitly mention Batch No for this item, leave this blank. Note: this setting will take priority over the Naming Series Prefix in Stock Settings.", - "fieldname": "batch_number_series", - "fieldtype": "Data", - "label": "Batch Number Series", - "translatable": 1 - }, - { - "default": "0", - "depends_on": "has_batch_no", - "fieldname": "has_expiry_date", - "fieldtype": "Check", - "label": "Has Expiry Date" - }, - { - "default": "0", - "depends_on": "has_batch_no", - "fieldname": "retain_sample", - "fieldtype": "Check", - "label": "Retain Sample" - }, - { - "depends_on": "eval: (doc.retain_sample && doc.has_batch_no)", - "description": "Maximum sample quantity that can be retained", - "fieldname": "sample_quantity", - "fieldtype": "Int", - "label": "Max Sample Quantity" - }, - { - "fieldname": "column_break_37", - "fieldtype": "Column Break" - }, - { - "default": "0", - "depends_on": "eval:doc.is_stock_item || doc.is_fixed_asset", - "fieldname": "has_serial_no", - "fieldtype": "Check", - "label": "Has Serial No", - "no_copy": 1, - "oldfieldname": "has_serial_no", - "oldfieldtype": "Select" - }, - { - "depends_on": "eval:doc.is_stock_item || doc.is_fixed_asset", - "description": "Example: ABCD.#####\nIf series is set and Serial No is not mentioned in transactions, then automatic serial number will be created based on this series. If you always want to explicitly mention Serial Nos for this item. leave this blank.", - "fieldname": "serial_no_series", - "fieldtype": "Data", - "label": "Serial Number Series" - }, - { - "collapsible": 1, - "collapsible_depends_on": "attributes", - "fieldname": "variants_section", - "fieldtype": "Section Break", - "label": "Variants" - }, - { - "default": "0", - "depends_on": "eval:!doc.variant_of", - "description": "If this item has variants, then it cannot be selected in sales orders etc.", - "fieldname": "has_variants", - "fieldtype": "Check", - "in_standard_filter": 1, - "label": "Has Variants", - "no_copy": 1 - }, - { - "default": "Item Attribute", - "depends_on": "has_variants", - "fieldname": "variant_based_on", - "fieldtype": "Select", - "label": "Variant Based On", - "options": "Item Attribute\nManufacturer" - }, - { - "depends_on": "eval:(doc.has_variants || doc.variant_of) && doc.variant_based_on==='Item Attribute'", - "fieldname": "attributes", - "fieldtype": "Table", - "hidden": 1, - "label": "Attributes", - "no_copy": 1, - "options": "Item Variant Attribute" - }, - { - "fieldname": "defaults", - "fieldtype": "Section Break", - "label": "Sales, Purchase, Accounting Defaults" - }, - { - "fieldname": "item_defaults", - "fieldtype": "Table", - "label": "Item Defaults", - "options": "Item Default" - }, - { - "collapsible": 1, - "fieldname": "purchase_details", - "fieldtype": "Section Break", - "label": "Purchase, Replenishment Details", - "oldfieldtype": "Section Break", - "options": "fa fa-shopping-cart" - }, - { - "default": "1", - "fieldname": "is_purchase_item", - "fieldtype": "Check", - "label": "Is Purchase Item" - }, - { - "fieldname": "purchase_uom", - "fieldtype": "Link", - "label": "Default Purchase Unit of Measure", - "options": "UOM" - }, - { - "default": "0.00", - "depends_on": "is_stock_item", - "fieldname": "min_order_qty", - "fieldtype": "Float", - "label": "Minimum Order Qty", - "oldfieldname": "min_order_qty", - "oldfieldtype": "Currency" - }, - { - "fieldname": "safety_stock", - "fieldtype": "Float", - "label": "Safety Stock" - }, - { - "fieldname": "purchase_details_cb", - "fieldtype": "Column Break" - }, - { - "description": "Average time taken by the supplier to deliver", - "fieldname": "lead_time_days", - "fieldtype": "Int", - "label": "Lead Time in days", - "oldfieldname": "lead_time_days", - "oldfieldtype": "Int" - }, - { - "fieldname": "last_purchase_rate", - "fieldtype": "Float", - "label": "Last Purchase Rate", - "no_copy": 1, - "oldfieldname": "last_purchase_rate", - "oldfieldtype": "Currency", - "read_only": 1 - }, - { - "default": "0", - "fieldname": "is_customer_provided_item", - "fieldtype": "Check", - "label": "Is Customer Provided Item" - }, - { - "depends_on": "eval:doc.is_customer_provided_item==1", - "fieldname": "customer", - "fieldtype": "Link", - "label": "Customer", - "options": "Customer" - }, - { - "collapsible": 1, - "fieldname": "supplier_details", - "fieldtype": "Section Break", - "label": "Supplier Details" - }, - { - "default": "0", - "fieldname": "delivered_by_supplier", - "fieldtype": "Check", - "label": "Delivered by Supplier (Drop Ship)", - "print_hide": 1 - }, - { - "fieldname": "column_break2", - "fieldtype": "Column Break", - "oldfieldtype": "Column Break", - "width": "50%" - }, - { - "fieldname": "supplier_items", - "fieldtype": "Table", - "label": "Supplier Items", - "options": "Item Supplier" - }, - { - "collapsible": 1, - "fieldname": "foreign_trade_details", - "fieldtype": "Section Break", - "label": "Foreign Trade Details" - }, - { - "fieldname": "country_of_origin", - "fieldtype": "Link", - "label": "Country of Origin", - "options": "Country" - }, - { - "fieldname": "column_break_59", - "fieldtype": "Column Break" - }, - { - "fieldname": "customs_tariff_number", - "fieldtype": "Link", - "label": "Customs Tariff Number", - "options": "Customs Tariff Number" - }, - { - "collapsible": 1, - "fieldname": "sales_details", - "fieldtype": "Section Break", - "label": "Sales Details", - "oldfieldtype": "Section Break", - "options": "fa fa-tag" - }, - { - "fieldname": "sales_uom", - "fieldtype": "Link", - "label": "Default Sales Unit of Measure", - "options": "UOM" - }, - { - "default": "1", - "fieldname": "is_sales_item", - "fieldtype": "Check", - "label": "Is Sales Item" - }, - { - "fieldname": "column_break3", - "fieldtype": "Column Break", - "oldfieldtype": "Column Break", - "width": "50%" - }, - { - "fieldname": "max_discount", - "fieldtype": "Float", - "label": "Max Discount (%)", - "oldfieldname": "max_discount", - "oldfieldtype": "Currency" - }, - { - "collapsible": 1, - "fieldname": "deferred_revenue", - "fieldtype": "Section Break", - "label": "Deferred Revenue" - }, - { - "depends_on": "enable_deferred_revenue", - "fieldname": "deferred_revenue_account", - "fieldtype": "Link", - "ignore_user_permissions": 1, - "label": "Deferred Revenue Account", - "options": "Account" - }, - { - "default": "0", - "fieldname": "enable_deferred_revenue", - "fieldtype": "Check", - "label": "Enable Deferred Revenue" - }, - { - "fieldname": "column_break_85", - "fieldtype": "Column Break" - }, - { - "depends_on": "enable_deferred_revenue", - "fieldname": "no_of_months", - "fieldtype": "Int", - "label": "No of Months" - }, - { - "collapsible": 1, - "fieldname": "deferred_expense_section", - "fieldtype": "Section Break", - "label": "Deferred Expense" - }, - { - "depends_on": "enable_deferred_expense", - "fieldname": "deferred_expense_account", - "fieldtype": "Link", - "ignore_user_permissions": 1, - "label": "Deferred Expense Account", - "options": "Account" - }, - { - "default": "0", - "fieldname": "enable_deferred_expense", - "fieldtype": "Check", - "label": "Enable Deferred Expense" - }, - { - "fieldname": "column_break_88", - "fieldtype": "Column Break" - }, - { - "depends_on": "enable_deferred_expense", - "fieldname": "no_of_months_exp", - "fieldtype": "Int", - "label": "No of Months" - }, - { - "collapsible": 1, - "fieldname": "customer_details", - "fieldtype": "Section Break", - "label": "Customer Details" - }, - { - "fieldname": "customer_items", - "fieldtype": "Table", - "label": "Customer Items", - "options": "Item Customer Detail" - }, - { - "collapsible": 1, - "collapsible_depends_on": "taxes", - "fieldname": "item_tax_section_break", - "fieldtype": "Section Break", - "label": "Item Tax", - "oldfieldtype": "Section Break", - "options": "fa fa-money" - }, - { - "description": "Will also apply for variants", - "fieldname": "taxes", - "fieldtype": "Table", - "label": "Taxes", - "oldfieldname": "item_tax", - "oldfieldtype": "Table", - "options": "Item Tax" - }, - { - "collapsible": 1, - "fieldname": "inspection_criteria", - "fieldtype": "Section Break", - "label": "Inspection Criteria", - "oldfieldtype": "Section Break", - "options": "fa fa-search" - }, - { - "default": "0", - "fieldname": "inspection_required_before_purchase", - "fieldtype": "Check", - "label": "Inspection Required before Purchase", - "oldfieldname": "inspection_required", - "oldfieldtype": "Select" - }, - { - "default": "0", - "fieldname": "inspection_required_before_delivery", - "fieldtype": "Check", - "label": "Inspection Required before Delivery" - }, - { - "depends_on": "eval:(doc.inspection_required_before_purchase || doc.inspection_required_before_delivery)", - "fieldname": "quality_inspection_template", - "fieldtype": "Link", - "label": "Quality Inspection Template", - "options": "Quality Inspection Template", - "print_hide": 1 - }, - { - "collapsible": 1, - "depends_on": "is_stock_item", - "fieldname": "manufacturing", - "fieldtype": "Section Break", - "label": "Manufacturing", - "oldfieldtype": "Section Break", - "options": "fa fa-cogs" - }, - { - "fieldname": "default_bom", - "fieldtype": "Link", - "ignore_user_permissions": 1, - "label": "Default BOM", - "no_copy": 1, - "oldfieldname": "default_bom", - "oldfieldtype": "Link", - "options": "BOM", - "read_only": 1 - }, - { - "default": "0", - "description": "If subcontracted to a vendor", - "fieldname": "is_sub_contracted_item", - "fieldtype": "Check", - "label": "Supply Raw Materials for Purchase", - "oldfieldname": "is_sub_contracted_item", - "oldfieldtype": "Select" - }, - { - "fieldname": "column_break_74", - "fieldtype": "Column Break" - }, - { - "fieldname": "customer_code", - "fieldtype": "Data", - "hidden": 1, - "label": "Customer Code", - "no_copy": 1, - "print_hide": 1 - }, - { - "collapsible": 1, - "fieldname": "website_section", - "fieldtype": "Section Break", - "label": "Website", - "options": "fa fa-globe" - }, - { - "default": "0", - "depends_on": "eval:!doc.variant_of", - "fieldname": "show_in_website", - "fieldtype": "Check", - "label": "Show in Website", - "search_index": 1 - }, - { - "default": "0", - "depends_on": "variant_of", - "fieldname": "show_variant_in_website", - "fieldtype": "Check", - "label": "Show in Website (Variant)", - "search_index": 1 - }, - { - "depends_on": "eval: doc.show_in_website || doc.show_variant_in_website", - "fieldname": "route", - "fieldtype": "Small Text", - "label": "Route", - "no_copy": 1 - }, - { - "depends_on": "eval: doc.show_in_website || doc.show_variant_in_website", - "description": "Items with higher weightage will be shown higher", - "fieldname": "weightage", - "fieldtype": "Int", - "label": "Weightage" - }, - { - "depends_on": "eval: doc.show_in_website || doc.show_variant_in_website", - "description": "Show a slideshow at the top of the page", - "fieldname": "slideshow", - "fieldtype": "Link", - "label": "Slideshow", - "options": "Website Slideshow" - }, - { - "depends_on": "eval: doc.show_in_website || doc.show_variant_in_website", - "description": "Item Image (if not slideshow)", - "fieldname": "website_image", - "fieldtype": "Attach", - "label": "Image" - }, - { - "fieldname": "thumbnail", - "fieldtype": "Data", - "label": "Thumbnail", - "read_only": 1 - }, - { - "fieldname": "cb72", - "fieldtype": "Column Break" - }, - { - "depends_on": "eval: doc.show_in_website || doc.show_variant_in_website", - "description": "Show \"In Stock\" or \"Not in Stock\" based on stock available in this warehouse.", - "fieldname": "website_warehouse", - "fieldtype": "Link", - "ignore_user_permissions": 1, - "label": "Website Warehouse", - "options": "Warehouse" - }, - { - "depends_on": "eval: doc.show_in_website || doc.show_variant_in_website", - "description": "List this Item in multiple groups on the website.", - "fieldname": "website_item_groups", - "fieldtype": "Table", - "label": "Website Item Groups", - "options": "Website Item Group" - }, - { - "depends_on": "eval: doc.show_in_website || doc.show_variant_in_website", - "fieldname": "set_meta_tags", - "fieldtype": "Button", - "label": "Set Meta Tags" - }, - { - "collapsible": 1, - "collapsible_depends_on": "website_specifications", - "depends_on": "eval: doc.show_in_website || doc.show_variant_in_website", - "fieldname": "sb72", - "fieldtype": "Section Break", - "label": "Website Specifications" - }, - { - "depends_on": "eval: doc.show_in_website || doc.show_variant_in_website", - "fieldname": "copy_from_item_group", - "fieldtype": "Button", - "label": "Copy From Item Group" - }, - { - "depends_on": "eval: doc.show_in_website || doc.show_variant_in_website", - "fieldname": "website_specifications", - "fieldtype": "Table", - "label": "Website Specifications", - "options": "Item Website Specification" - }, - { - "depends_on": "eval: doc.show_in_website || doc.show_variant_in_website", - "fieldname": "web_long_description", - "fieldtype": "Text Editor", - "label": "Website Description" - }, - { - "description": "You can use any valid Bootstrap 4 markup in this field. It will be shown on your Item Page.", - "fieldname": "website_content", - "fieldtype": "HTML Editor", - "label": "Website Content" - }, - { - "fieldname": "total_projected_qty", - "fieldtype": "Float", - "hidden": 1, - "label": "Total Projected Qty", - "print_hide": 1, - "read_only": 1 - }, - { - "depends_on": "eval:(!doc.is_item_from_hub)", - "fieldname": "hub_publishing_sb", - "fieldtype": "Section Break", - "label": "Hub Publishing Details" - }, - { - "default": "0", - "description": "Publish Item to hub.erpnext.com", - "fieldname": "publish_in_hub", - "fieldtype": "Check", - "label": "Publish in Hub" - }, - { - "fieldname": "hub_category_to_publish", - "fieldtype": "Data", - "label": "Hub Category to Publish", - "read_only": 1 - }, - { - "description": "Publish \"In Stock\" or \"Not in Stock\" on Hub based on stock available in this warehouse.", - "fieldname": "hub_warehouse", - "fieldtype": "Link", - "ignore_user_permissions": 1, - "label": "Hub Warehouse", - "options": "Warehouse" - }, - { - "default": "0", - "fieldname": "synced_with_hub", - "fieldtype": "Check", - "label": "Synced With Hub", - "read_only": 1 - }, - { - "fieldname": "manufacturers", - "fieldtype": "Table", - "label": "Manufacturers", - "options": "Item Manufacturer" - } - ], - "has_web_view": 1, - "icon": "fa fa-tag", - "idx": 2, - "image_field": "image", - "max_attachments": 1, - "modified": "2019-06-02 04:45:59.911507", - "modified_by": "Administrator", - "module": "Stock", - "name": "Item", - "owner": "Administrator", - "permissions": [ - { - "create": 1, - "delete": 1, - "email": 1, - "export": 1, - "import": 1, - "print": 1, - "read": 1, - "report": 1, - "role": "Item Manager", - "share": 1, - "write": 1 - }, - { - "email": 1, - "print": 1, - "read": 1, - "report": 1, - "role": "Stock Manager" - }, - { - "email": 1, - "print": 1, - "read": 1, - "report": 1, - "role": "Stock User" - }, - { - "read": 1, - "role": "Sales User" - }, - { - "read": 1, - "role": "Purchase User" - }, - { - "read": 1, - "role": "Maintenance User" - }, - { - "read": 1, - "role": "Accounts User" - }, - { - "read": 1, - "role": "Manufacturing User" - } - ], - "quick_entry": 1, - "search_fields": "item_name,description,item_group,customer_code", - "show_name_in_global_search": 1, - "show_preview_popup": 1, - "sort_field": "idx desc,modified desc", - "sort_order": "DESC", - "title_field": "item_name", - "track_changes": 1 -} \ No newline at end of file + "allow_guest_to_view": 1, + "allow_import": 1, + "allow_rename": 1, + "autoname": "field:item_code", + "creation": "2013-05-03 10:45:46", + "description": "A Product or a Service that is bought, sold or kept in stock.", + "doctype": "DocType", + "document_type": "Setup", + "editable_grid": 1, + "engine": "InnoDB", + "field_order": [ + "name_and_description_section", + "naming_series", + "item_code", + "variant_of", + "item_name", + "item_group", + "is_item_from_hub", + "stock_uom", + "column_break0", + "disabled", + "allow_alternative_item", + "is_stock_item", + "include_item_in_manufacturing", + "opening_stock", + "valuation_rate", + "standard_rate", + "is_fixed_asset", + "asset_category", + "asset_naming_series", + "tolerance", + "image", + "section_break_11", + "brand", + "description", + "sb_barcodes", + "barcodes", + "inventory_section", + "shelf_life_in_days", + "end_of_life", + "default_material_request_type", + "valuation_method", + "column_break1", + "warranty_period", + "weight_per_unit", + "weight_uom", + "reorder_section", + "reorder_levels", + "unit_of_measure_conversion", + "uoms", + "serial_nos_and_batches", + "has_batch_no", + "create_new_batch", + "batch_number_series", + "has_expiry_date", + "retain_sample", + "sample_quantity", + "column_break_37", + "has_serial_no", + "serial_no_series", + "variants_section", + "has_variants", + "variant_based_on", + "attributes", + "defaults", + "item_defaults", + "purchase_details", + "is_purchase_item", + "purchase_uom", + "min_order_qty", + "safety_stock", + "purchase_details_cb", + "lead_time_days", + "last_purchase_rate", + "is_customer_provided_item", + "customer", + "supplier_details", + "manufacturers", + "delivered_by_supplier", + "column_break2", + "supplier_items", + "foreign_trade_details", + "country_of_origin", + "column_break_59", + "customs_tariff_number", + "sales_details", + "sales_uom", + "is_sales_item", + "column_break3", + "max_discount", + "deferred_revenue", + "deferred_revenue_account", + "enable_deferred_revenue", + "column_break_85", + "no_of_months", + "deferred_expense_section", + "deferred_expense_account", + "enable_deferred_expense", + "column_break_88", + "no_of_months_exp", + "customer_details", + "customer_items", + "item_tax_section_break", + "taxes", + "inspection_criteria", + "inspection_required_before_purchase", + "inspection_required_before_delivery", + "quality_inspection_template", + "manufacturing", + "default_bom", + "is_sub_contracted_item", + "column_break_74", + "customer_code", + "website_section", + "show_in_website", + "show_variant_in_website", + "route", + "weightage", + "slideshow", + "website_image", + "thumbnail", + "cb72", + "website_warehouse", + "website_item_groups", + "set_meta_tags", + "sb72", + "copy_from_item_group", + "website_specifications", + "web_long_description", + "website_content", + "total_projected_qty", + "hub_publishing_sb", + "publish_in_hub", + "hub_category_to_publish", + "hub_warehouse", + "synced_with_hub" + ], + "fields": [ + { + "fieldname": "name_and_description_section", + "fieldtype": "Section Break", + "oldfieldtype": "Section Break", + "options": "fa fa-flag" + }, + { + "fieldname": "naming_series", + "fieldtype": "Select", + "label": "Series", + "options": "STO-ITEM-.YYYY.-", + "set_only_once": 1 + }, + { + "bold": 1, + "fieldname": "item_code", + "fieldtype": "Data", + "in_global_search": 1, + "label": "Item Code", + "oldfieldname": "item_code", + "oldfieldtype": "Data", + "unique": 1, + "reqd": 1 + }, + { + "depends_on": "variant_of", + "description": "If item is a variant of another item then description, image, pricing, taxes etc will be set from the template unless explicitly specified", + "fieldname": "variant_of", + "fieldtype": "Link", + "ignore_user_permissions": 1, + "in_standard_filter": 1, + "label": "Variant Of", + "options": "Item", + "read_only": 1, + "search_index": 1, + "set_only_once": 1 + }, + { + "bold": 1, + "fieldname": "item_name", + "fieldtype": "Data", + "in_global_search": 1, + "label": "Item Name", + "oldfieldname": "item_name", + "oldfieldtype": "Data", + "search_index": 1 + }, + { + "fieldname": "item_group", + "fieldtype": "Link", + "in_list_view": 1, + "in_preview": 1, + "in_standard_filter": 1, + "label": "Item Group", + "oldfieldname": "item_group", + "oldfieldtype": "Link", + "options": "Item Group", + "reqd": 1, + "search_index": 1 + }, + { + "default": "0", + "fieldname": "is_item_from_hub", + "fieldtype": "Check", + "label": "Is Item from Hub", + "read_only": 1 + }, + { + "fieldname": "stock_uom", + "fieldtype": "Link", + "ignore_user_permissions": 1, + "label": "Default Unit of Measure", + "oldfieldname": "stock_uom", + "oldfieldtype": "Link", + "options": "UOM", + "reqd": 1 + }, + { + "fieldname": "column_break0", + "fieldtype": "Column Break" + }, + { + "default": "0", + "fieldname": "disabled", + "fieldtype": "Check", + "label": "Disabled" + }, + { + "default": "0", + "fieldname": "allow_alternative_item", + "fieldtype": "Check", + "label": "Allow Alternative Item" + }, + { + "bold": 1, + "default": "1", + "fieldname": "is_stock_item", + "fieldtype": "Check", + "label": "Maintain Stock", + "oldfieldname": "is_stock_item", + "oldfieldtype": "Select" + }, + { + "default": "1", + "fieldname": "include_item_in_manufacturing", + "fieldtype": "Check", + "label": "Include Item In Manufacturing" + }, + { + "bold": 1, + "depends_on": "eval:(doc.__islocal&&doc.is_stock_item && !doc.has_serial_no && !doc.has_batch_no)", + "fieldname": "opening_stock", + "fieldtype": "Float", + "label": "Opening Stock" + }, + { + "depends_on": "is_stock_item", + "fieldname": "valuation_rate", + "fieldtype": "Currency", + "label": "Valuation Rate" + }, + { + "bold": 1, + "depends_on": "eval:doc.__islocal", + "fieldname": "standard_rate", + "fieldtype": "Currency", + "label": "Standard Selling Rate" + }, + { + "default": "0", + "fieldname": "is_fixed_asset", + "fieldtype": "Check", + "label": "Is Fixed Asset", + "set_only_once": 1 + }, + { + "depends_on": "is_fixed_asset", + "fieldname": "asset_category", + "fieldtype": "Link", + "label": "Asset Category", + "options": "Asset Category" + }, + { + "depends_on": "is_fixed_asset", + "fieldname": "asset_naming_series", + "fieldtype": "Select", + "label": "Asset Naming Series" + }, + { + "depends_on": "eval:!doc.__islocal", + "fieldname": "tolerance", + "fieldtype": "Float", + "label": "Allow over delivery or receipt upto this percent", + "oldfieldname": "tolerance", + "oldfieldtype": "Currency" + }, + { + "fieldname": "image", + "fieldtype": "Attach Image", + "hidden": 1, + "in_preview": 1, + "label": "Image", + "options": "image", + "print_hide": 1 + }, + { + "collapsible": 1, + "fieldname": "section_break_11", + "fieldtype": "Section Break", + "label": "Description" + }, + { + "fieldname": "brand", + "fieldtype": "Link", + "label": "Brand", + "oldfieldname": "brand", + "oldfieldtype": "Link", + "options": "Brand", + "print_hide": 1 + }, + { + "fieldname": "description", + "fieldtype": "Text Editor", + "in_preview": 1, + "label": "Description", + "oldfieldname": "description", + "oldfieldtype": "Text" + }, + { + "fieldname": "sb_barcodes", + "fieldtype": "Section Break", + "label": "Barcodes" + }, + { + "fieldname": "barcodes", + "fieldtype": "Table", + "label": "Barcodes", + "options": "Item Barcode" + }, + { + "collapsible": 1, + "collapsible_depends_on": "is_stock_item", + "depends_on": "is_stock_item", + "fieldname": "inventory_section", + "fieldtype": "Section Break", + "label": "Inventory", + "oldfieldtype": "Section Break", + "options": "fa fa-truck" + }, + { + "fieldname": "shelf_life_in_days", + "fieldtype": "Int", + "label": "Shelf Life In Days" + }, + { + "default": "2099-12-31", + "depends_on": "is_stock_item", + "fieldname": "end_of_life", + "fieldtype": "Date", + "label": "End of Life", + "oldfieldname": "end_of_life", + "oldfieldtype": "Date" + }, + { + "default": "Purchase", + "fieldname": "default_material_request_type", + "fieldtype": "Select", + "label": "Default Material Request Type", + "options": "Purchase\nMaterial Transfer\nMaterial Issue\nManufacture\nCustomer Provided" + }, + { + "depends_on": "is_stock_item", + "fieldname": "valuation_method", + "fieldtype": "Select", + "label": "Valuation Method", + "options": "\nFIFO\nMoving Average", + "set_only_once": 1 + }, + { + "depends_on": "is_stock_item", + "fieldname": "column_break1", + "fieldtype": "Column Break", + "oldfieldtype": "Column Break", + "width": "50%" + }, + { + "depends_on": "eval:doc.is_stock_item", + "fieldname": "warranty_period", + "fieldtype": "Data", + "label": "Warranty Period (in days)", + "oldfieldname": "warranty_period", + "oldfieldtype": "Data" + }, + { + "depends_on": "is_stock_item", + "fieldname": "weight_per_unit", + "fieldtype": "Float", + "label": "Weight Per Unit" + }, + { + "depends_on": "eval:doc.is_stock_item", + "fieldname": "weight_uom", + "fieldtype": "Link", + "ignore_user_permissions": 1, + "label": "Weight UOM", + "options": "UOM" + }, + { + "collapsible": 1, + "depends_on": "is_stock_item", + "fieldname": "reorder_section", + "fieldtype": "Section Break", + "label": "Auto re-order", + "options": "fa fa-rss" + }, + { + "description": "Will also apply for variants unless overrridden", + "fieldname": "reorder_levels", + "fieldtype": "Table", + "label": "Reorder level based on Warehouse", + "options": "Item Reorder" + }, + { + "collapsible": 1, + "fieldname": "unit_of_measure_conversion", + "fieldtype": "Section Break", + "label": "Units of Measure" + }, + { + "description": "Will also apply for variants", + "fieldname": "uoms", + "fieldtype": "Table", + "label": "UOMs", + "oldfieldname": "uom_conversion_details", + "oldfieldtype": "Table", + "options": "UOM Conversion Detail" + }, + { + "collapsible": 1, + "collapsible_depends_on": "eval:doc.has_batch_no || doc.has_serial_no || doc.is_fixed_asset", + "depends_on": "eval:doc.is_stock_item || doc.is_fixed_asset", + "fieldname": "serial_nos_and_batches", + "fieldtype": "Section Break", + "label": "Serial Nos and Batches" + }, + { + "default": "0", + "depends_on": "eval:doc.is_stock_item", + "fieldname": "has_batch_no", + "fieldtype": "Check", + "label": "Has Batch No", + "no_copy": 1, + "oldfieldname": "has_batch_no", + "oldfieldtype": "Select" + }, + { + "default": "0", + "depends_on": "has_batch_no", + "fieldname": "create_new_batch", + "fieldtype": "Check", + "label": "Automatically Create New Batch" + }, + { + "depends_on": "eval:doc.has_batch_no==1 && doc.create_new_batch==1", + "description": "Example: ABCD.#####. If series is set and Batch No is not mentioned in transactions, then automatic batch number will be created based on this series. If you always want to explicitly mention Batch No for this item, leave this blank. Note: this setting will take priority over the Naming Series Prefix in Stock Settings.", + "fieldname": "batch_number_series", + "fieldtype": "Data", + "label": "Batch Number Series", + "translatable": 1 + }, + { + "default": "0", + "depends_on": "has_batch_no", + "fieldname": "has_expiry_date", + "fieldtype": "Check", + "label": "Has Expiry Date" + }, + { + "default": "0", + "depends_on": "has_batch_no", + "fieldname": "retain_sample", + "fieldtype": "Check", + "label": "Retain Sample" + }, + { + "depends_on": "eval: (doc.retain_sample && doc.has_batch_no)", + "description": "Maximum sample quantity that can be retained", + "fieldname": "sample_quantity", + "fieldtype": "Int", + "label": "Max Sample Quantity" + }, + { + "fieldname": "column_break_37", + "fieldtype": "Column Break" + }, + { + "default": "0", + "depends_on": "eval:doc.is_stock_item || doc.is_fixed_asset", + "fieldname": "has_serial_no", + "fieldtype": "Check", + "label": "Has Serial No", + "no_copy": 1, + "oldfieldname": "has_serial_no", + "oldfieldtype": "Select" + }, + { + "depends_on": "eval:doc.is_stock_item || doc.is_fixed_asset", + "description": "Example: ABCD.#####\nIf series is set and Serial No is not mentioned in transactions, then automatic serial number will be created based on this series. If you always want to explicitly mention Serial Nos for this item. leave this blank.", + "fieldname": "serial_no_series", + "fieldtype": "Data", + "label": "Serial Number Series" + }, + { + "collapsible": 1, + "collapsible_depends_on": "attributes", + "fieldname": "variants_section", + "fieldtype": "Section Break", + "label": "Variants" + }, + { + "default": "0", + "depends_on": "eval:!doc.variant_of", + "description": "If this item has variants, then it cannot be selected in sales orders etc.", + "fieldname": "has_variants", + "fieldtype": "Check", + "in_standard_filter": 1, + "label": "Has Variants", + "no_copy": 1 + }, + { + "default": "Item Attribute", + "depends_on": "has_variants", + "fieldname": "variant_based_on", + "fieldtype": "Select", + "label": "Variant Based On", + "options": "Item Attribute\nManufacturer" + }, + { + "depends_on": "eval:(doc.has_variants || doc.variant_of) && doc.variant_based_on==='Item Attribute'", + "fieldname": "attributes", + "fieldtype": "Table", + "hidden": 1, + "label": "Attributes", + "no_copy": 1, + "options": "Item Variant Attribute" + }, + { + "fieldname": "defaults", + "fieldtype": "Section Break", + "label": "Sales, Purchase, Accounting Defaults" + }, + { + "fieldname": "item_defaults", + "fieldtype": "Table", + "label": "Item Defaults", + "options": "Item Default" + }, + { + "collapsible": 1, + "fieldname": "purchase_details", + "fieldtype": "Section Break", + "label": "Purchase, Replenishment Details", + "oldfieldtype": "Section Break", + "options": "fa fa-shopping-cart" + }, + { + "default": "1", + "fieldname": "is_purchase_item", + "fieldtype": "Check", + "label": "Is Purchase Item" + }, + { + "fieldname": "purchase_uom", + "fieldtype": "Link", + "label": "Default Purchase Unit of Measure", + "options": "UOM" + }, + { + "default": "0.00", + "depends_on": "is_stock_item", + "fieldname": "min_order_qty", + "fieldtype": "Float", + "label": "Minimum Order Qty", + "oldfieldname": "min_order_qty", + "oldfieldtype": "Currency" + }, + { + "fieldname": "safety_stock", + "fieldtype": "Float", + "label": "Safety Stock" + }, + { + "fieldname": "purchase_details_cb", + "fieldtype": "Column Break" + }, + { + "description": "Average time taken by the supplier to deliver", + "fieldname": "lead_time_days", + "fieldtype": "Int", + "label": "Lead Time in days", + "oldfieldname": "lead_time_days", + "oldfieldtype": "Int" + }, + { + "fieldname": "last_purchase_rate", + "fieldtype": "Float", + "label": "Last Purchase Rate", + "no_copy": 1, + "oldfieldname": "last_purchase_rate", + "oldfieldtype": "Currency", + "read_only": 1 + }, + { + "default": "0", + "fieldname": "is_customer_provided_item", + "fieldtype": "Check", + "label": "Is Customer Provided Item" + }, + { + "depends_on": "eval:doc.is_customer_provided_item==1", + "fieldname": "customer", + "fieldtype": "Link", + "label": "Customer", + "options": "Customer" + }, + { + "collapsible": 1, + "fieldname": "supplier_details", + "fieldtype": "Section Break", + "label": "Supplier Details" + }, + { + "default": "0", + "fieldname": "delivered_by_supplier", + "fieldtype": "Check", + "label": "Delivered by Supplier (Drop Ship)", + "print_hide": 1 + }, + { + "fieldname": "column_break2", + "fieldtype": "Column Break", + "oldfieldtype": "Column Break", + "width": "50%" + }, + { + "fieldname": "supplier_items", + "fieldtype": "Table", + "label": "Supplier Items", + "options": "Item Supplier" + }, + { + "collapsible": 1, + "fieldname": "foreign_trade_details", + "fieldtype": "Section Break", + "label": "Foreign Trade Details" + }, + { + "fieldname": "country_of_origin", + "fieldtype": "Link", + "label": "Country of Origin", + "options": "Country" + }, + { + "fieldname": "column_break_59", + "fieldtype": "Column Break" + }, + { + "fieldname": "customs_tariff_number", + "fieldtype": "Link", + "label": "Customs Tariff Number", + "options": "Customs Tariff Number" + }, + { + "collapsible": 1, + "fieldname": "sales_details", + "fieldtype": "Section Break", + "label": "Sales Details", + "oldfieldtype": "Section Break", + "options": "fa fa-tag" + }, + { + "fieldname": "sales_uom", + "fieldtype": "Link", + "label": "Default Sales Unit of Measure", + "options": "UOM" + }, + { + "default": "1", + "fieldname": "is_sales_item", + "fieldtype": "Check", + "label": "Is Sales Item" + }, + { + "fieldname": "column_break3", + "fieldtype": "Column Break", + "oldfieldtype": "Column Break", + "width": "50%" + }, + { + "fieldname": "max_discount", + "fieldtype": "Float", + "label": "Max Discount (%)", + "oldfieldname": "max_discount", + "oldfieldtype": "Currency" + }, + { + "collapsible": 1, + "fieldname": "deferred_revenue", + "fieldtype": "Section Break", + "label": "Deferred Revenue" + }, + { + "depends_on": "enable_deferred_revenue", + "fieldname": "deferred_revenue_account", + "fieldtype": "Link", + "ignore_user_permissions": 1, + "label": "Deferred Revenue Account", + "options": "Account" + }, + { + "default": "0", + "fieldname": "enable_deferred_revenue", + "fieldtype": "Check", + "label": "Enable Deferred Revenue" + }, + { + "fieldname": "column_break_85", + "fieldtype": "Column Break" + }, + { + "depends_on": "enable_deferred_revenue", + "fieldname": "no_of_months", + "fieldtype": "Int", + "label": "No of Months" + }, + { + "collapsible": 1, + "fieldname": "deferred_expense_section", + "fieldtype": "Section Break", + "label": "Deferred Expense" + }, + { + "depends_on": "enable_deferred_expense", + "fieldname": "deferred_expense_account", + "fieldtype": "Link", + "ignore_user_permissions": 1, + "label": "Deferred Expense Account", + "options": "Account" + }, + { + "default": "0", + "fieldname": "enable_deferred_expense", + "fieldtype": "Check", + "label": "Enable Deferred Expense" + }, + { + "fieldname": "column_break_88", + "fieldtype": "Column Break" + }, + { + "depends_on": "enable_deferred_expense", + "fieldname": "no_of_months_exp", + "fieldtype": "Int", + "label": "No of Months" + }, + { + "collapsible": 1, + "fieldname": "customer_details", + "fieldtype": "Section Break", + "label": "Customer Details" + }, + { + "fieldname": "customer_items", + "fieldtype": "Table", + "label": "Customer Items", + "options": "Item Customer Detail" + }, + { + "collapsible": 1, + "collapsible_depends_on": "taxes", + "fieldname": "item_tax_section_break", + "fieldtype": "Section Break", + "label": "Item Tax", + "oldfieldtype": "Section Break", + "options": "fa fa-money" + }, + { + "description": "Will also apply for variants", + "fieldname": "taxes", + "fieldtype": "Table", + "label": "Taxes", + "oldfieldname": "item_tax", + "oldfieldtype": "Table", + "options": "Item Tax" + }, + { + "collapsible": 1, + "fieldname": "inspection_criteria", + "fieldtype": "Section Break", + "label": "Inspection Criteria", + "oldfieldtype": "Section Break", + "options": "fa fa-search" + }, + { + "default": "0", + "fieldname": "inspection_required_before_purchase", + "fieldtype": "Check", + "label": "Inspection Required before Purchase", + "oldfieldname": "inspection_required", + "oldfieldtype": "Select" + }, + { + "default": "0", + "fieldname": "inspection_required_before_delivery", + "fieldtype": "Check", + "label": "Inspection Required before Delivery" + }, + { + "depends_on": "eval:(doc.inspection_required_before_purchase || doc.inspection_required_before_delivery)", + "fieldname": "quality_inspection_template", + "fieldtype": "Link", + "label": "Quality Inspection Template", + "options": "Quality Inspection Template", + "print_hide": 1 + }, + { + "collapsible": 1, + "depends_on": "is_stock_item", + "fieldname": "manufacturing", + "fieldtype": "Section Break", + "label": "Manufacturing", + "oldfieldtype": "Section Break", + "options": "fa fa-cogs" + }, + { + "fieldname": "default_bom", + "fieldtype": "Link", + "ignore_user_permissions": 1, + "label": "Default BOM", + "no_copy": 1, + "oldfieldname": "default_bom", + "oldfieldtype": "Link", + "options": "BOM", + "read_only": 1 + }, + { + "default": "0", + "description": "If subcontracted to a vendor", + "fieldname": "is_sub_contracted_item", + "fieldtype": "Check", + "label": "Supply Raw Materials for Purchase", + "oldfieldname": "is_sub_contracted_item", + "oldfieldtype": "Select" + }, + { + "fieldname": "column_break_74", + "fieldtype": "Column Break" + }, + { + "fieldname": "customer_code", + "fieldtype": "Data", + "hidden": 1, + "label": "Customer Code", + "no_copy": 1, + "print_hide": 1 + }, + { + "collapsible": 1, + "fieldname": "website_section", + "fieldtype": "Section Break", + "label": "Website", + "options": "fa fa-globe" + }, + { + "default": "0", + "depends_on": "eval:!doc.variant_of", + "fieldname": "show_in_website", + "fieldtype": "Check", + "label": "Show in Website", + "search_index": 1 + }, + { + "default": "0", + "depends_on": "variant_of", + "fieldname": "show_variant_in_website", + "fieldtype": "Check", + "label": "Show in Website (Variant)", + "search_index": 1 + }, + { + "depends_on": "eval: doc.show_in_website || doc.show_variant_in_website", + "fieldname": "route", + "fieldtype": "Small Text", + "label": "Route", + "no_copy": 1 + }, + { + "depends_on": "eval: doc.show_in_website || doc.show_variant_in_website", + "description": "Items with higher weightage will be shown higher", + "fieldname": "weightage", + "fieldtype": "Int", + "label": "Weightage" + }, + { + "depends_on": "eval: doc.show_in_website || doc.show_variant_in_website", + "description": "Show a slideshow at the top of the page", + "fieldname": "slideshow", + "fieldtype": "Link", + "label": "Slideshow", + "options": "Website Slideshow" + }, + { + "depends_on": "eval: doc.show_in_website || doc.show_variant_in_website", + "description": "Item Image (if not slideshow)", + "fieldname": "website_image", + "fieldtype": "Attach", + "label": "Image" + }, + { + "fieldname": "thumbnail", + "fieldtype": "Data", + "label": "Thumbnail", + "read_only": 1 + }, + { + "fieldname": "cb72", + "fieldtype": "Column Break" + }, + { + "depends_on": "eval: doc.show_in_website || doc.show_variant_in_website", + "description": "Show \"In Stock\" or \"Not in Stock\" based on stock available in this warehouse.", + "fieldname": "website_warehouse", + "fieldtype": "Link", + "ignore_user_permissions": 1, + "label": "Website Warehouse", + "options": "Warehouse" + }, + { + "depends_on": "eval: doc.show_in_website || doc.show_variant_in_website", + "description": "List this Item in multiple groups on the website.", + "fieldname": "website_item_groups", + "fieldtype": "Table", + "label": "Website Item Groups", + "options": "Website Item Group" + }, + { + "depends_on": "eval: doc.show_in_website || doc.show_variant_in_website", + "fieldname": "set_meta_tags", + "fieldtype": "Button", + "label": "Set Meta Tags" + }, + { + "collapsible": 1, + "collapsible_depends_on": "website_specifications", + "depends_on": "eval: doc.show_in_website || doc.show_variant_in_website", + "fieldname": "sb72", + "fieldtype": "Section Break", + "label": "Website Specifications" + }, + { + "depends_on": "eval: doc.show_in_website || doc.show_variant_in_website", + "fieldname": "copy_from_item_group", + "fieldtype": "Button", + "label": "Copy From Item Group" + }, + { + "depends_on": "eval: doc.show_in_website || doc.show_variant_in_website", + "fieldname": "website_specifications", + "fieldtype": "Table", + "label": "Website Specifications", + "options": "Item Website Specification" + }, + { + "depends_on": "eval: doc.show_in_website || doc.show_variant_in_website", + "fieldname": "web_long_description", + "fieldtype": "Text Editor", + "label": "Website Description" + }, + { + "description": "You can use any valid Bootstrap 4 markup in this field. It will be shown on your Item Page.", + "fieldname": "website_content", + "fieldtype": "HTML Editor", + "label": "Website Content" + }, + { + "fieldname": "total_projected_qty", + "fieldtype": "Float", + "hidden": 1, + "label": "Total Projected Qty", + "print_hide": 1, + "read_only": 1 + }, + { + "depends_on": "eval:(!doc.is_item_from_hub)", + "fieldname": "hub_publishing_sb", + "fieldtype": "Section Break", + "label": "Hub Publishing Details" + }, + { + "default": "0", + "description": "Publish Item to hub.erpnext.com", + "fieldname": "publish_in_hub", + "fieldtype": "Check", + "label": "Publish in Hub" + }, + { + "fieldname": "hub_category_to_publish", + "fieldtype": "Data", + "label": "Hub Category to Publish", + "read_only": 1 + }, + { + "description": "Publish \"In Stock\" or \"Not in Stock\" on Hub based on stock available in this warehouse.", + "fieldname": "hub_warehouse", + "fieldtype": "Link", + "ignore_user_permissions": 1, + "label": "Hub Warehouse", + "options": "Warehouse" + }, + { + "default": "0", + "fieldname": "synced_with_hub", + "fieldtype": "Check", + "label": "Synced With Hub", + "read_only": 1 + }, + { + "fieldname": "manufacturers", + "fieldtype": "Table", + "label": "Manufacturers", + "options": "Item Manufacturer" + } + ], + "has_web_view": 1, + "icon": "fa fa-tag", + "idx": 2, + "image_field": "image", + "max_attachments": 1, + "modified": "2019-06-02 04:45:59.911507", + "modified_by": "Administrator", + "module": "Stock", + "name": "Item", + "owner": "Administrator", + "permissions": [ + { + "create": 1, + "delete": 1, + "email": 1, + "export": 1, + "import": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "Item Manager", + "share": 1, + "write": 1 + }, + { + "email": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "Stock Manager" + }, + { + "email": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "Stock User" + }, + { + "read": 1, + "role": "Sales User" + }, + { + "read": 1, + "role": "Purchase User" + }, + { + "read": 1, + "role": "Maintenance User" + }, + { + "read": 1, + "role": "Accounts User" + }, + { + "read": 1, + "role": "Manufacturing User" + } + ], + "quick_entry": 1, + "search_fields": "item_name,description,item_group,customer_code", + "show_name_in_global_search": 1, + "show_preview_popup": 1, + "sort_field": "idx desc,modified desc", + "sort_order": "DESC", + "title_field": "item_name", + "track_changes": 1 + } \ No newline at end of file diff --git a/erpnext/stock/doctype/packing_slip/packing_slip.json b/erpnext/stock/doctype/packing_slip/packing_slip.json index 2ed25d0096..0ed039a391 100644 --- a/erpnext/stock/doctype/packing_slip/packing_slip.json +++ b/erpnext/stock/doctype/packing_slip/packing_slip.json @@ -1,264 +1,264 @@ { - "allow_import": 1, - "autoname": "MAT-PAC-.YYYY.-.#####", - "creation": "2013-04-11 15:32:24", - "description": "Generate packing slips for packages to be delivered. Used to notify package number, package contents and its weight.", - "doctype": "DocType", - "document_type": "Document", - "engine": "InnoDB", - "field_order": [ - "packing_slip_details", - "column_break0", - "delivery_note", - "column_break1", - "naming_series", - "section_break0", - "column_break2", - "from_case_no", - "column_break3", - "to_case_no", - "package_item_details", - "get_items", - "items", - "package_weight_details", - "net_weight_pkg", - "net_weight_uom", - "column_break4", - "gross_weight_pkg", - "gross_weight_uom", - "letter_head_details", - "letter_head", - "misc_details", - "amended_from" - ], - "fields": [ - { - "fieldname": "packing_slip_details", - "fieldtype": "Section Break" - }, - { - "fieldname": "column_break0", - "fieldtype": "Column Break" - }, - { - "description": "Indicates that the package is a part of this delivery (Only Draft)", - "fieldname": "delivery_note", - "fieldtype": "Link", - "in_global_search": 1, - "in_list_view": 1, - "label": "Delivery Note", - "options": "Delivery Note", - "reqd": 1 - }, - { - "fieldname": "column_break1", - "fieldtype": "Column Break" - }, - { - "fieldname": "naming_series", - "fieldtype": "Select", - "label": "Series", - "options": "MAT-PAC-.YYYY.-", - "print_hide": 1, - "reqd": 1, - "set_only_once": 1 - }, - { - "fieldname": "section_break0", - "fieldtype": "Section Break" - }, - { - "fieldname": "column_break2", - "fieldtype": "Column Break" - }, - { - "description": "Identification of the package for the delivery (for print)", - "fieldname": "from_case_no", - "fieldtype": "Data", - "in_list_view": 1, - "label": "From Package No.", - "no_copy": 1, - "reqd": 1, - "width": "50px" - }, - { - "fieldname": "column_break3", - "fieldtype": "Column Break" - }, - { - "description": "If more than one package of the same type (for print)", - "fieldname": "to_case_no", - "fieldtype": "Data", - "in_list_view": 1, - "label": "To Package No.", - "no_copy": 1, - "width": "50px" - }, - { - "fieldname": "package_item_details", - "fieldtype": "Section Break" - }, - { - "fieldname": "get_items", - "fieldtype": "Button", - "label": "Get Items" - }, - { - "fieldname": "items", - "fieldtype": "Table", - "label": "Items", - "options": "Packing Slip Item", - "reqd": 1 - }, - { - "fieldname": "package_weight_details", - "fieldtype": "Section Break", - "label": "Package Weight Details" - }, - { - "description": "The net weight of this package. (calculated automatically as sum of net weight of items)", - "fieldname": "net_weight_pkg", - "fieldtype": "Float", - "label": "Net Weight", - "no_copy": 1, - "read_only": 1 - }, - { - "fieldname": "net_weight_uom", - "fieldtype": "Link", - "label": "Net Weight UOM", - "no_copy": 1, - "options": "UOM", - "read_only": 1 - }, - { - "fieldname": "column_break4", - "fieldtype": "Column Break" - }, - { - "description": "The gross weight of the package. Usually net weight + packaging material weight. (for print)", - "fieldname": "gross_weight_pkg", - "fieldtype": "Float", - "label": "Gross Weight", - "no_copy": 1 - }, - { - "fieldname": "gross_weight_uom", - "fieldtype": "Link", - "label": "Gross Weight UOM", - "no_copy": 1, - "options": "UOM" - }, - { - "fieldname": "letter_head_details", - "fieldtype": "Section Break", - "label": "Letter Head" - }, - { - "allow_on_submit": 1, - "fieldname": "letter_head", - "fieldtype": "Link", - "label": "Letter Head", - "options": "Letter Head", - "print_hide": 1 - }, - { - "fieldname": "misc_details", - "fieldtype": "Section Break" - }, - { - "fieldname": "amended_from", - "fieldtype": "Link", - "ignore_user_permissions": 1, - "label": "Amended From", - "no_copy": 1, - "options": "Packing Slip", - "print_hide": 1, - "read_only": 1 - } - ], - "icon": "fa fa-suitcase", - "idx": 1, - "is_submittable": 1, - "modified": "2019-05-31 04:45:08.082862", - "modified_by": "Administrator", - "module": "Stock", - "name": "Packing Slip", - "owner": "Administrator", - "permissions": [ - { - "amend": 1, - "cancel": 1, - "create": 1, - "delete": 1, - "email": 1, - "print": 1, - "read": 1, - "report": 1, - "role": "Stock User", - "share": 1, - "submit": 1, - "write": 1 - }, - { - "amend": 1, - "cancel": 1, - "create": 1, - "delete": 1, - "email": 1, - "print": 1, - "read": 1, - "report": 1, - "role": "Sales User", - "share": 1, - "submit": 1, - "write": 1 - }, - { - "amend": 1, - "cancel": 1, - "create": 1, - "delete": 1, - "email": 1, - "print": 1, - "read": 1, - "report": 1, - "role": "Item Manager", - "share": 1, - "submit": 1, - "write": 1 - }, - { - "amend": 1, - "cancel": 1, - "create": 1, - "delete": 1, - "email": 1, - "print": 1, - "read": 1, - "report": 1, - "role": "Stock Manager", - "share": 1, - "submit": 1, - "write": 1 - }, - { - "amend": 1, - "cancel": 1, - "create": 1, - "delete": 1, - "email": 1, - "print": 1, - "read": 1, - "report": 1, - "role": "Sales Manager", - "share": 1, - "submit": 1, - "write": 1 - } - ], - "search_fields": "delivery_note", - "show_name_in_global_search": 1, - "sort_field": "modified", - "sort_order": "DESC" -} \ No newline at end of file + "allow_import": 1, + "autoname": "MAT-PAC-.YYYY.-.#####", + "creation": "2013-04-11 15:32:24", + "description": "Generate packing slips for packages to be delivered. Used to notify package number, package contents and its weight.", + "doctype": "DocType", + "document_type": "Document", + "engine": "InnoDB", + "field_order": [ + "packing_slip_details", + "column_break0", + "delivery_note", + "column_break1", + "naming_series", + "section_break0", + "column_break2", + "from_case_no", + "column_break3", + "to_case_no", + "package_item_details", + "get_items", + "items", + "package_weight_details", + "net_weight_pkg", + "net_weight_uom", + "column_break4", + "gross_weight_pkg", + "gross_weight_uom", + "letter_head_details", + "letter_head", + "misc_details", + "amended_from" + ], + "fields": [ + { + "fieldname": "packing_slip_details", + "fieldtype": "Section Break" + }, + { + "fieldname": "column_break0", + "fieldtype": "Column Break" + }, + { + "description": "Indicates that the package is a part of this delivery (Only Draft)", + "fieldname": "delivery_note", + "fieldtype": "Link", + "in_global_search": 1, + "in_list_view": 1, + "label": "Delivery Note", + "options": "Delivery Note", + "reqd": 1 + }, + { + "fieldname": "column_break1", + "fieldtype": "Column Break" + }, + { + "fieldname": "naming_series", + "fieldtype": "Select", + "label": "Series", + "options": "MAT-PAC-.YYYY.-", + "print_hide": 1, + "reqd": 1, + "set_only_once": 1 + }, + { + "fieldname": "section_break0", + "fieldtype": "Section Break" + }, + { + "fieldname": "column_break2", + "fieldtype": "Column Break" + }, + { + "description": "Identification of the package for the delivery (for print)", + "fieldname": "from_case_no", + "fieldtype": "Data", + "in_list_view": 1, + "label": "From Package No.", + "no_copy": 1, + "reqd": 1, + "width": "50px" + }, + { + "fieldname": "column_break3", + "fieldtype": "Column Break" + }, + { + "description": "If more than one package of the same type (for print)", + "fieldname": "to_case_no", + "fieldtype": "Data", + "in_list_view": 1, + "label": "To Package No.", + "no_copy": 1, + "width": "50px" + }, + { + "fieldname": "package_item_details", + "fieldtype": "Section Break" + }, + { + "fieldname": "get_items", + "fieldtype": "Button", + "label": "Get Items" + }, + { + "fieldname": "items", + "fieldtype": "Table", + "label": "Items", + "options": "Packing Slip Item", + "reqd": 1 + }, + { + "fieldname": "package_weight_details", + "fieldtype": "Section Break", + "label": "Package Weight Details" + }, + { + "description": "The net weight of this package. (calculated automatically as sum of net weight of items)", + "fieldname": "net_weight_pkg", + "fieldtype": "Float", + "label": "Net Weight", + "no_copy": 1, + "read_only": 1 + }, + { + "fieldname": "net_weight_uom", + "fieldtype": "Link", + "label": "Net Weight UOM", + "no_copy": 1, + "options": "UOM", + "read_only": 1 + }, + { + "fieldname": "column_break4", + "fieldtype": "Column Break" + }, + { + "description": "The gross weight of the package. Usually net weight + packaging material weight. (for print)", + "fieldname": "gross_weight_pkg", + "fieldtype": "Float", + "label": "Gross Weight", + "no_copy": 1 + }, + { + "fieldname": "gross_weight_uom", + "fieldtype": "Link", + "label": "Gross Weight UOM", + "no_copy": 1, + "options": "UOM" + }, + { + "fieldname": "letter_head_details", + "fieldtype": "Section Break", + "label": "Letter Head" + }, + { + "allow_on_submit": 1, + "fieldname": "letter_head", + "fieldtype": "Link", + "label": "Letter Head", + "options": "Letter Head", + "print_hide": 1 + }, + { + "fieldname": "misc_details", + "fieldtype": "Section Break" + }, + { + "fieldname": "amended_from", + "fieldtype": "Link", + "ignore_user_permissions": 1, + "label": "Amended From", + "no_copy": 1, + "options": "Packing Slip", + "print_hide": 1, + "read_only": 1 + } + ], + "icon": "fa fa-suitcase", + "idx": 1, + "is_submittable": 1, + "modified": "2019-05-31 04:45:08.082862", + "modified_by": "Administrator", + "module": "Stock", + "name": "Packing Slip", + "owner": "Administrator", + "permissions": [ + { + "amend": 1, + "cancel": 1, + "create": 1, + "delete": 1, + "email": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "Stock User", + "share": 1, + "submit": 1, + "write": 1 + }, + { + "amend": 1, + "cancel": 1, + "create": 1, + "delete": 1, + "email": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "Sales User", + "share": 1, + "submit": 1, + "write": 1 + }, + { + "amend": 1, + "cancel": 1, + "create": 1, + "delete": 1, + "email": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "Item Manager", + "share": 1, + "submit": 1, + "write": 1 + }, + { + "amend": 1, + "cancel": 1, + "create": 1, + "delete": 1, + "email": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "Stock Manager", + "share": 1, + "submit": 1, + "write": 1 + }, + { + "amend": 1, + "cancel": 1, + "create": 1, + "delete": 1, + "email": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "Sales Manager", + "share": 1, + "submit": 1, + "write": 1 + } + ], + "search_fields": "delivery_note", + "show_name_in_global_search": 1, + "sort_field": "modified", + "sort_order": "DESC" + } \ No newline at end of file diff --git a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py index cdca44d60b..67cd7f8678 100644 --- a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py +++ b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py @@ -51,15 +51,6 @@ class PurchaseReceipt(BuyingController): 'target_ref_field': 'qty', 'source_field': 'qty', 'percent_join_field': 'material_request' - }, - { - 'source_dt': 'Purchase Receipt Item', - 'target_dt': 'Purchase Order Item', - 'join_field': 'purchase_order_item', - 'target_field': 'returned_qty', - 'target_parent_dt': 'Purchase Order', - 'source_field': '-1 * qty', - 'extra_cond': """ and exists (select name from `tabPurchase Receipt` where name=`tabPurchase Receipt Item`.parent and is_return=1)""" }] if cint(self.is_return): self.status_updater.append({ @@ -445,6 +436,7 @@ def make_purchase_invoice(source_name, target_doc=None): doc = frappe.get_doc(target) doc.ignore_pricing_rule = 1 + doc.run_method("onload") doc.run_method("set_missing_values") doc.run_method("calculate_taxes_and_totals") diff --git a/erpnext/stock/doctype/purchase_receipt_item/purchase_receipt_item.json b/erpnext/stock/doctype/purchase_receipt_item/purchase_receipt_item.json index bb5cd52002..70b62b06a1 100644 --- a/erpnext/stock/doctype/purchase_receipt_item/purchase_receipt_item.json +++ b/erpnext/stock/doctype/purchase_receipt_item/purchase_receipt_item.json @@ -1,830 +1,830 @@ { - "autoname": "hash", - "creation": "2013-05-24 19:29:10", - "doctype": "DocType", - "document_type": "Document", - "editable_grid": 1, - "engine": "InnoDB", - "field_order": [ - "barcode", - "section_break_2", - "item_code", - "supplier_part_no", - "column_break_2", - "item_name", - "section_break_4", - "description", - "item_group", - "brand", - "image_section", - "image", - "image_view", - "manufacture_details", - "manufacturer", - "column_break_16", - "manufacturer_part_no", - "received_and_accepted", - "received_qty", - "qty", - "rejected_qty", - "col_break2", - "uom", - "stock_uom", - "conversion_factor", - "retain_sample", - "sample_quantity", - "rate_and_amount", - "price_list_rate", - "discount_percentage", - "discount_amount", - "col_break3", - "base_price_list_rate", - "sec_break1", - "rate", - "amount", - "col_break4", - "base_rate", - "base_amount", - "pricing_rules", - "is_free_item", - "section_break_29", - "net_rate", - "net_amount", - "item_tax_template", - "column_break_32", - "base_net_rate", - "base_net_amount", - "valuation_rate", - "item_tax_amount", - "rm_supp_cost", - "landed_cost_voucher_amount", - "billed_amt", - "item_weight_details", - "weight_per_unit", - "total_weight", - "column_break_41", - "weight_uom", - "warehouse_and_reference", - "warehouse", - "rejected_warehouse", - "quality_inspection", - "purchase_order", - "material_request", - "purchase_order_item", - "material_request_item", - "column_break_40", - "is_fixed_asset", - "asset", - "asset_location", - "schedule_date", - "stock_qty", - "section_break_45", - "serial_no", - "batch_no", - "column_break_48", - "rejected_serial_no", - "expense_account", - "col_break5", - "allow_zero_valuation_rate", - "bom", - "include_exploded_items", - "item_tax_rate", - "accounting_dimensions_section", - "project", - "dimension_col_break", - "cost_center", - "section_break_80", - "page_break" - ], - "fields": [ - { - "fieldname": "barcode", - "fieldtype": "Data", - "label": "Barcode" - }, - { - "fieldname": "section_break_2", - "fieldtype": "Section Break" - }, - { - "bold": 1, - "columns": 3, - "fieldname": "item_code", - "fieldtype": "Link", - "in_global_search": 1, - "in_list_view": 1, - "label": "Item Code", - "oldfieldname": "item_code", - "oldfieldtype": "Link", - "options": "Item", - "print_width": "100px", - "reqd": 1, - "search_index": 1, - "width": "100px" - }, - { - "fieldname": "supplier_part_no", - "fieldtype": "Data", - "hidden": 1, - "label": "Supplier Part Number", - "read_only": 1 - }, - { - "fieldname": "column_break_2", - "fieldtype": "Column Break" - }, - { - "fieldname": "item_name", - "fieldtype": "Data", - "in_global_search": 1, - "label": "Item Name", - "oldfieldname": "item_name", - "oldfieldtype": "Data", - "print_hide": 1, - "reqd": 1 - }, - { - "collapsible": 1, - "fieldname": "section_break_4", - "fieldtype": "Section Break", - "label": "Description" - }, - { - "fieldname": "description", - "fieldtype": "Text Editor", - "label": "Description", - "oldfieldname": "description", - "oldfieldtype": "Text", - "print_width": "300px", - "reqd": 1, - "width": "300px" - }, - { - "fieldname": "image", - "fieldtype": "Attach", - "hidden": 1, - "label": "Image" - }, - { - "fieldname": "image_view", - "fieldtype": "Image", - "label": "Image View", - "options": "image", - "print_hide": 1 - }, - { - "fieldname": "received_and_accepted", - "fieldtype": "Section Break", - "label": "Received and Accepted" - }, - { - "bold": 1, - "fieldname": "received_qty", - "fieldtype": "Float", - "label": "Received Quantity", - "oldfieldname": "received_qty", - "oldfieldtype": "Currency", - "print_hide": 1, - "print_width": "100px", - "reqd": 1, - "width": "100px" - }, - { - "columns": 2, - "fieldname": "qty", - "fieldtype": "Float", - "in_list_view": 1, - "label": "Accepted Quantity", - "oldfieldname": "qty", - "oldfieldtype": "Currency", - "print_width": "100px", - "width": "100px" - }, - { - "fieldname": "rejected_qty", - "fieldtype": "Float", - "label": "Rejected Quantity", - "oldfieldname": "rejected_qty", - "oldfieldtype": "Currency", - "print_hide": 1, - "print_width": "100px", - "width": "100px" - }, - { - "fieldname": "col_break2", - "fieldtype": "Column Break", - "print_hide": 1 - }, - { - "fieldname": "uom", - "fieldtype": "Link", - "label": "UOM", - "oldfieldname": "uom", - "oldfieldtype": "Link", - "options": "UOM", - "print_hide": 1, - "print_width": "100px", - "reqd": 1, - "width": "100px" - }, - { - "fieldname": "stock_uom", - "fieldtype": "Link", - "label": "Stock UOM", - "oldfieldname": "stock_uom", - "oldfieldtype": "Data", - "options": "UOM", - "print_hide": 1, - "print_width": "100px", - "read_only": 1, - "reqd": 1, - "width": "100px" - }, - { - "fieldname": "conversion_factor", - "fieldtype": "Float", - "label": "Conversion Factor", - "oldfieldname": "conversion_factor", - "oldfieldtype": "Currency", - "print_hide": 1, - "print_width": "100px", - "reqd": 1, - "width": "100px" - }, - { - "default": "0", - "fetch_from": "item_code.retain_sample", - "fieldname": "retain_sample", - "fieldtype": "Check", - "label": "Retain Sample", - "read_only": 1 - }, - { - "depends_on": "retain_sample", - "fetch_from": "item_code.sample_quantity", - "fieldname": "sample_quantity", - "fieldtype": "Int", - "label": "Sample Quantity" - }, - { - "fieldname": "rate_and_amount", - "fieldtype": "Section Break", - "label": "Rate and Amount" - }, - { - "fieldname": "price_list_rate", - "fieldtype": "Currency", - "label": "Price List Rate", - "options": "currency", - "print_hide": 1 - }, - { - "depends_on": "price_list_rate", - "fieldname": "discount_percentage", - "fieldtype": "Percent", - "label": "Discount on Price List Rate (%)", - "print_hide": 1 - }, - { - "depends_on": "price_list_rate", - "fieldname": "discount_amount", - "fieldtype": "Currency", - "label": "Discount Amount", - "options": "currency" - }, - { - "fieldname": "col_break3", - "fieldtype": "Column Break" - }, - { - "fieldname": "base_price_list_rate", - "fieldtype": "Currency", - "label": "Price List Rate (Company Currency)", - "options": "Company:company:default_currency", - "print_hide": 1, - "read_only": 1 - }, - { - "fieldname": "sec_break1", - "fieldtype": "Section Break" - }, - { - "bold": 1, - "columns": 3, - "fieldname": "rate", - "fieldtype": "Currency", - "in_list_view": 1, - "label": "Rate", - "oldfieldname": "import_rate", - "oldfieldtype": "Currency", - "options": "currency", - "print_width": "100px", - "width": "100px" - }, - { - "fieldname": "amount", - "fieldtype": "Currency", - "in_list_view": 1, - "label": "Amount", - "oldfieldname": "import_amount", - "oldfieldtype": "Currency", - "options": "currency", - "read_only": 1 - }, - { - "fieldname": "col_break4", - "fieldtype": "Column Break" - }, - { - "fieldname": "base_rate", - "fieldtype": "Currency", - "label": "Rate (Company Currency)", - "oldfieldname": "purchase_rate", - "oldfieldtype": "Currency", - "options": "Company:company:default_currency", - "print_hide": 1, - "print_width": "100px", - "read_only": 1, - "reqd": 1, - "width": "100px" - }, - { - "fieldname": "base_amount", - "fieldtype": "Currency", - "label": "Amount (Company Currency)", - "oldfieldname": "amount", - "oldfieldtype": "Currency", - "options": "Company:company:default_currency", - "print_hide": 1, - "print_width": "100px", - "read_only": 1, - "width": "100px" - }, - { - "fieldname": "pricing_rules", - "fieldtype": "Small Text", - "hidden": 1, - "label": "Pricing Rules", - "print_hide": 1, - "read_only": 1 - }, - { - "default": "0", - "fieldname": "is_free_item", - "fieldtype": "Check", - "label": "Is Free Item", - "print_hide": 1, - "read_only": 1 - }, - { - "fieldname": "section_break_29", - "fieldtype": "Section Break" - }, - { - "fieldname": "net_rate", - "fieldtype": "Currency", - "label": "Net Rate", - "options": "currency", - "print_hide": 1, - "read_only": 1 - }, - { - "columns": 2, - "fieldname": "net_amount", - "fieldtype": "Currency", - "in_list_view": 1, - "label": "Net Amount", - "options": "currency", - "print_hide": 1, - "read_only": 1 - }, - { - "fieldname": "column_break_32", - "fieldtype": "Column Break" - }, - { - "fieldname": "base_net_rate", - "fieldtype": "Currency", - "label": "Net Rate (Company Currency)", - "options": "Company:company:default_currency", - "print_hide": 1, - "read_only": 1 - }, - { - "fieldname": "base_net_amount", - "fieldtype": "Currency", - "label": "Net Amount (Company Currency)", - "options": "Company:company:default_currency", - "print_hide": 1, - "read_only": 1 - }, - { - "collapsible": 1, - "fieldname": "item_weight_details", - "fieldtype": "Section Break", - "label": "Item Weight Details" - }, - { - "fieldname": "weight_per_unit", - "fieldtype": "Float", - "label": "Weight Per Unit" - }, - { - "fieldname": "total_weight", - "fieldtype": "Float", - "label": "Total Weight", - "read_only": 1 - }, - { - "fieldname": "column_break_41", - "fieldtype": "Column Break" - }, - { - "fieldname": "weight_uom", - "fieldtype": "Link", - "label": "Weight UOM", - "options": "UOM" - }, - { - "fieldname": "warehouse_and_reference", - "fieldtype": "Section Break", - "label": "Warehouse and Reference" - }, - { - "bold": 1, - "fieldname": "warehouse", - "fieldtype": "Link", - "in_list_view": 1, - "label": "Accepted Warehouse", - "oldfieldname": "warehouse", - "oldfieldtype": "Link", - "options": "Warehouse", - "print_hide": 1, - "print_width": "100px", - "width": "100px" - }, - { - "fieldname": "rejected_warehouse", - "fieldtype": "Link", - "label": "Rejected Warehouse", - "no_copy": 1, - "oldfieldname": "rejected_warehouse", - "oldfieldtype": "Link", - "options": "Warehouse", - "print_hide": 1, - "print_width": "100px", - "width": "100px" - }, - { - "depends_on": "eval:!doc.__islocal", - "fieldname": "quality_inspection", - "fieldtype": "Link", - "label": "Quality Inspection", - "no_copy": 1, - "oldfieldname": "qa_no", - "oldfieldtype": "Link", - "options": "Quality Inspection", - "print_hide": 1 - }, - { - "fieldname": "column_break_40", - "fieldtype": "Column Break" - }, - { - "default": "0", - "fieldname": "is_fixed_asset", - "fieldtype": "Check", - "hidden": 1, - "label": "Is Fixed Asset", - "no_copy": 1, - "print_hide": 1, - "read_only": 1 - }, - { - "depends_on": "is_fixed_asset", - "fieldname": "asset", - "fieldtype": "Link", - "label": "Asset", - "no_copy": 1, - "options": "Asset" - }, - { - "depends_on": "is_fixed_asset", - "fieldname": "asset_location", - "fieldtype": "Link", - "label": "Asset Location", - "options": "Location" - }, - { - "fieldname": "purchase_order", - "fieldtype": "Link", - "label": "Purchase Order", - "no_copy": 1, - "oldfieldname": "prevdoc_docname", - "oldfieldtype": "Link", - "options": "Purchase Order", - "print_hide": 1, - "print_width": "150px", - "read_only": 1, - "search_index": 1, - "width": "150px" - }, - { - "fieldname": "schedule_date", - "fieldtype": "Date", - "label": "Required By", - "oldfieldname": "schedule_date", - "oldfieldtype": "Date", - "print_hide": 1, - "read_only": 1 - }, - { - "fieldname": "stock_qty", - "fieldtype": "Float", - "label": "Qty as per Stock UOM", - "oldfieldname": "stock_qty", - "oldfieldtype": "Currency", - "print_hide": 1, - "print_width": "100px", - "read_only": 1, - "width": "100px" - }, - { - "fieldname": "section_break_45", - "fieldtype": "Section Break" - }, - { - "fieldname": "serial_no", - "fieldtype": "Small Text", - "in_list_view": 1, - "label": "Serial No", - "no_copy": 1, - "oldfieldname": "serial_no", - "oldfieldtype": "Text" - }, - { - "fieldname": "batch_no", - "fieldtype": "Link", - "in_list_view": 1, - "label": "Batch No", - "no_copy": 1, - "oldfieldname": "batch_no", - "oldfieldtype": "Link", - "options": "Batch", - "print_hide": 1 - }, - { - "fieldname": "column_break_48", - "fieldtype": "Column Break" - }, - { - "fieldname": "rejected_serial_no", - "fieldtype": "Small Text", - "label": "Rejected Serial No", - "no_copy": 1, - "print_hide": 1 - }, - { - "fieldname": "item_tax_template", - "fieldtype": "Link", - "label": "Item Tax Template", - "options": "Item Tax Template", - "print_hide": 1 - }, - { - "fieldname": "project", - "fieldtype": "Link", - "label": "Project", - "options": "Project", - "print_hide": 1 - }, - { - "default": ":Company", - "depends_on": "eval:cint(erpnext.is_perpetual_inventory_enabled(parent.company))", - "fieldname": "cost_center", - "fieldtype": "Link", - "label": "Cost Center", - "options": "Cost Center", - "print_hide": 1 - }, - { - "fieldname": "purchase_order_item", - "fieldtype": "Data", - "hidden": 1, - "label": "Purchase Order Item", - "no_copy": 1, - "oldfieldname": "prevdoc_detail_docname", - "oldfieldtype": "Data", - "print_hide": 1, - "print_width": "150px", - "read_only": 1, - "search_index": 1, - "width": "150px" - }, - { - "fieldname": "col_break5", - "fieldtype": "Column Break" - }, - { - "default": "0", - "fieldname": "allow_zero_valuation_rate", - "fieldtype": "Check", - "label": "Allow Zero Valuation Rate", - "no_copy": 1, - "print_hide": 1 - }, - { - "fieldname": "bom", - "fieldtype": "Link", - "label": "BOM", - "no_copy": 1, - "options": "BOM", - "print_hide": 1 - }, - { - "default": "0", - "depends_on": "eval:parent.is_subcontracted == 'Yes'", - "fieldname": "include_exploded_items", - "fieldtype": "Check", - "label": "Include Exploded Items", - "read_only": 1 - }, - { - "fieldname": "billed_amt", - "fieldtype": "Currency", - "label": "Billed Amt", - "no_copy": 1, - "options": "currency", - "print_hide": 1, - "read_only": 1 - }, - { - "allow_on_submit": 1, - "fieldname": "landed_cost_voucher_amount", - "fieldtype": "Currency", - "label": "Landed Cost Voucher Amount", - "no_copy": 1, - "options": "Company:company:default_currency", - "print_hide": 1, - "read_only": 1 - }, - { - "fieldname": "brand", - "fieldtype": "Link", - "hidden": 1, - "label": "Brand", - "oldfieldname": "brand", - "oldfieldtype": "Link", - "options": "Brand", - "print_hide": 1, - "read_only": 1 - }, - { - "fieldname": "item_group", - "fieldtype": "Link", - "hidden": 1, - "label": "Item Group", - "oldfieldname": "item_group", - "oldfieldtype": "Link", - "options": "Item Group", - "print_hide": 1, - "read_only": 1 - }, - { - "fieldname": "rm_supp_cost", - "fieldtype": "Currency", - "hidden": 1, - "label": "Raw Materials Supplied Cost", - "no_copy": 1, - "oldfieldname": "rm_supp_cost", - "oldfieldtype": "Currency", - "options": "Company:company:default_currency", - "print_hide": 1, - "print_width": "150px", - "read_only": 1, - "width": "150px" - }, - { - "fieldname": "item_tax_amount", - "fieldtype": "Currency", - "hidden": 1, - "label": "Item Tax Amount Included in Value", - "no_copy": 1, - "oldfieldname": "item_tax_amount", - "oldfieldtype": "Currency", - "options": "Company:company:default_currency", - "print_hide": 1, - "print_width": "150px", - "read_only": 1, - "width": "150px" - }, - { - "allow_on_submit": 1, - "fieldname": "valuation_rate", - "fieldtype": "Currency", - "hidden": 1, - "label": "Valuation Rate", - "no_copy": 1, - "oldfieldname": "valuation_rate", - "oldfieldtype": "Currency", - "options": "Company:company:default_currency", - "print_hide": 1, - "print_width": "80px", - "read_only": 1, - "width": "80px" - }, - { - "description": "Tax detail table fetched from item master as a string and stored in this field.\nUsed for Taxes and Charges", - "fieldname": "item_tax_rate", - "fieldtype": "Code", - "hidden": 1, - "label": "Item Tax Rate", - "oldfieldname": "item_tax_rate", - "oldfieldtype": "Small Text", - "print_hide": 1, - "read_only": 1, - "report_hide": 1 - }, - { - "allow_on_submit": 1, - "default": "0", - "fieldname": "page_break", - "fieldtype": "Check", - "label": "Page Break", - "oldfieldname": "page_break", - "oldfieldtype": "Check", - "print_hide": 1 - }, - { - "fieldname": "section_break_80", - "fieldtype": "Section Break" - }, - { - "collapsible": 1, - "fieldname": "image_section", - "fieldtype": "Section Break", - "label": "Image" - }, - { - "fieldname": "material_request", - "fieldtype": "Link", - "label": "Material Request", - "options": "Material Request" - }, - { - "fieldname": "material_request_item", - "fieldtype": "Data", - "label": "Material Request Item" - }, - { - "fieldname": "expense_account", - "fieldtype": "Link", - "hidden": 1, - "label": "Expense Account", - "options": "Account", - "read_only": 1 - }, - { - "fieldname": "accounting_dimensions_section", - "fieldtype": "Section Break", - "label": "Accounting Dimensions" - }, - { - "fieldname": "dimension_col_break", - "fieldtype": "Column Break" - }, - { - "collapsible": 1, - "fieldname": "manufacture_details", - "fieldtype": "Section Break", - "label": "Manufacture" - }, - { - "fieldname": "manufacturer", - "fieldtype": "Link", - "label": "Manufacturer", - "options": "Manufacturer" - }, - { - "fieldname": "column_break_16", - "fieldtype": "Column Break" - }, - { - "fieldname": "manufacturer_part_no", - "fieldtype": "Data", - "label": "Manufacturer Part Number", - "read_only": 1 - } - ], - "idx": 1, - "istable": 1, - "modified": "2019-06-02 06:37:48.198745", - "modified_by": "Administrator", - "module": "Stock", - "name": "Purchase Receipt Item", - "owner": "Administrator", - "permissions": [], - "quick_entry": 1, - "sort_field": "modified", - "sort_order": "DESC" -} \ No newline at end of file + "autoname": "hash", + "creation": "2013-05-24 19:29:10", + "doctype": "DocType", + "document_type": "Document", + "editable_grid": 1, + "engine": "InnoDB", + "field_order": [ + "barcode", + "section_break_2", + "item_code", + "supplier_part_no", + "column_break_2", + "item_name", + "section_break_4", + "description", + "item_group", + "brand", + "image_section", + "image", + "image_view", + "manufacture_details", + "manufacturer", + "column_break_16", + "manufacturer_part_no", + "received_and_accepted", + "received_qty", + "qty", + "rejected_qty", + "col_break2", + "uom", + "stock_uom", + "conversion_factor", + "retain_sample", + "sample_quantity", + "rate_and_amount", + "price_list_rate", + "discount_percentage", + "discount_amount", + "col_break3", + "base_price_list_rate", + "sec_break1", + "rate", + "amount", + "col_break4", + "base_rate", + "base_amount", + "pricing_rules", + "is_free_item", + "section_break_29", + "net_rate", + "net_amount", + "item_tax_template", + "column_break_32", + "base_net_rate", + "base_net_amount", + "valuation_rate", + "item_tax_amount", + "rm_supp_cost", + "landed_cost_voucher_amount", + "billed_amt", + "item_weight_details", + "weight_per_unit", + "total_weight", + "column_break_41", + "weight_uom", + "warehouse_and_reference", + "warehouse", + "rejected_warehouse", + "quality_inspection", + "purchase_order", + "material_request", + "purchase_order_item", + "material_request_item", + "column_break_40", + "is_fixed_asset", + "asset", + "asset_location", + "schedule_date", + "stock_qty", + "section_break_45", + "serial_no", + "batch_no", + "column_break_48", + "rejected_serial_no", + "expense_account", + "col_break5", + "allow_zero_valuation_rate", + "bom", + "include_exploded_items", + "item_tax_rate", + "accounting_dimensions_section", + "project", + "dimension_col_break", + "cost_center", + "section_break_80", + "page_break" + ], + "fields": [ + { + "fieldname": "barcode", + "fieldtype": "Data", + "label": "Barcode" + }, + { + "fieldname": "section_break_2", + "fieldtype": "Section Break" + }, + { + "bold": 1, + "columns": 3, + "fieldname": "item_code", + "fieldtype": "Link", + "in_global_search": 1, + "in_list_view": 1, + "label": "Item Code", + "oldfieldname": "item_code", + "oldfieldtype": "Link", + "options": "Item", + "print_width": "100px", + "reqd": 1, + "search_index": 1, + "width": "100px" + }, + { + "fieldname": "supplier_part_no", + "fieldtype": "Data", + "hidden": 1, + "label": "Supplier Part Number", + "read_only": 1 + }, + { + "fieldname": "column_break_2", + "fieldtype": "Column Break" + }, + { + "fieldname": "item_name", + "fieldtype": "Data", + "in_global_search": 1, + "label": "Item Name", + "oldfieldname": "item_name", + "oldfieldtype": "Data", + "print_hide": 1, + "reqd": 1 + }, + { + "collapsible": 1, + "fieldname": "section_break_4", + "fieldtype": "Section Break", + "label": "Description" + }, + { + "fieldname": "description", + "fieldtype": "Text Editor", + "label": "Description", + "oldfieldname": "description", + "oldfieldtype": "Text", + "print_width": "300px", + "reqd": 1, + "width": "300px" + }, + { + "fieldname": "image", + "fieldtype": "Attach", + "hidden": 1, + "label": "Image" + }, + { + "fieldname": "image_view", + "fieldtype": "Image", + "label": "Image View", + "options": "image", + "print_hide": 1 + }, + { + "fieldname": "received_and_accepted", + "fieldtype": "Section Break", + "label": "Received and Accepted" + }, + { + "bold": 1, + "fieldname": "received_qty", + "fieldtype": "Float", + "label": "Received Quantity", + "oldfieldname": "received_qty", + "oldfieldtype": "Currency", + "print_hide": 1, + "print_width": "100px", + "reqd": 1, + "width": "100px" + }, + { + "columns": 2, + "fieldname": "qty", + "fieldtype": "Float", + "in_list_view": 1, + "label": "Accepted Quantity", + "oldfieldname": "qty", + "oldfieldtype": "Currency", + "print_width": "100px", + "width": "100px" + }, + { + "fieldname": "rejected_qty", + "fieldtype": "Float", + "label": "Rejected Quantity", + "oldfieldname": "rejected_qty", + "oldfieldtype": "Currency", + "print_hide": 1, + "print_width": "100px", + "width": "100px" + }, + { + "fieldname": "col_break2", + "fieldtype": "Column Break", + "print_hide": 1 + }, + { + "fieldname": "uom", + "fieldtype": "Link", + "label": "UOM", + "oldfieldname": "uom", + "oldfieldtype": "Link", + "options": "UOM", + "print_hide": 1, + "print_width": "100px", + "reqd": 1, + "width": "100px" + }, + { + "fieldname": "stock_uom", + "fieldtype": "Link", + "label": "Stock UOM", + "oldfieldname": "stock_uom", + "oldfieldtype": "Data", + "options": "UOM", + "print_hide": 1, + "print_width": "100px", + "read_only": 1, + "reqd": 1, + "width": "100px" + }, + { + "fieldname": "conversion_factor", + "fieldtype": "Float", + "label": "Conversion Factor", + "oldfieldname": "conversion_factor", + "oldfieldtype": "Currency", + "print_hide": 1, + "print_width": "100px", + "reqd": 1, + "width": "100px" + }, + { + "default": "0", + "fetch_from": "item_code.retain_sample", + "fieldname": "retain_sample", + "fieldtype": "Check", + "label": "Retain Sample", + "read_only": 1 + }, + { + "depends_on": "retain_sample", + "fetch_from": "item_code.sample_quantity", + "fieldname": "sample_quantity", + "fieldtype": "Int", + "label": "Sample Quantity" + }, + { + "fieldname": "rate_and_amount", + "fieldtype": "Section Break", + "label": "Rate and Amount" + }, + { + "fieldname": "price_list_rate", + "fieldtype": "Currency", + "label": "Price List Rate", + "options": "currency", + "print_hide": 1 + }, + { + "depends_on": "price_list_rate", + "fieldname": "discount_percentage", + "fieldtype": "Percent", + "label": "Discount on Price List Rate (%)", + "print_hide": 1 + }, + { + "depends_on": "price_list_rate", + "fieldname": "discount_amount", + "fieldtype": "Currency", + "label": "Discount Amount", + "options": "currency" + }, + { + "fieldname": "col_break3", + "fieldtype": "Column Break" + }, + { + "fieldname": "base_price_list_rate", + "fieldtype": "Currency", + "label": "Price List Rate (Company Currency)", + "options": "Company:company:default_currency", + "print_hide": 1, + "read_only": 1 + }, + { + "fieldname": "sec_break1", + "fieldtype": "Section Break" + }, + { + "bold": 1, + "columns": 3, + "fieldname": "rate", + "fieldtype": "Currency", + "in_list_view": 1, + "label": "Rate", + "oldfieldname": "import_rate", + "oldfieldtype": "Currency", + "options": "currency", + "print_width": "100px", + "width": "100px" + }, + { + "fieldname": "amount", + "fieldtype": "Currency", + "in_list_view": 1, + "label": "Amount", + "oldfieldname": "import_amount", + "oldfieldtype": "Currency", + "options": "currency", + "read_only": 1 + }, + { + "fieldname": "col_break4", + "fieldtype": "Column Break" + }, + { + "fieldname": "base_rate", + "fieldtype": "Currency", + "label": "Rate (Company Currency)", + "oldfieldname": "purchase_rate", + "oldfieldtype": "Currency", + "options": "Company:company:default_currency", + "print_hide": 1, + "print_width": "100px", + "read_only": 1, + "reqd": 1, + "width": "100px" + }, + { + "fieldname": "base_amount", + "fieldtype": "Currency", + "label": "Amount (Company Currency)", + "oldfieldname": "amount", + "oldfieldtype": "Currency", + "options": "Company:company:default_currency", + "print_hide": 1, + "print_width": "100px", + "read_only": 1, + "width": "100px" + }, + { + "fieldname": "pricing_rules", + "fieldtype": "Small Text", + "hidden": 1, + "label": "Pricing Rules", + "print_hide": 1, + "read_only": 1 + }, + { + "default": "0", + "fieldname": "is_free_item", + "fieldtype": "Check", + "label": "Is Free Item", + "print_hide": 1, + "read_only": 1 + }, + { + "fieldname": "section_break_29", + "fieldtype": "Section Break" + }, + { + "fieldname": "net_rate", + "fieldtype": "Currency", + "label": "Net Rate", + "options": "currency", + "print_hide": 1, + "read_only": 1 + }, + { + "columns": 2, + "fieldname": "net_amount", + "fieldtype": "Currency", + "in_list_view": 1, + "label": "Net Amount", + "options": "currency", + "print_hide": 1, + "read_only": 1 + }, + { + "fieldname": "column_break_32", + "fieldtype": "Column Break" + }, + { + "fieldname": "base_net_rate", + "fieldtype": "Currency", + "label": "Net Rate (Company Currency)", + "options": "Company:company:default_currency", + "print_hide": 1, + "read_only": 1 + }, + { + "fieldname": "base_net_amount", + "fieldtype": "Currency", + "label": "Net Amount (Company Currency)", + "options": "Company:company:default_currency", + "print_hide": 1, + "read_only": 1 + }, + { + "collapsible": 1, + "fieldname": "item_weight_details", + "fieldtype": "Section Break", + "label": "Item Weight Details" + }, + { + "fieldname": "weight_per_unit", + "fieldtype": "Float", + "label": "Weight Per Unit" + }, + { + "fieldname": "total_weight", + "fieldtype": "Float", + "label": "Total Weight", + "read_only": 1 + }, + { + "fieldname": "column_break_41", + "fieldtype": "Column Break" + }, + { + "fieldname": "weight_uom", + "fieldtype": "Link", + "label": "Weight UOM", + "options": "UOM" + }, + { + "fieldname": "warehouse_and_reference", + "fieldtype": "Section Break", + "label": "Warehouse and Reference" + }, + { + "bold": 1, + "fieldname": "warehouse", + "fieldtype": "Link", + "in_list_view": 1, + "label": "Accepted Warehouse", + "oldfieldname": "warehouse", + "oldfieldtype": "Link", + "options": "Warehouse", + "print_hide": 1, + "print_width": "100px", + "width": "100px" + }, + { + "fieldname": "rejected_warehouse", + "fieldtype": "Link", + "label": "Rejected Warehouse", + "no_copy": 1, + "oldfieldname": "rejected_warehouse", + "oldfieldtype": "Link", + "options": "Warehouse", + "print_hide": 1, + "print_width": "100px", + "width": "100px" + }, + { + "depends_on": "eval:!doc.__islocal", + "fieldname": "quality_inspection", + "fieldtype": "Link", + "label": "Quality Inspection", + "no_copy": 1, + "oldfieldname": "qa_no", + "oldfieldtype": "Link", + "options": "Quality Inspection", + "print_hide": 1 + }, + { + "fieldname": "column_break_40", + "fieldtype": "Column Break" + }, + { + "default": "0", + "fieldname": "is_fixed_asset", + "fieldtype": "Check", + "hidden": 1, + "label": "Is Fixed Asset", + "no_copy": 1, + "print_hide": 1, + "read_only": 1 + }, + { + "depends_on": "is_fixed_asset", + "fieldname": "asset", + "fieldtype": "Link", + "label": "Asset", + "no_copy": 1, + "options": "Asset" + }, + { + "depends_on": "is_fixed_asset", + "fieldname": "asset_location", + "fieldtype": "Link", + "label": "Asset Location", + "options": "Location" + }, + { + "fieldname": "purchase_order", + "fieldtype": "Link", + "label": "Purchase Order", + "no_copy": 1, + "oldfieldname": "prevdoc_docname", + "oldfieldtype": "Link", + "options": "Purchase Order", + "print_hide": 1, + "print_width": "150px", + "read_only": 1, + "search_index": 1, + "width": "150px" + }, + { + "fieldname": "schedule_date", + "fieldtype": "Date", + "label": "Required By", + "oldfieldname": "schedule_date", + "oldfieldtype": "Date", + "print_hide": 1, + "read_only": 1 + }, + { + "fieldname": "stock_qty", + "fieldtype": "Float", + "label": "Qty as per Stock UOM", + "oldfieldname": "stock_qty", + "oldfieldtype": "Currency", + "print_hide": 1, + "print_width": "100px", + "read_only": 1, + "width": "100px" + }, + { + "fieldname": "section_break_45", + "fieldtype": "Section Break" + }, + { + "fieldname": "serial_no", + "fieldtype": "Small Text", + "in_list_view": 1, + "label": "Serial No", + "no_copy": 1, + "oldfieldname": "serial_no", + "oldfieldtype": "Text" + }, + { + "fieldname": "batch_no", + "fieldtype": "Link", + "in_list_view": 1, + "label": "Batch No", + "no_copy": 1, + "oldfieldname": "batch_no", + "oldfieldtype": "Link", + "options": "Batch", + "print_hide": 1 + }, + { + "fieldname": "column_break_48", + "fieldtype": "Column Break" + }, + { + "fieldname": "rejected_serial_no", + "fieldtype": "Small Text", + "label": "Rejected Serial No", + "no_copy": 1, + "print_hide": 1 + }, + { + "fieldname": "item_tax_template", + "fieldtype": "Link", + "label": "Item Tax Template", + "options": "Item Tax Template", + "print_hide": 1 + }, + { + "fieldname": "project", + "fieldtype": "Link", + "label": "Project", + "options": "Project", + "print_hide": 1 + }, + { + "default": ":Company", + "depends_on": "eval:cint(erpnext.is_perpetual_inventory_enabled(parent.company))", + "fieldname": "cost_center", + "fieldtype": "Link", + "label": "Cost Center", + "options": "Cost Center", + "print_hide": 1 + }, + { + "fieldname": "purchase_order_item", + "fieldtype": "Data", + "hidden": 1, + "label": "Purchase Order Item", + "no_copy": 1, + "oldfieldname": "prevdoc_detail_docname", + "oldfieldtype": "Data", + "print_hide": 1, + "print_width": "150px", + "read_only": 1, + "search_index": 1, + "width": "150px" + }, + { + "fieldname": "col_break5", + "fieldtype": "Column Break" + }, + { + "default": "0", + "fieldname": "allow_zero_valuation_rate", + "fieldtype": "Check", + "label": "Allow Zero Valuation Rate", + "no_copy": 1, + "print_hide": 1 + }, + { + "fieldname": "bom", + "fieldtype": "Link", + "label": "BOM", + "no_copy": 1, + "options": "BOM", + "print_hide": 1 + }, + { + "default": "0", + "depends_on": "eval:parent.is_subcontracted == 'Yes'", + "fieldname": "include_exploded_items", + "fieldtype": "Check", + "label": "Include Exploded Items", + "read_only": 1 + }, + { + "fieldname": "billed_amt", + "fieldtype": "Currency", + "label": "Billed Amt", + "no_copy": 1, + "options": "currency", + "print_hide": 1, + "read_only": 1 + }, + { + "allow_on_submit": 1, + "fieldname": "landed_cost_voucher_amount", + "fieldtype": "Currency", + "label": "Landed Cost Voucher Amount", + "no_copy": 1, + "options": "Company:company:default_currency", + "print_hide": 1, + "read_only": 1 + }, + { + "fieldname": "brand", + "fieldtype": "Link", + "hidden": 1, + "label": "Brand", + "oldfieldname": "brand", + "oldfieldtype": "Link", + "options": "Brand", + "print_hide": 1, + "read_only": 1 + }, + { + "fieldname": "item_group", + "fieldtype": "Link", + "hidden": 1, + "label": "Item Group", + "oldfieldname": "item_group", + "oldfieldtype": "Link", + "options": "Item Group", + "print_hide": 1, + "read_only": 1 + }, + { + "fieldname": "rm_supp_cost", + "fieldtype": "Currency", + "hidden": 1, + "label": "Raw Materials Supplied Cost", + "no_copy": 1, + "oldfieldname": "rm_supp_cost", + "oldfieldtype": "Currency", + "options": "Company:company:default_currency", + "print_hide": 1, + "print_width": "150px", + "read_only": 1, + "width": "150px" + }, + { + "fieldname": "item_tax_amount", + "fieldtype": "Currency", + "hidden": 1, + "label": "Item Tax Amount Included in Value", + "no_copy": 1, + "oldfieldname": "item_tax_amount", + "oldfieldtype": "Currency", + "options": "Company:company:default_currency", + "print_hide": 1, + "print_width": "150px", + "read_only": 1, + "width": "150px" + }, + { + "allow_on_submit": 1, + "fieldname": "valuation_rate", + "fieldtype": "Currency", + "hidden": 1, + "label": "Valuation Rate", + "no_copy": 1, + "oldfieldname": "valuation_rate", + "oldfieldtype": "Currency", + "options": "Company:company:default_currency", + "print_hide": 1, + "print_width": "80px", + "read_only": 1, + "width": "80px" + }, + { + "description": "Tax detail table fetched from item master as a string and stored in this field.\nUsed for Taxes and Charges", + "fieldname": "item_tax_rate", + "fieldtype": "Code", + "hidden": 1, + "label": "Item Tax Rate", + "oldfieldname": "item_tax_rate", + "oldfieldtype": "Small Text", + "print_hide": 1, + "read_only": 1, + "report_hide": 1 + }, + { + "allow_on_submit": 1, + "default": "0", + "fieldname": "page_break", + "fieldtype": "Check", + "label": "Page Break", + "oldfieldname": "page_break", + "oldfieldtype": "Check", + "print_hide": 1 + }, + { + "fieldname": "section_break_80", + "fieldtype": "Section Break" + }, + { + "collapsible": 1, + "fieldname": "image_section", + "fieldtype": "Section Break", + "label": "Image" + }, + { + "fieldname": "material_request", + "fieldtype": "Link", + "label": "Material Request", + "options": "Material Request" + }, + { + "fieldname": "material_request_item", + "fieldtype": "Data", + "label": "Material Request Item" + }, + { + "fieldname": "expense_account", + "fieldtype": "Link", + "hidden": 1, + "label": "Expense Account", + "options": "Account", + "read_only": 1 + }, + { + "fieldname": "accounting_dimensions_section", + "fieldtype": "Section Break", + "label": "Accounting Dimensions" + }, + { + "fieldname": "dimension_col_break", + "fieldtype": "Column Break" + }, + { + "collapsible": 1, + "fieldname": "manufacture_details", + "fieldtype": "Section Break", + "label": "Manufacture" + }, + { + "fieldname": "manufacturer", + "fieldtype": "Link", + "label": "Manufacturer", + "options": "Manufacturer" + }, + { + "fieldname": "column_break_16", + "fieldtype": "Column Break" + }, + { + "fieldname": "manufacturer_part_no", + "fieldtype": "Data", + "label": "Manufacturer Part Number", + "read_only": 1 + } + ], + "idx": 1, + "istable": 1, + "modified": "2019-06-02 06:37:48.198745", + "modified_by": "Administrator", + "module": "Stock", + "name": "Purchase Receipt Item", + "owner": "Administrator", + "permissions": [], + "quick_entry": 1, + "sort_field": "modified", + "sort_order": "DESC" + } \ No newline at end of file diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.json b/erpnext/stock/doctype/stock_entry/stock_entry.json index 4358dedc8e..bbc54ec37c 100644 --- a/erpnext/stock/doctype/stock_entry/stock_entry.json +++ b/erpnext/stock/doctype/stock_entry/stock_entry.json @@ -1,20 +1,1969 @@ { - "allow_copy": 0, - "allow_events_in_timeline": 0, - "allow_guest_to_view": 0, - "allow_import": 1, - "allow_rename": 0, - "autoname": "naming_series:", - "beta": 0, - "creation": "2013-04-09 11:43:55", - "custom": 0, - "docstatus": 0, - "doctype": "DocType", - "document_type": "Document", - "editable_grid": 0, - "engine": "InnoDB", - "fields": [ - { + "allow_copy": 0, + "allow_events_in_timeline": 0, + "allow_guest_to_view": 0, + "allow_import": 1, + "allow_rename": 0, + "autoname": "naming_series:", + "beta": 0, + "creation": "2013-04-09 11:43:55", + "custom": 0, + "docstatus": 0, + "doctype": "DocType", + "document_type": "Document", + "editable_grid": 0, + "engine": "InnoDB", + "fields": [ + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "items_section", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "", + "length": 0, + "no_copy": 0, + "oldfieldtype": "Section Break", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 1, + "bold": 0, + "collapsible": 0, + "columns": 0, + "default": "{purpose}", + "fetch_if_empty": 0, + "fieldname": "title", + "fieldtype": "Data", + "hidden": 1, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Title", + "length": 0, + "no_copy": 1, + "permlevel": 0, + "precision": "", + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "default": "", + "fetch_if_empty": 0, + "fieldname": "naming_series", + "fieldtype": "Select", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Series", + "length": 0, + "no_copy": 1, + "oldfieldname": "naming_series", + "oldfieldtype": "Select", + "options": "MAT-STE-.YYYY.-", + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 1, + "search_index": 0, + "set_only_once": 1, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "stock_entry_type", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 1, + "in_standard_filter": 1, + "label": "Stock Entry Type", + "length": 0, + "no_copy": 0, + "options": "Stock Entry Type", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 1, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "eval:doc.purpose == 'Receive at Warehouse'", + "fetch_if_empty": 0, + "fieldname": "outgoing_stock_entry", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Stock Entry (Outward GIT)", + "length": 0, + "no_copy": 0, + "options": "Stock Entry", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 1, + "collapsible": 0, + "columns": 0, + "default": "", + "fetch_from": "stock_entry_type.purpose", + "fetch_if_empty": 0, + "fieldname": "purpose", + "fieldtype": "Select", + "hidden": 1, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 1, + "in_standard_filter": 0, + "label": "Purpose", + "length": 0, + "no_copy": 0, + "oldfieldname": "purpose", + "oldfieldtype": "Select", + "options": "Material Issue\nMaterial Receipt\nMaterial Transfer\nMaterial Transfer for Manufacture\nMaterial Consumption for Manufacture\nManufacture\nRepack\nSend to Subcontractor\nSend to Warehouse\nReceive at Warehouse", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "company", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Company", + "length": 0, + "no_copy": 0, + "oldfieldname": "company", + "oldfieldtype": "Link", + "options": "Company", + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 1, + "report_hide": 0, + "reqd": 1, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "eval:in_list([\"Material Transfer for Manufacture\", \"Manufacture\", \"Material Consumption for Manufacture\"], doc.purpose)", + "fetch_if_empty": 0, + "fieldname": "work_order", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Work Order", + "length": 0, + "no_copy": 0, + "oldfieldname": "production_order", + "oldfieldtype": "Link", + "options": "Work Order", + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 1, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "eval:doc.purpose==\"Send to Subcontractor\"", + "fetch_if_empty": 0, + "fieldname": "purchase_order", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Purchase Order", + "length": 0, + "no_copy": 0, + "options": "Purchase Order", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "eval:doc.purpose==\"Sales Return\"", + "fetch_if_empty": 0, + "fieldname": "delivery_note_no", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Delivery Note No", + "length": 0, + "no_copy": 1, + "oldfieldname": "delivery_note_no", + "oldfieldtype": "Link", + "options": "Delivery Note", + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 1, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "eval:doc.purpose==\"Sales Return\"", + "fetch_if_empty": 0, + "fieldname": "sales_invoice_no", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Sales Invoice No", + "length": 0, + "no_copy": 1, + "options": "Sales Invoice", + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "eval:doc.purpose==\"Purchase Return\"", + "fetch_if_empty": 0, + "fieldname": "purchase_receipt_no", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Purchase Receipt No", + "length": 0, + "no_copy": 1, + "oldfieldname": "purchase_receipt_no", + "oldfieldtype": "Link", + "options": "Purchase Receipt", + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 1, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "col2", + "fieldtype": "Column Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "length": 0, + "no_copy": 0, + "oldfieldtype": "Column Break", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "print_width": "50%", + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0, + "width": "50%" + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "default": "Today", + "depends_on": "", + "fetch_if_empty": 0, + "fieldname": "posting_date", + "fieldtype": "Date", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Posting Date", + "length": 0, + "no_copy": 1, + "oldfieldname": "posting_date", + "oldfieldtype": "Date", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 1, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "", + "fetch_if_empty": 0, + "fieldname": "posting_time", + "fieldtype": "Time", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Posting Time", + "length": 0, + "no_copy": 1, + "oldfieldname": "posting_time", + "oldfieldtype": "Time", + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "eval:doc.docstatus==0", + "fetch_if_empty": 0, + "fieldname": "set_posting_time", + "fieldtype": "Check", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Edit Posting Date and Time", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "inspection_required", + "fieldtype": "Check", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Inspection Required", + "length": 0, + "no_copy": 0, + "options": "", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "eval:in_list([\"Material Issue\", \"Material Transfer\", \"Manufacture\", \"Repack\", \t\t\t\t\t\"Send to Subcontractor\", \"Material Transfer for Manufacture\", \"Material Consumption for Manufacture\"], doc.purpose)", + "fetch_if_empty": 0, + "fieldname": "from_bom", + "fieldtype": "Check", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "From BOM", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "eval: doc.from_bom && (doc.purpose!==\"Sales Return\" && doc.purpose!==\"Purchase Return\")", + "fetch_if_empty": 0, + "fieldname": "sb1", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "from_bom", + "fetch_if_empty": 0, + "fieldname": "bom_no", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "BOM No", + "length": 0, + "no_copy": 0, + "options": "BOM", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "from_bom", + "description": "As per Stock UOM", + "fetch_if_empty": 0, + "fieldname": "fg_completed_qty", + "fieldtype": "Float", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "For Quantity", + "length": 0, + "no_copy": 0, + "oldfieldname": "fg_completed_qty", + "oldfieldtype": "Currency", + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "cb1", + "fieldtype": "Column Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "length": 0, + "no_copy": 0, + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "default": "1", + "depends_on": "from_bom", + "description": "Including items for sub assemblies", + "fetch_if_empty": 0, + "fieldname": "use_multi_level_bom", + "fieldtype": "Check", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Use Multi-Level BOM", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "from_bom", + "fetch_if_empty": 0, + "fieldname": "get_items", + "fieldtype": "Button", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Get Items", + "length": 0, + "no_copy": 0, + "oldfieldtype": "Button", + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "section_break_12", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "from_warehouse", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 1, + "in_standard_filter": 1, + "label": "Default Source Warehouse", + "length": 0, + "no_copy": 1, + "oldfieldname": "from_warehouse", + "oldfieldtype": "Link", + "options": "Warehouse", + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "from_warehouse", + "fetch_if_empty": 0, + "fieldname": "source_warehouse_address", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Source Warehouse Address", + "length": 0, + "no_copy": 0, + "options": "Address", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "source_address_display", + "fieldtype": "Small Text", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Source Warehouse Address", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "cb0", + "fieldtype": "Column Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "length": 0, + "no_copy": 0, + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "to_warehouse", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 1, + "in_standard_filter": 1, + "label": "Default Target Warehouse", + "length": 0, + "no_copy": 1, + "oldfieldname": "to_warehouse", + "oldfieldtype": "Link", + "options": "Warehouse", + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "to_warehouse", + "fetch_if_empty": 0, + "fieldname": "target_warehouse_address", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Target Warehouse Name", + "length": 0, + "no_copy": 0, + "options": "Address", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "target_address_display", + "fieldtype": "Small Text", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Target Warehouse Address", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "sb0", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "length": 0, + "no_copy": 0, + "options": "Simple", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "scan_barcode", + "fieldtype": "Data", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Scan Barcode", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "items", + "fieldtype": "Table", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Items", + "length": 0, + "no_copy": 0, + "oldfieldname": "mtn_details", + "oldfieldtype": "Table", + "options": "Stock Entry Detail", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 1, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "description": "", + "fetch_if_empty": 0, + "fieldname": "get_stock_and_rate", + "fieldtype": "Button", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Update Rate and Availability", + "length": 0, + "no_copy": 0, + "oldfieldtype": "Button", + "options": "get_stock_and_rate", + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "section_break_19", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "total_incoming_value", + "fieldtype": "Currency", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Total Incoming Value", + "length": 0, + "no_copy": 0, + "options": "Company:company:default_currency", + "permlevel": 0, + "precision": "", + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "column_break_22", + "fieldtype": "Column Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "total_outgoing_value", + "fieldtype": "Currency", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Total Outgoing Value", + "length": 0, + "no_copy": 0, + "options": "Company:company:default_currency", + "permlevel": 0, + "precision": "", + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "value_difference", + "fieldtype": "Currency", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Total Value Difference (Out - In)", + "length": 0, + "no_copy": 0, + "options": "Company:company:default_currency", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 1, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 1, + "collapsible_depends_on": "total_additional_costs", + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "additional_costs_section", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Additional Costs", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "additional_costs", + "fieldtype": "Table", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Additional Costs", + "length": 0, + "no_copy": 0, + "options": "Landed Cost Taxes and Charges", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "total_additional_costs", + "fieldtype": "Currency", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Total Additional Costs", + "length": 0, + "no_copy": 0, + "options": "Company:company:default_currency", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 1, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 1, + "columns": 0, + "depends_on": "eval: in_list([\"Sales Return\", \"Purchase Return\", \"Send to Subcontractor\"], doc.purpose)", + "fetch_if_empty": 0, + "fieldname": "contact_section", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Customer or Supplier Details", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "eval:doc.purpose==\"Purchase Return\" || doc.purpose==\"Send to Subcontractor\"", + "fetch_if_empty": 0, + "fieldname": "supplier", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Supplier", + "length": 0, + "no_copy": 1, + "oldfieldname": "supplier", + "oldfieldtype": "Link", + "options": "Supplier", + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 1, + "collapsible": 0, + "columns": 0, + "depends_on": "eval:doc.purpose==\"Purchase Return\" || doc.purpose==\"Send to Subcontractor\"", + "fetch_if_empty": 0, + "fieldname": "supplier_name", + "fieldtype": "Data", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Supplier Name", + "length": 0, + "no_copy": 1, + "oldfieldname": "supplier_name", + "oldfieldtype": "Data", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "eval:doc.purpose==\"Purchase Return\" || doc.purpose==\"Send to Subcontractor\"", + "fetch_if_empty": 0, + "fieldname": "supplier_address", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Supplier Address", + "length": 0, + "no_copy": 1, + "oldfieldname": "supplier_address", + "oldfieldtype": "Small Text", + "options": "Address", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "address_display", + "fieldtype": "Small Text", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Address", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "column_break_39", + "fieldtype": "Column Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "eval:doc.purpose==\"Sales Return\"", + "fetch_if_empty": 0, + "fieldname": "customer", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Customer", + "length": 0, + "no_copy": 1, + "oldfieldname": "customer", + "oldfieldtype": "Link", + "options": "Customer", + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 1, + "collapsible": 0, + "columns": 0, + "depends_on": "eval:doc.purpose==\"Sales Return\"", + "fetch_if_empty": 0, + "fieldname": "customer_name", + "fieldtype": "Data", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Customer Name", + "length": 0, + "no_copy": 1, + "oldfieldname": "customer_name", + "oldfieldtype": "Data", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "eval:doc.purpose==\"Sales Return\"", + "fetch_if_empty": 0, + "fieldname": "customer_address", + "fieldtype": "Small Text", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Customer Address", + "length": 0, + "no_copy": 1, + "oldfieldname": "customer_address", + "oldfieldtype": "Small Text", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 1, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "printing_settings", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Printing Settings", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 1, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "select_print_heading", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Print Heading", + "length": 0, + "no_copy": 0, + "oldfieldname": "select_print_heading", + "oldfieldtype": "Link", + "options": "Print Heading", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "letter_head", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Letter Head", + "length": 0, + "no_copy": 0, + "options": "Letter Head", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 1, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "more_info", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "More Information", + "length": 0, + "no_copy": 0, + "oldfieldtype": "Section Break", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { "allow_bulk_edit": 0, "allow_in_quick_entry": 0, "allow_on_submit": 0, @@ -22,75 +1971,7 @@ "collapsible": 0, "columns": 0, "fetch_if_empty": 0, - "fieldname": "items_section", - "fieldtype": "Section Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "", - "length": 0, - "no_copy": 0, - "oldfieldtype": "Section Break", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 1, - "bold": 0, - "collapsible": 0, - "columns": 0, - "default": "{purpose}", - "fetch_if_empty": 0, - "fieldname": "title", - "fieldtype": "Data", - "hidden": 1, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Title", - "length": 0, - "no_copy": 1, - "permlevel": 0, - "precision": "", - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "default": "", - "fetch_if_empty": 0, - "fieldname": "naming_series", + "fieldname": "is_opening", "fieldtype": "Select", "hidden": 0, "ignore_user_permissions": 0, @@ -99,80 +1980,10 @@ "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, - "label": "Series", - "length": 0, - "no_copy": 1, - "oldfieldname": "naming_series", - "oldfieldtype": "Select", - "options": "MAT-STE-.YYYY.-", - "permlevel": 0, - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 1, - "search_index": 0, - "set_only_once": 1, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "stock_entry_type", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 1, - "label": "Stock Entry Type", + "label": "Is Opening", "length": 0, "no_copy": 0, - "options": "Stock Entry Type", - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 1, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "eval:doc.purpose == 'Receive at Warehouse'", - "fetch_if_empty": 0, - "fieldname": "outgoing_stock_entry", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Stock Entry (Outward GIT)", - "length": 0, - "no_copy": 0, - "options": "Stock Entry", + "options": "No\nYes", "permlevel": 0, "precision": "", "print_hide": 0, @@ -185,2192 +1996,381 @@ "set_only_once": 0, "translatable": 0, "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 1, - "collapsible": 0, - "columns": 0, - "default": "", - "fetch_from": "stock_entry_type.purpose", - "fetch_if_empty": 0, - "fieldname": "purpose", - "fieldtype": "Select", - "hidden": 1, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "Purpose", - "length": 0, - "no_copy": 0, - "oldfieldname": "purpose", - "oldfieldtype": "Select", - "options": "Material Issue\nMaterial Receipt\nMaterial Transfer\nMaterial Transfer for Manufacture\nMaterial Consumption for Manufacture\nManufacture\nRepack\nSend to Subcontractor\nSend to Warehouse\nReceive at Warehouse", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 1, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "company", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Company", - "length": 0, - "no_copy": 0, - "oldfieldname": "company", - "oldfieldtype": "Link", - "options": "Company", - "permlevel": 0, - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 1, - "report_hide": 0, - "reqd": 1, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "eval:in_list([\"Material Transfer for Manufacture\", \"Manufacture\", \"Material Consumption for Manufacture\"], doc.purpose)", - "fetch_if_empty": 0, - "fieldname": "work_order", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Work Order", - "length": 0, - "no_copy": 0, - "oldfieldname": "production_order", - "oldfieldtype": "Link", - "options": "Work Order", - "permlevel": 0, - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 1, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "eval:doc.purpose==\"Send to Subcontractor\"", - "fetch_if_empty": 0, - "fieldname": "purchase_order", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Purchase Order", - "length": 0, - "no_copy": 0, - "options": "Purchase Order", - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "eval:doc.purpose==\"Sales Return\"", - "fetch_if_empty": 0, - "fieldname": "delivery_note_no", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Delivery Note No", - "length": 0, - "no_copy": 1, - "oldfieldname": "delivery_note_no", - "oldfieldtype": "Link", - "options": "Delivery Note", - "permlevel": 0, - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 1, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "eval:doc.purpose==\"Sales Return\"", - "fetch_if_empty": 0, - "fieldname": "sales_invoice_no", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Sales Invoice No", - "length": 0, - "no_copy": 1, - "options": "Sales Invoice", - "permlevel": 0, - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "eval:doc.purpose==\"Purchase Return\"", - "fetch_if_empty": 0, - "fieldname": "purchase_receipt_no", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Purchase Receipt No", - "length": 0, - "no_copy": 1, - "oldfieldname": "purchase_receipt_no", - "oldfieldtype": "Link", - "options": "Purchase Receipt", - "permlevel": 0, - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 1, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "col2", - "fieldtype": "Column Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "length": 0, - "no_copy": 0, - "oldfieldtype": "Column Break", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "print_width": "50%", - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0, - "width": "50%" - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "default": "Today", - "depends_on": "", - "fetch_if_empty": 0, - "fieldname": "posting_date", - "fieldtype": "Date", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Posting Date", - "length": 0, - "no_copy": 1, - "oldfieldname": "posting_date", - "oldfieldtype": "Date", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 1, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "", - "fetch_if_empty": 0, - "fieldname": "posting_time", - "fieldtype": "Time", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Posting Time", - "length": 0, - "no_copy": 1, - "oldfieldname": "posting_time", - "oldfieldtype": "Time", - "permlevel": 0, - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "eval:doc.docstatus==0", - "fetch_if_empty": 0, - "fieldname": "set_posting_time", - "fieldtype": "Check", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Edit Posting Date and Time", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "inspection_required", - "fieldtype": "Check", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Inspection Required", - "length": 0, - "no_copy": 0, - "options": "", - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "eval:in_list([\"Material Issue\", \"Material Transfer\", \"Manufacture\", \"Repack\", \t\t\t\t\t\"Send to Subcontractor\", \"Material Transfer for Manufacture\", \"Material Consumption for Manufacture\"], doc.purpose)", - "fetch_if_empty": 0, - "fieldname": "from_bom", - "fieldtype": "Check", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "From BOM", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "eval: doc.from_bom && (doc.purpose!==\"Sales Return\" && doc.purpose!==\"Purchase Return\")", - "fetch_if_empty": 0, - "fieldname": "sb1", - "fieldtype": "Section Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "from_bom", - "fetch_if_empty": 0, - "fieldname": "bom_no", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "BOM No", - "length": 0, - "no_copy": 0, - "options": "BOM", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "from_bom", - "description": "As per Stock UOM", - "fetch_if_empty": 0, - "fieldname": "fg_completed_qty", - "fieldtype": "Float", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "For Quantity", - "length": 0, - "no_copy": 0, - "oldfieldname": "fg_completed_qty", - "oldfieldtype": "Currency", - "permlevel": 0, - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "cb1", - "fieldtype": "Column Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "length": 0, - "no_copy": 0, - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "default": "1", - "depends_on": "from_bom", - "description": "Including items for sub assemblies", - "fetch_if_empty": 0, - "fieldname": "use_multi_level_bom", - "fieldtype": "Check", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Use Multi-Level BOM", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "from_bom", - "fetch_if_empty": 0, - "fieldname": "get_items", - "fieldtype": "Button", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Get Items", - "length": 0, - "no_copy": 0, - "oldfieldtype": "Button", - "permlevel": 0, - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "section_break_12", - "fieldtype": "Section Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "from_warehouse", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 1, - "label": "Default Source Warehouse", - "length": 0, - "no_copy": 1, - "oldfieldname": "from_warehouse", - "oldfieldtype": "Link", - "options": "Warehouse", - "permlevel": 0, - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "from_warehouse", - "fetch_if_empty": 0, - "fieldname": "source_warehouse_address", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Source Warehouse Address", - "length": 0, - "no_copy": 0, - "options": "Address", - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "source_address_display", - "fieldtype": "Small Text", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Source Warehouse Address", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 1, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "cb0", - "fieldtype": "Column Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "length": 0, - "no_copy": 0, - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "to_warehouse", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 1, - "label": "Default Target Warehouse", - "length": 0, - "no_copy": 1, - "oldfieldname": "to_warehouse", - "oldfieldtype": "Link", - "options": "Warehouse", - "permlevel": 0, - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "to_warehouse", - "fetch_if_empty": 0, - "fieldname": "target_warehouse_address", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Target Warehouse Name", - "length": 0, - "no_copy": 0, - "options": "Address", - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "target_address_display", - "fieldtype": "Small Text", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Target Warehouse Address", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 1, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "sb0", - "fieldtype": "Section Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "length": 0, - "no_copy": 0, - "options": "Simple", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "scan_barcode", - "fieldtype": "Data", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Scan Barcode", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "items", - "fieldtype": "Table", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Items", - "length": 0, - "no_copy": 0, - "oldfieldname": "mtn_details", - "oldfieldtype": "Table", - "options": "Stock Entry Detail", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 1, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "description": "", - "fetch_if_empty": 0, - "fieldname": "get_stock_and_rate", - "fieldtype": "Button", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Update Rate and Availability", - "length": 0, - "no_copy": 0, - "oldfieldtype": "Button", - "options": "get_stock_and_rate", - "permlevel": 0, - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "section_break_19", - "fieldtype": "Section Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "total_incoming_value", - "fieldtype": "Currency", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Total Incoming Value", - "length": 0, - "no_copy": 0, - "options": "Company:company:default_currency", - "permlevel": 0, - "precision": "", - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 1, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "column_break_22", - "fieldtype": "Column Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "total_outgoing_value", - "fieldtype": "Currency", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Total Outgoing Value", - "length": 0, - "no_copy": 0, - "options": "Company:company:default_currency", - "permlevel": 0, - "precision": "", - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 1, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "value_difference", - "fieldtype": "Currency", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Total Value Difference (Out - In)", - "length": 0, - "no_copy": 0, - "options": "Company:company:default_currency", - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 1, - "read_only": 1, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 1, - "collapsible_depends_on": "total_additional_costs", - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "additional_costs_section", - "fieldtype": "Section Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Additional Costs", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "additional_costs", - "fieldtype": "Table", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Additional Costs", - "length": 0, - "no_copy": 0, - "options": "Landed Cost Taxes and Charges", - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "total_additional_costs", - "fieldtype": "Currency", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Total Additional Costs", - "length": 0, - "no_copy": 0, - "options": "Company:company:default_currency", - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 1, - "read_only": 1, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 1, - "columns": 0, - "depends_on": "eval: in_list([\"Sales Return\", \"Purchase Return\", \"Send to Subcontractor\"], doc.purpose)", - "fetch_if_empty": 0, - "fieldname": "contact_section", - "fieldtype": "Section Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Customer or Supplier Details", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "eval:doc.purpose==\"Purchase Return\" || doc.purpose==\"Send to Subcontractor\"", - "fetch_if_empty": 0, - "fieldname": "supplier", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Supplier", - "length": 0, - "no_copy": 1, - "oldfieldname": "supplier", - "oldfieldtype": "Link", - "options": "Supplier", - "permlevel": 0, - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 1, - "collapsible": 0, - "columns": 0, - "depends_on": "eval:doc.purpose==\"Purchase Return\" || doc.purpose==\"Send to Subcontractor\"", - "fetch_if_empty": 0, - "fieldname": "supplier_name", - "fieldtype": "Data", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Supplier Name", - "length": 0, - "no_copy": 1, - "oldfieldname": "supplier_name", - "oldfieldtype": "Data", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 1, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "eval:doc.purpose==\"Purchase Return\" || doc.purpose==\"Send to Subcontractor\"", - "fetch_if_empty": 0, - "fieldname": "supplier_address", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Supplier Address", - "length": 0, - "no_copy": 1, - "oldfieldname": "supplier_address", - "oldfieldtype": "Small Text", - "options": "Address", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "address_display", - "fieldtype": "Small Text", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Address", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "column_break_39", - "fieldtype": "Column Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "eval:doc.purpose==\"Sales Return\"", - "fetch_if_empty": 0, - "fieldname": "customer", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Customer", - "length": 0, - "no_copy": 1, - "oldfieldname": "customer", - "oldfieldtype": "Link", - "options": "Customer", - "permlevel": 0, - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 1, - "collapsible": 0, - "columns": 0, - "depends_on": "eval:doc.purpose==\"Sales Return\"", - "fetch_if_empty": 0, - "fieldname": "customer_name", - "fieldtype": "Data", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Customer Name", - "length": 0, - "no_copy": 1, - "oldfieldname": "customer_name", - "oldfieldtype": "Data", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 1, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "eval:doc.purpose==\"Sales Return\"", - "fetch_if_empty": 0, - "fieldname": "customer_address", - "fieldtype": "Small Text", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Customer Address", - "length": 0, - "no_copy": 1, - "oldfieldname": "customer_address", - "oldfieldtype": "Small Text", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 1, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "printing_settings", - "fieldtype": "Section Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Printing Settings", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 1, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "select_print_heading", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Print Heading", - "length": 0, - "no_copy": 0, - "oldfieldname": "select_print_heading", - "oldfieldtype": "Link", - "options": "Print Heading", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "letter_head", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Letter Head", - "length": 0, - "no_copy": 0, - "options": "Letter Head", - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 1, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "more_info", - "fieldtype": "Section Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "More Information", - "length": 0, - "no_copy": 0, - "oldfieldtype": "Section Break", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "is_opening", - "fieldtype": "Select", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Is Opening", - "length": 0, - "no_copy": 0, - "options": "No\nYes", - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "project", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Project", - "length": 0, - "no_copy": 0, - "oldfieldtype": "Link", - "options": "Project", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "remarks", - "fieldtype": "Text", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Remarks", - "length": 0, - "no_copy": 1, - "oldfieldname": "remarks", - "oldfieldtype": "Text", - "permlevel": 0, - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "col5", - "fieldtype": "Column Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "length": 0, - "no_copy": 0, - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "print_width": "50%", - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0, - "width": "50%" - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "", - "fetch_if_empty": 0, - "fieldname": "per_transferred", - "fieldtype": "Percent", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "Per Transferred", - "length": 0, - "no_copy": 1, - "options": "", - "permlevel": 0, - "precision": "", - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 1, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "total_amount", - "fetch_if_empty": 0, - "fieldname": "total_amount", - "fieldtype": "Currency", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Total Amount", - "length": 0, - "no_copy": 0, - "options": "Company:company:default_currency", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 1, - "read_only": 1, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "job_card", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Job Card", - "length": 0, - "no_copy": 0, - "options": "Job Card", - "permlevel": 0, - "precision": "", - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 1, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "amended_from", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 1, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Amended From", - "length": 0, - "no_copy": 1, - "oldfieldname": "amended_from", - "oldfieldtype": "Link", - "options": "Stock Entry", - "permlevel": 0, - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 1, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_if_empty": 0, - "fieldname": "credit_note", - "fieldtype": "Link", - "hidden": 1, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Credit Note", - "length": 0, - "no_copy": 0, - "options": "Journal Entry", - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - } - ], - "has_web_view": 0, - "hide_toolbar": 0, - "icon": "fa fa-file-text", - "idx": 1, - "in_create": 0, - "is_submittable": 1, - "issingle": 0, - "istable": 0, - "max_attachments": 0, - "modified": "2019-05-23 12:24:46.439626", - "modified_by": "Administrator", - "module": "Stock", - "name": "Stock Entry", - "owner": "Administrator", - "permissions": [ - { - "amend": 1, - "cancel": 1, - "create": 1, - "delete": 1, - "email": 1, - "export": 0, - "if_owner": 0, - "import": 0, - "permlevel": 0, - "print": 1, - "read": 1, - "report": 1, - "role": "Stock User", - "set_user_permissions": 0, - "share": 1, - "submit": 1, - "write": 1 - }, - { - "amend": 1, - "cancel": 1, - "create": 1, - "delete": 1, - "email": 1, - "export": 0, - "if_owner": 0, - "import": 0, - "permlevel": 0, - "print": 1, - "read": 1, - "report": 1, - "role": "Manufacturing User", - "set_user_permissions": 0, - "share": 1, - "submit": 1, - "write": 1 - }, - { - "amend": 1, - "cancel": 1, - "create": 1, - "delete": 1, - "email": 1, - "export": 0, - "if_owner": 0, - "import": 0, - "permlevel": 0, - "print": 1, - "read": 1, - "report": 1, - "role": "Manufacturing Manager", - "set_user_permissions": 0, - "share": 1, - "submit": 1, - "write": 1 - }, - { - "amend": 1, - "cancel": 1, - "create": 1, - "delete": 1, - "email": 1, - "export": 1, - "if_owner": 0, - "import": 1, - "permlevel": 0, - "print": 1, - "read": 1, - "report": 1, - "role": "Stock Manager", - "set_user_permissions": 1, - "share": 1, - "submit": 1, - "write": 1 - } - ], - "quick_entry": 0, - "read_only": 0, - "search_fields": "posting_date, from_warehouse, to_warehouse, purpose, remarks", - "show_name_in_global_search": 1, - "sort_field": "modified", - "sort_order": "DESC", - "title_field": "title", - "track_changes": 1, - "track_seen": 0, - "track_views": 0 - } \ No newline at end of file + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "project", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Project", + "length": 0, + "no_copy": 0, + "oldfieldtype": "Link", + "options": "Project", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "remarks", + "fieldtype": "Text", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Remarks", + "length": 0, + "no_copy": 1, + "oldfieldname": "remarks", + "oldfieldtype": "Text", + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "col5", + "fieldtype": "Column Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "length": 0, + "no_copy": 0, + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "print_width": "50%", + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0, + "width": "50%" + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "", + "fetch_if_empty": 0, + "fieldname": "per_transferred", + "fieldtype": "Percent", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 1, + "in_standard_filter": 0, + "label": "Per Transferred", + "length": 0, + "no_copy": 1, + "options": "", + "permlevel": 0, + "precision": "", + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "total_amount", + "fetch_if_empty": 0, + "fieldname": "total_amount", + "fieldtype": "Currency", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Total Amount", + "length": 0, + "no_copy": 0, + "options": "Company:company:default_currency", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 1, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "job_card", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Job Card", + "length": 0, + "no_copy": 0, + "options": "Job Card", + "permlevel": 0, + "precision": "", + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "amended_from", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 1, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Amended From", + "length": 0, + "no_copy": 1, + "oldfieldname": "amended_from", + "oldfieldtype": "Link", + "options": "Stock Entry", + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "credit_note", + "fieldtype": "Link", + "hidden": 1, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Credit Note", + "length": 0, + "no_copy": 0, + "options": "Journal Entry", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, + "unique": 0 + } + ], + "has_web_view": 0, + "hide_toolbar": 0, + "icon": "fa fa-file-text", + "idx": 1, + "in_create": 0, + "is_submittable": 1, + "issingle": 0, + "istable": 0, + "max_attachments": 0, + "modified": "2019-05-23 12:24:46.439626", + "modified_by": "Administrator", + "module": "Stock", + "name": "Stock Entry", + "owner": "Administrator", + "permissions": [ + { + "amend": 1, + "cancel": 1, + "create": 1, + "delete": 1, + "email": 1, + "export": 0, + "if_owner": 0, + "import": 0, + "permlevel": 0, + "print": 1, + "read": 1, + "report": 1, + "role": "Stock User", + "set_user_permissions": 0, + "share": 1, + "submit": 1, + "write": 1 + }, + { + "amend": 1, + "cancel": 1, + "create": 1, + "delete": 1, + "email": 1, + "export": 0, + "if_owner": 0, + "import": 0, + "permlevel": 0, + "print": 1, + "read": 1, + "report": 1, + "role": "Manufacturing User", + "set_user_permissions": 0, + "share": 1, + "submit": 1, + "write": 1 + }, + { + "amend": 1, + "cancel": 1, + "create": 1, + "delete": 1, + "email": 1, + "export": 0, + "if_owner": 0, + "import": 0, + "permlevel": 0, + "print": 1, + "read": 1, + "report": 1, + "role": "Manufacturing Manager", + "set_user_permissions": 0, + "share": 1, + "submit": 1, + "write": 1 + }, + { + "amend": 1, + "cancel": 1, + "create": 1, + "delete": 1, + "email": 1, + "export": 1, + "if_owner": 0, + "import": 1, + "permlevel": 0, + "print": 1, + "read": 1, + "report": 1, + "role": "Stock Manager", + "set_user_permissions": 1, + "share": 1, + "submit": 1, + "write": 1 + } + ], + "quick_entry": 0, + "read_only": 0, + "search_fields": "posting_date, from_warehouse, to_warehouse, purpose, remarks", + "show_name_in_global_search": 1, + "sort_field": "modified", + "sort_order": "DESC", + "title_field": "title", + "track_changes": 1, + "track_seen": 0, + "track_views": 0 + } \ No newline at end of file diff --git a/erpnext/stock/doctype/stock_settings/stock_settings.json b/erpnext/stock/doctype/stock_settings/stock_settings.json index e05b320fcf..c989907639 100644 --- a/erpnext/stock/doctype/stock_settings/stock_settings.json +++ b/erpnext/stock/doctype/stock_settings/stock_settings.json @@ -1,926 +1,955 @@ { - "allow_copy": 0, - "allow_guest_to_view": 0, - "allow_import": 0, - "allow_rename": 0, - "autoname": "", - "beta": 0, - "creation": "2013-06-24 16:37:54", - "custom": 0, - "description": "Settings", - "docstatus": 0, - "doctype": "DocType", - "editable_grid": 0, + "allow_copy": 0, + "allow_events_in_timeline": 0, + "allow_guest_to_view": 0, + "allow_import": 0, + "allow_rename": 0, + "autoname": "", + "beta": 0, + "creation": "2013-06-24 16:37:54", + "custom": 0, + "description": "Settings", + "docstatus": 0, + "doctype": "DocType", + "editable_grid": 0, "fields": [ { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "default": "Item Code", - "fieldname": "item_naming_by", - "fieldtype": "Select", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "Item Naming By", - "length": 0, - "no_copy": 0, - "options": "Item Code\nNaming Series", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "default": "Item Code", + "fetch_if_empty": 0, + "fieldname": "item_naming_by", + "fieldtype": "Select", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 1, + "in_standard_filter": 0, + "label": "Item Naming By", + "length": 0, + "no_copy": 0, + "options": "Item Code\nNaming Series", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "description": "", - "fieldname": "item_group", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "Default Item Group", - "length": 0, - "no_copy": 0, - "options": "Item Group", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "description": "", + "fetch_if_empty": 0, + "fieldname": "item_group", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 1, + "in_standard_filter": 0, + "label": "Default Item Group", + "length": 0, + "no_copy": 0, + "options": "Item Group", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "stock_uom", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "Default Stock UOM", - "length": 0, - "no_copy": 0, - "options": "UOM", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "stock_uom", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 1, + "in_standard_filter": 0, + "label": "Default Stock UOM", + "length": 0, + "no_copy": 0, + "options": "UOM", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "default_warehouse", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Default Warehouse", - "length": 0, - "no_copy": 0, - "options": "Warehouse", - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "default_warehouse", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Default Warehouse", + "length": 0, + "no_copy": 0, + "options": "Warehouse", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "default_return_warehouse", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Default Return Warehouse", - "length": 0, - "no_copy": 0, - "options": "Warehouse", - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "sample_retention_warehouse", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Sample Retention Warehouse", + "length": 0, + "no_copy": 0, + "options": "Warehouse", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "sample_retention_warehouse", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Sample Retention Warehouse", - "length": 0, - "no_copy": 0, - "options": "Warehouse", - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "column_break_4", + "fieldtype": "Column Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "length": 0, + "no_copy": 0, + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "column_break_4", - "fieldtype": "Column Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "length": 0, - "no_copy": 0, - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "valuation_method", + "fieldtype": "Select", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Default Valuation Method", + "length": 0, + "no_copy": 0, + "options": "FIFO\nMoving Average", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "valuation_method", - "fieldtype": "Select", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Default Valuation Method", - "length": 0, - "no_copy": 0, - "options": "FIFO\nMoving Average", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "description": "Percentage you are allowed to receive or deliver more against the quantity ordered. For example: If you have ordered 100 units. and your Allowance is 10% then you are allowed to receive 110 units.", + "fetch_if_empty": 0, + "fieldname": "tolerance", + "fieldtype": "Float", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Limit Percent", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "description": "Percentage you are allowed to receive or deliver more against the quantity ordered. For example: If you have ordered 100 units. and your Allowance is 10% then you are allowed to receive 110 units.", - "fieldname": "tolerance", - "fieldtype": "Float", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Limit Percent", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "default": "Stop", + "fetch_if_empty": 0, + "fieldname": "action_if_quality_inspection_is_not_submitted", + "fieldtype": "Select", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Action if Quality inspection is not submitted", + "length": 0, + "no_copy": 0, + "options": "Stop\nWarn", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "default": "1", - "fieldname": "show_barcode_field", - "fieldtype": "Check", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Show Barcode Field", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "default": "1", + "fetch_if_empty": 0, + "fieldname": "show_barcode_field", + "fieldtype": "Check", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Show Barcode Field", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "default": "1", - "fieldname": "clean_description_html", - "fieldtype": "Check", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Convert Item Description to Clean HTML", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "default": "1", + "fetch_if_empty": 0, + "fieldname": "clean_description_html", + "fieldtype": "Check", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Convert Item Description to Clean HTML", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "section_break_7", - "fieldtype": "Section Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "section_break_7", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "auto_insert_price_list_rate_if_missing", - "fieldtype": "Check", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Auto insert Price List rate if missing", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "auto_insert_price_list_rate_if_missing", + "fieldtype": "Check", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Auto insert Price List rate if missing", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "allow_negative_stock", - "fieldtype": "Check", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Allow Negative Stock", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "allow_negative_stock", + "fieldtype": "Check", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Allow Negative Stock", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "column_break_10", - "fieldtype": "Column Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "column_break_10", + "fieldtype": "Column Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "default": "1", - "fieldname": "automatically_set_serial_nos_based_on_fifo", - "fieldtype": "Check", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Automatically Set Serial Nos based on FIFO", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "default": "1", + "fetch_if_empty": 0, + "fieldname": "automatically_set_serial_nos_based_on_fifo", + "fieldtype": "Check", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Automatically Set Serial Nos based on FIFO", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "default": "1", - "fieldname": "set_qty_in_transactions_based_on_serial_no_input", - "fieldtype": "Check", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Set Qty in Transactions based on Serial No Input", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "default": "1", + "fetch_if_empty": 0, + "fieldname": "set_qty_in_transactions_based_on_serial_no_input", + "fieldtype": "Check", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Set Qty in Transactions based on Serial No Input", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "auto_material_request", - "fieldtype": "Section Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Auto Material Request", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "auto_material_request", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Auto Material Request", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "auto_indent", - "fieldtype": "Check", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Raise Material Request when stock reaches re-order level", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "auto_indent", + "fieldtype": "Check", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Raise Material Request when stock reaches re-order level", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "reorder_email_notify", - "fieldtype": "Check", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Notify by Email on creation of automatic Material Request", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "reorder_email_notify", + "fieldtype": "Check", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Notify by Email on creation of automatic Material Request", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "freeze_stock_entries", - "fieldtype": "Section Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Freeze Stock Entries", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "freeze_stock_entries", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Freeze Stock Entries", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "stock_frozen_upto", - "fieldtype": "Date", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Stock Frozen Upto", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "stock_frozen_upto", + "fieldtype": "Date", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Stock Frozen Upto", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "stock_frozen_upto_days", - "fieldtype": "Int", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Freeze Stocks Older Than [Days]", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "stock_frozen_upto_days", + "fieldtype": "Int", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Freeze Stocks Older Than [Days]", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "stock_auth_role", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Role Allowed to edit frozen stock", - "length": 0, - "no_copy": 0, - "options": "Role", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "stock_auth_role", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Role Allowed to edit frozen stock", + "length": 0, + "no_copy": 0, + "options": "Role", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "batch_id_sb", - "fieldtype": "Section Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Batch Identification", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fetch_if_empty": 0, + "fieldname": "batch_id_sb", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Batch Identification", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "default": "0", - "fieldname": "use_naming_series", - "fieldtype": "Check", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Use Naming Series", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "default": "0", + "fetch_if_empty": 0, + "fieldname": "use_naming_series", + "fieldtype": "Check", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Use Naming Series", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "default": "BATCH-", - "depends_on": "eval:doc.use_naming_series==1", - "fieldname": "naming_series_prefix", - "fieldtype": "Data", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Naming Series Prefix", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "default": "BATCH-", + "depends_on": "eval:doc.use_naming_series==1", + "fetch_if_empty": 0, + "fieldname": "naming_series_prefix", + "fieldtype": "Data", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Naming Series Prefix", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "translatable": 0, "unique": 0 } - ], - "has_web_view": 0, - "hide_heading": 0, - "hide_toolbar": 0, - "icon": "icon-cog", - "idx": 1, - "image_view": 0, - "in_create": 0, - "is_submittable": 0, - "issingle": 1, - "istable": 0, - "max_attachments": 0, - "modified": "2018-09-25 01:19:07.738045", - "modified_by": "Administrator", - "module": "Stock", - "name": "Stock Settings", - "owner": "Administrator", + ], + "has_web_view": 0, + "hide_heading": 0, + "hide_toolbar": 0, + "icon": "icon-cog", + "idx": 1, + "image_view": 0, + "in_create": 0, + "is_submittable": 0, + "issingle": 1, + "istable": 0, + "max_attachments": 0, + "modified": "2019-06-18 01:19:07.738045", + "modified_by": "Administrator", + "module": "Stock", + "name": "Stock Settings", + "owner": "Administrator", "permissions": [ { - "amend": 0, - "cancel": 0, - "create": 1, - "delete": 0, - "email": 1, - "export": 0, - "if_owner": 0, - "import": 0, - "permlevel": 0, - "print": 1, - "read": 1, - "report": 0, - "role": "Stock Manager", - "set_user_permissions": 0, - "share": 1, - "submit": 0, + "amend": 0, + "cancel": 0, + "create": 1, + "delete": 0, + "email": 1, + "export": 0, + "if_owner": 0, + "import": 0, + "permlevel": 0, + "print": 1, + "read": 1, + "report": 0, + "role": "Stock Manager", + "set_user_permissions": 0, + "share": 1, + "submit": 0, "write": 1 } - ], - "quick_entry": 1, - "read_only": 0, - "read_only_onload": 0, - "show_name_in_global_search": 0, - "sort_order": "ASC", - "track_changes": 0, - "track_seen": 0, + ], + "quick_entry": 1, + "read_only": 0, + "read_only_onload": 0, + "show_name_in_global_search": 0, + "sort_order": "ASC", + "track_changes": 0, + "track_seen": 0, "track_views": 0 } \ No newline at end of file diff --git a/erpnext/stock/doctype/warehouse/warehouse.py b/erpnext/stock/doctype/warehouse/warehouse.py index 57256c80bd..6cdb56be7f 100644 --- a/erpnext/stock/doctype/warehouse/warehouse.py +++ b/erpnext/stock/doctype/warehouse/warehouse.py @@ -3,7 +3,7 @@ from __future__ import unicode_literals import frappe, erpnext -from frappe.utils import cint +from frappe.utils import cint, nowdate from frappe import throw, _ from frappe.utils.nestedset import NestedSet from erpnext.stock import get_warehouse_account diff --git a/erpnext/stock/get_item_details.py b/erpnext/stock/get_item_details.py index fe2e0a43f1..f1d784c8d9 100644 --- a/erpnext/stock/get_item_details.py +++ b/erpnext/stock/get_item_details.py @@ -321,8 +321,21 @@ def get_basic_details(args, item): out["manufacturer_part_no"] = None out["manufacturer"] = None + child_doctype = args.doctype + ' Item' + meta = frappe.get_meta(child_doctype) + if meta.get_field("barcode"): + update_barcode_value(out) + return out +def update_barcode_value(out): + from erpnext.accounts.doctype.sales_invoice.pos import get_barcode_data + barcode_data = get_barcode_data([out]) + + # If item has one barcode then update the value of the barcode field + if barcode_data and len(barcode_data.get(out.item_code)) == 1: + out['barcode'] = barcode_data.get(out.item_code)[0] + @frappe.whitelist() def get_item_tax_info(company, tax_category, item_codes): out = {} @@ -651,6 +664,10 @@ def validate_conversion_rate(args, meta): def get_party_item_code(args, item_doc, out): if args.transaction_type=="selling" and args.customer: out.customer_item_code = None + + if args.quotation_to and args.quotation_to != 'Customer': + return + customer_item_code = item_doc.get("customer_items", {"customer_name": args.customer}) if customer_item_code: diff --git a/erpnext/stock/report/delayed_item_report/delayed_item_report.js b/erpnext/stock/report/delayed_item_report/delayed_item_report.js index 5d160b1519..40e6abefeb 100644 --- a/erpnext/stock/report/delayed_item_report/delayed_item_report.js +++ b/erpnext/stock/report/delayed_item_report/delayed_item_report.js @@ -55,8 +55,8 @@ frappe.query_reports["Delayed Item Report"] = { label: __("Based On"), fieldtype: "Select", options: ["Delivery Note", "Sales Invoice"], - default: "Delivery Note", + default: "Sales Invoice", reqd: 1 }, ] -} \ No newline at end of file +} diff --git a/erpnext/stock/report/delayed_item_report/delayed_item_report.json b/erpnext/stock/report/delayed_item_report/delayed_item_report.json index f336cecf20..f5b64a4a55 100644 --- a/erpnext/stock/report/delayed_item_report/delayed_item_report.json +++ b/erpnext/stock/report/delayed_item_report/delayed_item_report.json @@ -7,7 +7,7 @@ "doctype": "Report", "idx": 0, "is_standard": "Yes", - "letter_head": "Gadgets International", + "letter_head": "", "modified": "2019-06-17 12:45:07.324014", "modified_by": "Administrator", "module": "Stock", diff --git a/erpnext/stock/report/delayed_item_report/delayed_item_report.py b/erpnext/stock/report/delayed_item_report/delayed_item_report.py index 7b968b89a7..4fc4027200 100644 --- a/erpnext/stock/report/delayed_item_report/delayed_item_report.py +++ b/erpnext/stock/report/delayed_item_report/delayed_item_report.py @@ -46,7 +46,8 @@ class DelayedItemReport(object): self.transactions = frappe.db.sql(""" SELECT `tab{child_doc}`.item_code, `tab{child_doc}`.item_name, `tab{child_doc}`.item_group, `tab{child_doc}`.qty, `tab{child_doc}`.rate, `tab{child_doc}`.amount, `tab{child_doc}`.so_detail, `tab{child_doc}`.{so_field} as sales_order, - `tab{doctype}`.customer, `tab{doctype}`.posting_date, `tab{doctype}`.name, `tab{doctype}`.grand_total + `tab{doctype}`.shipping_address_name, `tab{doctype}`.po_no, `tab{doctype}`.customer, + `tab{doctype}`.posting_date, `tab{doctype}`.name, `tab{doctype}`.grand_total FROM `tab{child_doc}`, `tab{doctype}` WHERE `tab{child_doc}`.parent = `tab{doctype}`.name and `tab{doctype}`.docstatus = 1 and @@ -97,12 +98,20 @@ class DelayedItemReport(object): "fieldtype": "Link", "options": based_on, "width": 100 - },{ + }, + { "label": _("Customer"), "fieldname": "customer", "fieldtype": "Link", "options": "Customer", - "width": 100 + "width": 200 + }, + { + "label": _("Shipping Address"), + "fieldname": "shipping_address_name", + "fieldtype": "Link", + "options": "Address", + "width": 120 }, { "label": _("Expected Delivery Date"), diff --git a/erpnext/stock/report/delayed_order_report/delayed_order_report.js b/erpnext/stock/report/delayed_order_report/delayed_order_report.js index 11752ae9fb..aab0f3d0d1 100644 --- a/erpnext/stock/report/delayed_order_report/delayed_order_report.js +++ b/erpnext/stock/report/delayed_order_report/delayed_order_report.js @@ -55,8 +55,8 @@ frappe.query_reports["Delayed Order Report"] = { label: __("Based On"), fieldtype: "Select", options: ["Delivery Note", "Sales Invoice"], - default: "Delivery Note", + default: "Sales Invoice", reqd: 1 }, ] -} \ No newline at end of file +} diff --git a/erpnext/stock/report/delayed_order_report/delayed_order_report.json b/erpnext/stock/report/delayed_order_report/delayed_order_report.json index 29c27cb1a6..327ee6aaa3 100644 --- a/erpnext/stock/report/delayed_order_report/delayed_order_report.json +++ b/erpnext/stock/report/delayed_order_report/delayed_order_report.json @@ -7,7 +7,7 @@ "doctype": "Report", "idx": 0, "is_standard": "Yes", - "letter_head": "Gadgets International", + "letter_head": "", "modified": "2019-06-17 12:45:56.359322", "modified_by": "Administrator", "module": "Stock", diff --git a/erpnext/stock/report/delayed_order_report/delayed_order_report.py b/erpnext/stock/report/delayed_order_report/delayed_order_report.py index d2a1a30d9e..79dc5d8821 100644 --- a/erpnext/stock/report/delayed_order_report/delayed_order_report.py +++ b/erpnext/stock/report/delayed_order_report/delayed_order_report.py @@ -42,7 +42,14 @@ class DelayedOrderReport(DelayedItemReport): "fieldname": "customer", "fieldtype": "Link", "options": "Customer", - "width": 100 + "width": 200 + }, + { + "label": _("Shipping Address"), + "fieldname": "shipping_address_name", + "fieldtype": "Link", + "options": "Address", + "width": 140 }, { "label": _("Expected Delivery Date"), @@ -73,11 +80,11 @@ class DelayedOrderReport(DelayedItemReport): "fieldname": "sales_order", "fieldtype": "Link", "options": "Sales Order", - "width": 100 + "width": 150 }, { "label": _("Customer PO"), "fieldname": "po_no", "fieldtype": "Data", - "width": 100 + "width": 110 }] \ No newline at end of file diff --git a/erpnext/stock/report/stock_ledger/stock_ledger.py b/erpnext/stock/report/stock_ledger/stock_ledger.py index a810ddd931..d386230687 100644 --- a/erpnext/stock/report/stock_ledger/stock_ledger.py +++ b/erpnext/stock/report/stock_ledger/stock_ledger.py @@ -22,12 +22,8 @@ def execute(filters=None): for sle in sl_entries: item_detail = item_details[sle.item_code] - data.append([sle.date, sle.item_code, item_detail.item_name, item_detail.item_group, - item_detail.brand, item_detail.description, sle.warehouse, - item_detail.stock_uom, sle.actual_qty, sle.qty_after_transaction, - (sle.incoming_rate if sle.actual_qty > 0 else 0.0), - sle.valuation_rate, sle.stock_value, sle.voucher_type, sle.voucher_no, - sle.batch_no, sle.serial_no, sle.project, sle.company]) + sle.update(item_detail) + data.append(sle) if include_uom: conversion_factors.append(item_detail.conversion_factor) diff --git a/erpnext/stock/report/supplier_wise_sales_analytics/supplier_wise_sales_analytics.py b/erpnext/stock/report/supplier_wise_sales_analytics/supplier_wise_sales_analytics.py index 2a02b469fb..6a86889aa3 100644 --- a/erpnext/stock/report/supplier_wise_sales_analytics/supplier_wise_sales_analytics.py +++ b/erpnext/stock/report/supplier_wise_sales_analytics/supplier_wise_sales_analytics.py @@ -94,9 +94,13 @@ def get_suppliers_details(filters): item_supplier_map.setdefault(d.item_code, []).append(d.supplier) if supplier: + invalid_items = [] for item_code, suppliers in iteritems(item_supplier_map): if supplier not in suppliers: - del item_supplier_map[item_code] + invalid_items.append(item_code) + + for item_code in invalid_items: + del item_supplier_map[item_code] return item_supplier_map diff --git a/erpnext/stock/report/total_stock_summary/total_stock_summary.js b/erpnext/stock/report/total_stock_summary/total_stock_summary.js index 90648f1b24..264642856d 100644 --- a/erpnext/stock/report/total_stock_summary/total_stock_summary.js +++ b/erpnext/stock/report/total_stock_summary/total_stock_summary.js @@ -38,4 +38,4 @@ frappe.query_reports["Total Stock Summary"] = { "reqd": 1 }, ] -} +} \ No newline at end of file diff --git a/erpnext/support/doctype/issue/issue.json b/erpnext/support/doctype/issue/issue.json index 3ad5153a6b..b7c4166f6c 100644 --- a/erpnext/support/doctype/issue/issue.json +++ b/erpnext/support/doctype/issue/issue.json @@ -69,7 +69,8 @@ "fieldtype": "Data", "in_global_search": 1, "label": "Subject", - "reqd": 1 + "reqd": 1, + "in_standard_filter": 1 }, { "fieldname": "customer", @@ -336,7 +337,7 @@ ], "icon": "fa fa-ticket", "idx": 7, - "modified": "2019-05-20 15:19:00.771333", + "modified": "2019-06-27 15:19:00.771333", "modified_by": "Administrator", "module": "Support", "name": "Issue", @@ -361,4 +362,4 @@ "timeline_field": "customer", "title_field": "subject", "track_seen": 1 -} \ No newline at end of file +} diff --git a/erpnext/templates/includes/product_page.js b/erpnext/templates/includes/product_page.js new file mode 100644 index 0000000000..af98fc7987 --- /dev/null +++ b/erpnext/templates/includes/product_page.js @@ -0,0 +1,217 @@ +// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors +// License: GNU General Public License v3. See license.txt + +frappe.ready(function() { + window.item_code = $('[itemscope] [itemprop="productID"]').text().trim(); + var qty = 0; + + frappe.call({ + type: "POST", + method: "erpnext.shopping_cart.product_info.get_product_info_for_website", + args: { + item_code: get_item_code() + }, + callback: function(r) { + if(r.message) { + if(r.message.cart_settings.enabled) { + let hide_add_to_cart = !r.message.product_info.price + || (!r.message.product_info.in_stock && !r.message.cart_settings.allow_items_not_in_stock); + $(".item-cart, .item-price, .item-stock").toggleClass('hide', hide_add_to_cart); + } + if(r.message.cart_settings.show_price) { + $(".item-price").toggleClass("hide", false); + } + if(r.message.cart_settings.show_stock_availability) { + $(".item-stock").toggleClass("hide", false); + } + if(r.message.product_info.price) { + $(".item-price") + .html(r.message.product_info.price.formatted_price_sales_uom + "
\ + (" + r.message.product_info.price.formatted_price + " / " + r.message.product_info.uom + ")
"); + + if(r.message.product_info.in_stock==0) { + $(".item-stock").html("
{{ _("Not in stock") }}
"); + } + else if(r.message.product_info.in_stock==1) { + var qty_display = "{{ _("In stock") }}"; + if (r.message.product_info.show_stock_qty) { + qty_display += " ("+r.message.product_info.stock_qty+")"; + } + $(".item-stock").html("
\ + "+qty_display+"
"); + } + + if(r.message.product_info.qty) { + qty = r.message.product_info.qty; + toggle_update_cart(r.message.product_info.qty); + } else { + toggle_update_cart(0); + } + } + } + } + }) + + $("#item-add-to-cart button").on("click", function() { + frappe.provide('erpnext.shopping_cart'); + + erpnext.shopping_cart.update_cart({ + item_code: get_item_code(), + qty: $("#item-spinner .cart-qty").val(), + callback: function(r) { + if(!r.exc) { + toggle_update_cart(1); + qty = 1; + } + }, + btn: this, + }); + }); + + $("#item-spinner").on('click', '.number-spinner button', function () { + var btn = $(this), + input = btn.closest('.number-spinner').find('input'), + oldValue = input.val().trim(), + newVal = 0; + + if (btn.attr('data-dir') == 'up') { + newVal = parseInt(oldValue) + 1; + } else if (btn.attr('data-dir') == 'dwn') { + if (parseInt(oldValue) > 1) { + newVal = parseInt(oldValue) - 1; + } + else { + newVal = parseInt(oldValue); + } + } + input.val(newVal); + }); + + $("[itemscope] .item-view-attribute .form-control").on("change", function() { + try { + var item_code = encodeURIComponent(get_item_code()); + + } catch(e) { + // unable to find variant + // then chose the closest available one + + var attribute = $(this).attr("data-attribute"); + var attribute_value = $(this).val(); + var item_code = find_closest_match(attribute, attribute_value); + + if (!item_code) { + frappe.msgprint(__("Cannot find a matching Item. Please select some other value for {0}.", [attribute])) + throw e; + } + } + + if (window.location.search == ("?variant=" + item_code) || window.location.search.includes(item_code)) { + return; + } + + window.location.href = window.location.pathname + "?variant=" + item_code; + }); + + // change the item image src when alternate images are hovered + $(document.body).on('mouseover', '.item-alternative-image', (e) => { + const $alternative_image = $(e.currentTarget); + const src = $alternative_image.find('img').prop('src'); + $('.item-image img').prop('src', src); + }); +}); + +var toggle_update_cart = function(qty) { + $("#item-add-to-cart").toggle(qty ? false : true); + $("#item-update-cart") + .toggle(qty ? true : false) + .find("input").val(qty); + $("#item-spinner").toggle(qty ? false : true); +} + +function get_item_code() { + var variant_info = window.variant_info; + if(variant_info) { + var attributes = get_selected_attributes(); + var no_of_attributes = Object.keys(attributes).length; + + for(var i in variant_info) { + var variant = variant_info[i]; + + if (variant.attributes.length < no_of_attributes) { + // the case when variant has less attributes than template + continue; + } + + var match = true; + for(var j in variant.attributes) { + if(attributes[variant.attributes[j].attribute] + != variant.attributes[j].attribute_value + ) { + match = false; + break; + } + } + if(match) { + return variant.name; + } + } + throw "Unable to match variant"; + } else { + return window.item_code; + } +} + +function find_closest_match(selected_attribute, selected_attribute_value) { + // find the closest match keeping the selected attribute in focus and get the item code + + var attributes = get_selected_attributes(); + + var previous_match_score = 0; + var previous_no_of_attributes = 0; + var matched; + + var variant_info = window.variant_info; + for(var i in variant_info) { + var variant = variant_info[i]; + var match_score = 0; + var has_selected_attribute = false; + + for(var j in variant.attributes) { + if(attributes[variant.attributes[j].attribute]===variant.attributes[j].attribute_value) { + match_score = match_score + 1; + + if (variant.attributes[j].attribute==selected_attribute && variant.attributes[j].attribute_value==selected_attribute_value) { + has_selected_attribute = true; + } + } + } + + if (has_selected_attribute + && ((match_score > previous_match_score) || (match_score==previous_match_score && previous_no_of_attributes < variant.attributes.length))) { + previous_match_score = match_score; + matched = variant; + previous_no_of_attributes = variant.attributes.length; + + + } + } + + if (matched) { + for (var j in matched.attributes) { + var attr = matched.attributes[j]; + $('[itemscope]') + .find(repl('.item-view-attribute .form-control[data-attribute="%(attribute)s"]', attr)) + .val(attr.attribute_value); + } + + return matched.name; + } +} + +function get_selected_attributes() { + var attributes = {}; + $('[itemscope]').find(".item-view-attribute .form-control").each(function() { + attributes[$(this).attr('data-attribute')] = $(this).val(); + }); + return attributes; +} diff --git a/erpnext/templates/utils.py b/erpnext/templates/utils.py index cb44fd30d2..743657de32 100644 --- a/erpnext/templates/utils.py +++ b/erpnext/templates/utils.py @@ -28,7 +28,7 @@ def send_message(subject="Website Query", message="", sender="", status="Open"): opportunity = frappe.get_doc(dict( doctype ='Opportunity', - enquiry_from = 'Customer' if customer else 'Lead', + opportunity_from = 'Customer' if customer else 'Lead', status = 'Open', title = subject, contact_email = sender, @@ -36,11 +36,11 @@ def send_message(subject="Website Query", message="", sender="", status="Open"): )) if customer: - opportunity.customer = customer[0][0] + opportunity.party_name = customer[0][0] elif lead: - opportunity.lead = lead + opportunity.party_name = lead else: - opportunity.lead = new_lead.name + opportunity.party_name = new_lead.name opportunity.insert(ignore_permissions=True) diff --git a/erpnext/tests/test_search.py b/erpnext/tests/test_search.py index ab8eca3a3b..8a93b6a5a8 100644 --- a/erpnext/tests/test_search.py +++ b/erpnext/tests/test_search.py @@ -4,12 +4,12 @@ import frappe from frappe.contacts.address_and_contact import filter_dynamic_link_doctypes class TestSearch(unittest.TestCase): - #Search for the word "clie", part of the word "client" (customer) in french. + #Search for the word "cond", part of the word "conduire" (Lead) in french. def test_contact_search_in_foreign_language(self): frappe.local.lang = 'fr' - output = filter_dynamic_link_doctypes("DocType", "clie", "name", 0, 20, {'fieldtype': 'HTML', 'fieldname': 'contact_html'}) + output = filter_dynamic_link_doctypes("DocType", "cond", "name", 0, 20, {'fieldtype': 'HTML', 'fieldname': 'contact_html'}) - result = [['found' for x in y if x=="Customer"] for y in output] + result = [['found' for x in y if x=="Lead"] for y in output] self.assertTrue(['found'] in result) def tearDown(self): diff --git a/requirements.txt b/requirements.txt index 0fee6c1084..28ba9f676f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -6,4 +6,5 @@ python-stdnum braintree gocardless_pro woocommerce -pandas \ No newline at end of file +pandas +plaid-python \ No newline at end of file