diff --git a/service/mantle/account/InvoiceServices.xml b/service/mantle/account/InvoiceServices.xml index 1481a434..75d1b65c 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)]"/> + + + @@ -781,11 +835,14 @@ along with this software (see the LICENSE.md file). If not, see + + + diff --git a/service/mantle/order/OrderInfoServices.xml b/service/mantle/order/OrderInfoServices.xml index d393a12f..b36db166 100644 --- a/service/mantle/order/OrderInfoServices.xml +++ b/service/mantle/order/OrderInfoServices.xml @@ -133,8 +133,10 @@ along with this software (see the LICENSE.md file). If not, see + + @@ -147,6 +149,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). @@ -368,7 +371,18 @@ along with this software (see the LICENSE.md file). If not, see } 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") @@ -381,13 +395,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 @@ -487,6 +494,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, @@ -516,6 +524,10 @@ along with this software (see the LICENSE.md file). If not, see in-map="[partyId:firstPart.vendorPartyId, partySettingTypeId:('Org' + templateSettingSuffix)]"/> + + + diff --git a/service/mantle/party/ContactServices.xml b/service/mantle/party/ContactServices.xml index 4e22fcf2..7fb7ee97 100644 --- a/service/mantle/party/ContactServices.xml +++ b/service/mantle/party/ContactServices.xml @@ -687,7 +687,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 2f3bad6c..5464201b 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']"/> + + + @@ -762,6 +766,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.