From 1d06a4c2827a49e92284e3b10be0844816f5cd54 Mon Sep 17 00:00:00 2001 From: Hans Bakker Date: Wed, 11 Mar 2020 10:26:41 +0700 Subject: [PATCH 01/37] generate logo location for use in order PDF --- service/mantle/order/OrderInfoServices.xml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/service/mantle/order/OrderInfoServices.xml b/service/mantle/order/OrderInfoServices.xml index 9d75f3f6..e5c36893 100644 --- a/service/mantle/order/OrderInfoServices.xml +++ b/service/mantle/order/OrderInfoServices.xml @@ -140,6 +140,7 @@ along with this software (see the LICENSE.md file). If not, see + Looked up from ProductStoreSetting and if no setting found for store or no store is associated with the Order then from PartySetting (for vendorPartyId). @@ -438,6 +439,10 @@ along with this software (see the LICENSE.md file). If not, see in-map="[partyId:firstPart.vendorPartyId, partySettingTypeId:('Org' + templateSettingSuffix)]"/> + + + From 841d516b884bd642b37907f5828fc6a80f744b0c Mon Sep 17 00:00:00 2001 From: Hans Bakker Date: Mon, 23 Mar 2020 13:55:27 +0700 Subject: [PATCH 02/37] get vendor/customer contactInfo for PDF --- service/mantle/order/OrderInfoServices.xml | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/service/mantle/order/OrderInfoServices.xml b/service/mantle/order/OrderInfoServices.xml index e5c36893..8a6ec41a 100644 --- a/service/mantle/order/OrderInfoServices.xml +++ b/service/mantle/order/OrderInfoServices.xml @@ -126,8 +126,10 @@ along with this software (see the LICENSE.md file). If not, see + + @@ -292,7 +294,18 @@ along with this software (see the LICENSE.md file). If not, see EntityList partNoParentOrderItemList = partOrderItemList.findAll({ it.parentItemSeqId == null }) EntityValue customerDetail = ec.entity.find("mantle.party.PartyDetail").condition("partyId", orderPart.customerPartyId).one() + Map customerContactInfo = null; + if (customerDetail) { + customerContactInfo = ec.service.sync().name("mantle.party.ContactServices.get#PartyContactInfo") + .parameter("partyId", orderPart.customerPartyId).parameter("postalContactMechPurposeId","PostalOrder") + .parameter("emailContactMechPurposeId", 'EmailOrder').parameter("defaultToPrimaryPurpose", true).call() + String customerEmail = customerContactInfo?.emailAddress} EntityValue vendorDetail = ec.entity.find("mantle.party.PartyDetail").condition("partyId", orderPart.vendorPartyId).one() + Map vendorContactInfo = null; + if (vendorDetail) { + vendorContactInfo = ec.service.sync().name("mantle.party.ContactServices.get#PartyContactInfo") + .parameter("partyId", orderPart.vendorPartyId).parameter("postalContactMechPurposeId","PostalOrder") + .parameter("defaultToPrimaryPurpose", true).call()} boolean isCustomerInternalOrg = ec.entity.find("mantle.party.PartyRole") .condition("partyId", orderPart.customerPartyId).condition("roleTypeId", "OrgInternal").one() as boolean boolean isVendorInternalOrg = ec.entity.find("mantle.party.PartyRole") @@ -305,13 +318,6 @@ along with this software (see the LICENSE.md file). If not, see String shipToPartyId = customerShipToDetail?.partyId ?: orderPart.customerPartyId String billToPartyId = customerBillToDetail?.partyId ?: orderPart.customerPartyId - String customerEmail = null - if (orderPart.customerPartyId) { - customerEmail = ec.service.sync().name("mantle.party.ContactServices.get#PartyContactInfo") - .parameter("partyId", orderPart.customerPartyId).parameter("emailContactMechPurposeId", "EmailOrder") - .parameter("defaultToPrimaryPurpose", true).call()?.emailAddress - } - boolean hasShippableItems = orderItemList.find({ it.product?.productTypeEnumId in ['PtAsset', 'PtDigitalAsset', 'PtAssetUse'] }) != null boolean singleLot = false boolean newerInventory = false @@ -410,6 +416,7 @@ along with this software (see the LICENSE.md file). If not, see postalAddress:postalAddress, postalAddressStateGeo:postalAddressStateGeo, telecomNumber:telecomNumber, facility:facility, facilityContactInfo:facilityContactInfo, customerDetail:customerDetail, customerEmail:customerEmail, + vendorContactInfo: vendorContactInfo, customerContactInfo: customerContactInfo, vendorDetail:vendorDetail, isCustomerInternalOrg:isCustomerInternalOrg, isVendorInternalOrg:isVendorInternalOrg, orderPartPartyList:orderPartPartyList, customerShipToDetail:customerShipToDetail, customerBillToDetail:customerBillToDetail, partShipmentItemSourceList:partShipmentItemSourceList, From 698bfe8348c325de0b3b42a7810008736f35c557 Mon Sep 17 00:00:00 2001 From: Swapnil M Mane Date: Wed, 4 Mar 2020 18:52:46 +0530 Subject: [PATCH 03/37] Fixed: The UserAccount should be created if emailAddress is available As mentioned in the IN parameter definition of create#PersonCustomer service, if newPassword field is empty, the UserAccount will be created and after this user will have to change or reset. But with the exiting newPassword check, it was blocking the creation of UserAccount, thus removed the additional check of newPassword. --- service/mantle/party/PartyServices.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/service/mantle/party/PartyServices.xml b/service/mantle/party/PartyServices.xml index ee4b480d..9b4d0470 100644 --- a/service/mantle/party/PartyServices.xml +++ b/service/mantle/party/PartyServices.xml @@ -656,7 +656,7 @@ along with this software (see the LICENSE.md file). If not, see relationshipTypeEnumId:'PrtContact', fromPartyId:partyId, toPartyId:accountPartyId, fromRoleTypeId:'Contact', toRoleTypeId:'Account']"/> - + From ba04aa3a153d6595f5b081b5f14eb11f6f2b9434 Mon Sep 17 00:00:00 2001 From: David E Jones Date: Tue, 17 Mar 2020 15:49:55 -0700 Subject: [PATCH 04/37] In add#OrderProductQuantity service log when using calculated vs manual/modified price --- service/mantle/order/OrderServices.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/service/mantle/order/OrderServices.xml b/service/mantle/order/OrderServices.xml index 23479a9b..41292d9b 100644 --- a/service/mantle/order/OrderServices.xml +++ b/service/mantle/order/OrderServices.xml @@ -616,7 +616,9 @@ General Order Placement and eCommerce Usage + + From b95cff2bd2821519e9dcd2a6e67ae2f0fff00716 Mon Sep 17 00:00:00 2001 From: David E Jones Date: Sat, 21 Mar 2020 02:25:37 -0700 Subject: [PATCH 05/37] In cancel#AssetIssuance handle reservations that still exist because was only partly issued, and always do separate AssetDetail records for the issuance reversal and the new reservation making it much easier to see history and avoid weird data combinations, also pass through shipmentId and other IDs relevant to AssetDetail records --- service/mantle/product/AssetServices.xml | 53 +++++++++++++++--------- 1 file changed, 34 insertions(+), 19 deletions(-) diff --git a/service/mantle/product/AssetServices.xml b/service/mantle/product/AssetServices.xml index bd0ec96c..810f9f86 100644 --- a/service/mantle/product/AssetServices.xml +++ b/service/mantle/product/AssetServices.xml @@ -1037,6 +1037,7 @@ along with this software (see the LICENSE.md file). If not, see + + - + - + + --> @@ -2112,6 +2115,10 @@ along with this software (see the LICENSE.md file). If not, see + + + + @@ -2121,23 +2128,31 @@ along with this software (see the LICENSE.md file). If not, see - - - - - - - - - + + + + + productId:assetIssuance.productId, assetIssuanceId:assetIssuanceId, + shipmentId:assetIssuance.shipmentId, workEffortId:assetIssuance.workEffortId, + assetMaintenanceId:assetIssuance.assetMaintenanceId]"/> + + + + + + + + + + + + + + From 3c9dec592535bfdbad727aba7cf35fef845ac3b9 Mon Sep 17 00:00:00 2001 From: David E Jones Date: Sat, 21 Mar 2020 02:26:50 -0700 Subject: [PATCH 06/37] Add tests for inventory reservation and issuance scenarios where shipments are partly or fully packed and shipped and then hard cancelled, still some to do --- src/test/groovy/OrderToCashBasicFlow.groovy | 196 ++++++++++++++++---- 1 file changed, 162 insertions(+), 34 deletions(-) diff --git a/src/test/groovy/OrderToCashBasicFlow.groovy b/src/test/groovy/OrderToCashBasicFlow.groovy index 5e38bb3b..bd1dd56b 100644 --- a/src/test/groovy/OrderToCashBasicFlow.groovy +++ b/src/test/groovy/OrderToCashBasicFlow.groovy @@ -31,6 +31,7 @@ class OrderToCashBasicFlow extends Specification { @Shared protected final static Logger logger = LoggerFactory.getLogger(OrderToCashBasicFlow.class) @Shared ExecutionContext ec @Shared String cartOrderId = null, cartOrderPartSeqId + @Shared String inventoryOrderId = null @Shared Map setInfoOut, shipResult @Shared String b2bPaymentId, b2bShipmentId, b2bCredMemoId @Shared long effectiveTime = System.currentTimeMillis() @@ -49,7 +50,7 @@ class OrderToCashBasicFlow extends Specification { ec.entity.tempSetSequencedIdPrimary("mantle.shipment.Shipment", 55500, 10) ec.entity.tempSetSequencedIdPrimary("mantle.shipment.ShipmentItemSource", 55500, 10) ec.entity.tempSetSequencedIdPrimary("mantle.product.asset.Asset", 55500, 10) - ec.entity.tempSetSequencedIdPrimary("mantle.product.asset.AssetDetail", 55500, 10) + ec.entity.tempSetSequencedIdPrimary("mantle.product.asset.AssetDetail", 55500, 50) ec.entity.tempSetSequencedIdPrimary("mantle.product.asset.PhysicalInventory", 55500, 10) ec.entity.tempSetSequencedIdPrimary("mantle.product.issuance.AssetReservation", 55500, 10) ec.entity.tempSetSequencedIdPrimary("mantle.product.issuance.AssetIssuance", 55500, 10) @@ -57,7 +58,7 @@ class OrderToCashBasicFlow extends Specification { ec.entity.tempSetSequencedIdPrimary("mantle.account.payment.Payment", 55500, 10) ec.entity.tempSetSequencedIdPrimary("mantle.account.payment.PaymentApplication", 55500, 10) ec.entity.tempSetSequencedIdPrimary("mantle.order.OrderHeader", 55500, 10) - ec.entity.tempSetSequencedIdPrimary("mantle.order.OrderItemBilling", 55500, 10) + ec.entity.tempSetSequencedIdPrimary("mantle.order.OrderItemBilling", 55500, 20) } def cleanupSpec() { @@ -546,38 +547,6 @@ class OrderToCashBasicFlow extends Specification { dataCheckErrors.size() == 0 } - def "reserve Asset With Displace Reservation"() { - when: - // NOTE: orders used here are from AssetReservationMultipleThreads (base id 53000) - // use asset DEMO_1_1A with 0 ATP at this point (90 QOH, 2 reservations for orders) - // use order with 60 currently reserved against asset 55400 - - EntityList beforeResList = ec.entity.find("mantle.product.issuance.AssetReservation") - .condition("assetId", "DEMO_1_1A").orderBy("assetId").list() - for (EntityValue res in beforeResList) logger.warn("Res before: R:${res.assetReservationId} - O:${res.orderId} - A:${res.assetId} - ${res.quantity} - QOH:${res.asset.quantityOnHandTotal}") - - beforeResList = ec.entity.find("mantle.product.issuance.AssetReservation") - .condition("assetId", "55400").orderBy("assetId").list() - for (EntityValue res in beforeResList) logger.warn("Res before: R:${res.assetReservationId} - O:${res.orderId} - A:${res.assetId} - ${res.quantity}") - - EntityValue beforeRes = beforeResList.find({it.quantity == 60}) - String orderId = beforeRes.orderId - String orderItemSeqId = beforeRes.orderItemSeqId - - ec.service.sync().name("mantle.product.AssetServices.reserve#AssetForOrderItem") - .parameters([orderId:orderId, orderItemSeqId:orderItemSeqId, assetId:"DEMO_1_1A", resetReservations:true]).call() - - EntityList afterResList = ec.entity.find("mantle.product.issuance.AssetReservation") - .condition("orderId", orderId).condition("orderItemSeqId", orderItemSeqId).orderBy("assetId").list() - for (EntityValue res in afterResList) logger.info("Res after: R:${res.assetReservationId} - O:${res.orderId} - A:${res.assetId} - ${res.quantity}") - EntityValue afterRes = afterResList.find({it.assetId == "DEMO_1_1A"}) - - then: - afterRes != null - afterRes?.assetId == "DEMO_1_1A" - afterRes?.quantity == 60.0 - } - /* ========== Business Customer Order, Credit Memo, Overpay/Refund, etc ========== */ def "create and Ship Business Customer Order"() { @@ -783,4 +752,163 @@ class OrderToCashBasicFlow extends Specification { refundApplResult.amountApplied == overpayAmount dataCheckErrors.size() == 0 } + + /* ========== Inventory Reservation and Issuance Tests: pack/issue and unpack, cancel Shipment in late status ========== */ + + def "create Inventory Tests Sales Order"() { + when: + ec.user.loginUser("john.doe", "moqui") + + Map addOut1 = ec.service.sync().name("mantle.order.OrderServices.add#OrderProductQuantity") + .parameters([productId:"DEMO_UNIT", quantity:10, customerPartyId:"CustJqp", + currencyUomId:"USD", productStoreId:"POPC_DEFAULT"]).call() + + inventoryOrderId = addOut1.orderId + + ec.service.sync().name("mantle.order.OrderServices.set#OrderBillingShippingInfo") + .parameters([orderId:inventoryOrderId, paymentMethodId:'CustJqpCc', shippingPostalContactMechId:'CustJqpAddr', + shippingTelecomContactMechId:'CustJqpTeln', carrierPartyId:'_NA_', shipmentMethodEnumId:'ShMthGround']).call() + + ec.service.sync().name("mantle.order.OrderServices.place#Order").parameters([orderId:inventoryOrderId, requireInventory:false]).call() + ec.service.sync().name("mantle.order.OrderServices.approve#Order").parameters([orderId:inventoryOrderId]).call() + + // NOTE: this has sequenced IDs so is sensitive to run order! + List dataCheckErrors = ec.entity.makeDataLoader().xmlText(""" + + + + + + + """).check() + logger.info("create Inventory Tests Sales Order data check results: ") + for (String dataCheckError in dataCheckErrors) logger.info(dataCheckError) + + // TODO: check QOH - ATP = Reservations + + then: + dataCheckErrors.size() == 0 + } + + def "ship Inventory Sales Order and Cancel Shipment"() { + when: + ec.user.loginUser("john.doe", "moqui") + + Map shipResult = ec.service.sync().name("mantle.shipment.ShipmentServices.create#OrderPartShipment") + .parameters([orderId:inventoryOrderId, orderPartSeqId:"01", createPackage:true]).call() + + ec.service.sync().name("mantle.shipment.ShipmentServices.pack#ShipmentProduct") + .parameters([productId:'DEMO_UNIT', quantity:10, shipmentId:shipResult.shipmentId, shipmentPackageSeqId:shipResult.shipmentPackageSeqId]).call() + + ec.service.sync().name("mantle.shipment.ShipmentServices.pack#Shipment").parameters([shipmentId:shipResult.shipmentId]).call() + ec.service.sync().name("mantle.shipment.ShipmentServices.ship#Shipment").parameters([shipmentId:shipResult.shipmentId]).call() + ec.service.sync().name("mantle.shipment.ShipmentServices.cancel#Shipment").parameters([shipmentId:shipResult.shipmentId]).call() + + // NOTE: this has sequenced IDs so is sensitive to run order! + List dataCheckErrors = ec.entity.makeDataLoader().xmlText(""" + + + + + + + + + """).check() + logger.info("ship Inventory Sales Order and Cancel Shipment data check results: ") + for (String dataCheckError in dataCheckErrors) logger.info(dataCheckError) + + // TODO: check QOH - ATP = Reservations + + then: + dataCheckErrors.size() == 0 + } + + def "ship Partial Inventory Sales Order and Cancel Shipment"() { + when: + ec.user.loginUser("john.doe", "moqui") + + Map shipResult = ec.service.sync().name("mantle.shipment.ShipmentServices.create#OrderPartShipment") + .parameters([orderId:inventoryOrderId, orderPartSeqId:"01", createPackage:true]).call() + String shipmentId = shipResult.shipmentId + + // pack partial + ec.service.sync().name("mantle.shipment.ShipmentServices.pack#ShipmentProduct") + .parameters([productId:'DEMO_UNIT', quantity:5, shipmentId:shipResult.shipmentId, shipmentPackageSeqId:shipResult.shipmentPackageSeqId]).call() + // unpack + EntityList issuanceList = ec.entity.find("mantle.product.issuance.AssetIssuance").condition("shipmentId", shipmentId).list() + for (EntityValue issuance in issuanceList) { + ec.service.sync().name("mantle.shipment.ShipmentServices.unpack#ShipmentItemIssuance") + .parameters([assetIssuanceId:issuance.assetIssuanceId]).call() + } + + // pack partial again + ec.service.sync().name("mantle.shipment.ShipmentServices.pack#ShipmentProduct") + .parameters([productId:'DEMO_UNIT', quantity:5, shipmentId:shipResult.shipmentId, shipmentPackageSeqId:shipResult.shipmentPackageSeqId]).call() + + ec.service.sync().name("mantle.shipment.ShipmentServices.pack#Shipment").parameters([shipmentId:shipResult.shipmentId]).call() + ec.service.sync().name("mantle.shipment.ShipmentServices.ship#Shipment").parameters([shipmentId:shipResult.shipmentId]).call() + ec.service.sync().name("mantle.shipment.ShipmentServices.cancel#Shipment").parameters([shipmentId:shipResult.shipmentId]).call() + + // NOTE: this has sequenced IDs so is sensitive to run order! + List dataCheckErrors = ec.entity.makeDataLoader().xmlText(""" + """).check() + logger.info("ship Partial Inventory Sales Order and Cancel Shipment data check results: ") + for (String dataCheckError in dataCheckErrors) logger.info(dataCheckError) + + // TODO: check QOH - ATP = Reservations + + then: + dataCheckErrors.size() == 0 + } + + // NOTE: do this last because deals with unpredictable data (number of AssetDetail, etc records) from the thread race in asset reservations + def "reserve Asset With Displace Reservation"() { + when: + // NOTE: orders used here are from AssetReservationMultipleThreads (base id 53000) + // use asset DEMO_1_1A with 0 ATP at this point (90 QOH, 2 reservations for orders) + // use order with 60 currently reserved against asset 55400 + + EntityList beforeResList = ec.entity.find("mantle.product.issuance.AssetReservation") + .condition("assetId", "DEMO_1_1A").orderBy("assetId").list() + for (EntityValue res in beforeResList) logger.warn("Res before: R:${res.assetReservationId} - O:${res.orderId} - A:${res.assetId} - ${res.quantity} - QOH:${res.asset.quantityOnHandTotal}") + + beforeResList = ec.entity.find("mantle.product.issuance.AssetReservation") + .condition("assetId", "55400").orderBy("assetId").list() + for (EntityValue res in beforeResList) logger.warn("Res before: R:${res.assetReservationId} - O:${res.orderId} - A:${res.assetId} - ${res.quantity}") + + EntityValue beforeRes = beforeResList.find({it.quantity == 60}) + String orderId = beforeRes.orderId + String orderItemSeqId = beforeRes.orderItemSeqId + + ec.service.sync().name("mantle.product.AssetServices.reserve#AssetForOrderItem") + .parameters([orderId:orderId, orderItemSeqId:orderItemSeqId, assetId:"DEMO_1_1A", resetReservations:true]).call() + + EntityList afterResList = ec.entity.find("mantle.product.issuance.AssetReservation") + .condition("orderId", orderId).condition("orderItemSeqId", orderItemSeqId).orderBy("assetId").list() + for (EntityValue res in afterResList) logger.info("Res after: R:${res.assetReservationId} - O:${res.orderId} - A:${res.assetId} - ${res.quantity}") + EntityValue afterRes = afterResList.find({it.assetId == "DEMO_1_1A"}) + + then: + afterRes != null + afterRes?.assetId == "DEMO_1_1A" + afterRes?.quantity == 60.0 + } } From 67d51b47f75f16dd178655f74765781b058099e2 Mon Sep 17 00:00:00 2001 From: David E Jones Date: Sat, 21 Mar 2020 02:56:16 -0700 Subject: [PATCH 07/37] Add tests to make sure QOH - ATP = Reservations and fix that issue in cancel#AssetIssuance when there was an existing reservation --- service/mantle/product/AssetServices.xml | 14 +++++----- src/test/groovy/OrderToCashBasicFlow.groovy | 30 ++++++++++++++++++--- 2 files changed, 34 insertions(+), 10 deletions(-) diff --git a/service/mantle/product/AssetServices.xml b/service/mantle/product/AssetServices.xml index 810f9f86..cb5335dd 100644 --- a/service/mantle/product/AssetServices.xml +++ b/service/mantle/product/AssetServices.xml @@ -2131,17 +2131,17 @@ along with this software (see the LICENSE.md file). If not, see - - - + + diff --git a/src/test/groovy/OrderToCashBasicFlow.groovy b/src/test/groovy/OrderToCashBasicFlow.groovy index bd1dd56b..bdb2c156 100644 --- a/src/test/groovy/OrderToCashBasicFlow.groovy +++ b/src/test/groovy/OrderToCashBasicFlow.groovy @@ -792,10 +792,18 @@ class OrderToCashBasicFlow extends Specification { logger.info("create Inventory Tests Sales Order data check results: ") for (String dataCheckError in dataCheckErrors) logger.info(dataCheckError) - // TODO: check QOH - ATP = Reservations + // check QOH - ATP = Reservations + def assetDetailSummaryList = ec.entity.find("mantle.product.asset.AssetDetailSummary") + .condition("assetId", "DEMO_UNITA").selectField("availableToPromiseTotal,quantityOnHandTotal").list() + BigDecimal availableToPromiseTotal = (BigDecimal) assetDetailSummaryList.get(0).availableToPromiseTotal + BigDecimal quantityOnHandTotal = (BigDecimal) assetDetailSummaryList.get(0).quantityOnHandTotal + BigDecimal reservationTotal = (BigDecimal) ec.entity.find("mantle.product.issuance.AssetReservation") + .condition("assetId", "DEMO_UNITA").list().sum({ it.quantity }) + logger.info("availableToPromiseTotal ${availableToPromiseTotal} quantityOnHandTotal ${quantityOnHandTotal} reservationTotal ${reservationTotal}") then: dataCheckErrors.size() == 0 + quantityOnHandTotal - availableToPromiseTotal == reservationTotal } def "ship Inventory Sales Order and Cancel Shipment"() { @@ -835,10 +843,18 @@ class OrderToCashBasicFlow extends Specification { logger.info("ship Inventory Sales Order and Cancel Shipment data check results: ") for (String dataCheckError in dataCheckErrors) logger.info(dataCheckError) - // TODO: check QOH - ATP = Reservations + // check QOH - ATP = Reservations + def assetDetailSummaryList = ec.entity.find("mantle.product.asset.AssetDetailSummary") + .condition("assetId", "DEMO_UNITA").selectField("availableToPromiseTotal,quantityOnHandTotal").list() + BigDecimal availableToPromiseTotal = (BigDecimal) assetDetailSummaryList.get(0).availableToPromiseTotal + BigDecimal quantityOnHandTotal = (BigDecimal) assetDetailSummaryList.get(0).quantityOnHandTotal + BigDecimal reservationTotal = (BigDecimal) ec.entity.find("mantle.product.issuance.AssetReservation") + .condition("assetId", "DEMO_UNITA").list().sum({ it.quantity }) + logger.info("availableToPromiseTotal ${availableToPromiseTotal} quantityOnHandTotal ${quantityOnHandTotal} reservationTotal ${reservationTotal}") then: dataCheckErrors.size() == 0 + quantityOnHandTotal - availableToPromiseTotal == reservationTotal } def "ship Partial Inventory Sales Order and Cancel Shipment"() { @@ -873,10 +889,18 @@ class OrderToCashBasicFlow extends Specification { logger.info("ship Partial Inventory Sales Order and Cancel Shipment data check results: ") for (String dataCheckError in dataCheckErrors) logger.info(dataCheckError) - // TODO: check QOH - ATP = Reservations + // check QOH - ATP = Reservations + def assetDetailSummaryList = ec.entity.find("mantle.product.asset.AssetDetailSummary") + .condition("assetId", "DEMO_UNITA").selectField("availableToPromiseTotal,quantityOnHandTotal").list() + BigDecimal availableToPromiseTotal = (BigDecimal) assetDetailSummaryList.get(0).availableToPromiseTotal + BigDecimal quantityOnHandTotal = (BigDecimal) assetDetailSummaryList.get(0).quantityOnHandTotal + BigDecimal reservationTotal = (BigDecimal) ec.entity.find("mantle.product.issuance.AssetReservation") + .condition("assetId", "DEMO_UNITA").list().sum({ it.quantity }) + logger.info("availableToPromiseTotal ${availableToPromiseTotal} quantityOnHandTotal ${quantityOnHandTotal} reservationTotal ${reservationTotal}") then: dataCheckErrors.size() == 0 + quantityOnHandTotal - availableToPromiseTotal == reservationTotal } // NOTE: do this last because deals with unpredictable data (number of AssetDetail, etc records) from the thread race in asset reservations From c558bd9e3d028b887f472c77c369d3886b765d25 Mon Sep 17 00:00:00 2001 From: David E Jones Date: Sat, 21 Mar 2020 22:08:40 -0700 Subject: [PATCH 08/37] On order approve populate new OrderHeader.approvedDate field --- service/mantle/order/OrderServices.xml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/service/mantle/order/OrderServices.xml b/service/mantle/order/OrderServices.xml index 41292d9b..25679a89 100644 --- a/service/mantle/order/OrderServices.xml +++ b/service/mantle/order/OrderServices.xml @@ -919,6 +919,7 @@ General Order Placement and eCommerce Usage + @@ -935,6 +936,7 @@ General Order Placement and eCommerce Usage + @@ -1041,6 +1043,9 @@ General Order Placement and eCommerce Usage For manual order approval, requires ORDER_APPROVE permission. + + + @@ -1119,7 +1124,8 @@ General Order Placement and eCommerce Usage - + From fa70e20ef25ce50a8ef5a15723eeb8b1a7d28b3e Mon Sep 17 00:00:00 2001 From: David E Jones Date: Sat, 21 Mar 2020 22:10:49 -0700 Subject: [PATCH 09/37] In reserve#AssetForOrderItem reuse placeholder/dummy Asset records for unavailable reservations; add reReserve#Assets service to bulk re-reserve existing reservations, new reservations initially always sorted by OrderPart.priority then OrderHeader.placedDate --- service/mantle/product/AssetServices.xml | 93 ++++++++++++++++++++---- 1 file changed, 79 insertions(+), 14 deletions(-) diff --git a/service/mantle/product/AssetServices.xml b/service/mantle/product/AssetServices.xml index cb5335dd..0eb68aa0 100644 --- a/service/mantle/product/AssetServices.xml +++ b/service/mantle/product/AssetServices.xml @@ -955,19 +955,39 @@ along with this software (see the LICENSE.md file). If not, see - + + + + + + + + + + + + + + + + + + + + + + + - - @@ -1004,7 +1024,7 @@ along with this software (see the LICENSE.md file). If not, see + assetReservationId:existingRes.assetReservationId, productId:existingRes.productId, orderId:existingRes.orderId]"/> @@ -1037,15 +1057,60 @@ along with this software (see the LICENSE.md file). If not, see - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - --> For Asset with availableToPromiseTotal > 0 find AssetReservation with quantityNotAvailable and reserve against it From a34bdcb33f2fb2c325dd07c0f16fb8398f6b9b02 Mon Sep 17 00:00:00 2001 From: David E Jones Date: Mon, 23 Mar 2020 16:41:45 -0700 Subject: [PATCH 10/37] In create#Order set new default disable promos, ship calc, and tax calc fields from ProductStore --- service/mantle/order/OrderServices.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/service/mantle/order/OrderServices.xml b/service/mantle/order/OrderServices.xml index 25679a89..8ccfd5d3 100644 --- a/service/mantle/order/OrderServices.xml +++ b/service/mantle/order/OrderServices.xml @@ -71,6 +71,9 @@ General Order Placement and eCommerce Usage + + + From 3a8235c0d11b730f6ee72bbf813a53f9024ce6e0 Mon Sep 17 00:00:00 2001 From: David E Jones Date: Tue, 31 Mar 2020 13:58:54 -0700 Subject: [PATCH 11/37] In issue#AssetReservation set AssetIssuance.invoiceId and item seq id based on ShipmentItemSource if available, fixes issue where invoiceId/invoiceItemSeqId not set on AssetIssuance if invoice created before shipment --- service/mantle/product/AssetServices.xml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/service/mantle/product/AssetServices.xml b/service/mantle/product/AssetServices.xml index 0eb68aa0..e3e811aa 100644 --- a/service/mantle/product/AssetServices.xml +++ b/service/mantle/product/AssetServices.xml @@ -1649,9 +1649,13 @@ along with this software (see the LICENSE.md file). If not, see + + + + @@ -1663,12 +1667,15 @@ along with this software (see the LICENSE.md file). If not, see + in-map="[assetIssuanceId:assetIssuanceId, quantity:(existingIssuance.quantity + quantity), + invoiceId:(existingIssuance.invoiceId ?: shipmentItemSource?.invoiceId), + invoiceItemSeqId:(existingIssuance.invoiceItemSeqId ?: shipmentItemSource?.invoiceItemSeqId)]"/> - + From 96dc51bea9a9dc3690a0b2877af4e4cbbee576c7 Mon Sep 17 00:00:00 2001 From: David E Jones Date: Tue, 31 Mar 2020 13:59:52 -0700 Subject: [PATCH 12/37] Improve apply#InvoiceItemToShipment to fill in invoiceId and invoiceItemSeqId on AssetIssuance related to ShipmentItemSource for records where was missing --- service/mantle/account/InvoiceServices.xml | 45 +++++++++++++++------- 1 file changed, 32 insertions(+), 13 deletions(-) diff --git a/service/mantle/account/InvoiceServices.xml b/service/mantle/account/InvoiceServices.xml index 94ae8595..5bd933ba 100644 --- a/service/mantle/account/InvoiceServices.xml +++ b/service/mantle/account/InvoiceServices.xml @@ -2259,7 +2259,7 @@ along with this software (see the LICENSE.md file). If not, see - + @@ -2269,20 +2269,39 @@ along with this software (see the LICENSE.md file). If not, see - + + + + + + + + + + + + + + + + Invoice ${invoiceId} item ${invoiceItemSeqId} already fully applied to shipments + - - - - + + + + - - - - - - - + + + + + + + + + + From 856e3d6304ec991cdf08bac0ee76c2c54b543730 Mon Sep 17 00:00:00 2001 From: David E Jones Date: Tue, 31 Mar 2020 17:04:39 -0700 Subject: [PATCH 13/37] In get#ProjectParties service also include Project roles so all project parties are available --- service/mantle/work/ProjectServices.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/service/mantle/work/ProjectServices.xml b/service/mantle/work/ProjectServices.xml index 301acfef..664e799d 100644 --- a/service/mantle/work/ProjectServices.xml +++ b/service/mantle/work/ProjectServices.xml @@ -510,7 +510,7 @@ along with this software (see the LICENSE.md file). If not, see - + From 25d0ccf913df1d5a4ee9627c95c19b77e933f385 Mon Sep 17 00:00:00 2001 From: David E Jones Date: Fri, 3 Apr 2020 15:39:36 -0700 Subject: [PATCH 14/37] In Party/ContactServices add create#WebAddress service and add webAddress support (like emailAddress) to get#PartyContactInfo, get#PartyContactInfoList, and store#PartyContactInfo --- service/mantle/party/ContactServices.xml | 125 +++++++++++++++++++++++ 1 file changed, 125 insertions(+) diff --git a/service/mantle/party/ContactServices.xml b/service/mantle/party/ContactServices.xml index 3a74de99..612ce949 100644 --- a/service/mantle/party/ContactServices.xml +++ b/service/mantle/party/ContactServices.xml @@ -25,6 +25,8 @@ along with this software (see the LICENSE.md file). If not, see + + @@ -38,6 +40,7 @@ along with this software (see the LICENSE.md file). If not, see + @@ -48,11 +51,18 @@ along with this software (see the LICENSE.md file). If not, see + + + + + + + @@ -190,6 +200,36 @@ along with this software (see the LICENSE.md file). If not, see + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -213,6 +253,7 @@ along with this software (see the LICENSE.md file). If not, see + @@ -250,6 +291,14 @@ along with this software (see the LICENSE.md file). If not, see + + + + + + + + @@ -372,6 +421,37 @@ along with this software (see the LICENSE.md file). If not, see + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -458,6 +538,11 @@ along with this software (see the LICENSE.md file). If not, see + + + + + @@ -467,6 +552,7 @@ along with this software (see the LICENSE.md file). If not, see + @@ -509,6 +595,25 @@ along with this software (see the LICENSE.md file). If not, see + + + + + + + + + + + + + + + + @@ -1030,6 +1135,26 @@ along with this software (see the LICENSE.md file). If not, see + + + + + + + + + + + + + + + + + + + From 22f1e177fdf53752595c0ff03bbf566f246bc52a Mon Sep 17 00:00:00 2001 From: David E Jones Date: Fri, 3 Apr 2020 18:31:35 -0700 Subject: [PATCH 15/37] Add hasAllTrackingCodes out-parameter to get#ShipmentDisplayInfo service for use on ShipmentDetail and PackShipment screens --- service/mantle/shipment/ShipmentInfoServices.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/service/mantle/shipment/ShipmentInfoServices.xml b/service/mantle/shipment/ShipmentInfoServices.xml index a934ae6a..a8174674 100644 --- a/service/mantle/shipment/ShipmentInfoServices.xml +++ b/service/mantle/shipment/ShipmentInfoServices.xml @@ -70,6 +70,7 @@ along with this software (see the LICENSE.md file). If not, see + @@ -161,12 +162,14 @@ along with this software (see the LICENSE.md file). If not, see + + From 43e0149b8f8f31059cae6d30c66999e70f999bda Mon Sep 17 00:00:00 2001 From: Hans Bakker Date: Mon, 6 Apr 2020 12:25:15 +0700 Subject: [PATCH 16/37] mantle.party.ContactServices.create#PostalAddress address1 should be mandatory mantle.party.duplicateServices find#PostalAddresses is already mandatory if mssing the following will happen: Transaction rollback for [Error running service mantle.order.OrderInfoServices.check#OrderPreApprove (message): Field cannot be empty(for field Address 1 of service Mantle Party Duplicate Services Find Postal Addresses which make the order detail screen locked. --- service/mantle/party/ContactServices.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/service/mantle/party/ContactServices.xml b/service/mantle/party/ContactServices.xml index 612ce949..a6538e04 100644 --- a/service/mantle/party/ContactServices.xml +++ b/service/mantle/party/ContactServices.xml @@ -667,7 +667,7 @@ along with this software (see the LICENSE.md file). If not, see - + From 3473b9241de601048309a0aa05a7fa4798e128de Mon Sep 17 00:00:00 2001 From: David E Jones Date: Tue, 7 Apr 2020 01:37:12 -0700 Subject: [PATCH 17/37] In search#Party service use a nested query to filter partyClassificationId by from/thru dates, add pageNoLimit parameter for file output use --- service/mantle/party/PartyServices.xml | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/service/mantle/party/PartyServices.xml b/service/mantle/party/PartyServices.xml index 9b4d0470..04e69e23 100644 --- a/service/mantle/party/PartyServices.xml +++ b/service/mantle/party/PartyServices.xml @@ -73,6 +73,7 @@ along with this software (see the LICENSE.md file). If not, see + @@ -88,6 +89,8 @@ along with this software (see the LICENSE.md file). If not, see + + @@ -100,7 +103,16 @@ along with this software (see the LICENSE.md file). If not, see - + + + + @@ -181,7 +193,8 @@ along with this software (see the LICENSE.md file). If not, see + orderByFields:orderByFields, highlightFields:highlightFields, nestedQueryMap:nestedQueryMap, + pageIndex:pageIndex, pageSize:pageSize, pageNoLimit:pageNoLimit]"/> From d62263d9af7aff566963fea6c704c0736479c881 Mon Sep 17 00:00:00 2001 From: David E Jones Date: Wed, 8 Apr 2020 14:06:55 -0700 Subject: [PATCH 18/37] Fix error messages in generate#NachaFile service --- service/mantle/account/NachaServices.xml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/service/mantle/account/NachaServices.xml b/service/mantle/account/NachaServices.xml index d194acd0..6c50a4c1 100644 --- a/service/mantle/account/NachaServices.xml +++ b/service/mantle/account/NachaServices.xml @@ -190,10 +190,13 @@ along with this software (see the LICENSE.md file). If not, see BigDecimal debitAmountTotal = 0, creditAmountTotal = 0 paymentList = [] for (EntityValue payment in originalPaymentList) { - boolean outgoing = payment.fromPartyId == paymentMethod.ownerPartyId + // add payment to context for error messages using ec.resource.expand() + ec.context.put("payment", payment) // Get PaymentMethod and BankAccount; use toPaymentMethodId if outgoing - String pmtPaymentMethodId = outgoing ? payment.toPaymentMethodId : payment.paymentMethodId + boolean outgoing = payment.fromPartyId == paymentMethod.ownerPartyId + // NOTE: no type on pmtPaymentMethodId to put in ec.context so available for ec.resource.expand() + pmtPaymentMethodId = outgoing ? payment.toPaymentMethodId : payment.paymentMethodId EntityValue pmtPaymentMethod = ec.entity.find("mantle.account.method.PaymentMethod") .condition("paymentMethodId", pmtPaymentMethodId).one() EntityValue pmtBankAccount = ec.entity.find("mantle.account.method.BankAccount") From 6b940fc4c9637d5a8f0c6e11073495c68c7a8b32 Mon Sep 17 00:00:00 2001 From: David E Jones Date: Sat, 11 Apr 2020 00:32:29 -0700 Subject: [PATCH 19/37] In store#PaymentMethodInfo automatically update open Payments with new paymentMethodId and toPaymentMethodId --- .../mantle/account/PaymentMethodServices.xml | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/service/mantle/account/PaymentMethodServices.xml b/service/mantle/account/PaymentMethodServices.xml index c756c460..6f86a5d0 100644 --- a/service/mantle/account/PaymentMethodServices.xml +++ b/service/mantle/account/PaymentMethodServices.xml @@ -198,6 +198,7 @@ along with this software (see the LICENSE.md file). If not, see + @@ -246,6 +247,27 @@ along with this software (see the LICENSE.md file). If not, see + + + + + + + + + + + + + + + + + + + + + From f5c4c14fab7bf0c198d5a9fbe0cd0c41e04eb6a0 Mon Sep 17 00:00:00 2001 From: David E Jones Date: Sat, 11 Apr 2020 00:39:24 -0700 Subject: [PATCH 20/37] In store#PaymentMethodInfo show message when automatically updating open Payments --- service/mantle/account/PaymentMethodServices.xml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/service/mantle/account/PaymentMethodServices.xml b/service/mantle/account/PaymentMethodServices.xml index 6f86a5d0..37e19261 100644 --- a/service/mantle/account/PaymentMethodServices.xml +++ b/service/mantle/account/PaymentMethodServices.xml @@ -258,6 +258,7 @@ along with this software (see the LICENSE.md file). If not, see + Updated Payment Method on Payment ${payment.paymentId} @@ -265,7 +266,8 @@ along with this software (see the LICENSE.md file). If not, see - + + Updated To Payment Method on Payment ${toPayment.paymentId} @@ -286,6 +288,7 @@ along with this software (see the LICENSE.md file). If not, see + From 9c0471ded585d60e7ed5b68c930b2f3f1b1b8571 Mon Sep 17 00:00:00 2001 From: David E Jones Date: Tue, 14 Apr 2020 00:29:58 -0700 Subject: [PATCH 21/37] In search#Party service use new StringUtilities.elasticQueryAutoWildcard() method to handle query string processing instead of inconsistent inline --- service/mantle/party/PartyServices.xml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/service/mantle/party/PartyServices.xml b/service/mantle/party/PartyServices.xml index 04e69e23..bfa0ca03 100644 --- a/service/mantle/party/PartyServices.xml +++ b/service/mantle/party/PartyServices.xml @@ -93,10 +93,7 @@ along with this software (see the LICENSE.md file). If not, see - - - - + From ab9f3201db535f3209b3366a763ced775a226185 Mon Sep 17 00:00:00 2001 From: David E Jones Date: Tue, 14 Apr 2020 02:53:45 -0700 Subject: [PATCH 22/37] Add create#WorkerInvoiceItems service for direct billing from worker to project vendor or employer, ie without a project; move child/descendant WorkEffort logic to create#TimeEntryInvoiceItems from create#ProjectInvoiceItems; changes to all of these services to better handle invoice type and invoice item type for employee, non-employee person, and organization --- service/mantle/account/InvoiceServices.xml | 140 ++++++++++++++++----- service/mantle/work/TimeServices.xml | 4 +- 2 files changed, 115 insertions(+), 29 deletions(-) diff --git a/service/mantle/account/InvoiceServices.xml b/service/mantle/account/InvoiceServices.xml index 5bd933ba..957c87cb 100644 --- a/service/mantle/account/InvoiceServices.xml +++ b/service/mantle/account/InvoiceServices.xml @@ -1517,7 +1517,8 @@ along with this software (see the LICENSE.md file). If not, see Only TimeEntry records before this date will be included. Defaults to now. - + + Invoice Project Client/Customer (RaprClient) or Vendor/Worker (RaprVendor) If specified only include time entries and expenses from this Party. @@ -1536,9 +1537,31 @@ along with this software (see the LICENSE.md file). If not, see + - - + + + + + + + + + + + + + + + + + + + + + + @@ -1551,33 +1574,20 @@ along with this software (see the LICENSE.md file). If not, see - - - - - - - - - - - - + + @@ -1611,31 +1621,106 @@ along with this software (see the LICENSE.md file). If not, see + + + + Matches TimeEntry.vendorPartyId, a Project Vendor or Employer + If specified add item(s) to this Invoice. If empty an Invoice will be created. + + Only TimeEntry records before this date will be included. Defaults to now. + + + If specified filter TimeEntry query by the specified WorkEffort and all WorkEfforts matching on rootWorkEffortId (for projects, etc) or parentWorkEffortId + If specified get TimeEntry records constrained on it. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + No time entries found for worker ${ec.resource.expand('PartyNameTemplate','',workerParty)}, not creating invoice or adding items to existing invoice. + + Added ${createResult.invoiceItemCreatedCount} items to Invoice ${invoiceId} + + + + - If specified get TimeEntry records constrained on it. Generally a task ID. + If specified filter TimeEntry query by the specified WorkEffort and all WorkEfforts matching on rootWorkEffortId (for projects, etc) or parentWorkEffortId If specified get TimeEntry records constrained on it. Only TimeEntry records before this date will be included. Defaults to now. + If not specified uses ItemTimeEntry for RaprClient, + for RaprVendor use ItemHourlyEarnings for Person Worker and ItemTimeEntry for Organization Worker If RaprVendor TimeEntry.vendorInvoiceId is populated and time entries with it populated are excluded, otherwise with default of RaprClient TimeEntry.invoiceId is used. - If specified only include time entries from this Party. + If specified only include time entries from this Party (matches TimeEntry.partyId) + Matches TimeEntry.vendorPartyId, a Project Vendor or Employer + + + + + + + + + + + + + + + + - + @@ -1643,10 +1728,9 @@ along with this software (see the LICENSE.md file). If not, see + - - diff --git a/service/mantle/work/TimeServices.xml b/service/mantle/work/TimeServices.xml index 467364ea..7ac6f771 100644 --- a/service/mantle/work/TimeServices.xml +++ b/service/mantle/work/TimeServices.xml @@ -597,7 +597,9 @@ along with this software (see the LICENSE.md file). If not, see - No hourly ${purposeDesc} rate amount found for time entry ${timeEntryId} + + + No hourly ${purposeDesc} rate amount found for time entry ${timeEntryId} for worker ${ec.resource.expand('PartyNameTemplate','',workerParty)} From 28c3b050464a583f0acc816025c275ddb53d0ada Mon Sep 17 00:00:00 2001 From: David E Jones Date: Thu, 23 Apr 2020 18:17:22 -0700 Subject: [PATCH 23/37] In AUTHORS file update my year range, add bottom line to help preserve format with empty line at end so adding signatures is hopefully more consistently a single line add in diffs --- AUTHORS | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/AUTHORS b/AUTHORS index d28a8e9a..541e68a3 100644 --- a/AUTHORS +++ b/AUTHORS @@ -34,7 +34,7 @@ that are otherwise encumbered. Signed by git commit adding my legal name and git username: -Written in 2010-2016 by David E. Jones - jonesde +Written in 2010-2020 by David E. Jones - jonesde Written in 2014-2015 by Solomon Bessire - sbessire Written in 2012-2016 by Sam Hamilton - samhamilton Written in 2014-2015 by Yao Chunlin - chunlinyao @@ -74,7 +74,7 @@ litigation is filed. Signed by git commit adding my legal name and git username: -Written in 2010-2016 by David E. Jones - jonesde +Written in 2010-2020 by David E. Jones - jonesde Written in 2014-2015 by Solomon Bessire - sbessire Written in 2014-2015 by Yao Chunlin - chunlinyao Written in 2015-2015 by Jens Hardings - jenshp @@ -92,3 +92,5 @@ written in 2019 by Deepak Dixit - dixitdeepak written in 2019 by Arzang Kasiri - akasiri Written in 2019 by Lawrence Tran - lawrencetran written in 2019 by Irwing Herrera - iaha + +=========================================================================== From a483c7ab1a4983fbf1e25a007b9905ad31cea086 Mon Sep 17 00:00:00 2001 From: David E Jones Date: Sun, 26 Apr 2020 19:37:47 -0700 Subject: [PATCH 24/37] In get#PartyEmployersAndPositionClasses service also return an employerPartyList that defaults to all internal orgs if worker party has no employee relationships --- service/mantle/humanres/PositionServices.xml | 21 ++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/service/mantle/humanres/PositionServices.xml b/service/mantle/humanres/PositionServices.xml index e76779c1..fb06af88 100644 --- a/service/mantle/humanres/PositionServices.xml +++ b/service/mantle/humanres/PositionServices.xml @@ -21,7 +21,8 @@ along with this software (see the LICENSE.md file). If not, see - + + @@ -34,7 +35,7 @@ along with this software (see the LICENSE.md file). If not, see - + @@ -45,6 +46,22 @@ along with this software (see the LICENSE.md file). If not, see + + + + + + + + + + + + + + + + From 2f0cc20aa6ec915da40c478c5b58f6bdcffc2643 Mon Sep 17 00:00:00 2001 From: David E Jones Date: Mon, 27 Apr 2020 19:13:10 -0700 Subject: [PATCH 25/37] On RequestAndPartyDetail view-entity add Party member entity (for psuedoId, etc) --- entity/RequestViewEntities.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/entity/RequestViewEntities.xml b/entity/RequestViewEntities.xml index e9524574..1dca1702 100644 --- a/entity/RequestViewEntities.xml +++ b/entity/RequestViewEntities.xml @@ -60,6 +60,8 @@ along with this software (see the LICENSE.md file). If not, see + + @@ -68,6 +70,7 @@ along with this software (see the LICENSE.md file). If not, see + From 1a7e1d1ae99256007ad4ae3577fc2f3d6f83fb1e Mon Sep 17 00:00:00 2001 From: Wei Zhang Date: Tue, 28 Apr 2020 14:15:13 +0800 Subject: [PATCH 26/37] Add CommunicationEventContent Services --- AUTHORS | 2 +- .../mantle/party/CommunicationServices.xml | 88 +++++++++++++++++++ 2 files changed, 89 insertions(+), 1 deletion(-) diff --git a/AUTHORS b/AUTHORS index 541e68a3..fb56798d 100644 --- a/AUTHORS +++ b/AUTHORS @@ -85,7 +85,7 @@ Written in 2016 by Shen Defu - shendepu Written in 2016 by Sean Lovinger - smlovin2 Written in 2017 by Oleg Andrieiev - onadreyev Written in 2017 by Zhen Zhao Wei - WillWei1983 -Written in 2017 by Zhang Wei - zhangwei1979 +Written in 2017-2020 by Zhang Wei - zhangwei1979 written in 2018 by Hans Bakker - hansbak written in 2019 by Daniel Taylor - danieltaylor-nz written in 2019 by Deepak Dixit - dixitdeepak diff --git a/service/mantle/party/CommunicationServices.xml b/service/mantle/party/CommunicationServices.xml index 25197c03..b3d8f2fe 100644 --- a/service/mantle/party/CommunicationServices.xml +++ b/service/mantle/party/CommunicationServices.xml @@ -101,4 +101,92 @@ along with this software (see the LICENSE.md file). If not, see in-map="[wikiPageId:wikiPageId, communicationEventId:communicationEventId]"/> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From cc6e8328c0f108e75d5ab0e68897bebb5996c949 Mon Sep 17 00:00:00 2001 From: David E Jones Date: Thu, 30 Apr 2020 14:48:56 -0700 Subject: [PATCH 27/37] Fix issue in add#OrderProductQuantity where orderHeader and orderPart entity values were not looked up for existing open orders, and also constrain lookup of existing orders by vendorPartyId; related to PR #153 --- service/mantle/order/OrderServices.xml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/service/mantle/order/OrderServices.xml b/service/mantle/order/OrderServices.xml index 8ccfd5d3..bcbbc177 100644 --- a/service/mantle/order/OrderServices.xml +++ b/service/mantle/order/OrderServices.xml @@ -587,6 +587,7 @@ General Order Placement and eCommerce Usage + @@ -594,6 +595,9 @@ General Order Placement and eCommerce Usage + + + From 3532d61ece11edcb7174882ab13e3b2be29cec14 Mon Sep 17 00:00:00 2001 From: David E Jones Date: Fri, 1 May 2020 01:52:44 -0700 Subject: [PATCH 28/37] In CarrierServices and ShipmentInfoServices for order and shipment bulk rates and actual charges/rates add support for new ProductStoreShipOption markup fields that override the PsstShipLabelMarkup store setting if used, also honor the new ProductStore markupOrderShipLabels and markupShipmentShipLabels config fields --- service/mantle/shipment/CarrierServices.xml | 213 +++++++++++++----- .../mantle/shipment/ShipmentInfoServices.xml | 28 ++- 2 files changed, 175 insertions(+), 66 deletions(-) diff --git a/service/mantle/shipment/CarrierServices.xml b/service/mantle/shipment/CarrierServices.xml index ee1b1fec..aee3365a 100644 --- a/service/mantle/shipment/CarrierServices.xml +++ b/service/mantle/shipment/CarrierServices.xml @@ -321,13 +321,17 @@ along with this software (see the LICENSE.md file). If not, see - - - - + + + + + + + + + - @@ -349,10 +353,12 @@ along with this software (see the LICENSE.md file). If not, see message="Could not get order shipping rate, no order rate service on gateway ${shippingGatewayConfig.shippingGatewayConfigId}"/> - - - - + + + + + + @@ -367,6 +373,37 @@ along with this software (see the LICENSE.md file). If not, see + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -398,6 +435,7 @@ along with this software (see the LICENSE.md file). If not, see + @@ -421,7 +459,7 @@ along with this software (see the LICENSE.md file). If not, see - + @@ -472,7 +510,25 @@ along with this software (see the LICENSE.md file). If not, see fromPartyId:fromPartyId, toPartyId:toPartyId, originFacilityId:originFacilityId, originPostalContactMechId:facOriginOut.postalContactMechId, destPostalContactMechId:destPostalContactMechId, packageInfoList:packageInfoList]"/> - + + + + + + + + + + + + + + + + @@ -498,6 +554,7 @@ along with this software (see the LICENSE.md file). If not, see + + --> @@ -536,49 +593,103 @@ along with this software (see the LICENSE.md file). If not, see - - - - - + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + If specified will use to calculate markedUpAmount + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/service/mantle/shipment/ShipmentInfoServices.xml b/service/mantle/shipment/ShipmentInfoServices.xml index a8174674..49a046d8 100644 --- a/service/mantle/shipment/ShipmentInfoServices.xml +++ b/service/mantle/shipment/ShipmentInfoServices.xml @@ -447,19 +447,9 @@ along with this software (see the LICENSE.md file). If not, see - - - - - - - - - - - + + @@ -488,9 +478,17 @@ along with this software (see the LICENSE.md file). If not, see - - + + + + + + + + From ee79cdcc521a343aae02d1c3ca8a9486e2e344ee Mon Sep 17 00:00:00 2001 From: David E Jones Date: Fri, 1 May 2020 02:34:36 -0700 Subject: [PATCH 29/37] Add UserPreferenceKey data for options to markup label price for shipments and orders, support in services --- data/MantleSetupData.xml | 3 +++ service/mantle/shipment/CarrierServices.xml | 6 +++--- service/mantle/shipment/ShipmentInfoServices.xml | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/data/MantleSetupData.xml b/data/MantleSetupData.xml index f0b16853..65feb7f7 100644 --- a/data/MantleSetupData.xml +++ b/data/MantleSetupData.xml @@ -42,6 +42,9 @@ along with this software (see the LICENSE.md file). If not, see + + + - + @@ -511,7 +511,7 @@ along with this software (see the LICENSE.md file). If not, see originPostalContactMechId:facOriginOut.postalContactMechId, destPostalContactMechId:destPostalContactMechId, packageInfoList:packageInfoList]"/> - + @@ -596,7 +596,7 @@ along with this software (see the LICENSE.md file). If not, see - + diff --git a/service/mantle/shipment/ShipmentInfoServices.xml b/service/mantle/shipment/ShipmentInfoServices.xml index 49a046d8..78339fd1 100644 --- a/service/mantle/shipment/ShipmentInfoServices.xml +++ b/service/mantle/shipment/ShipmentInfoServices.xml @@ -478,7 +478,7 @@ along with this software (see the LICENSE.md file). If not, see - + From d27590e0117cada43a277e0584ce9b9b7fb158f2 Mon Sep 17 00:00:00 2001 From: David E Jones Date: Tue, 5 May 2020 16:21:23 -0700 Subject: [PATCH 30/37] Use smaller bank size of 10 for IDs for tasks within a project --- service/mantle/work/TaskServices.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/service/mantle/work/TaskServices.xml b/service/mantle/work/TaskServices.xml index 404f4e6a..008b31ba 100644 --- a/service/mantle/work/TaskServices.xml +++ b/service/mantle/work/TaskServices.xml @@ -121,7 +121,7 @@ along with this software (see the LICENSE.md file). If not, see - + From 8d2ab263eea58dee8521249ff5a78ff5ac87399c Mon Sep 17 00:00:00 2001 From: David E Jones Date: Wed, 6 May 2020 18:01:13 -0700 Subject: [PATCH 31/37] In store#TimeEntry service add constraint that if fromDate and thruDate are specified fromDate must be before thruDate, cleanup up some weird old logic for hours to only calc if null --- service/mantle/work/TimeServices.xml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/service/mantle/work/TimeServices.xml b/service/mantle/work/TimeServices.xml index 7ac6f771..53cc32a1 100644 --- a/service/mantle/work/TimeServices.xml +++ b/service/mantle/work/TimeServices.xml @@ -69,8 +69,12 @@ along with this software (see the LICENSE.md file). If not, see + + + + - + From 26ccced2f19e764cf7e0108c304385a699fd89c2 Mon Sep 17 00:00:00 2001 From: David E Jones Date: Fri, 8 May 2020 12:19:10 -0700 Subject: [PATCH 32/37] In check#OrderPreApprove service before looking for grey- and black-listed addresses make sure current address has a value for address1 which is required by the DuplicateServices.find#PostalAddresses service, and if no value add a different warning and don't call the service as it will result in an error --- service/mantle/order/OrderInfoServices.xml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/service/mantle/order/OrderInfoServices.xml b/service/mantle/order/OrderInfoServices.xml index 8a6ec41a..f151b085 100644 --- a/service/mantle/order/OrderInfoServices.xml +++ b/service/mantle/order/OrderInfoServices.xml @@ -779,6 +779,11 @@ along with this software (see the LICENSE.md file). If not, see --> + + + + + - + @@ -121,11 +121,11 @@ along with this software (see the LICENSE.md file). If not, see - + - + @@ -153,9 +153,9 @@ along with this software (see the LICENSE.md file). If not, see - + + in-map="context + [communicationEventId:communicationEventContent.communicationEventId, saveContentLocation:false]"/> From 35917fb37abf4b7d8b276b620df722d12394db9c Mon Sep 17 00:00:00 2001 From: Daniel Taylor Date: Fri, 8 May 2020 15:53:54 -0500 Subject: [PATCH 34/37] Fixed missing customerPartyId and ownerPartyId in OrderItemSalesSummary and OrderItemShipBillSummary --- entity/OrderViewEntities.xml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/entity/OrderViewEntities.xml b/entity/OrderViewEntities.xml index 9df3d129..9f345d1e 100644 --- a/entity/OrderViewEntities.xml +++ b/entity/OrderViewEntities.xml @@ -312,6 +312,7 @@ along with this software (see the LICENSE.md file). If not, see + @@ -329,6 +330,7 @@ along with this software (see the LICENSE.md file). If not, see + @@ -397,7 +399,7 @@ along with this software (see the LICENSE.md file). If not, see - + From aebdf54286b71db49429cfcfb113c86ba26695d2 Mon Sep 17 00:00:00 2001 From: Hans Bakker Date: Fri, 29 May 2020 08:27:14 +0700 Subject: [PATCH 35/37] add retrieval of vendor logo at packsheet --- service/mantle/shipment/ShipmentInfoServices.xml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/service/mantle/shipment/ShipmentInfoServices.xml b/service/mantle/shipment/ShipmentInfoServices.xml index 78339fd1..8101101d 100644 --- a/service/mantle/shipment/ShipmentInfoServices.xml +++ b/service/mantle/shipment/ShipmentInfoServices.xml @@ -355,6 +355,10 @@ along with this software (see the LICENSE.md file). If not, see in-map="[partyId:toPartyId, postalContactMechPurposeId:'PostalShippingDest', telecomContactMechPurposeId:'PhoneShippingDest', emailContactMechPurposeId:'EmailShippingDest']"/> + + + @@ -758,6 +762,7 @@ along with this software (see the LICENSE.md file). If not, see + If templateSettingSuffix specified this is looked up from ProductStoreSetting and if no setting found for store then from PartySetting. From c589caa3d5c06eeff8b66bc05d1008e720c4526d Mon Sep 17 00:00:00 2001 From: Hans Bakker Date: Sat, 6 Jun 2020 10:26:24 +0700 Subject: [PATCH 36/37] change invoice print service to add panels --- service/mantle/account/InvoiceServices.xml | 54 ++++++++++++++++++++++ 1 file changed, 54 insertions(+) diff --git a/service/mantle/account/InvoiceServices.xml b/service/mantle/account/InvoiceServices.xml index 957c87cb..e1a0abe1 100644 --- a/service/mantle/account/InvoiceServices.xml +++ b/service/mantle/account/InvoiceServices.xml @@ -381,6 +381,57 @@ along with this software (see the LICENSE.md file). If not, see + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -475,6 +526,9 @@ along with this software (see the LICENSE.md file). If not, see in-map="[partyId:invoice.fromPartyId, partySettingTypeId:('Org' + templateSettingSuffix)]"/> + + + From a4fc61c74b731c62fcc97d982f097bee726cc85f Mon Sep 17 00:00:00 2001 From: Hans Bakker Date: Mon, 4 Jan 2021 10:30:07 +0700 Subject: [PATCH 37/37] Optionally use product calc price with invoiceItem input --- service/mantle/account/InvoiceServices.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/service/mantle/account/InvoiceServices.xml b/service/mantle/account/InvoiceServices.xml index 426d9bf4..75d1b65c 100644 --- a/service/mantle/account/InvoiceServices.xml +++ b/service/mantle/account/InvoiceServices.xml @@ -835,11 +835,14 @@ along with this software (see the LICENSE.md file). If not, see + + +