Compare commits
No commits in common. "229be993d5e00edb45ef15713d774ac7e2b6c4bd" and "98b6cae2844e710459e73621ed63f680150cea66" have entirely different histories.
229be993d5
...
98b6cae284
|
@ -346,13 +346,12 @@ public class InventoryService {
|
|||
.collect(Collectors.toMap(InventoryTransactionLeg::getParentDocumentId, Function.identity()));
|
||||
for (Bundle subBundle : wrapper.getBundles()) {
|
||||
long accountId = masterBundleDAO.find(subBundle.getMasterBundleId()).getAccountId();
|
||||
if(subBundle.getCurrentProduction() != null && subBundle.getCurrentProduction().compareTo(BigDecimal.ZERO) != 0){
|
||||
if(subBundle.getCurrentProduction().compareTo(BigDecimal.ZERO) != 0){
|
||||
Bundle bundle = bundleDAO.find(subBundle.getId());
|
||||
jobCard = jobCardDAO.find(subBundle.getJobCardId());
|
||||
long production = (bundle.getProduction() == null) ? 0 : bundle.getProduction().longValue() ;
|
||||
long wrapQuantity = bundle.getWrapQuantity().longValue();
|
||||
JobCardItem jobCardItem = jobCardItemDAO.findByCardIdAndItemId(subBundle.getJobCardId(),subBundle.getItemId());
|
||||
BigDecimal previousTotalProduction = jobCardItem.getTotalProduction() == null ? BigDecimal.ZERO : jobCardItem.getTotalProduction();
|
||||
|
||||
InventoryTransactionLeg lastInvTransaction = lastBundleIdInTransactionMap.getOrDefault(subBundle.getId(), null);
|
||||
|
||||
|
@ -368,10 +367,10 @@ public class InventoryService {
|
|||
// create IN Transactions of Finished Items into account
|
||||
createTransactions(stitchingOfflineItems, accountId, InventoryArtifactType.STITCHING_OFFLINE.name());
|
||||
|
||||
jobCardItem.setTotalProduction(previousTotalProduction.add(subBundle.getCurrentProduction()));
|
||||
jobCardItem.setTotalProduction(jobCardItem.getTotalProduction().add(subBundle.getCurrentProduction()));
|
||||
jobCardItem.setJobCardId(jobCard.getId());
|
||||
updatedItems.add(jobCardItem);
|
||||
BigDecimal pro = BigDecimal.valueOf(production + subBundle.getCurrentProduction().longValue());
|
||||
BigDecimal pro = subBundle.getCurrentProduction();
|
||||
bundle.setProduction(pro);
|
||||
bundleDAO.save(bundle);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue