Add a new "paymentReasonId" on PosTerminalInternTx entity and store payment reason id during Pos Paid IN/OUT (Issue OFBIZ-1991)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk/specialpurpose@703568 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -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>
|
||||
|
||||
|
||||
|
||||
@@ -103,9 +103,13 @@ under the License.
|
||||
<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>
|
||||
@@ -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>
|
||||
|
||||
@@ -21,14 +21,5 @@ under the License.
|
||||
<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>
|
||||
@@ -296,18 +296,15 @@ under the License.
|
||||
</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/>
|
||||
|
||||
@@ -55,6 +55,7 @@ under the License.
|
||||
<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"
|
||||
|
||||
@@ -43,6 +43,10 @@ under the License.
|
||||
</select>
|
||||
</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>
|
||||
|
||||
Reference in New Issue
Block a user