Openbravo Issue Tracking System - Retail Modules
View Issue Details
0053764Retail ModulesWeb POSpublic2023-10-26 01:072023-11-27 12:08
sofidossant 
SABARINATH P 
highmajoralways
closedfixed 
5
pi 
RR24Q1 
No
0053764: Sales delivery error - Return Receipts/Shipments do not allow lines with positive quantities
When we deliver a sale, it generates the following error "Return Receipts/Shipments do not allow lines with positive quantities", and it is because the code does not correctly take into account the type of discount that should be used
- Configure a discount type of M_INOUT as default and that is used in return as well.
- Try to deliver an order (1 quantity)
- In the code if we see JAVA GoodsShipmentGenerator (POSTERMINAL), createNewGoodsShipment function, the FIN_Utility.getDocumentType(organization, DOCBASETYPE_MATERIAL_SHIPMENT) function is used but this function does not take into account other than return (a shipment is going to be made)

More information
https://www.youtube.com/watch?v=mo91NUwbfFk&ab_channel=CristianAdrian%7CPracticsBS [^]
Solution proposed

--- a/modules/org.openbravo.retail.posterminal/src/org/openbravo/retail/posterminal/process/GoodsShipmentGenerator.java 2023-10-25 18:01:46.358985000 +0200
+++ b/modules/org.openbravo.retail.posterminal/src/org/openbravo/retail/posterminal/process/GoodsShipmentGenerator.java 2023-10-25 17:58:18.724292000 +0200
@@ -86,8 +86,9 @@
     this.shipment.setOrganization(organization);
     this.shipment.setTrxOrganization(salesOrder.getTrxOrganization());
     this.shipment.setSalesTransaction(true);
- this.shipment
- .setDocumentType(FIN_Utility.getDocumentType(organization, DOCBASETYPE_MATERIAL_SHIPMENT));
+ this.shipment.setDocumentType(salesOrder.getDocumentType().getDocumentTypeForShipment() != null
+ ? salesOrder.getDocumentType().getDocumentTypeForShipment()
+ : FIN_Utility.getDocumentType(organization, DOCBASETYPE_MATERIAL_SHIPMENT));
     this.shipment.setDocumentNo(FIN_Utility.getDocumentNo(this.shipment.getDocumentType(),
         this.shipment.getDocumentType().getTable() != null
             ? "DocumentNo_" + this.shipment.getDocumentType().getTable().getDBTableName()

No tags attached.
diff GoodsShipmentGenerator.diff (1,117) 2023-10-26 01:07
https://issues.openbravo.com/file_download.php?file_id=19094&type=bug
Issue History
2023-10-26 01:07sofidossantNew Issue
2023-10-26 01:07sofidossantAssigned To => Retail
2023-10-26 01:07sofidossantFile Added: GoodsShipmentGenerator.diff
2023-10-26 01:07sofidossantTriggers an Emergency Pack => No
2023-10-26 07:31PracticsIssue Monitored: Practics
2023-11-03 14:12SABARINATH PAssigned ToRetail => SABARINATH P
2023-11-03 14:21SABARINATH PStatusnew => acknowledged
2023-11-04 12:45SABARINATH PStatusacknowledged => scheduled
2023-11-17 11:47sofidossantNote Added: 0157275
2023-11-21 12:04sofidossantNote Added: 0157412
2023-11-23 10:12hgbotNote Added: 0157539
2023-11-24 12:17sofidossantNote Added: 0157610
2023-11-27 12:08hgbotResolutionopen => fixed
2023-11-27 12:08hgbotStatusscheduled => closed
2023-11-27 12:08hgbotNote Added: 0157666
2023-11-27 12:08hgbotFixed in Version => RR24Q1
2023-11-27 12:08hgbotNote Added: 0157667

Notes
(0157275)
sofidossant   
2023-11-17 11:47   
any news?
(0157412)
sofidossant   
2023-11-21 12:04   
any news?
(0157539)
hgbot   
2023-11-23 10:12   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/1413 [^]
(0157610)
sofidossant   
2023-11-24 12:17   
any news?
(0157666)
hgbot   
2023-11-27 12:08   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/1413 [^]
(0157667)
hgbot   
2023-11-27 12:08   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal [^]
Changeset: 1fff05832793ceb61ae209490d6d4b47d28f88b5
Author: Sabarinath <sabarinath.palanisamy.ext@openbravo.com>
Date: 27-11-2023 12:05:51
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/commit/1fff05832793ceb61ae209490d6d4b47d28f88b5 [^]

Fixed ISSUE-53764: Handled sales delivery error.

---
M src/org/openbravo/retail/posterminal/process/GoodsShipmentGenerator.java
---