Author: mrisaliti
Date: Fri Oct 10 12:56:17 2008 New Revision: 703568 URL: http://svn.apache.org/viewvc?rev=703568&view=rev Log: Add a new "paymentReasonId" on PosTerminalInternTx entity and store payment reason id during Pos Paid IN/OUT (Issue OFBIZ-1991) Modified: ofbiz/trunk/specialpurpose/pos/data/DemoRetail.xml ofbiz/trunk/specialpurpose/pos/entitydef/entitymodel.xml ofbiz/trunk/specialpurpose/webpos/config/WebPosUiLabels.xml ofbiz/trunk/specialpurpose/webpos/data/DemoPosData.xml ofbiz/trunk/specialpurpose/webpos/script/org/ofbiz/webpos/event/ManagerEvents.xml ofbiz/trunk/specialpurpose/webpos/servicedef/services_manager.xml ofbiz/trunk/specialpurpose/webpos/webapp/webpos/manager/PaidOutAndIn.ftl Modified: ofbiz/trunk/specialpurpose/pos/data/DemoRetail.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/pos/data/DemoRetail.xml?rev=703568&r1=703567&r2=703568&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/pos/data/DemoRetail.xml (original) +++ ofbiz/trunk/specialpurpose/pos/data/DemoRetail.xml Fri Oct 10 12:56:17 2008 @@ -89,6 +89,15 @@ <!-- <InventoryItem facilityId="MyRetailStore" inventoryItemId="9100" inventoryItemTypeId="NON_SERIAL_INV_ITEM" productId="GZ-1001"/> <InventoryItemDetail inventoryItemId="9100" inventoryItemDetailSeqId="0001" availableToPromiseDiff="20" quantityOnHandDiff="20"/> --> <!-- NOTE: for testing now leaving out GZ-5005 which is the other default product with a button in the POS, should create a new inventory item with negative QOH --> + + <EnumerationType description="Pos Paid Reason In" enumTypeId="POS_PAID_REASON_IN" hasTable="N" parentTypeId=""/> + <Enumeration description="Banking during the day" enumCode="BANKING_IN_REASON" enumId="BANKING_IN_REASON" sequenceId="01" enumTypeId="POS_PAID_REASON_IN"/> + <Enumeration description="Change added to Till's float" enumCode="CHANGE_IN_REASON" enumId="CHANGE_IN_REASON" sequenceId="02" enumTypeId="POS_PAID_REASON_IN"/> + <Enumeration description="Petty Cash Paid into Till" enumCode="CASH_IN_REASON" enumId="CASH_IN_REASON" sequenceId="03" enumTypeId="POS_PAID_REASON_IN"/> + + <EnumerationType description="Pos Paid Reason Out" enumTypeId="POS_PAID_REASON_OUT" hasTable="N" parentTypeId=""/> + <Enumeration description="Banking during the day" enumCode="BANKING_OUT_REASON" enumId="BANKING_OUT_REASON" sequenceId="01" enumTypeId="POS_PAID_REASON_OUT"/> + <Enumeration description="Petty Cash out" enumCode="CASH_OUT_REASON" enumId="CASH_OUT_REASON" sequenceId="03" enumTypeId="POS_PAID_REASON_OUT"/> </entity-engine-xml> Modified: ofbiz/trunk/specialpurpose/pos/entitydef/entitymodel.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/pos/entitydef/entitymodel.xml?rev=703568&r1=703567&r2=703568&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/pos/entitydef/entitymodel.xml (original) +++ ofbiz/trunk/specialpurpose/pos/entitydef/entitymodel.xml Fri Oct 10 12:56:17 2008 @@ -103,9 +103,13 @@ <field name="posTerminalLogId" type="id-ne"></field> <field name="paidAmount" type="currency-amount"></field> <field name="reasonComment" type="comment"/> + <field name="reasonEnumId" type="id"/> <prim-key field="posTerminalLogId"/> <relation type="one" fk-name="POS_TRA_POS" rel-entity-name="PosTerminalLog"> <key-map field-name="posTerminalLogId"/> </relation> + <relation type="one" fk-name="POS_TRA_PAYENUM" rel-entity-name="Enumeration"> + <key-map field-name="reasonEnumId" rel-field-name="enumId"/> + </relation> </entity> </entitymodel> \ No newline at end of file Modified: ofbiz/trunk/specialpurpose/webpos/config/WebPosUiLabels.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/webpos/config/WebPosUiLabels.xml?rev=703568&r1=703567&r2=703568&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/webpos/config/WebPosUiLabels.xml (original) +++ ofbiz/trunk/specialpurpose/webpos/config/WebPosUiLabels.xml Fri Oct 10 12:56:17 2008 @@ -212,20 +212,24 @@ <value xml:lang="it">Inserire un'importo iniziale cassa valido:</value> </property> <property key="WebPosManagerPaidInAmount"> - <value xml:lang="en">Enter amount to paid in and create or choose a reason</value> - <value xml:lang="it">Inserire l'importo del pagamento in ingresso o scegli una motivazione</value> + <value xml:lang="en">Enter amount to paid in</value> + <value xml:lang="it">Inserire l'importo del pagamento in ingresso</value> </property> <property key="WebPosManagerPaidOutAmount"> - <value xml:lang="en">Enter amount to withdraw and create or choose a reason</value> - <value xml:lang="it">Inserire l'importo del pagamento in uscita o scegli una motivazione</value> + <value xml:lang="en">Enter amount to withdraw</value> + <value xml:lang="it">Inserire l'importo del pagamento in uscita</value> </property> <property key="WebPosManagerPaidOutAndIndAmountNotValid"> <value xml:lang="en">Enter a valid amount</value> <value xml:lang="it">Inserire un'importo valido</value> </property> <property key="WebPosManagerPaidOutAndIndReason"> - <value xml:lang="en">You have to create or choose a reason</value> - <value xml:lang="it">Tu devi creare o scegliere la motivazione</value> + <value xml:lang="en">You have to choose a reason</value> + <value xml:lang="it">Tu devi scegliere la motivazione</value> + </property> + <property key="WebPosManagerPaidOutAndIndReasonComment"> + <value xml:lang="en">You can insert a comment</value> + <value xml:lang="it">Tu puoi inserire un commento</value> </property> <property key="WebPosManagerPaidOutAndInWithoutOpenedTransaction"> <value xml:lang="en">Cannot Paid Out and In without an opened transaction</value> Modified: ofbiz/trunk/specialpurpose/webpos/data/DemoPosData.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/webpos/data/DemoPosData.xml?rev=703568&r1=703567&r2=703568&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/webpos/data/DemoPosData.xml (original) +++ ofbiz/trunk/specialpurpose/webpos/data/DemoPosData.xml Fri Oct 10 12:56:17 2008 @@ -21,14 +21,5 @@ <entity-engine-xml> <WebSite webSiteId="WebStorePos" siteName="Web POS Site" productStoreId="9100"/> - <EnumerationType description="Pos Paid Reason In" enumTypeId="POS_PAID_REASON_IN" hasTable="N" parentTypeId=""/> - <Enumeration description="Banking during the day" enumCode="BANKING_IN_REASON" enumId="BANKING_IN_REASON" sequenceId="01" enumTypeId="POS_PAID_REASON_IN"/> - <Enumeration description="Change added to Till's float" enumCode="CHANGE_IN_REASON" enumId="CHANGE_IN_REASON" sequenceId="02" enumTypeId="POS_PAID_REASON_IN"/> - <Enumeration description="Petty Cash Paid into Till" enumCode="CASH_IN_REASON" enumId="CASH_IN_REASON" sequenceId="03" enumTypeId="POS_PAID_REASON_IN"/> - - <EnumerationType description="Pos Paid Reason Out" enumTypeId="POS_PAID_REASON_OUT" hasTable="N" parentTypeId=""/> - <Enumeration description="Banking during the day" enumCode="BANKING_OUT_REASON" enumId="BANKING_OUT_REASON" sequenceId="01" enumTypeId="POS_PAID_REASON_OUT"/> - <Enumeration description="Petty Cash out" enumCode="CASH_OUT_REASON" enumId="CASH_OUT_REASON" sequenceId="03" enumTypeId="POS_PAID_REASON_OUT"/> - <ProductStorePaymentSetting productStoreId="9100" paymentMethodTypeId="PERSONAL_CHECK" paymentServiceTypeEnumId="PRDS_PAY_EXTERNAL" paymentService=""/> </entity-engine-xml> \ No newline at end of file Modified: ofbiz/trunk/specialpurpose/webpos/script/org/ofbiz/webpos/event/ManagerEvents.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/webpos/script/org/ofbiz/webpos/event/ManagerEvents.xml?rev=703568&r1=703567&r2=703568&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/webpos/script/org/ofbiz/webpos/event/ManagerEvents.xml (original) +++ ofbiz/trunk/specialpurpose/webpos/script/org/ofbiz/webpos/event/ManagerEvents.xml Fri Oct 10 12:56:17 2008 @@ -296,18 +296,15 @@ </call-class-method> <if-compare field="isDouble" operator="equals" value="true"> <make-value value-name="internTx" entity-name="PosTerminalInternTx"/> - <call-object-method obj-field-name="webPosTransaction" method-name="getTerminalLogId" ret-field-name="internTx.posTerminalLogId"/> - <set field="internTx.paidAmount" from-field="parameters.amountInOut"/> - <entity-one entity-name="Enumeration" value-name="enum"> - <field-map field-name="enumId" env-name="parameters.reasonInOut"/> - </entity-one> - <set field="internTx.reasonComment" from-field="enum.description"/> - <!-- // TODO : store the parameter reasonInOut into the enum paid reason id --> - <create-value value-name="internTx"/> - <set from-field="parameters.type" field="paidInOut"/> - <call-object-method obj-field-name="webPosTransaction" method-name="paidInOut"> - <field field-name="paidInOut" type="String"/> - </call-object-method> + <call-object-method obj-field-name="webPosTransaction" method-name="getTerminalLogId" ret-field-name="internTx.posTerminalLogId"/> + <set field="internTx.paidAmount" from-field="parameters.amountInOut"/> + <set field="internTx.reasonComment" from-field="parameters.reasonCommentInOut"/> + <set field="internTx.reasonEnumId" from-field="parameters.reasonInOut"/> + <create-value value-name="internTx"/> + <set from-field="parameters.type" field="paidInOut"/> + <call-object-method obj-field-name="webPosTransaction" method-name="paidInOut"> + <field field-name="paidInOut" type="String"/> + </call-object-method> <else> <add-error><fail-property resource="WebPosUiLabels" property="WebPosManagerPaidOutAndIndAmountNotValid"/></add-error> <check-errors/> Modified: ofbiz/trunk/specialpurpose/webpos/servicedef/services_manager.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/webpos/servicedef/services_manager.xml?rev=703568&r1=703567&r2=703568&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/webpos/servicedef/services_manager.xml (original) +++ ofbiz/trunk/specialpurpose/webpos/servicedef/services_manager.xml Fri Oct 10 12:56:17 2008 @@ -55,6 +55,7 @@ <attribute name="type" type="String" mode="IN" optional="false"/> <attribute name="amountInOut" type="Double" mode="IN" optional="false"/> <attribute name="reasonInOut" type="String" mode="IN" optional="false"/> + <attribute name="reasonCommentInOut" type="String" mode="IN" optional="false"/> </service> <service name="modifyPrice" engine="simple" auth="false" Modified: ofbiz/trunk/specialpurpose/webpos/webapp/webpos/manager/PaidOutAndIn.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/webpos/webapp/webpos/manager/PaidOutAndIn.ftl?rev=703568&r1=703567&r2=703568&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/webpos/webapp/webpos/manager/PaidOutAndIn.ftl (original) +++ ofbiz/trunk/specialpurpose/webpos/webapp/webpos/manager/PaidOutAndIn.ftl Fri Oct 10 12:56:17 2008 @@ -44,6 +44,10 @@ </td> </tr> <tr> + <td><b>${uiLabelMap.WebPosManagerPaidOutAndIndReasonComment}</b></td> + <td><input type="text" name="reasonCommentInOut" id="reasonCommentInOut" value="${parameters.reasonCommentInOut?default("")}"/></td> + </tr> + <tr> <td colspan="2""> </td> </tr> <tr> |
Free forum by Nabble | Edit this page |