You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by "Jacopo Cappellato (JIRA)" <ji...@apache.org> on 2014/06/18 15:16:15 UTC
[jira] [Closed] (OFBIZ-5622) Incorrect creation logic for
ShipmentItemBilling records
[ https://issues.apache.org/jira/browse/OFBIZ-5622?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jacopo Cappellato closed OFBIZ-5622.
------------------------------------
> Incorrect creation logic for ShipmentItemBilling records
> --------------------------------------------------------
>
> Key: OFBIZ-5622
> URL: https://issues.apache.org/jira/browse/OFBIZ-5622
> Project: OFBiz
> Issue Type: Bug
> Components: accounting
> Affects Versions: SVN trunk
> Reporter: Jacopo Cappellato
> Assignee: Jacopo Cappellato
> Priority: Minor
> Fix For: SVN trunk, Release Branch 13.07
>
> Attachments: Invoice-ShipmentItemBilling-trunk.diff
>
>
> When invoice is created the following code is run for each invoice item:
> {code}
> if ("ItemIssuance".equals(currentValue.getEntityName())) {
> List<GenericValue> shipmentItemBillings = delegator.findByAnd("ShipmentItemBilling", UtilMisc.toMap("shipmentId", currentValue.get("shipmentId")), null, false);
> if (UtilValidate.isEmpty(shipmentItemBillings)) {
> // create the ShipmentItemBilling record
> GenericValue shipmentItemBilling = delegator.makeValue("ShipmentItemBilling", UtilMisc.toMap("invoiceId", invoiceId, "invoiceItemSeqId", invoiceItemSeqId));
> shipmentItemBilling.put("shipmentId", currentValue.get("shipmentId"));
> shipmentItemBilling.put("shipmentItemSeqId", currentValue.get("shipmentItemSeqId"));
> shipmentItemBilling.create();
> }
> }
> {code}
> If I read it correctly, this will only create one ShipmentItemBilling for the first InvoiceItem only, i.e.
> one ShipmentItemBilling record for each invoiceId and shipmentId and several invoiceItemSeqId will be missing it
> The good news is that ShipmentItemBilling is not used much currently but until the bug is fixed the ShipmentItemBilling entity will not contain reliable information.
--
This message was sent by Atlassian JIRA
(v6.2#6252)