UI test cases and documentation
This commit is contained in:
parent
5296e3c321
commit
120b6c0b3c
@ -31,6 +31,8 @@ class TestPOSProfile(unittest.TestCase):
|
|||||||
frappe.db.sql("delete from `tabPOS Profile`")
|
frappe.db.sql("delete from `tabPOS Profile`")
|
||||||
|
|
||||||
def make_pos_profile():
|
def make_pos_profile():
|
||||||
|
frappe.db.sql("delete from `tabPOS Profile`")
|
||||||
|
|
||||||
pos_profile = frappe.get_doc({
|
pos_profile = frappe.get_doc({
|
||||||
"company": "_Test Company",
|
"company": "_Test Company",
|
||||||
"cost_center": "_Test Cost Center - _TC",
|
"cost_center": "_Test Cost Center - _TC",
|
||||||
|
60
erpnext/accounts/page/pos/test_pos.js
Normal file
60
erpnext/accounts/page/pos/test_pos.js
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
QUnit.test("test:POS Profile", function(assert) {
|
||||||
|
assert.expect(1);
|
||||||
|
let done = assert.async();
|
||||||
|
|
||||||
|
frappe.run_serially([
|
||||||
|
() => {
|
||||||
|
return frappe.tests.make("POS Profile", [
|
||||||
|
{naming_series: "SINV"},
|
||||||
|
{company: "_Test Company"},
|
||||||
|
{country: "India"},
|
||||||
|
{currency: "INR"},
|
||||||
|
{write_off_account: "Write Off - _TC"},
|
||||||
|
{write_off_cost_center: "Main - _TC"},
|
||||||
|
{payments: [
|
||||||
|
[
|
||||||
|
{"default": 1},
|
||||||
|
{"mode_of_payment": "Cash"}
|
||||||
|
]]
|
||||||
|
}
|
||||||
|
]);
|
||||||
|
},
|
||||||
|
() => cur_frm.save(),
|
||||||
|
() => frappe.timeout(2),
|
||||||
|
() => {
|
||||||
|
assert.equal(cur_frm.doc.payments[0].default, 1, "Default mode of payment tested");
|
||||||
|
},
|
||||||
|
() => done()
|
||||||
|
]);
|
||||||
|
});
|
||||||
|
|
||||||
|
QUnit.test("test:Sales Invoice", function(assert) {
|
||||||
|
assert.expect(2);
|
||||||
|
let done = assert.async();
|
||||||
|
|
||||||
|
frappe.run_serially([
|
||||||
|
() => {
|
||||||
|
return frappe.tests.make("Sales Invoice", [
|
||||||
|
{customer: "_Test Customer 2"},
|
||||||
|
{company: "_Test Company"},
|
||||||
|
{is_pos: 1},
|
||||||
|
{posting_date: frappe.datetime.get_today()},
|
||||||
|
{due_date: frappe.datetime.get_today()},
|
||||||
|
{items: [
|
||||||
|
[
|
||||||
|
{"item_code": "_Test Item"},
|
||||||
|
{"qty": 5}
|
||||||
|
]]
|
||||||
|
}
|
||||||
|
]);
|
||||||
|
},
|
||||||
|
() => frappe.timeout(2),
|
||||||
|
() => cur_frm.save(),
|
||||||
|
() => frappe.timeout(2),
|
||||||
|
() => {
|
||||||
|
assert.equal(cur_frm.doc.payments[0].default, 1, "Default mode of payment tested");
|
||||||
|
assert.equal(cur_frm.doc.payments[0].mode_of_payment, "Cash", "Default mode of payment tested");
|
||||||
|
},
|
||||||
|
() => done()
|
||||||
|
]);
|
||||||
|
});
|
BIN
erpnext/docs/assets/img/pos-setting/default_mop.png
Normal file
BIN
erpnext/docs/assets/img/pos-setting/default_mop.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 23 KiB |
BIN
erpnext/docs/assets/img/pos-setting/item_customer_group.png
Normal file
BIN
erpnext/docs/assets/img/pos-setting/item_customer_group.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 25 KiB |
Binary file not shown.
Before Width: | Height: | Size: 82 KiB |
BIN
erpnext/docs/assets/img/pos-setting/pos_profile.png
Normal file
BIN
erpnext/docs/assets/img/pos-setting/pos_profile.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 72 KiB |
@ -15,7 +15,7 @@ POS Invoices created in the offline mode will be saved locally in the browser. I
|
|||||||
In ERPNext all Sales and Purchase transactions, like Sales Invoice, Quotation, Sales Order, Purchase Order etc. can be edited via the POS. There two steps to Setup POS:
|
In ERPNext all Sales and Purchase transactions, like Sales Invoice, Quotation, Sales Order, Purchase Order etc. can be edited via the POS. There two steps to Setup POS:
|
||||||
|
|
||||||
1. Enable POS View via (Setup > Customize > Feature Setup)
|
1. Enable POS View via (Setup > Customize > Feature Setup)
|
||||||
2. Create a [POS Setting]({{docs_base_url}}/user/manual/en/setting-up/pos-setting.html) record
|
2. Create a [POS Profile]({{docs_base_url}}/user/manual/en/setting-up/pos-setting.html) record
|
||||||
|
|
||||||
#### Different sections of the POS
|
#### Different sections of the POS
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Point of Sale Setting
|
# Point of Sale Profile
|
||||||
|
|
||||||
POS includes advanced features to cater to different functionality, such as
|
POS includes advanced features to cater to different functionality, such as
|
||||||
inventory management, CRM, financials, warehousing, etc., all built into the
|
inventory management, CRM, financials, warehousing, etc., all built into the
|
||||||
@ -10,11 +10,17 @@ If you are in retail operations, you want your Point of Sale to be as quick
|
|||||||
and efficient as possible. To do this, you can create a POS Setting for a user
|
and efficient as possible. To do this, you can create a POS Setting for a user
|
||||||
from:
|
from:
|
||||||
|
|
||||||
> Accounts > Setup > Point-of-Sale Setting
|
> Accounts > Setup > Point-of-Sale Profile
|
||||||
|
|
||||||
Set default values as defined.
|
Set default values as defined.
|
||||||
|
|
||||||
<img class="screenshot" alt="POS Setting" src="{{docs_base_url}}/assets/img/pos-setting/pos-setting.png">
|
<img class="screenshot" alt="POS Setting" src="{{docs_base_url}}/assets/img/pos-setting/pos_profile.png">
|
||||||
|
|
||||||
|
To set the default mode of payment, enabled the option default in the mode of payments table
|
||||||
|
<img class="screenshot" alt="POS Setting" src="{{docs_base_url}}/assets/img/pos-setting/default_mop.png">
|
||||||
|
|
||||||
|
User can sale the particular products to the particular customers from the POS by adding item groups, customer groups in the POS Profile.
|
||||||
|
<img class="screenshot" alt="POS Setting" src="{{docs_base_url}}/assets/img/pos-setting/item_customer_group.png">
|
||||||
|
|
||||||
> Important : If you specify a particular User, the POS setting will be
|
> Important : If you specify a particular User, the POS setting will be
|
||||||
applied only to that User. If the User option is left blank, the setting will
|
applied only to that User. If the User option is left blank, the setting will
|
||||||
|
@ -27,3 +27,4 @@ erpnext/schools/doctype/student_batch_name/test_student_batch_name.js
|
|||||||
erpnext/schools/doctype/student_category/test_student_category.js
|
erpnext/schools/doctype/student_category/test_student_category.js
|
||||||
erpnext/schools/doctype/room/test_room.js
|
erpnext/schools/doctype/room/test_room.js
|
||||||
erpnext/schools/doctype/instructor/test_instructor.js
|
erpnext/schools/doctype/instructor/test_instructor.js
|
||||||
|
erpnext/accounts/page/pos/test_pos.js
|
Loading…
x
Reference in New Issue
Block a user