Openbravo Issue Tracking System - POS2
View Issue Details
0053088POS2POSpublic2023-07-27 12:012023-08-29 09:15
marvintm 
Retail 
normalmajorhave not tried
closedfixed 
5
 
23Q4 
No
0053088: Implement credit sales functionality for POS2 - Phase 1
We need to add support for the ability to sell on credit on the POS. This functionality already exists in Enyo and it needs to be available also in React.
.
No tags attached.
Issue History
2023-07-27 12:01marvintmNew Issue
2023-07-27 12:01marvintmAssigned To => Retail
2023-07-27 12:01marvintmTriggers an Emergency Pack => No
2023-07-27 12:30hgbotNote Added: 0152921
2023-07-27 12:34hgbotNote Added: 0152926
2023-07-27 12:36hgbotNote Added: 0152927
2023-07-31 15:40hgbotNote Added: 0153033
2023-08-28 16:09hgbotNote Added: 0154063
2023-08-29 09:09hgbotNote Added: 0154080
2023-08-29 09:09hgbotResolutionopen => fixed
2023-08-29 09:09hgbotStatusnew => closed
2023-08-29 09:09hgbotFixed in Version => 23Q4
2023-08-29 09:09hgbotNote Added: 0154081
2023-08-29 09:10hgbotFixed in Version23Q4 => RR23Q4
2023-08-29 09:10hgbotNote Added: 0154082
2023-08-29 09:10hgbotNote Added: 0154083
2023-08-29 09:13hgbotNote Added: 0154084
2023-08-29 09:13hgbotNote Added: 0154085
2023-08-29 09:14hgbotFixed in VersionRR23Q4 => PR23Q4
2023-08-29 09:14hgbotNote Added: 0154086
2023-08-29 09:14hgbotNote Added: 0154087
2023-08-29 09:14hgbotFixed in VersionPR23Q4 => 23Q4
2023-08-29 09:15hgbotNote Added: 0154088
2023-08-29 09:15hgbotNote Added: 0154089

Notes
(0152921)
hgbot   
2023-07-27 12:30   
Merge Request created: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/953 [^]
(0152926)
hgbot   
2023-07-27 12:34   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core/-/merge_requests/581 [^]
(0152927)
hgbot   
2023-07-27 12:36   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/merge_requests/1983 [^]
(0153033)
hgbot   
2023-07-31 15:40   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/1298 [^]
(0154063)
hgbot   
2023-08-28 16:09   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2.sampledata/-/merge_requests/50 [^]
(0154080)
hgbot   
2023-08-29 09:09   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2.sampledata/-/merge_requests/50 [^]
(0154081)
hgbot   
2023-08-29 09:09   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2.sampledata [^]
Changeset: ccde47b15c13905514608e7035a02380d2ed024e
Author: Justin Patterson <justin.patterson@openbravo.com>
Date: 29-08-2023 09:03:09
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2.sampledata/-/commit/ccde47b15c13905514608e7035a02380d2ed024e [^]

Fixes FR-53088: Customer information to display on search results
-Added sampledata having to do with CRM Business Partner properties to
enable credit sales functionality

---
M referencedata/sampledata/The_White_Valley_Group/C_EXTBP_CONFIG.xml
M referencedata/sampledata/The_White_Valley_Group/C_EXTBP_CONFIG_PROPERTY.xml
M referencedata/sampledata/The_White_Valley_Group/OBPOS_TERMINALTYPE.xml
---
(0154082)
hgbot   
2023-08-29 09:10   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core [^]
Changeset: 8eec676d96a4b98273a655fa2d212b19992da4a8
Author: Justin Patterson <justin.patterson@openbravo.com>
Date: 29-08-2023 08:43:33
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core/-/commit/8eec676d96a4b98273a655fa2d212b19992da4a8 [^]

Fixes FR-53088: Credit Sales functionality in WebPOS REACT
-In class ExternalBusinessPartner:
-Added getCreditLimitProperty(), getCreditLimit(), getCreditUsedProperty(), getCreditUsed() methods, which get respective properties from a mixedBP object
-Added getAvailableCredit() method, which returns the remainder of the CreditLimit minus UsedCredit
-Added setProperty() method which finds a property by apiKey and sets its value

---
M web/org.openbravo.mobile.core/app/integration/external-business-partner/ExternalBusinessPartner.js
---
(0154083)
hgbot   
2023-08-29 09:10   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core/-/merge_requests/581 [^]
(0154084)
hgbot   
2023-08-29 09:13   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal [^]
Changeset: f0b72cdf7b0c0fa676549fa7fa5153a11e58307e
Author: Justin Patterson <justin.patterson@openbravo.com>
Date: 29-08-2023 09:02:38
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/commit/f0b72cdf7b0c0fa676549fa7fa5153a11e58307e [^]

Fixes FR-53088: Customer information to display on search results
-Exposed new property "currency" in BusinessPartnerProperties.java
-Added check to CompletTicketUtils.js in checkOverPayments() which checks both Ticket and payload objects for payOnCredit flag to avoid showing "distinct amounts" popup on credit sales

---
M src/org/openbravo/retail/posterminal/master/BusinessPartnerProperties.java
M web/org.openbravo.retail.posterminal/app/model/business-object/ticket/CompleteTicketUtils.js
---
(0154085)
hgbot   
2023-08-29 09:13   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/1298 [^]
(0154086)
hgbot   
2023-08-29 09:14   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/openbravo [^]
Changeset: 76e872e4e13397bbee1c5cd74da2f5c2a88bb2fa
Author: Justin Patterson <justin.patterson@openbravo.com>
Date: 29-08-2023 08:57:32
URL: https://gitlab.com/openbravo/product/openbravo/-/commit/76e872e4e13397bbee1c5cd74da2f5c2a88bb2fa [^]

Fixes FR-53088: Customer information to display on search results
-Added new column crmbusinessproperty to table c_extbp_config_property with UNIQUE constraint per c_extbp_config_id
-Added new AD_ELEMENT for column
-Connected new AD_REFERENCE with type=List to column
-Added new AD_REFERENCE_LIST which includes values for creditLimit,
creditUsed, and currency as possible configuration options
-Added new field in CRM Configuration > API Property with name "Use As" which can be configured with one of these options
-Removed fields "Icon Class", "Show Icon in List View" and "Use As" from API Property tab in CRM Configuration window
-Added these fields to API Property for Customer tab in CRM Configuration window

---
M src-db/database/model/tables/C_EXTBP_CONFIG_PROPERTY.xml
M src-db/database/sourcedata/AD_COLUMN.xml
M src-db/database/sourcedata/AD_ELEMENT.xml
M src-db/database/sourcedata/AD_FIELD.xml
M src-db/database/sourcedata/AD_REFERENCE.xml
M src-db/database/sourcedata/AD_REF_LIST.xml
---
(0154087)
hgbot   
2023-08-29 09:14   
Merge request merged: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/953 [^]
(0154088)
hgbot   
2023-08-29 09:14   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2 [^]
Changeset: 4c7afb34430de9b79643b5c9dc61b49e098444de
Author: Justin Patterson <justin.patterson@openbravo.com>
Date: 29-08-2023 09:14:24
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/commit/4c7afb34430de9b79643b5c9dc61b49e098444de [^]

Fixes FR-53088: Credit Sales functionality in WebPOS REACT
-Added CreditButton.jsx component, a button which is clickable when an External BP is selected, they have enough credit to pay the ticket total, and all necessary properties are configured in the CRM
-Added the button to PaymentPanelButtons.jsx, the component container, with state logic to provide checks which display the CreditButton when the cashier has permission to use the SellOnCredit user action and the terminal in use allows customers to pay on credit
-Added respective index.js and CreditButton.scss files for CreditButton component
-Added SellOnCredit user-action, which launches the completeTicket user action and passes a payload with payOnCredit flag set to true to trigger Sell On Credit flow
-Added sellOnCredit action which contains two preHooks for the CompleteTicket user action: sellOnCredit, which further sets globalState.Ticket..payOnCredit: true, and forceInvoiceForCreditSales
-Added icon sell-credit.svg for the CreditButton
-Added obpos2SellOnCredit class to iconography.scss to display icon
-Added additional CSS classes for Credit Button and fields inside the custom dialog form
-Added Cypress tests in ticket.spec.js that execute Pay On Credit logic with and without prepayments
-Refactored methods that update BP credit to include one for tickets with prepayments (updateBpCreditPrepayments()) and one for normal Pay On Credit flow (updateBpCreditNoPrepayments()) in CompleteTicketActionPreparation.js
-Added updateBpCreditPrepayments Action Preparation in TicketExtension.js
-Added CreditButtonConfirmationDialogContent component which displays custom content for a pop-up confirmation on left-click of CreditButton
-Added two field components, AmountField and PaymentTypeField, which display the amount and payment type for a credit sale within the pop-up
-Added new AD_MESSAGE entries for button, pop-up and fields
-Removed fields "Icon Class", "Show Icon in List View" and "Use As" from API Property tab in CRM Configuration window
-Added these fields to API Property for Customer tab in CRM Configuration window
-Exported dataset for CRM Connector
-In class OBCustomerRelationshipManagement: added methods
updateBusinessPartner() and insertBusinessPartner() which complete the
update call to CRM on Credit Sales

---
A web-jspack/org.openbravo.pos2/src/assets/icons/sell-credit.svg
A web-jspack/org.openbravo.pos2/src/components/Payments/PaymentPanelButtons/CreditButton/CreditButton.jsx
A web-jspack/org.openbravo.pos2/src/components/Payments/PaymentPanelButtons/CreditButton/CreditButton.scss
A web-jspack/org.openbravo.pos2/src/components/Payments/PaymentPanelButtons/CreditButton/CreditButtonConfirmationDialogContent/AmountField/AmountField.jsx
A web-jspack/org.openbravo.pos2/src/components/Payments/PaymentPanelButtons/CreditButton/CreditButtonConfirmationDialogContent/AmountField/AmountField.scss
A web-jspack/org.openbravo.pos2/src/components/Payments/PaymentPanelButtons/CreditButton/CreditButtonConfirmationDialogContent/AmountField/index.js
A web-jspack/org.openbravo.pos2/src/components/Payments/PaymentPanelButtons/CreditButton/CreditButtonConfirmationDialogContent/CreditButtonConfirmationDialogContent.jsx
A web-jspack/org.openbravo.pos2/src/components/Payments/PaymentPanelButtons/CreditButton/CreditButtonConfirmationDialogContent/PaymentTypeField/PaymentTypeField.jsx
A web-jspack/org.openbravo.pos2/src/components/Payments/PaymentPanelButtons/CreditButton/CreditButtonConfirmationDialogContent/PaymentTypeField/PaymentTypeField.scss
A web-jspack/org.openbravo.pos2/src/components/Payments/PaymentPanelButtons/CreditButton/CreditButtonConfirmationDialogContent/PaymentTypeField/index.js
A web-jspack/org.openbravo.pos2/src/components/Payments/PaymentPanelButtons/CreditButton/CreditButtonConfirmationDialogContent/index.js
A web-jspack/org.openbravo.pos2/src/components/Payments/PaymentPanelButtons/CreditButton/index.js
A web-jspack/org.openbravo.pos2/src/model/ticket/actions/SellOnCredit.js
A web-jspack/org.openbravo.pos2/src/model/ticket/user-actions/SellOnCredit.js
M referencedata/standard/CRM_Connector_for_Openbravo_Customers.xml
M src-db/database/sourcedata/AD_DATASET.xml
M src-db/database/sourcedata/AD_ELEMENT.xml
M src-db/database/sourcedata/AD_FIELD.xml
M src-db/database/sourcedata/AD_MESSAGE.xml
M src-db/database/sourcedata/OBC2_USER_ACTION.xml
M web-jspack/org.openbravo.pos2/src-test/cypress/e2e/Features/ticket.spec.js
M web-jspack/org.openbravo.pos2/src/assets/style/iconography.scss
M web-jspack/org.openbravo.pos2/src/components/Payments/PaymentPanel/__test__/PaymentPanel.test.jsx
M web-jspack/org.openbravo.pos2/src/components/Payments/PaymentPanel/stories/PaymentPanel.stories.jsx
M web-jspack/org.openbravo.pos2/src/components/Payments/PaymentPanelButtons/PaymentPanelButtons.jsx
M web-jspack/org.openbravo.pos2/src/components/Payments/PaymentPanelButtons/__test__/PaymentPanelButtons.test.jsx
M web-jspack/org.openbravo.pos2/src/model/ticket/TicketExtension.js
M web-jspack/org.openbravo.pos2/src/model/ticket/actions/CompleteTicketActionPreparation.js
M web-jspack/org.openbravo.pos2/src/ob-init.js
M web-jspack/org.openbravo.pos2/src/services/crm/OBCustomerRelationshipManagement.js
---
(0154089)
hgbot   
2023-08-29 09:15   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/merge_requests/1983 [^]