Merge branch 'staging-fixes' into staging
This commit is contained in:
commit
43c95e397a
@ -42,6 +42,20 @@ frappe.ui.form.on('POS Profile', {
|
|||||||
frm.toggle_display('offline_pos_section', is_offline);
|
frm.toggle_display('offline_pos_section', is_offline);
|
||||||
frm.toggle_display('print_format_for_online', !is_offline);
|
frm.toggle_display('print_format_for_online', !is_offline);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
frm.set_query('company_address', function(doc) {
|
||||||
|
if(!doc.company) {
|
||||||
|
frappe.throw(__('Please set Company'));
|
||||||
|
}
|
||||||
|
|
||||||
|
return {
|
||||||
|
query: 'frappe.contacts.doctype.address.address.address_query',
|
||||||
|
filters: {
|
||||||
|
link_doctype: 'Company',
|
||||||
|
link_name: doc.company
|
||||||
|
}
|
||||||
|
};
|
||||||
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
refresh: function(frm) {
|
refresh: function(frm) {
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
{
|
{
|
||||||
"allow_copy": 0,
|
"allow_copy": 0,
|
||||||
|
"allow_events_in_timeline": 0,
|
||||||
"allow_guest_to_view": 0,
|
"allow_guest_to_view": 0,
|
||||||
"allow_import": 0,
|
"allow_import": 0,
|
||||||
"allow_rename": 1,
|
"allow_rename": 1,
|
||||||
@ -13,6 +14,7 @@
|
|||||||
"fields": [
|
"fields": [
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
|
"allow_in_quick_entry": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@ -45,6 +47,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
|
"allow_in_quick_entry": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@ -75,6 +78,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
|
"allow_in_quick_entry": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@ -102,10 +106,11 @@
|
|||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
"translatable": 0,
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
|
"allow_in_quick_entry": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@ -139,6 +144,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
|
"allow_in_quick_entry": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@ -171,6 +177,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
|
"allow_in_quick_entry": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@ -202,6 +209,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
|
"allow_in_quick_entry": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@ -233,6 +241,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
|
"allow_in_quick_entry": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@ -264,6 +273,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
|
"allow_in_quick_entry": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@ -295,6 +305,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
|
"allow_in_quick_entry": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@ -326,6 +337,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
|
"allow_in_quick_entry": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@ -352,10 +364,12 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
|
"allow_in_quick_entry": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@ -386,6 +400,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
|
"allow_in_quick_entry": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@ -419,6 +434,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
|
"allow_in_quick_entry": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@ -452,6 +468,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
|
"allow_in_quick_entry": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@ -485,6 +502,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
|
"allow_in_quick_entry": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@ -519,6 +537,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
|
"allow_in_quick_entry": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@ -551,6 +570,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
|
"allow_in_quick_entry": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@ -582,6 +602,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
|
"allow_in_quick_entry": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@ -614,6 +635,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
|
"allow_in_quick_entry": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@ -644,6 +666,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
|
"allow_in_quick_entry": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@ -676,6 +699,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
|
"allow_in_quick_entry": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@ -707,6 +731,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
|
"allow_in_quick_entry": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@ -739,6 +764,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
|
"allow_in_quick_entry": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@ -769,6 +795,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
|
"allow_in_quick_entry": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@ -801,6 +828,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
|
"allow_in_quick_entry": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@ -832,6 +860,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
|
"allow_in_quick_entry": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@ -864,6 +893,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
|
"allow_in_quick_entry": 0,
|
||||||
"allow_on_submit": 1,
|
"allow_on_submit": 1,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@ -897,6 +927,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
|
"allow_in_quick_entry": 0,
|
||||||
"allow_on_submit": 1,
|
"allow_on_submit": 1,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@ -930,6 +961,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
|
"allow_in_quick_entry": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@ -960,6 +992,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
|
"allow_in_quick_entry": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@ -993,6 +1026,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
|
"allow_in_quick_entry": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@ -1026,6 +1060,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
|
"allow_in_quick_entry": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@ -1057,6 +1092,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
|
"allow_in_quick_entry": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@ -1091,6 +1127,72 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
|
"allow_in_quick_entry": 0,
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
|
"columns": 0,
|
||||||
|
"fieldname": "company_address_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": "Company 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,
|
||||||
|
"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 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,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@ -1123,6 +1225,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
|
"allow_in_quick_entry": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@ -1157,6 +1260,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
|
"allow_in_quick_entry": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@ -1187,6 +1291,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
|
"allow_in_quick_entry": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@ -1220,6 +1325,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
|
"allow_in_quick_entry": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@ -1252,6 +1358,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
|
"allow_in_quick_entry": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@ -1284,6 +1391,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
|
"allow_in_quick_entry": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@ -1317,6 +1425,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
|
"allow_in_quick_entry": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@ -1350,6 +1459,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
|
"allow_in_quick_entry": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@ -1382,6 +1492,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
|
"allow_in_quick_entry": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@ -1414,6 +1525,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
|
"allow_in_quick_entry": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@ -1444,6 +1556,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
|
"allow_in_quick_entry": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@ -1477,6 +1590,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
|
"allow_in_quick_entry": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@ -1509,6 +1623,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
|
"allow_in_quick_entry": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@ -1542,6 +1657,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
|
"allow_in_quick_entry": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@ -1585,7 +1701,7 @@
|
|||||||
"issingle": 0,
|
"issingle": 0,
|
||||||
"istable": 0,
|
"istable": 0,
|
||||||
"max_attachments": 0,
|
"max_attachments": 0,
|
||||||
"modified": "2018-09-05 12:43:37.272875",
|
"modified": "2018-12-03 14:16:08.589778",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Accounts",
|
"module": "Accounts",
|
||||||
"name": "POS Profile",
|
"name": "POS Profile",
|
||||||
@ -1639,5 +1755,6 @@
|
|||||||
"sort_order": "DESC",
|
"sort_order": "DESC",
|
||||||
"title_field": "pos_profile_name",
|
"title_field": "pos_profile_name",
|
||||||
"track_changes": 0,
|
"track_changes": 0,
|
||||||
"track_seen": 0
|
"track_seen": 0,
|
||||||
|
"track_views": 0
|
||||||
}
|
}
|
@ -313,6 +313,10 @@ erpnext.accounts.SalesInvoiceController = erpnext.selling.SellingController.exte
|
|||||||
erpnext.setup_serial_no();
|
erpnext.setup_serial_no();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
packed_items_on_form_rendered: function(doc, grid_row) {
|
||||||
|
erpnext.setup_serial_no();
|
||||||
|
},
|
||||||
|
|
||||||
make_sales_return: function() {
|
make_sales_return: function() {
|
||||||
frappe.model.open_mapped_doc({
|
frappe.model.open_mapped_doc({
|
||||||
method: "erpnext.accounts.doctype.sales_invoice.sales_invoice.make_sales_return",
|
method: "erpnext.accounts.doctype.sales_invoice.sales_invoice.make_sales_return",
|
||||||
@ -585,7 +589,7 @@ frappe.ui.form.on('Sales Invoice', {
|
|||||||
|
|
||||||
frm.set_query('company_address', function(doc) {
|
frm.set_query('company_address', function(doc) {
|
||||||
if(!doc.company) {
|
if(!doc.company) {
|
||||||
frappe.throw(_('Please set Company'));
|
frappe.throw(__('Please set Company'));
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
@ -397,7 +397,7 @@ class SalesInvoice(SellingController):
|
|||||||
self.account_for_change_amount = pos.get('account_for_change_amount')
|
self.account_for_change_amount = pos.get('account_for_change_amount')
|
||||||
|
|
||||||
for fieldname in ('territory', 'naming_series', 'currency', 'taxes_and_charges', 'letter_head', 'tc_name',
|
for fieldname in ('territory', 'naming_series', 'currency', 'taxes_and_charges', 'letter_head', 'tc_name',
|
||||||
'selling_price_list', 'company', 'select_print_heading', 'cash_bank_account',
|
'selling_price_list', 'company', 'select_print_heading', 'cash_bank_account', 'company_address',
|
||||||
'write_off_account', 'write_off_cost_center', 'apply_discount_on'):
|
'write_off_account', 'write_off_cost_center', 'apply_discount_on'):
|
||||||
if (not for_validate) or (for_validate and not self.get(fieldname)):
|
if (not for_validate) or (for_validate and not self.get(fieldname)):
|
||||||
self.set(fieldname, pos.get(fieldname))
|
self.set(fieldname, pos.get(fieldname))
|
||||||
|
@ -537,7 +537,7 @@ def get_party_shipping_address(doctype, name):
|
|||||||
'dl.link_doctype=%s '
|
'dl.link_doctype=%s '
|
||||||
'and dl.link_name=%s '
|
'and dl.link_name=%s '
|
||||||
'and dl.parenttype="Address" '
|
'and dl.parenttype="Address" '
|
||||||
'and '
|
'and ifnull(ta.disabled, 0) = 0 and'
|
||||||
'(ta.address_type="Shipping" or ta.is_shipping_address=1) '
|
'(ta.address_type="Shipping" or ta.is_shipping_address=1) '
|
||||||
'order by ta.is_shipping_address desc, ta.address_type desc limit 1',
|
'order by ta.is_shipping_address desc, ta.address_type desc limit 1',
|
||||||
(doctype, name)
|
(doctype, name)
|
||||||
|
@ -10,36 +10,6 @@ frappe.query_reports["Accounts Payable"] = {
|
|||||||
"options": "Company",
|
"options": "Company",
|
||||||
"default": frappe.defaults.get_user_default("Company")
|
"default": frappe.defaults.get_user_default("Company")
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"fieldname":"finance_book",
|
|
||||||
"label": __("Finance Book"),
|
|
||||||
"fieldtype": "Link",
|
|
||||||
"options": "Finance Book"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"fieldname":"supplier",
|
|
||||||
"label": __("Supplier"),
|
|
||||||
"fieldtype": "Link",
|
|
||||||
"options": "Supplier",
|
|
||||||
on_change: () => {
|
|
||||||
var supplier = frappe.query_report.get_filter_value('supplier');
|
|
||||||
frappe.db.get_value('Supplier', supplier, "tax_id", function(value) {
|
|
||||||
frappe.query_report.set_filter_value('tax_id', value["tax_id"]);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"fieldname":"supplier_group",
|
|
||||||
"label": __("Supplier Group"),
|
|
||||||
"fieldtype": "Link",
|
|
||||||
"options": "Supplier Group"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"fieldname":"report_date",
|
|
||||||
"label": __("As on Date"),
|
|
||||||
"fieldtype": "Date",
|
|
||||||
"default": frappe.datetime.get_today()
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"fieldname":"ageing_based_on",
|
"fieldname":"ageing_based_on",
|
||||||
"label": __("Ageing Based On"),
|
"label": __("Ageing Based On"),
|
||||||
@ -48,7 +18,10 @@ frappe.query_reports["Accounts Payable"] = {
|
|||||||
"default": "Posting Date"
|
"default": "Posting Date"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldtype": "Break",
|
"fieldname":"report_date",
|
||||||
|
"label": __("As on Date"),
|
||||||
|
"fieldtype": "Date",
|
||||||
|
"default": frappe.datetime.get_today()
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname":"range1",
|
"fieldname":"range1",
|
||||||
@ -71,6 +44,34 @@ frappe.query_reports["Accounts Payable"] = {
|
|||||||
"default": "90",
|
"default": "90",
|
||||||
"reqd": 1
|
"reqd": 1
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"fieldname":"finance_book",
|
||||||
|
"label": __("Finance Book"),
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"options": "Finance Book"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname":"supplier",
|
||||||
|
"label": __("Supplier"),
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"options": "Supplier",
|
||||||
|
on_change: () => {
|
||||||
|
var supplier = frappe.query_report.get_filter_value('supplier');
|
||||||
|
if (supplier) {
|
||||||
|
frappe.db.get_value('Supplier', supplier, "tax_id", function(value) {
|
||||||
|
frappe.query_report.set_filter_value('tax_id', value["tax_id"]);
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
frappe.query_report.set_filter_value('tax_id', "");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname":"supplier_group",
|
||||||
|
"label": __("Supplier Group"),
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"options": "Supplier Group"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"fieldname":"tax_id",
|
"fieldname":"tax_id",
|
||||||
"label": __("Tax Id"),
|
"label": __("Tax Id"),
|
||||||
|
@ -10,24 +10,6 @@ frappe.query_reports["Accounts Payable Summary"] = {
|
|||||||
"options": "Company",
|
"options": "Company",
|
||||||
"default": frappe.defaults.get_user_default("Company")
|
"default": frappe.defaults.get_user_default("Company")
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"fieldname":"supplier",
|
|
||||||
"label": __("Supplier"),
|
|
||||||
"fieldtype": "Link",
|
|
||||||
"options": "Supplier"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"fieldname":"supplier_group",
|
|
||||||
"label": __("Supplier Group"),
|
|
||||||
"fieldtype": "Link",
|
|
||||||
"options": "Supplier Group"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"fieldname":"report_date",
|
|
||||||
"label": __("Date"),
|
|
||||||
"fieldtype": "Date",
|
|
||||||
"default": frappe.datetime.get_today()
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"fieldname":"ageing_based_on",
|
"fieldname":"ageing_based_on",
|
||||||
"label": __("Ageing Based On"),
|
"label": __("Ageing Based On"),
|
||||||
@ -36,7 +18,10 @@ frappe.query_reports["Accounts Payable Summary"] = {
|
|||||||
"default": "Posting Date"
|
"default": "Posting Date"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldtype": "Break",
|
"fieldname":"report_date",
|
||||||
|
"label": __("Date"),
|
||||||
|
"fieldtype": "Date",
|
||||||
|
"default": frappe.datetime.get_today()
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname":"range1",
|
"fieldname":"range1",
|
||||||
@ -58,6 +43,24 @@ frappe.query_reports["Accounts Payable Summary"] = {
|
|||||||
"fieldtype": "Int",
|
"fieldtype": "Int",
|
||||||
"default": "90",
|
"default": "90",
|
||||||
"reqd": 1
|
"reqd": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname":"finance_book",
|
||||||
|
"label": __("Finance Book"),
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"options": "Finance Book"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname":"supplier",
|
||||||
|
"label": __("Supplier"),
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"options": "Supplier"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname":"supplier_group",
|
||||||
|
"label": __("Supplier Group"),
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"options": "Supplier Group"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
||||||
|
@ -1,24 +1,14 @@
|
|||||||
{% if(filters.show_pdc_in_print) { %}
|
|
||||||
<style>
|
|
||||||
@media screen {
|
|
||||||
.print-format {
|
|
||||||
padding: 4mm;
|
|
||||||
font-size: 8.0pt !important;
|
|
||||||
font-family: Tahoma, sans-serif;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
{% } %}
|
|
||||||
<style>
|
<style>
|
||||||
.print-format {
|
.print-format {
|
||||||
padding: 4mm;
|
padding: 4mm;
|
||||||
font-size: 8.0pt !important;
|
font-size: 8.0pt !important;
|
||||||
font-family: Tahoma, sans-serif;
|
}
|
||||||
}
|
.print-format td {
|
||||||
|
vertical-align:middle !important;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
<h2 class="text-center" style="margin-top:0">{%= __(report.report_name) %}</h2>
|
||||||
<h2 class="text-center">{%= __(report.report_name) %}</h2>
|
|
||||||
<h4 class="text-center">
|
<h4 class="text-center">
|
||||||
{% if (filters.customer_name) { %}
|
{% if (filters.customer_name) { %}
|
||||||
{%= filters.customer_name %}
|
{%= filters.customer_name %}
|
||||||
@ -36,7 +26,20 @@
|
|||||||
{%= __("Until") %}
|
{%= __("Until") %}
|
||||||
{%= frappe.datetime.str_to_user(filters.report_date) %}
|
{%= frappe.datetime.str_to_user(filters.report_date) %}
|
||||||
</h5>
|
</h5>
|
||||||
<hr>
|
|
||||||
|
<div class="clearfix">
|
||||||
|
<div class="pull-left">
|
||||||
|
{% if(filters.payment_terms) { %}
|
||||||
|
<strong>{%= __("Payment Terms") %}:</strong> {%= filters.payment_terms %}
|
||||||
|
{% } %}
|
||||||
|
</div>
|
||||||
|
<div class="pull-right">
|
||||||
|
{% if(filters.credit_limit) { %}
|
||||||
|
<strong>{%= __("Credit Limit") %}:</strong> {%= format_currency(filters.credit_limit) %}
|
||||||
|
{% } %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
{% if(filters.show_pdc_in_print) { %}
|
{% if(filters.show_pdc_in_print) { %}
|
||||||
{% var balance_row = data.slice(-1).pop();
|
{% var balance_row = data.slice(-1).pop();
|
||||||
var range1 = report.columns[11].label;
|
var range1 = report.columns[11].label;
|
||||||
@ -104,17 +107,21 @@
|
|||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
{% if(report.report_name === "Accounts Receivable" || report.report_name === "Accounts Payable") { %}
|
{% if(report.report_name === "Accounts Receivable" || report.report_name === "Accounts Payable") { %}
|
||||||
<th style="width: 18%">{%= __("Date") %}</th>
|
<th style="width: 7%">{%= __("Date") %}</th>
|
||||||
<th style="width: 17%">{%= __("Reference") %}</th>
|
<th style="width: 7%">{%= __("Age (Days)") %}</th>
|
||||||
|
<th style="width: 13%">{%= __("Reference") %}</th>
|
||||||
|
{% if(report.report_name === "Accounts Receivable") { %}
|
||||||
|
<th style="width: 10%">{%= __("Sales Person") %}</th>
|
||||||
|
{% } %}
|
||||||
{% if(!filters.show_pdc_in_print) { %}
|
{% if(!filters.show_pdc_in_print) { %}
|
||||||
<th style="width: 20%">{%= (filters.customer || filters.supplier) ? __("Remarks"): __("Party") %}</th>
|
<th style="width: 20%">{%= (filters.customer || filters.supplier) ? __("Remarks"): __("Party") %}</th>
|
||||||
{% } %}
|
{% } %}
|
||||||
<th style="width: 10%">{%= __("Invoiced Amount") %}</th>
|
<th style="width: 10%; text-align: right">{%= __("Invoiced Amount") %}</th>
|
||||||
{% if(!filters.show_pdc_in_print) { %}
|
{% if(!filters.show_pdc_in_print) { %}
|
||||||
<th style="width: 10%">{%= __("Paid Amount") %}</th>
|
<th style="width: 10%; text-align: right">{%= __("Paid Amount") %}</th>
|
||||||
<th style="width: 10%">{%= report.report_name === "Accounts Receivable" ? __('Credit Note') : __('Debit Note') %}</th>
|
<th style="width: 10%; text-align: right">{%= report.report_name === "Accounts Receivable" ? __('Credit Note') : __('Debit Note') %}</th>
|
||||||
{% } %}
|
{% } %}
|
||||||
<th style="width: 15%">{%= __("Outstanding Amount") %}</th>
|
<th style="width: 15%; text-align: right">{%= __("Outstanding Amount") %}</th>
|
||||||
{% if(filters.show_pdc_in_print) { %}
|
{% if(filters.show_pdc_in_print) { %}
|
||||||
{% if(report.report_name === "Accounts Receivable") { %}
|
{% if(report.report_name === "Accounts Receivable") { %}
|
||||||
<th style="width: 10%">{%= __("Customer LPO No.") %}</th>
|
<th style="width: 10%">{%= __("Customer LPO No.") %}</th>
|
||||||
@ -139,6 +146,7 @@
|
|||||||
{% if(report.report_name === "Accounts Receivable" || report.report_name === "Accounts Payable") { %}
|
{% if(report.report_name === "Accounts Receivable" || report.report_name === "Accounts Payable") { %}
|
||||||
{% if(data[i][__("Customer")] || data[i][__("Supplier")]) { %}
|
{% if(data[i][__("Customer")] || data[i][__("Supplier")]) { %}
|
||||||
<td>{%= frappe.datetime.str_to_user(data[i]["posting_date"]) %}</td>
|
<td>{%= frappe.datetime.str_to_user(data[i]["posting_date"]) %}</td>
|
||||||
|
<td style="text-align: right">{%= data[i][__("Age (Days)")] %}</td>
|
||||||
<td>
|
<td>
|
||||||
{% if(!filters.show_pdc_in_print) { %}
|
{% if(!filters.show_pdc_in_print) { %}
|
||||||
{%= data[i]["voucher_type"] %}
|
{%= data[i]["voucher_type"] %}
|
||||||
@ -146,6 +154,11 @@
|
|||||||
{% } %}
|
{% } %}
|
||||||
{%= data[i]["voucher_no"] %}
|
{%= data[i]["voucher_no"] %}
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
|
{% if(report.report_name === "Accounts Receivable") { %}
|
||||||
|
<td>{%= data[i]["sales_person"] %}</td>
|
||||||
|
{% } %}
|
||||||
|
|
||||||
{% if(!filters.show_pdc_in_print) { %}
|
{% if(!filters.show_pdc_in_print) { %}
|
||||||
<td>
|
<td>
|
||||||
{% if(!(filters.customer || filters.supplier)) { %}
|
{% if(!(filters.customer || filters.supplier)) { %}
|
||||||
@ -156,10 +169,15 @@
|
|||||||
<br> {%= data[i][__("Supplier Name")] %}
|
<br> {%= data[i][__("Supplier Name")] %}
|
||||||
{% } %}
|
{% } %}
|
||||||
{% } %}
|
{% } %}
|
||||||
<br>{%= __("Remarks") %}:
|
<div>
|
||||||
|
{% if data[i][__("Remarks")] %}
|
||||||
|
{%= __("Remarks") %}:
|
||||||
{%= data[i][__("Remarks")] %}
|
{%= data[i][__("Remarks")] %}
|
||||||
|
{% } %}
|
||||||
|
</div>
|
||||||
</td>
|
</td>
|
||||||
{% } %}
|
{% } %}
|
||||||
|
|
||||||
<td style="text-align: right">
|
<td style="text-align: right">
|
||||||
{%= format_currency(data[i]["invoiced_amount"], data[i]["currency"]) %}</td>
|
{%= format_currency(data[i]["invoiced_amount"], data[i]["currency"]) %}</td>
|
||||||
|
|
||||||
@ -187,7 +205,11 @@
|
|||||||
{% if(!filters.show_pdc_in_print) { %}
|
{% if(!filters.show_pdc_in_print) { %}
|
||||||
<td></td>
|
<td></td>
|
||||||
{% } %}
|
{% } %}
|
||||||
<td><b>{%= __("Total") %}</b></td>
|
{% if(report.report_name === "Accounts Receivable") { %}
|
||||||
|
<td></td>
|
||||||
|
{% } %}
|
||||||
|
<td></td>
|
||||||
|
<td style="text-align: right"><b>{%= __("Total") %}</b></td>
|
||||||
<td style="text-align: right">
|
<td style="text-align: right">
|
||||||
{%= format_currency(data[i]["invoiced_amount"], data[i]["currency"] ) %}</td>
|
{%= format_currency(data[i]["invoiced_amount"], data[i]["currency"] ) %}</td>
|
||||||
|
|
||||||
|
@ -10,6 +10,40 @@ frappe.query_reports["Accounts Receivable"] = {
|
|||||||
"options": "Company",
|
"options": "Company",
|
||||||
"default": frappe.defaults.get_user_default("Company")
|
"default": frappe.defaults.get_user_default("Company")
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"fieldname":"ageing_based_on",
|
||||||
|
"label": __("Ageing Based On"),
|
||||||
|
"fieldtype": "Select",
|
||||||
|
"options": 'Posting Date\nDue Date',
|
||||||
|
"default": "Posting Date"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname":"report_date",
|
||||||
|
"label": __("As on Date"),
|
||||||
|
"fieldtype": "Date",
|
||||||
|
"default": frappe.datetime.get_today()
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname":"range1",
|
||||||
|
"label": __("Ageing Range 1"),
|
||||||
|
"fieldtype": "Int",
|
||||||
|
"default": "30",
|
||||||
|
"reqd": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname":"range2",
|
||||||
|
"label": __("Ageing Range 2"),
|
||||||
|
"fieldtype": "Int",
|
||||||
|
"default": "60",
|
||||||
|
"reqd": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname":"range3",
|
||||||
|
"label": __("Ageing Range 3"),
|
||||||
|
"fieldtype": "Int",
|
||||||
|
"default": "90",
|
||||||
|
"reqd": 1
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"fieldname":"finance_book",
|
"fieldname":"finance_book",
|
||||||
"label": __("Finance Book"),
|
"label": __("Finance Book"),
|
||||||
@ -23,10 +57,19 @@ frappe.query_reports["Accounts Receivable"] = {
|
|||||||
"options": "Customer",
|
"options": "Customer",
|
||||||
on_change: () => {
|
on_change: () => {
|
||||||
var customer = frappe.query_report.get_filter_value('customer');
|
var customer = frappe.query_report.get_filter_value('customer');
|
||||||
frappe.db.get_value('Customer', customer, ["tax_id", "customer_name"], function(value) {
|
if (customer) {
|
||||||
|
frappe.db.get_value('Customer', customer, ["tax_id", "customer_name", "credit_limit", "payment_terms"], function(value) {
|
||||||
frappe.query_report.set_filter_value('tax_id', value["tax_id"]);
|
frappe.query_report.set_filter_value('tax_id', value["tax_id"]);
|
||||||
frappe.query_report.set_filter_value('customer_name', value["customer_name"]);
|
frappe.query_report.set_filter_value('customer_name', value["customer_name"]);
|
||||||
|
frappe.query_report.set_filter_value('credit_limit', value["credit_limit"]);
|
||||||
|
frappe.query_report.set_filter_value('payment_terms', value["payment_terms"]);
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
frappe.query_report.set_filter_value('tax_id', "");
|
||||||
|
frappe.query_report.set_filter_value('customer_name', "");
|
||||||
|
frappe.query_report.set_filter_value('credit_limit', "");
|
||||||
|
frappe.query_report.set_filter_value('payment_terms', "");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -59,43 +102,6 @@ frappe.query_reports["Accounts Receivable"] = {
|
|||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"options": "Sales Person"
|
"options": "Sales Person"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"fieldtype": "Break",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"fieldname":"report_date",
|
|
||||||
"label": __("As on Date"),
|
|
||||||
"fieldtype": "Date",
|
|
||||||
"default": frappe.datetime.get_today()
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"fieldname":"ageing_based_on",
|
|
||||||
"label": __("Ageing Based On"),
|
|
||||||
"fieldtype": "Select",
|
|
||||||
"options": 'Posting Date\nDue Date',
|
|
||||||
"default": "Posting Date"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"fieldname":"range1",
|
|
||||||
"label": __("Ageing Range 1"),
|
|
||||||
"fieldtype": "Int",
|
|
||||||
"default": "30",
|
|
||||||
"reqd": 1
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"fieldname":"range2",
|
|
||||||
"label": __("Ageing Range 2"),
|
|
||||||
"fieldtype": "Int",
|
|
||||||
"default": "60",
|
|
||||||
"reqd": 1
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"fieldname":"range3",
|
|
||||||
"label": __("Ageing Range 3"),
|
|
||||||
"fieldtype": "Int",
|
|
||||||
"default": "90",
|
|
||||||
"reqd": 1
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"fieldname":"show_pdc_in_print",
|
"fieldname":"show_pdc_in_print",
|
||||||
"label": __("Show PDC in Print"),
|
"label": __("Show PDC in Print"),
|
||||||
@ -112,6 +118,18 @@ frappe.query_reports["Accounts Receivable"] = {
|
|||||||
"label": __("Customer Name"),
|
"label": __("Customer Name"),
|
||||||
"fieldtype": "Data",
|
"fieldtype": "Data",
|
||||||
"hidden": 1
|
"hidden": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname":"payment_terms",
|
||||||
|
"label": __("Payment Tems"),
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"hidden": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname":"credit_limit",
|
||||||
|
"label": __("Credit Limit"),
|
||||||
|
"fieldtype": "Currency",
|
||||||
|
"hidden": 1
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
||||||
|
@ -125,17 +125,22 @@ class ReceivablePayableReport(object):
|
|||||||
}]
|
}]
|
||||||
|
|
||||||
if args.get('party_type') == 'Customer':
|
if args.get('party_type') == 'Customer':
|
||||||
columns.append({
|
columns += [
|
||||||
|
{
|
||||||
"label": _("Customer LPO"),
|
"label": _("Customer LPO"),
|
||||||
"fieldtype": "Data",
|
"fieldtype": "Data",
|
||||||
"fieldname": "po_no",
|
"fieldname": "po_no",
|
||||||
"width": 100,
|
"width": 100,
|
||||||
})
|
},
|
||||||
columns += [_("Delivery Note") + ":Data:100"]
|
_("Delivery Note") + ":Data:100",
|
||||||
if args.get("party_type") == "Customer":
|
|
||||||
columns += [
|
|
||||||
_("Territory") + ":Link/Territory:80",
|
_("Territory") + ":Link/Territory:80",
|
||||||
_("Customer Group") + ":Link/Customer Group:120"
|
_("Customer Group") + ":Link/Customer Group:120",
|
||||||
|
{
|
||||||
|
"label": _("Sales Person"),
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"fieldname": "sales_person",
|
||||||
|
"width": 120,
|
||||||
|
}
|
||||||
]
|
]
|
||||||
if args.get("party_type") == "Supplier":
|
if args.get("party_type") == "Supplier":
|
||||||
columns += [_("Supplier Group") + ":Link/Supplier Group:80"]
|
columns += [_("Supplier Group") + ":Link/Supplier Group:80"]
|
||||||
@ -238,7 +243,8 @@ class ReceivablePayableReport(object):
|
|||||||
|
|
||||||
# customer territory / supplier group
|
# customer territory / supplier group
|
||||||
if args.get("party_type") == "Customer":
|
if args.get("party_type") == "Customer":
|
||||||
row += [self.get_territory(gle.party), self.get_customer_group(gle.party)]
|
row += [self.get_territory(gle.party), self.get_customer_group(gle.party),
|
||||||
|
voucher_details.get(gle.voucher_no, {}).get("sales_person")]
|
||||||
if args.get("party_type") == "Supplier":
|
if args.get("party_type") == "Supplier":
|
||||||
row += [self.get_supplier_group(gle.party)]
|
row += [self.get_supplier_group(gle.party)]
|
||||||
|
|
||||||
@ -395,9 +401,14 @@ class ReceivablePayableReport(object):
|
|||||||
values.append(self.filters.get("sales_partner"))
|
values.append(self.filters.get("sales_partner"))
|
||||||
|
|
||||||
if self.filters.get("sales_person"):
|
if self.filters.get("sales_person"):
|
||||||
conditions.append("""party in (select parent
|
lft, rgt = frappe.db.get_value("Sales Person",
|
||||||
from `tabSales Team` where sales_person=%s and parenttype = 'Customer')""")
|
self.filters.get("sales_person"), ["lft", "rgt"])
|
||||||
values.append(self.filters.get("sales_person"))
|
|
||||||
|
conditions.append("""exists(select name from `tabSales Team` steam where
|
||||||
|
steam.sales_person in (select name from `tabSales Person` where lft >= {0} and rgt <= {1})
|
||||||
|
and ((steam.parent = voucher_no and steam.parenttype = voucher_type)
|
||||||
|
or (steam.parent = against_voucher and steam.parenttype = against_voucher_type)
|
||||||
|
or (steam.parent = party and steam.parenttype = 'Customer')))""".format(lft, rgt))
|
||||||
|
|
||||||
if party_type_field=="supplier":
|
if party_type_field=="supplier":
|
||||||
if self.filters.get("supplier_group"):
|
if self.filters.get("supplier_group"):
|
||||||
@ -550,8 +561,12 @@ def get_voucher_details(party_type, voucher_nos, dn_details):
|
|||||||
voucher_details = frappe._dict()
|
voucher_details = frappe._dict()
|
||||||
|
|
||||||
if party_type == "Customer":
|
if party_type == "Customer":
|
||||||
for si in frappe.db.sql("""select name, due_date, po_no
|
for si in frappe.db.sql("""
|
||||||
from `tabSales Invoice` where docstatus=1 and name in (%s)
|
select inv.name, inv.due_date, inv.po_no, GROUP_CONCAT(steam.sales_person SEPARATOR ', ') as sales_person
|
||||||
|
from `tabSales Invoice` inv
|
||||||
|
left join `tabSales Team` steam on steam.parent = inv.name and steam.parenttype = 'Sales Invoice'
|
||||||
|
where inv.docstatus=1 and inv.name in (%s)
|
||||||
|
group by inv.name
|
||||||
""" %(','.join(['%s'] *len(voucher_nos))), (tuple(voucher_nos)), as_dict=1):
|
""" %(','.join(['%s'] *len(voucher_nos))), (tuple(voucher_nos)), as_dict=1):
|
||||||
si['delivery_note'] = dn_details.get(si.name)
|
si['delivery_note'] = dn_details.get(si.name)
|
||||||
voucher_details.setdefault(si.name, si)
|
voucher_details.setdefault(si.name, si)
|
||||||
|
@ -11,25 +11,11 @@ frappe.query_reports["Accounts Receivable Summary"] = {
|
|||||||
"default": frappe.defaults.get_user_default("Company")
|
"default": frappe.defaults.get_user_default("Company")
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname":"customer",
|
"fieldname":"ageing_based_on",
|
||||||
"label": __("Customer"),
|
"label": __("Ageing Based On"),
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Select",
|
||||||
"options": "Customer"
|
"options": 'Posting Date\nDue Date',
|
||||||
},
|
"default": "Posting Date"
|
||||||
{
|
|
||||||
"fieldname":"customer_group",
|
|
||||||
"label": __("Customer Group"),
|
|
||||||
"fieldtype": "Link",
|
|
||||||
"options": "Customer Group"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"fieldname":"payment_terms_template",
|
|
||||||
"label": __("Payment Terms Template"),
|
|
||||||
"fieldtype": "Link",
|
|
||||||
"options": "Payment Terms Template"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"fieldtype": "Break",
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname":"report_date",
|
"fieldname":"report_date",
|
||||||
@ -37,13 +23,6 @@ frappe.query_reports["Accounts Receivable Summary"] = {
|
|||||||
"fieldtype": "Date",
|
"fieldtype": "Date",
|
||||||
"default": frappe.datetime.get_today()
|
"default": frappe.datetime.get_today()
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"fieldname":"ageing_based_on",
|
|
||||||
"label": __("Ageing Based On"),
|
|
||||||
"fieldtype": "Select",
|
|
||||||
"options": 'Posting Date\nDue Date',
|
|
||||||
"default": "Posting Date"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"fieldname":"range1",
|
"fieldname":"range1",
|
||||||
"label": __("Ageing Range 1"),
|
"label": __("Ageing Range 1"),
|
||||||
@ -64,6 +43,48 @@ frappe.query_reports["Accounts Receivable Summary"] = {
|
|||||||
"fieldtype": "Int",
|
"fieldtype": "Int",
|
||||||
"default": "90",
|
"default": "90",
|
||||||
"reqd": 1
|
"reqd": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname":"finance_book",
|
||||||
|
"label": __("Finance Book"),
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"options": "Finance Book"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname":"customer",
|
||||||
|
"label": __("Customer"),
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"options": "Customer"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname":"customer_group",
|
||||||
|
"label": __("Customer Group"),
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"options": "Customer Group"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname":"payment_terms_template",
|
||||||
|
"label": __("Payment Terms Template"),
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"options": "Payment Terms Template"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname":"territory",
|
||||||
|
"label": __("Territory"),
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"options": "Territory"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname":"sales_partner",
|
||||||
|
"label": __("Sales Partner"),
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"options": "Sales Partner"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname":"sales_person",
|
||||||
|
"label": __("Sales Person"),
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"options": "Sales Person"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
||||||
|
@ -97,6 +97,12 @@ class AccountsReceivableSummary(ReceivablePayableReport):
|
|||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"options": "Customer Group",
|
"options": "Customer Group",
|
||||||
"width": 80
|
"width": 80
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": _("Sales Person"),
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"fieldname": "sales_person",
|
||||||
|
"width": 120,
|
||||||
}]
|
}]
|
||||||
|
|
||||||
if args.get("party_type") == "Supplier":
|
if args.get("party_type") == "Supplier":
|
||||||
@ -135,7 +141,7 @@ class AccountsReceivableSummary(ReceivablePayableReport):
|
|||||||
]
|
]
|
||||||
|
|
||||||
if args.get("party_type") == "Customer":
|
if args.get("party_type") == "Customer":
|
||||||
row += [self.get_territory(party), self.get_customer_group(party)]
|
row += [self.get_territory(party), self.get_customer_group(party), ", ".join(set(party_dict.sales_person))]
|
||||||
if args.get("party_type") == "Supplier":
|
if args.get("party_type") == "Supplier":
|
||||||
row += [self.get_supplier_group(party)]
|
row += [self.get_supplier_group(party)]
|
||||||
|
|
||||||
@ -156,15 +162,19 @@ class AccountsReceivableSummary(ReceivablePayableReport):
|
|||||||
"range1": 0,
|
"range1": 0,
|
||||||
"range2": 0,
|
"range2": 0,
|
||||||
"range3": 0,
|
"range3": 0,
|
||||||
"range4": 0
|
"range4": 0,
|
||||||
|
"sales_person": []
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
for k in list(party_total[d.party]):
|
for k in list(party_total[d.party]):
|
||||||
if k != "currency":
|
if k not in ["currency", "sales_person"]:
|
||||||
party_total[d.party][k] += flt(d.get(k, 0))
|
party_total[d.party][k] += flt(d.get(k, 0))
|
||||||
|
|
||||||
party_total[d.party].currency = d.currency
|
party_total[d.party].currency = d.currency
|
||||||
|
|
||||||
|
if d.sales_person:
|
||||||
|
party_total[d.party].sales_person.append(d.sales_person)
|
||||||
|
|
||||||
return party_total
|
return party_total
|
||||||
|
|
||||||
def get_voucherwise_data(self, party_naming_by, args):
|
def get_voucherwise_data(self, party_naming_by, args):
|
||||||
@ -181,12 +191,13 @@ class AccountsReceivableSummary(ReceivablePayableReport):
|
|||||||
cols += ["bill_no", "bill_date"]
|
cols += ["bill_no", "bill_date"]
|
||||||
|
|
||||||
cols += ["invoiced_amt", "paid_amt", "credit_amt",
|
cols += ["invoiced_amt", "paid_amt", "credit_amt",
|
||||||
"outstanding_amt", "age", "range1", "range2", "range3", "range4", "currency"]
|
"outstanding_amt", "age", "range1", "range2", "range3", "range4", "currency", "pdc/lc_date", "pdc/lc_ref",
|
||||||
|
"pdc/lc_amount", "remaining_balance"]
|
||||||
|
|
||||||
if args.get("party_type") == "Supplier":
|
if args.get("party_type") == "Supplier":
|
||||||
cols += ["supplier_group", "remarks"]
|
cols += ["supplier_group", "remarks"]
|
||||||
if args.get("party_type") == "Customer":
|
if args.get("party_type") == "Customer":
|
||||||
cols += ["territory", "customer_group", "remarks"]
|
cols += ["po_no", "do_no", "territory", "customer_group", "sales_person", "remarks"]
|
||||||
|
|
||||||
return self.make_data_dict(cols, voucherwise_data)
|
return self.make_data_dict(cols, voucherwise_data)
|
||||||
|
|
||||||
|
@ -1,8 +1,10 @@
|
|||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
from frappe import _
|
from frappe import _
|
||||||
|
import frappe
|
||||||
|
|
||||||
|
|
||||||
def get_data():
|
def get_data():
|
||||||
return [
|
config = [
|
||||||
{
|
{
|
||||||
"label": _("Billing"),
|
"label": _("Billing"),
|
||||||
"items": [
|
"items": [
|
||||||
@ -25,48 +27,7 @@ def get_data():
|
|||||||
"type": "doctype",
|
"type": "doctype",
|
||||||
"name": "Payment Entry",
|
"name": "Payment Entry",
|
||||||
"description": _("Bank/Cash transactions against party or for internal transfer")
|
"description": _("Bank/Cash transactions against party or for internal transfer")
|
||||||
},
|
}
|
||||||
{
|
|
||||||
"type": "page",
|
|
||||||
"name": "pos",
|
|
||||||
"label": _("POS"),
|
|
||||||
"description": _("Point of Sale")
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "doctype",
|
|
||||||
"name": "Cashier Closing",
|
|
||||||
"description": _("Cashier Closing")
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "doctype",
|
|
||||||
"name": "Auto Repeat",
|
|
||||||
"label": _("Auto Repeat"),
|
|
||||||
"description": _("To make recurring documents")
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "doctype",
|
|
||||||
"name": "Loyalty Program",
|
|
||||||
"label": _("Loyalty Program"),
|
|
||||||
"description": _("To make Customer based incentive schemes.")
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "doctype",
|
|
||||||
"name": "Loyalty Point Entry",
|
|
||||||
"label": _("Loyalty Point Entry"),
|
|
||||||
"description": _("To view logs of Loyalty Points assigned to a Customer.")
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "report",
|
|
||||||
"name": "Accounts Receivable",
|
|
||||||
"doctype": "Sales Invoice",
|
|
||||||
"is_query_report": True
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "report",
|
|
||||||
"name": "Accounts Payable",
|
|
||||||
"doctype": "Purchase Invoice",
|
|
||||||
"is_query_report": True
|
|
||||||
},
|
|
||||||
]
|
]
|
||||||
|
|
||||||
},
|
},
|
||||||
@ -93,7 +54,7 @@ def get_data():
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "report",
|
"type": "report",
|
||||||
"name":"General Ledger",
|
"name": "General Ledger",
|
||||||
"doctype": "GL Entry",
|
"doctype": "GL Entry",
|
||||||
"is_query_report": True,
|
"is_query_report": True,
|
||||||
},
|
},
|
||||||
@ -121,6 +82,18 @@ def get_data():
|
|||||||
{
|
{
|
||||||
"label": _("Accounting Statements"),
|
"label": _("Accounting Statements"),
|
||||||
"items": [
|
"items": [
|
||||||
|
{
|
||||||
|
"type": "report",
|
||||||
|
"name": "Accounts Receivable",
|
||||||
|
"doctype": "Sales Invoice",
|
||||||
|
"is_query_report": True
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "report",
|
||||||
|
"name": "Accounts Payable",
|
||||||
|
"doctype": "Purchase Invoice",
|
||||||
|
"is_query_report": True
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "report",
|
"type": "report",
|
||||||
"name": "Trial Balance",
|
"name": "Trial Balance",
|
||||||
@ -224,49 +197,6 @@ def get_data():
|
|||||||
},
|
},
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"label": _("Goods and Services Tax (GST India)"),
|
|
||||||
"items": [
|
|
||||||
{
|
|
||||||
"type": "doctype",
|
|
||||||
"name": "GST Settings",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "doctype",
|
|
||||||
"name": "GST HSN Code",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "report",
|
|
||||||
"name": "GSTR-1",
|
|
||||||
"is_query_report": True
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "report",
|
|
||||||
"name": "GSTR-2",
|
|
||||||
"is_query_report": True
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "report",
|
|
||||||
"name": "GST Sales Register",
|
|
||||||
"is_query_report": True
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "report",
|
|
||||||
"name": "GST Purchase Register",
|
|
||||||
"is_query_report": True
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "report",
|
|
||||||
"name": "GST Itemised Sales Register",
|
|
||||||
"is_query_report": True
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "report",
|
|
||||||
"name": "GST Itemised Purchase Register",
|
|
||||||
"is_query_report": True
|
|
||||||
},
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"label": _("Budget and Cost Center"),
|
"label": _("Budget and Cost Center"),
|
||||||
"items": [
|
"items": [
|
||||||
@ -290,7 +220,7 @@ def get_data():
|
|||||||
"doctype": "Cost Center"
|
"doctype": "Cost Center"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type":"doctype",
|
"type": "doctype",
|
||||||
"name": "Monthly Distribution",
|
"name": "Monthly Distribution",
|
||||||
"description": _("Seasonality for setting budgets, targets etc.")
|
"description": _("Seasonality for setting budgets, targets etc.")
|
||||||
},
|
},
|
||||||
@ -347,29 +277,24 @@ def get_data():
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "doctype",
|
"type": "doctype",
|
||||||
"name": "POS Settings",
|
"name": "Terms and Conditions",
|
||||||
"description": _("Setup mode of POS (Online / Offline)")
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "doctype",
|
|
||||||
"name": "POS Profile",
|
|
||||||
"label": _("Point-of-Sale Profile"),
|
|
||||||
"description": _("Setup default values for POS Invoices")
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "doctype",
|
|
||||||
"name":"Terms and Conditions",
|
|
||||||
"label": _("Terms and Conditions Template"),
|
"label": _("Terms and Conditions Template"),
|
||||||
"description": _("Template of terms or contract.")
|
"description": _("Template of terms or contract.")
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "doctype",
|
"type": "doctype",
|
||||||
"name":"Mode of Payment",
|
"name": "Mode of Payment",
|
||||||
"description": _("e.g. Bank, Cash, Credit Card")
|
"description": _("e.g. Bank, Cash, Credit Card")
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "doctype",
|
"type": "doctype",
|
||||||
"name":"C-Form",
|
"name": "Auto Repeat",
|
||||||
|
"label": _("Auto Repeat"),
|
||||||
|
"description": _("To make recurring documents")
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "doctype",
|
||||||
|
"name": "C-Form",
|
||||||
"description": _("C-Form records"),
|
"description": _("C-Form records"),
|
||||||
"country": "India"
|
"country": "India"
|
||||||
}
|
}
|
||||||
@ -506,12 +431,12 @@ def get_data():
|
|||||||
"items": [
|
"items": [
|
||||||
{
|
{
|
||||||
"type": "doctype",
|
"type": "doctype",
|
||||||
"name":"Shareholder",
|
"name": "Shareholder",
|
||||||
"description": _("List of available Shareholders with folio numbers")
|
"description": _("List of available Shareholders with folio numbers")
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "doctype",
|
"type": "doctype",
|
||||||
"name":"Share Transfer",
|
"name": "Share Transfer",
|
||||||
"description": _("List of all share transactions"),
|
"description": _("List of all share transactions"),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -528,28 +453,6 @@ def get_data():
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"label": _("Subscription Management"),
|
|
||||||
"icon": "fa fa-microchip ",
|
|
||||||
"items": [
|
|
||||||
{
|
|
||||||
"type": "doctype",
|
|
||||||
"name":"Subscriber",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "doctype",
|
|
||||||
"name":"Subscription Plan",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "doctype",
|
|
||||||
"name":"Subscription"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "doctype",
|
|
||||||
"name": "Subscription Settings"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"label": _("Help"),
|
"label": _("Help"),
|
||||||
"icon": "fa fa-facetime-video",
|
"icon": "fa fa-facetime-video",
|
||||||
@ -572,3 +475,121 @@ def get_data():
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
gst = {
|
||||||
|
"label": _("Goods and Services Tax (GST India)"),
|
||||||
|
"items": [
|
||||||
|
{
|
||||||
|
"type": "doctype",
|
||||||
|
"name": "GST Settings",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "doctype",
|
||||||
|
"name": "GST HSN Code",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "report",
|
||||||
|
"name": "GSTR-1",
|
||||||
|
"is_query_report": True
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "report",
|
||||||
|
"name": "GSTR-2",
|
||||||
|
"is_query_report": True
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "report",
|
||||||
|
"name": "GST Sales Register",
|
||||||
|
"is_query_report": True
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "report",
|
||||||
|
"name": "GST Purchase Register",
|
||||||
|
"is_query_report": True
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "report",
|
||||||
|
"name": "GST Itemised Sales Register",
|
||||||
|
"is_query_report": True
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "report",
|
||||||
|
"name": "GST Itemised Purchase Register",
|
||||||
|
"is_query_report": True
|
||||||
|
},
|
||||||
|
]
|
||||||
|
}
|
||||||
|
retail = {
|
||||||
|
"label": _("Retail Operations"),
|
||||||
|
"items": [
|
||||||
|
{
|
||||||
|
"type": "page",
|
||||||
|
"name": "pos",
|
||||||
|
"label": _("POS"),
|
||||||
|
"description": _("Point of Sale")
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "doctype",
|
||||||
|
"name": "Cashier Closing",
|
||||||
|
"description": _("Cashier Closing")
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "doctype",
|
||||||
|
"name": "POS Settings",
|
||||||
|
"description": _("Setup mode of POS (Online / Offline)")
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "doctype",
|
||||||
|
"name": "POS Profile",
|
||||||
|
"label": _("Point-of-Sale Profile"),
|
||||||
|
"description": _("Setup default values for POS Invoices")
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "doctype",
|
||||||
|
"name": "Loyalty Program",
|
||||||
|
"label": _("Loyalty Program"),
|
||||||
|
"description": _("To make Customer based incentive schemes.")
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "doctype",
|
||||||
|
"name": "Loyalty Point Entry",
|
||||||
|
"label": _("Loyalty Point Entry"),
|
||||||
|
"description": _("To view logs of Loyalty Points assigned to a Customer.")
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
subscriptions = {
|
||||||
|
"label": _("Subscription Management"),
|
||||||
|
"icon": "fa fa-microchip ",
|
||||||
|
"items": [
|
||||||
|
{
|
||||||
|
"type": "doctype",
|
||||||
|
"name": "Subscriber",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "doctype",
|
||||||
|
"name": "Subscription Plan",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "doctype",
|
||||||
|
"name": "Subscription"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "doctype",
|
||||||
|
"name": "Subscription Settings"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
countries = frappe.get_all("Company", fields="country")
|
||||||
|
countries = [country["country"] for country in countries]
|
||||||
|
if "India" in countries:
|
||||||
|
config.insert(7, gst)
|
||||||
|
domains = frappe.get_active_domains()
|
||||||
|
if "Retail" in domains:
|
||||||
|
config.insert(2, retail)
|
||||||
|
else:
|
||||||
|
config.insert(7, retail)
|
||||||
|
if "Services" in domains:
|
||||||
|
config.insert(2, subscriptions)
|
||||||
|
else:
|
||||||
|
config.insert(7, subscriptions)
|
||||||
|
return config
|
||||||
|
@ -12,7 +12,7 @@ app_license = "GNU General Public License (v3)"
|
|||||||
source_link = "https://github.com/frappe/erpnext"
|
source_link = "https://github.com/frappe/erpnext"
|
||||||
|
|
||||||
develop_version = '12.x.x-develop'
|
develop_version = '12.x.x-develop'
|
||||||
staging_version = '11.0.3-beta.26'
|
staging_version = '11.0.3-beta.27'
|
||||||
|
|
||||||
error_report_email = "support@erpnext.com"
|
error_report_email = "support@erpnext.com"
|
||||||
|
|
||||||
|
@ -110,7 +110,7 @@ class JobCard(Document):
|
|||||||
|
|
||||||
if self.items:
|
if self.items:
|
||||||
self.transferred_qty = frappe.db.get_value('Stock Entry', {'job_card': self.name,
|
self.transferred_qty = frappe.db.get_value('Stock Entry', {'job_card': self.name,
|
||||||
'work_order': self.work_order, 'docstatus': 1}, 'sum(fg_completed_qty)')
|
'work_order': self.work_order, 'docstatus': 1}, 'sum(fg_completed_qty)') or 0
|
||||||
|
|
||||||
self.db_set("transferred_qty", self.transferred_qty)
|
self.db_set("transferred_qty", self.transferred_qty)
|
||||||
|
|
||||||
|
@ -579,3 +579,4 @@ erpnext.patches.v10_0.update_user_image_in_employee
|
|||||||
erpnext.patches.v11_0.update_delivery_trip_status
|
erpnext.patches.v11_0.update_delivery_trip_status
|
||||||
erpnext.patches.v10_0.repost_gle_for_purchase_receipts_with_rejected_items
|
erpnext.patches.v10_0.repost_gle_for_purchase_receipts_with_rejected_items
|
||||||
erpnext.patches.v11_0.set_missing_gst_hsn_code
|
erpnext.patches.v11_0.set_missing_gst_hsn_code
|
||||||
|
erpnext.patches.v11_0.update_package_total_in_delivery_trips
|
7
erpnext/patches/v11_0/update_package_total_in_delivery_trips.py
Executable file
7
erpnext/patches/v11_0/update_package_total_in_delivery_trips.py
Executable file
@ -0,0 +1,7 @@
|
|||||||
|
import frappe
|
||||||
|
|
||||||
|
def execute():
|
||||||
|
for trip in frappe.get_all("Delivery Trip", {"docstatus" : 1}):
|
||||||
|
trip_doc = frappe.get_doc("Delivery Trip", trip.name)
|
||||||
|
total = sum([stop.grand_total for stop in trip_doc.delivery_stops if stop.grand_total])
|
||||||
|
frappe.db.set_value("Delivery Trip", trip.name, "package_total", total, update_modified=False)
|
@ -120,28 +120,3 @@ frappe.ui.form.on("Project Task", {
|
|||||||
frm.trigger('tasks_refresh');
|
frm.trigger('tasks_refresh');
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
frappe.ui.form.on("Project", "validate", function (frm) {
|
|
||||||
if (frm.doc.collect_progress == 1) {
|
|
||||||
frappe.call({
|
|
||||||
method: "erpnext.projects.doctype.project.project.times_check",
|
|
||||||
args: {
|
|
||||||
"from1": frm.doc.from,
|
|
||||||
"to": frm.doc.to,
|
|
||||||
"first_email": frm.doc.first_email,
|
|
||||||
"second_email": frm.doc.second_email,
|
|
||||||
"daily_time_to_send": frm.doc.daily_time_to_send,
|
|
||||||
"weekly_time_to_send": frm.doc.weekly_time_to_send
|
|
||||||
|
|
||||||
},
|
|
||||||
callback: function (r) {
|
|
||||||
frm.set_value("from", r.message.from1);
|
|
||||||
frm.set_value("to", r.message.to);
|
|
||||||
frm.set_value("first_email", r.message.first_email);
|
|
||||||
frm.set_value("second_email", r.message.second_email);
|
|
||||||
frm.set_value("daily_time_to_send", r.message.daily_time_to_send);
|
|
||||||
frm.set_value("weekly_time_to_send", r.message.weekly_time_to_send);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
@ -427,23 +427,6 @@ def weekly():
|
|||||||
project = frappe.db.sql("""SELECT `tabProject User`.user FROM `tabProject User` INNER JOIN `tabProject` ON `tabProject`.project_name = `tabProject User`.parent WHERE (`tabProject`.frequency = "Weekly") AND (`tabProject`.day_to_send = %s) AND (`tabProject`.weekly_time_to_send BETWEEN DATE_ADD(curtime(), INTERVAL -15 MINUTE) AND DATE_ADD(curtime(), INTERVAL 15 MINUTE)) AND `tabProject`.collect_progress = 1""", today)
|
project = frappe.db.sql("""SELECT `tabProject User`.user FROM `tabProject User` INNER JOIN `tabProject` ON `tabProject`.project_name = `tabProject User`.parent WHERE (`tabProject`.frequency = "Weekly") AND (`tabProject`.day_to_send = %s) AND (`tabProject`.weekly_time_to_send BETWEEN DATE_ADD(curtime(), INTERVAL -15 MINUTE) AND DATE_ADD(curtime(), INTERVAL 15 MINUTE)) AND `tabProject`.collect_progress = 1""", today)
|
||||||
create_project_update(project)
|
create_project_update(project)
|
||||||
|
|
||||||
@frappe.whitelist()
|
|
||||||
def times_check(from1, to, first_email, second_email, daily_time_to_send, weekly_time_to_send):
|
|
||||||
from1 = datetime.datetime.strptime(from1, "%H:%M:%S.%f")
|
|
||||||
from1 = from1.strftime("%H:00:00")
|
|
||||||
to = datetime.datetime.strptime(to, "%H:%M:%S.%f")
|
|
||||||
to = to.strftime("%H:00:00")
|
|
||||||
first_email = datetime.datetime.strptime(first_email, "%H:%M:%S.%f")
|
|
||||||
first_email = first_email.strftime("%H:00:00")
|
|
||||||
second_email = datetime.datetime.strptime(second_email, "%H:%M:%S.%f")
|
|
||||||
second_email = second_email.strftime("%H:00:00")
|
|
||||||
daily_time_to_send = datetime.datetime.strptime(daily_time_to_send, "%H:%M:%S.%f")
|
|
||||||
daily_time_to_send = daily_time_to_send.strftime("%H:00:00")
|
|
||||||
weekly_time_to_send = datetime.datetime.strptime(weekly_time_to_send, "%H:%M:%S.%f")
|
|
||||||
weekly_time_to_send = weekly_time_to_send.strftime("%H:00:00")
|
|
||||||
return {"from1": from1, "to": to, "first_email": first_email, "second_email": second_email,"daily_time_to_send": daily_time_to_send, "weekly_time_to_send": weekly_time_to_send}
|
|
||||||
|
|
||||||
|
|
||||||
#Call this function in order to generate the Project Update for a specific project
|
#Call this function in order to generate the Project Update for a specific project
|
||||||
def create_project_update(project):
|
def create_project_update(project):
|
||||||
data = []
|
data = []
|
||||||
|
@ -120,7 +120,7 @@ $.extend(erpnext.utils, {
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else {
|
else if (company_wise_info.length === 1) {
|
||||||
frm.dashboard.stats_area.removeClass('hidden');
|
frm.dashboard.stats_area.removeClass('hidden');
|
||||||
frm.dashboard.stats_area_row.append(
|
frm.dashboard.stats_area_row.append(
|
||||||
'</div><div class="col-xs-6 small" style="margin-bottom:10px">Annual Billing: <b>'
|
'</div><div class="col-xs-6 small" style="margin-bottom:10px">Annual Billing: <b>'
|
||||||
|
@ -206,7 +206,7 @@ cur_frm.cscript['Declare Order Lost'] = function(){
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
frappe.ui.form.on("Quotation Item", "items_on_form_rendered", function(frm, cdt, cdn) {
|
frappe.ui.form.on("Quotation Item", "items_on_form_rendered", "packed_items_on_form_rendered", function(frm, cdt, cdn) {
|
||||||
// enable tax_amount field if Actual
|
// enable tax_amount field if Actual
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -125,6 +125,8 @@ def search_serial_or_batch_or_barcode_number(search_value):
|
|||||||
if batch_no_data:
|
if batch_no_data:
|
||||||
return batch_no_data
|
return batch_no_data
|
||||||
|
|
||||||
|
return {}
|
||||||
|
|
||||||
def get_conditions(item_code, serial_no, batch_no, barcode):
|
def get_conditions(item_code, serial_no, batch_no, barcode):
|
||||||
if serial_no or batch_no or barcode:
|
if serial_no or batch_no or barcode:
|
||||||
return frappe.db.escape(item_code), "i.name = %(item_code)s"
|
return frappe.db.escape(item_code), "i.name = %(item_code)s"
|
||||||
|
@ -223,6 +223,10 @@ erpnext.stock.DeliveryNoteController = erpnext.selling.SellingController.extend(
|
|||||||
erpnext.setup_serial_no();
|
erpnext.setup_serial_no();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
packed_items_on_form_rendered: function(doc, grid_row) {
|
||||||
|
erpnext.setup_serial_no();
|
||||||
|
},
|
||||||
|
|
||||||
close_delivery_note: function(doc){
|
close_delivery_note: function(doc){
|
||||||
this.update_status("Closed")
|
this.update_status("Closed")
|
||||||
},
|
},
|
||||||
|
@ -25,6 +25,8 @@ class DeliveryTrip(Document):
|
|||||||
|
|
||||||
def validate(self):
|
def validate(self):
|
||||||
self.validate_stop_addresses()
|
self.validate_stop_addresses()
|
||||||
|
self.update_status()
|
||||||
|
self.update_package_total()
|
||||||
|
|
||||||
def on_submit(self):
|
def on_submit(self):
|
||||||
self.update_status()
|
self.update_status()
|
||||||
@ -37,11 +39,6 @@ class DeliveryTrip(Document):
|
|||||||
self.update_status()
|
self.update_status()
|
||||||
self.update_delivery_notes(delete=True)
|
self.update_delivery_notes(delete=True)
|
||||||
|
|
||||||
def validate_stop_addresses(self):
|
|
||||||
for stop in self.delivery_stops:
|
|
||||||
if not stop.customer_address:
|
|
||||||
stop.customer_address = get_address_display(frappe.get_doc("Address", stop.address).as_dict())
|
|
||||||
|
|
||||||
def update_status(self):
|
def update_status(self):
|
||||||
status = {
|
status = {
|
||||||
0: "Draft",
|
0: "Draft",
|
||||||
@ -58,6 +55,14 @@ class DeliveryTrip(Document):
|
|||||||
|
|
||||||
self.db_set("status", status)
|
self.db_set("status", status)
|
||||||
|
|
||||||
|
def update_package_total(self):
|
||||||
|
self.package_total = sum([stop.grand_total for stop in self.delivery_stops if stop.grand_total])
|
||||||
|
|
||||||
|
def validate_stop_addresses(self):
|
||||||
|
for stop in self.delivery_stops:
|
||||||
|
if not stop.customer_address:
|
||||||
|
stop.customer_address = get_address_display(frappe.get_doc("Address", stop.address).as_dict())
|
||||||
|
|
||||||
def update_delivery_notes(self, delete=False):
|
def update_delivery_notes(self, delete=False):
|
||||||
"""
|
"""
|
||||||
Update all connected Delivery Notes with Delivery Trip details
|
Update all connected Delivery Notes with Delivery Trip details
|
||||||
|
@ -102,7 +102,7 @@ frappe.ui.form.on('Material Request', {
|
|||||||
|
|
||||||
update_status: function(frm, stop_status) {
|
update_status: function(frm, stop_status) {
|
||||||
frappe.call({
|
frappe.call({
|
||||||
method: 'erpnext.stock.material_request.material_request.update_status',
|
method: 'erpnext.stock.doctype.material_request.material_request.update_status',
|
||||||
args: { name: frm.doc.name, status: stop_status },
|
args: { name: frm.doc.name, status: stop_status },
|
||||||
callback(r) {
|
callback(r) {
|
||||||
if (!r.exc) {
|
if (!r.exc) {
|
||||||
|
Loading…
Reference in New Issue
Block a user