InvoiceDetailSummary
The InvoiceDetailSummary element contains totals used validate the invoice.
Note: Unimarket will calculate the totals of each line and check these match with what is provided in the InvoiceDetailSummary. Any differences will cause the invoice to fail validation. |
Example InvoiceDetailSummary
<InvoiceDetailSummary>
<SubtotalAmount>
<Money currency="NZD">40.53</Money>
</SubtotalAmount>
<Tax>
<Money currency="NZD">6.0795</Money>
<Description lang="en">GST</Description>
</Tax>
<GrossAmount>
<Money currency="NZD">46.6095</Money>
</GrossAmount>
</InvoiceDetailSummary>
SubtotalAmount
The SubtotalAmount element contains the Money element.
The Money element has a currency attribute and the sum total for all lines on the invoice.
<SubtotalAmount>
<Money currency="NZD">40.53</Money>
</SubtotalAmount>
This should be calculated based on the sum of the subtotal amounts from each line.
In this example it would be: 17.05 + 13.08 + 10.40 = 40.53
<InvoiceDetailItem invoiceLineNumber="1" quantity="1.00">
<SubtotalAmount>
<Money currency="NZD">17.05</Money>
</SubtotalAmount>
</InvoiceDetailItem>
<InvoiceDetailItem invoiceLineNumber="2" quantity="12.00">
<SubtotalAmount>
<Money currency="NZD">13.08</Money>
</SubtotalAmount>
</InvoiceDetailItem>
<InvoiceDetailItem invoiceLineNumber="3" quantity="10.00">
<SubtotalAmount>
<Money currency="NZD">10.40</Money>
</SubtotalAmount>
</InvoiceDetailItem>
Tax
The Tax element contains the Money element.
The Money element has a currency attribute and the sum total of tax for all lines on the invoice.
The Description element contains the name of this type of tax. In this example it would be GST.
<Tax>
<Money currency="NZD">6.0795</Money>
<Description lang="en">GST</Description>
</Tax>
This should be calculated based on the sum of the tax amounts from each line.
In this example it would be: 2.5575 + 1.962 + 1.56 = 6.0795
<InvoiceDetailItem invoiceLineNumber="1" quantity="1.00">
<Tax>
<Money currency="NZD">2.5575</Money>
<Description lang="en">GST</Description>
</Tax>
</InvoiceDetailItem>
<InvoiceDetailItem invoiceLineNumber="2" quantity="12.00">
<Tax>
<Money currency="NZD">1.962</Money>
<Description lang="en">GST</Description>
</Tax>
</InvoiceDetailItem>
<InvoiceDetailItem invoiceLineNumber="3" quantity="10.00">
<Tax>
<Money currency="NZD">1.56</Money>
<Description lang="en">GST</Description>
</Tax>
</InvoiceDetailItem>
GrossAmount
The GrossAmount element contains the Money element.
The Money element has a currency attribute and the Gross Amount for the invoice.
This should be calculated based on Subtotal + Tax = GrossAmount
In this example it would be: 40.53 + 6.0795 = 46.6095
<GrossAmount>
<Money currency="NZD">46.6095</Money>
</GrossAmount>
Complete Basic Invoice Example
<cXML payloadID="[A Unique Value]" timestamp="2020-10-08T23:59:45-07:00" version="1.2.021">
<Header>
<From>
<Credential domain="unimarket-id">
<Identity>82d1aa66-095a-45a8-b8f1-20778aac4ed8</Identity>
</Credential>
</From>
<To>
<Credential domain="unimarket-code">
<Identity>miketest</Identity>
</Credential>
</To>
<Sender>
<Credential domain="unimarket-user">
<Identity>fd36b3b9-ad5a-4fa6-aedd-a826b7b3d87b</Identity>
<SharedSecret>Super Secret Password</SharedSecret>
</Credential>
<UserAgent>Suppliers Software System</UserAgent>
</Sender>
</Header>
<Request deploymentMode="test">
<InvoiceDetailRequest>
<InvoiceDetailRequestHeader invoiceDate="2020-10-08" invoiceID="TestInvoice10018" operation="new" purpose="standard">
<InvoiceDetailLineIndicator isTaxInLine="yes"/>
<InvoicePartner>
<Contact role="billTo">
<Name lang="en">Bill To Address</Name>
<PostalAddress>
<Street>123 Something Street</Street>
<City>Auckland</City>
<PostalCode>1010</PostalCode>
<Country isoCountryCode="NZ">New Zealand</Country>
</PostalAddress>
</Contact>
</InvoicePartner>
</InvoiceDetailRequestHeader>
<InvoiceDetailOrder>
<InvoiceDetailOrderInfo>
<OrderReference orderID="[Purchase Order Number]"/>
</InvoiceDetailOrderInfo>
<InvoiceDetailItem invoiceLineNumber="1" quantity="1.00">
<InvoiceDetailItemReference lineNumber="1">
<ItemID>
<SupplierPartID>1497243</SupplierPartID>
</ItemID>
<Description lang="en">LAMINATING POUCH A4 80MU GLOSSY FINISH PK/100</Description>
</InvoiceDetailItemReference>
<UnitOfMeasure>PACK</UnitOfMeasure>
<UnitPrice>
<Money currency="NZD">17.05</Money>
</UnitPrice>
<SubtotalAmount>
<Money currency="NZD">17.05</Money>
</SubtotalAmount>
<Tax>
<Money currency="NZD">2.5575</Money>
<Description lang="en">GST</Description>
</Tax>
</InvoiceDetailItem>
<InvoiceDetailItem invoiceLineNumber="2" quantity="12.00">
<InvoiceDetailItemReference lineNumber="2">
<ItemID>
<SupplierPartID>2223414</SupplierPartID>
</ItemID>
<Description lang="en">TISSUE FACIAL TORK 2311408 PREMIUM 2 PLY PK/100</Description>
</InvoiceDetailItemReference>
<UnitOfMeasure>PACK</UnitOfMeasure>
<UnitPrice>
<Money currency="NZD">1.09</Money>
</UnitPrice>
<SubtotalAmount>
<Money currency="NZD">13.08</Money>
</SubtotalAmount>
<Tax>
<Money currency="NZD">1.962</Money>
<Description lang="en">GST</Description>
</Tax>
</InvoiceDetailItem>
<InvoiceDetailItem invoiceLineNumber="3" quantity="10.00">
<InvoiceDetailItemReference lineNumber="3">
<ItemID>
<SupplierPartID>1046543</SupplierPartID>
</ItemID>
<Description lang="en">FINGER CONE NO 0 </Description>
</InvoiceDetailItemReference>
<UnitOfMeasure>EACH</UnitOfMeasure>
<UnitPrice>
<Money currency="NZD">1.04</Money>
</UnitPrice>
<SubtotalAmount>
<Money currency="NZD">10.40</Money>
</SubtotalAmount>
<Tax>
<Money currency="NZD">1.56</Money>
<Description lang="en">GST</Description>
</Tax>
</InvoiceDetailItem>
</InvoiceDetailOrder>
<InvoiceDetailSummary>
<SubtotalAmount>
<Money currency="NZD">40.53</Money>
</SubtotalAmount>
<Tax>
<Money currency="NZD">6.0795</Money>
<Description lang="en">GST</Description>
</Tax>
<GrossAmount>
<Money currency="NZD">46.6095</Money>
</GrossAmount>
</InvoiceDetailSummary>
</InvoiceDetailRequest>
</Request>
</cXML>
When looking at this invoice in the Unimarket Supplier Store the cXML invoice will be a downloadable attachment called invoice.xml
See the articles below for additional information on Invoice Integration:
Invoice Integration - Overview
Invoice Integration - cXML Request
Invoice Integration - cXML Header (Credentials)
Invoice Integration - InvoiceDetailOrder
Invoice Integration - Discount at Header Level
Invoice Integration - Shipping at Header Level
Invoice Integration - Shipping at Line Level
Invoice Integration - Shipping & Special Handling at Header Level
Invoice Integration - Shipping & Special Handling at Line Level
Invoice Integration - Invoice Accepted Response
Troubleshooting Integrated Invoices