Projects:PurchasePrice field for Product On the Fly/Functional Specifications
Contents |
PurchasePrice field for Product On the Fly - Functional Specifications
Overview
This project is about to have the possibility of add Product Purchase Price field when creating new products “on the fly” through the webpos. It depend on: Projects:Product_On_The_Fly_in_WebPOS/Functional_Specifications
Functional Requirements
Backend
- Add a field PurchasePrice to Product table
WebPOS
- Add in New OTF product dialog a new property editor for Purchase Price field
Implementation
This project is implemented in a new custom module: com.openbravo.but.productonthefly.productprice
Add property editor to dialog: New OTF product
When the terminal was loaded from backend (Hook: OBPOS_TerminalLoadedFromBackend), it's added a property editor for Purchase Price in New OTF product dialog
OBROTF.ModalProductDuplicate.prototype.newAttributes.push({ kind: 'OB.UI.renderTextProperty', name: 'butotfpPurchasePrice', modelProperty: 'butotfpPurchasePrice', mandatory: false, handlers: { onLoadValue: 'loadValue' }, loadValue: function (inSender, inEvent) { .... }, isValid: function () { .... }, getFloatValue: function (value) { .... }, getValue: function () { .... } });