commit
81e35f67be
@ -31,8 +31,7 @@ frappe.ui.form.on('POS Profile', {
|
|||||||
frm.set_query("print_format", function() {
|
frm.set_query("print_format", function() {
|
||||||
return {
|
return {
|
||||||
filters: [
|
filters: [
|
||||||
['Print Format', 'doc_type', '=', 'Sales Invoice'],
|
['Print Format', 'doc_type', '=', 'POS Invoice']
|
||||||
['Print Format', 'print_format_type', '=', 'Jinja'],
|
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
@ -45,10 +44,6 @@ frappe.ui.form.on('POS Profile', {
|
|||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
frm.set_query("print_format", function() {
|
|
||||||
return { filters: { doc_type: "Sales Invoice", print_format_type: "JS"} };
|
|
||||||
});
|
|
||||||
|
|
||||||
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'));
|
||||||
|
@ -35,7 +35,8 @@ erpnext.PointOfSale.Controller = class {
|
|||||||
create_opening_voucher() {
|
create_opening_voucher() {
|
||||||
const table_fields = [
|
const table_fields = [
|
||||||
{ fieldname: "mode_of_payment", fieldtype: "Link", in_list_view: 1, label: "Mode of Payment", options: "Mode of Payment", reqd: 1 },
|
{ fieldname: "mode_of_payment", fieldtype: "Link", in_list_view: 1, label: "Mode of Payment", options: "Mode of Payment", reqd: 1 },
|
||||||
{ fieldname: "opening_amount", fieldtype: "Currency", in_list_view: 1, label: "Opening Amount", options: "company:company_currency", reqd: 1 }
|
{ fieldname: "opening_amount", fieldtype: "Currency", default: 0, in_list_view: 1, label: "Opening Amount",
|
||||||
|
options: "company:company_currency", reqd: 1 }
|
||||||
];
|
];
|
||||||
|
|
||||||
const dialog = new frappe.ui.Dialog({
|
const dialog = new frappe.ui.Dialog({
|
||||||
@ -66,7 +67,7 @@ erpnext.PointOfSale.Controller = class {
|
|||||||
frappe.db.get_doc("POS Closing Entry", pos_closing_entry.name).then(({ payment_reconciliation }) => {
|
frappe.db.get_doc("POS Closing Entry", pos_closing_entry.name).then(({ payment_reconciliation }) => {
|
||||||
dialog.fields_dict.balance_details.df.data = [];
|
dialog.fields_dict.balance_details.df.data = [];
|
||||||
payment_reconciliation.forEach(pay => {
|
payment_reconciliation.forEach(pay => {
|
||||||
const { mode_of_payment, closing_amount } = pay;
|
const { mode_of_payment } = pay;
|
||||||
dialog.fields_dict.balance_details.df.data.push({
|
dialog.fields_dict.balance_details.df.data.push({
|
||||||
mode_of_payment: mode_of_payment
|
mode_of_payment: mode_of_payment
|
||||||
});
|
});
|
||||||
@ -152,7 +153,7 @@ erpnext.PointOfSale.Controller = class {
|
|||||||
},
|
},
|
||||||
() => this.make_new_invoice(),
|
() => this.make_new_invoice(),
|
||||||
() => frappe.dom.unfreeze(),
|
() => frappe.dom.unfreeze(),
|
||||||
() => this.page.set_title(__('Point of Sale Beta')),
|
() => this.page.set_title(__('Point of Sale')),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user