brotherton-erpnext/erpnext/selling/page/point_of_sale/point_of_sale.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

23 lines
571 B
JavaScript
Raw Normal View History

refactor: POS workflow (#20789) * refactor: add pos invoice doctype replacing sales invoice in POS * refactor: move pos.py to pos invoice * feat: add pos invoice merge log doctype * feat: ability to merge pos invoices into a sales invoice * feat: [wip] new ui for point of sale * fix: pos.py moved to pos_invoice * feat: loyalty points for POS Invoice * fix: loyalty points on merging * feat: return against pos invoices * Merge 'fork/serial-no-selector' into refactor-pos-invoice * chore: status fix and set warehouse from pos profile * fix: naming series * feat: merge pos returns into credit notes * feat: add pos list action for merging into sales invoices * feat[UX]: add shortcuts & focus on search after customer selection * feat: stock validation from previous pos transactions * Merge 'fork/serial-no-selector' into refactor-pos-invoice * chore: fix df not found for base_amount precision * feat: serial no validation from previous pos transactions * chore: move pos.py into pos page * feat: pos opening voucher * feat: link pos closing voucher with opening voucher * chore: use map_doc instead of get_mapped_doc for better perf * feat: enforce opening voucher on pos page * feat: [ui] [wip] point of sale beta ui refactor * fix: auto fetching serial nos with batch no * feat: [ui] item details section for new pos ui * feat: remove item from cart * refactor: [ui] [wip] split point_of_sale into components * new payment component * new numberpad * fix pos opening status * move from flex to grids * fix: search from item selector * feat: loyalty points as payment method * feat: pos invoice status * fix a bug with invalid JSON * fix: loyalty program ui fixes * feat: past order list and past order summary * feat: (minor) setting discount from item details * fix: adding item before customer selection * feat: post order submission summary * save and open draft orders * fix: item group filter * fix: item_det not defined while submitting sle * fix: minor bugs * fix: minor ux fixes * feat: show opening time in pos ui * feat: item and customer images * feat: emailing and printing an invoice * fix: item details field edit shows empty alert * fix: (minor) ux fixes * chore: rename pos opening voucher to pos opening entry * chore: (minor) rename pos closing voucher and sub doctypes * chore: add patch for renaming pos closing doctypes * fix: negative stock not allowed in pos invoices* default is_pos in pos invoices* fix: transalation * fix: invoices not getting fetched on pos closing * fix: indentation * feat: view / edit customer info * fix: minor bugs * fix: minor bug * fix: patch * fix: minor ux issues * fix: remove uppercase status * refactor: pos closing payment reconciliation * fix: move pos invoice print formats to pos invoice doctype * fix: ui issues * feat: new child doctype to store pos payment mode details * fix: add to patches.txt * feat: search by serial no * chore: [wip] code cleanup * fix: item not selectable from cart * chore: [wip] code cleanup * fix: minor issues * loyalty points transactions * default payment mode * fix: minor fixes * set correct mop amount with loaylty points * editing draft invoices from UI * chore: pos invoice merge log tests * fix: batch / serial validation in pos ui and on submission * feat: use onscan js for barcode scan events * fix: cart header with amount column * fix: validate batch no and qty in pos transactions * chore: do not fetch closing balances as opening balance * feat: show available qty in item selector * feat: shortcuts * fix: onscan.js not found * fix: onscan.js not found * fix: cannot return partial items * fix: neagtive stock indicator * feat: invoice discount * fix: change available stock on warehouse change * chore: cleanup code * fix: pos profile payment method table * feat: adding same item with different uom * fix: loyalty points deleted after consolidation * fix: enter loyalty amount instead of loyalty points * chore: return print format * feat: custom fields in pos view * chore: pos invoice test * chore: remove offline pos * fix: cyclic dependency * fix: cyclic dependency * patch: remove pos page and order fixes * chore: little fixes * fix: patch perf and plural naming * chore: tidy up pos invoice validation * chore: move pos closing to accounts * fix: move pos doctypes to accounts * fix: move pos doctypes to accounts * fix: item description in cart * fix: item description in cart * chore: loyalty tests * minor fixes * chore: rename point of sale beta to point of sale * chore: reset past order summary on filter change * chore: add point of sale to accounting desk * fix: payment reconciliation table in pos closing * fix: travis * Update accounting.json * fix: test cases * fix: tests * patch loyalty point entries * fix: remove test * default mode of payment is mandatory for pos transaction * chore: remove unused checks from pos profile * fix: loyalty point entry patch * fix: numpad reset and patches * fix: minor bugs * fix: travis * fix: travis * fix: travis * fix: travis Co-authored-by: Nabin Hait <nabinhait@gmail.com>
2020-07-23 13:21:26 +00:00
frappe.provide('erpnext.PointOfSale');
2017-08-10 05:52:03 +00:00
frappe.pages['point-of-sale'].on_page_load = function(wrapper) {
2017-08-30 13:26:26 +00:00
frappe.ui.make_app_page({
2017-08-10 05:52:03 +00:00
parent: wrapper,
2019-08-23 11:02:58 +00:00
title: __('Point of Sale'),
2017-08-10 05:52:03 +00:00
single_column: true
});
2021-05-07 09:23:42 +00:00
frappe.require('point-of-sale.bundle.js', function() {
2020-11-23 12:23:34 +00:00
wrapper.pos = new erpnext.PointOfSale.Controller(wrapper);
window.cur_pos = wrapper.pos;
2021-02-01 14:21:25 +00:00
});
fix: multiple pos issues (#23347) * fix: point of sale search * fix: pos fetches expired serial nos * fix: pos doesn't refresh on route change * fix: opening balances not set in opening entry * fix: remove debug statement * fix: invalid query if no serial no is reserved by pos invoice * chore: make new order btn primary * chore: filter warehouse by company * chore: add shortcuts for new order and email * fix: cannot fetch serial no if no batch control * chore: add shortcuts for menu items * feat: standard keyboard shortcuts for pos page * feat: display only items that are in stock * fix: empty point of sale page if opening entry dialog is closed * feat: conversion factor in pos item details * fix: show all invalid mode of payments * chore: show all items if allow negative stock is checked * fix: -ve amount set when changing mode of payment * fix: pos closing validations * fix: test * fix: non expired serial no fetching query * fix: cannot dismiss pos opening creation dialog * fix: transalation strings * fix: msgprint to throw * chore: use as_list in frappe.throw * chore: clean up pos invoice.js & .py * fix: codacy * fix: transalation syntax * fix: codacy * fix: set_missing_values called twice from pos page * fix: mode selector with double spaces * fix: do not allow tables in pos additional fields * fix: pos is not defined * feat: set mode of payments for returns * fix: remove naming series from pos profile * fix: error message * fix: minor bugs * chore: re-arrange pos closing entry detail fields * fix: sider & frappe linter * fix: more translation strings * fix: travis * fix: more translation strings * fix: sider * fix: travis * fix: unexpected end of string * fix: travis Co-authored-by: Nabin Hait <nabinhait@gmail.com>
2020-10-26 05:47:04 +00:00
};
frappe.pages['point-of-sale'].refresh = function(wrapper) {
if (document.scannerDetectionData) {
onScan.detachFrom(document);
wrapper.pos.wrapper.html("");
wrapper.pos.check_opening_entry();
}
2021-05-07 09:23:42 +00:00
};