mirror of
https://github.com/bcomsugi/dasaproject.git
synced 2026-01-08 18:42:37 +07:00
exim import done with qbclasses change InvoiceAdd ok
This commit is contained in:
parent
c8c7816f01
commit
40c237630f
454
InvoiceAdd.xml
Normal file
454
InvoiceAdd.xml
Normal file
@ -0,0 +1,454 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?qbxml version="16.0"?>
|
||||
<QBXML>
|
||||
<QBXMLMsgsRq onError="stopOnError">
|
||||
<InvoiceAddRq>
|
||||
<InvoiceAdd defMacro="MACROTYPE"> <!-- required -->
|
||||
<CustomerRef> <!-- required -->
|
||||
<ListID >IDTYPE</ListID> <!-- optional -->
|
||||
<FullName >STRTYPE</FullName> <!-- optional -->
|
||||
</CustomerRef>
|
||||
<ClassRef> <!-- optional -->
|
||||
<ListID >IDTYPE</ListID> <!-- optional -->
|
||||
<FullName >STRTYPE</FullName> <!-- optional -->
|
||||
</ClassRef>
|
||||
<ARAccountRef> <!-- optional -->
|
||||
<ListID >IDTYPE</ListID> <!-- optional -->
|
||||
<FullName >STRTYPE</FullName> <!-- optional -->
|
||||
</ARAccountRef>
|
||||
<TemplateRef> <!-- optional -->
|
||||
<ListID >IDTYPE</ListID> <!-- optional -->
|
||||
<FullName >STRTYPE</FullName> <!-- optional -->
|
||||
</TemplateRef>
|
||||
<TxnDate >DATETYPE</TxnDate> <!-- optional -->
|
||||
<RefNumber >STRTYPE</RefNumber> <!-- optional -->
|
||||
<BillAddress> <!-- optional -->
|
||||
<Addr1 >STRTYPE</Addr1> <!-- optional -->
|
||||
<Addr2 >STRTYPE</Addr2> <!-- optional -->
|
||||
<Addr3 >STRTYPE</Addr3> <!-- optional -->
|
||||
<Addr4 >STRTYPE</Addr4> <!-- optional -->
|
||||
<Addr5 >STRTYPE</Addr5> <!-- optional -->
|
||||
<City >STRTYPE</City> <!-- optional -->
|
||||
<State >STRTYPE</State> <!-- optional -->
|
||||
<PostalCode >STRTYPE</PostalCode> <!-- optional -->
|
||||
<Country >STRTYPE</Country> <!-- optional -->
|
||||
<Note >STRTYPE</Note> <!-- optional -->
|
||||
</BillAddress>
|
||||
<ShipAddress> <!-- optional -->
|
||||
<Addr1 >STRTYPE</Addr1> <!-- optional -->
|
||||
<Addr2 >STRTYPE</Addr2> <!-- optional -->
|
||||
<Addr3 >STRTYPE</Addr3> <!-- optional -->
|
||||
<Addr4 >STRTYPE</Addr4> <!-- optional -->
|
||||
<Addr5 >STRTYPE</Addr5> <!-- optional -->
|
||||
<City >STRTYPE</City> <!-- optional -->
|
||||
<State >STRTYPE</State> <!-- optional -->
|
||||
<PostalCode >STRTYPE</PostalCode> <!-- optional -->
|
||||
<Country >STRTYPE</Country> <!-- optional -->
|
||||
<Note >STRTYPE</Note> <!-- optional -->
|
||||
</ShipAddress>
|
||||
<IsPending >BOOLTYPE</IsPending> <!-- optional -->
|
||||
<IsFinanceCharge >BOOLTYPE</IsFinanceCharge> <!-- optional -->
|
||||
<PONumber >STRTYPE</PONumber> <!-- optional -->
|
||||
<TermsRef> <!-- optional -->
|
||||
<ListID >IDTYPE</ListID> <!-- optional -->
|
||||
<FullName >STRTYPE</FullName> <!-- optional -->
|
||||
</TermsRef>
|
||||
<DueDate >DATETYPE</DueDate> <!-- optional -->
|
||||
<SalesRepRef> <!-- optional -->
|
||||
<ListID >IDTYPE</ListID> <!-- optional -->
|
||||
<FullName >STRTYPE</FullName> <!-- optional -->
|
||||
</SalesRepRef>
|
||||
<FOB >STRTYPE</FOB> <!-- optional -->
|
||||
<ShipDate >DATETYPE</ShipDate> <!-- optional -->
|
||||
<ShipMethodRef> <!-- optional -->
|
||||
<ListID >IDTYPE</ListID> <!-- optional -->
|
||||
<FullName >STRTYPE</FullName> <!-- optional -->
|
||||
</ShipMethodRef>
|
||||
<ItemSalesTaxRef> <!-- optional -->
|
||||
<ListID >IDTYPE</ListID> <!-- optional -->
|
||||
<FullName >STRTYPE</FullName> <!-- optional -->
|
||||
</ItemSalesTaxRef>
|
||||
<Memo >STRTYPE</Memo> <!-- optional -->
|
||||
<CustomerMsgRef> <!-- optional -->
|
||||
<ListID >IDTYPE</ListID> <!-- optional -->
|
||||
<FullName >STRTYPE</FullName> <!-- optional -->
|
||||
</CustomerMsgRef>
|
||||
<IsToBePrinted >BOOLTYPE</IsToBePrinted> <!-- optional -->
|
||||
<IsToBeEmailed >BOOLTYPE</IsToBeEmailed> <!-- optional -->
|
||||
<IsTaxIncluded >BOOLTYPE</IsTaxIncluded> <!-- optional -->
|
||||
<CustomerSalesTaxCodeRef> <!-- optional -->
|
||||
<ListID >IDTYPE</ListID> <!-- optional -->
|
||||
<FullName >STRTYPE</FullName> <!-- optional -->
|
||||
</CustomerSalesTaxCodeRef>
|
||||
<Other >STRTYPE</Other> <!-- optional -->
|
||||
<ExchangeRate >FLOATTYPE</ExchangeRate> <!-- optional -->
|
||||
<ExternalGUID >GUIDTYPE</ExternalGUID> <!-- optional -->
|
||||
<LinkToTxnID >IDTYPE</LinkToTxnID> <!-- optional, may repeat -->
|
||||
<SetCredit> <!-- optional, may repeat -->
|
||||
<CreditTxnID useMacro="MACROTYPE">IDTYPE</CreditTxnID> <!-- required -->
|
||||
<AppliedAmount >AMTTYPE</AppliedAmount> <!-- required -->
|
||||
<Override >BOOLTYPE</Override> <!-- optional -->
|
||||
</SetCredit>
|
||||
<!-- BEGIN OR -->
|
||||
<InvoiceLineAdd defMacro="MACROTYPE"> <!-- optional -->
|
||||
<ItemRef> <!-- optional -->
|
||||
<ListID >IDTYPE</ListID> <!-- optional -->
|
||||
<FullName >STRTYPE</FullName> <!-- optional -->
|
||||
</ItemRef>
|
||||
<Desc >STRTYPE</Desc> <!-- optional -->
|
||||
<Quantity >QUANTYPE</Quantity> <!-- optional -->
|
||||
<UnitOfMeasure >STRTYPE</UnitOfMeasure> <!-- optional -->
|
||||
<!-- BEGIN OR -->
|
||||
<Rate >PRICETYPE</Rate> <!-- optional -->
|
||||
<!-- OR -->
|
||||
<RatePercent >PERCENTTYPE</RatePercent> <!-- optional -->
|
||||
<!-- OR -->
|
||||
<PriceLevelRef> <!-- optional -->
|
||||
<ListID >IDTYPE</ListID> <!-- optional -->
|
||||
<FullName >STRTYPE</FullName> <!-- optional -->
|
||||
</PriceLevelRef>
|
||||
<!-- END OR -->
|
||||
<ClassRef> <!-- optional -->
|
||||
<ListID >IDTYPE</ListID> <!-- optional -->
|
||||
<FullName >STRTYPE</FullName> <!-- optional -->
|
||||
</ClassRef>
|
||||
<Amount >AMTTYPE</Amount> <!-- optional -->
|
||||
<!-- OptionForPriceRuleConflict may have one of the following values: Zero, BasePrice -->
|
||||
<OptionForPriceRuleConflict >ENUMTYPE</OptionForPriceRuleConflict> <!-- optional -->
|
||||
<InventorySiteRef> <!-- optional -->
|
||||
<ListID >IDTYPE</ListID> <!-- optional -->
|
||||
<FullName >STRTYPE</FullName> <!-- optional -->
|
||||
</InventorySiteRef>
|
||||
<InventorySiteLocationRef> <!-- optional -->
|
||||
<ListID >IDTYPE</ListID> <!-- optional -->
|
||||
<FullName >STRTYPE</FullName> <!-- optional -->
|
||||
</InventorySiteLocationRef>
|
||||
<!-- BEGIN OR -->
|
||||
<SerialNumber >STRTYPE</SerialNumber> <!-- optional -->
|
||||
<!-- OR -->
|
||||
<LotNumber >STRTYPE</LotNumber> <!-- optional -->
|
||||
<!-- END OR -->
|
||||
<ServiceDate >DATETYPE</ServiceDate> <!-- optional -->
|
||||
<SalesTaxCodeRef> <!-- optional -->
|
||||
<ListID >IDTYPE</ListID> <!-- optional -->
|
||||
<FullName >STRTYPE</FullName> <!-- optional -->
|
||||
</SalesTaxCodeRef>
|
||||
<OverrideItemAccountRef> <!-- optional -->
|
||||
<ListID >IDTYPE</ListID> <!-- optional -->
|
||||
<FullName >STRTYPE</FullName> <!-- optional -->
|
||||
</OverrideItemAccountRef>
|
||||
<Other1 >STRTYPE</Other1> <!-- optional -->
|
||||
<Other2 >STRTYPE</Other2> <!-- optional -->
|
||||
<LinkToTxn> <!-- optional -->
|
||||
<TxnID >IDTYPE</TxnID> <!-- required -->
|
||||
<TxnLineID >IDTYPE</TxnLineID> <!-- required -->
|
||||
</LinkToTxn>
|
||||
<DataExt> <!-- optional, may repeat -->
|
||||
<OwnerID >GUIDTYPE</OwnerID> <!-- required -->
|
||||
<DataExtName >STRTYPE</DataExtName> <!-- required -->
|
||||
<DataExtValue >STRTYPE</DataExtValue> <!-- required -->
|
||||
</DataExt>
|
||||
</InvoiceLineAdd>
|
||||
<!-- OR -->
|
||||
<InvoiceLineGroupAdd> <!-- optional -->
|
||||
<ItemGroupRef> <!-- required -->
|
||||
<ListID >IDTYPE</ListID> <!-- optional -->
|
||||
<FullName >STRTYPE</FullName> <!-- optional -->
|
||||
</ItemGroupRef>
|
||||
<Quantity >QUANTYPE</Quantity> <!-- optional -->
|
||||
<UnitOfMeasure >STRTYPE</UnitOfMeasure> <!-- optional -->
|
||||
<InventorySiteRef> <!-- optional -->
|
||||
<ListID >IDTYPE</ListID> <!-- optional -->
|
||||
<FullName >STRTYPE</FullName> <!-- optional -->
|
||||
</InventorySiteRef>
|
||||
<InventorySiteLocationRef> <!-- optional -->
|
||||
<ListID >IDTYPE</ListID> <!-- optional -->
|
||||
<FullName >STRTYPE</FullName> <!-- optional -->
|
||||
</InventorySiteLocationRef>
|
||||
<DataExt> <!-- optional, may repeat -->
|
||||
<OwnerID >GUIDTYPE</OwnerID> <!-- required -->
|
||||
<DataExtName >STRTYPE</DataExtName> <!-- required -->
|
||||
<DataExtValue >STRTYPE</DataExtValue> <!-- required -->
|
||||
</DataExt>
|
||||
</InvoiceLineGroupAdd>
|
||||
<!-- END OR -->
|
||||
</InvoiceAdd>
|
||||
<IncludeRetElement >STRTYPE</IncludeRetElement> <!-- optional, may repeat -->
|
||||
</InvoiceAddRq>
|
||||
|
||||
<InvoiceAddRs statusCode="INTTYPE" statusSeverity="STRTYPE" statusMessage="STRTYPE">
|
||||
<InvoiceRet> <!-- optional -->
|
||||
<TxnID >IDTYPE</TxnID> <!-- required -->
|
||||
<TimeCreated >DATETIMETYPE</TimeCreated> <!-- required -->
|
||||
<TimeModified >DATETIMETYPE</TimeModified> <!-- required -->
|
||||
<EditSequence >STRTYPE</EditSequence> <!-- required -->
|
||||
<TxnNumber >INTTYPE</TxnNumber> <!-- optional -->
|
||||
<CustomerRef> <!-- required -->
|
||||
<ListID >IDTYPE</ListID> <!-- optional -->
|
||||
<FullName >STRTYPE</FullName> <!-- optional -->
|
||||
</CustomerRef>
|
||||
<ClassRef> <!-- optional -->
|
||||
<ListID >IDTYPE</ListID> <!-- optional -->
|
||||
<FullName >STRTYPE</FullName> <!-- optional -->
|
||||
</ClassRef>
|
||||
<ARAccountRef> <!-- optional -->
|
||||
<ListID >IDTYPE</ListID> <!-- optional -->
|
||||
<FullName >STRTYPE</FullName> <!-- optional -->
|
||||
</ARAccountRef>
|
||||
<TemplateRef> <!-- optional -->
|
||||
<ListID >IDTYPE</ListID> <!-- optional -->
|
||||
<FullName >STRTYPE</FullName> <!-- optional -->
|
||||
</TemplateRef>
|
||||
<TxnDate >DATETYPE</TxnDate> <!-- required -->
|
||||
<RefNumber >STRTYPE</RefNumber> <!-- optional -->
|
||||
<BillAddress> <!-- optional -->
|
||||
<Addr1 >STRTYPE</Addr1> <!-- optional -->
|
||||
<Addr2 >STRTYPE</Addr2> <!-- optional -->
|
||||
<Addr3 >STRTYPE</Addr3> <!-- optional -->
|
||||
<Addr4 >STRTYPE</Addr4> <!-- optional -->
|
||||
<Addr5 >STRTYPE</Addr5> <!-- optional -->
|
||||
<City >STRTYPE</City> <!-- optional -->
|
||||
<State >STRTYPE</State> <!-- optional -->
|
||||
<PostalCode >STRTYPE</PostalCode> <!-- optional -->
|
||||
<Country >STRTYPE</Country> <!-- optional -->
|
||||
<Note >STRTYPE</Note> <!-- optional -->
|
||||
</BillAddress>
|
||||
<BillAddressBlock> <!-- optional -->
|
||||
<Addr1 >STRTYPE</Addr1> <!-- optional -->
|
||||
<Addr2 >STRTYPE</Addr2> <!-- optional -->
|
||||
<Addr3 >STRTYPE</Addr3> <!-- optional -->
|
||||
<Addr4 >STRTYPE</Addr4> <!-- optional -->
|
||||
<Addr5 >STRTYPE</Addr5> <!-- optional -->
|
||||
</BillAddressBlock>
|
||||
<ShipAddress> <!-- optional -->
|
||||
<Addr1 >STRTYPE</Addr1> <!-- optional -->
|
||||
<Addr2 >STRTYPE</Addr2> <!-- optional -->
|
||||
<Addr3 >STRTYPE</Addr3> <!-- optional -->
|
||||
<Addr4 >STRTYPE</Addr4> <!-- optional -->
|
||||
<Addr5 >STRTYPE</Addr5> <!-- optional -->
|
||||
<City >STRTYPE</City> <!-- optional -->
|
||||
<State >STRTYPE</State> <!-- optional -->
|
||||
<PostalCode >STRTYPE</PostalCode> <!-- optional -->
|
||||
<Country >STRTYPE</Country> <!-- optional -->
|
||||
<Note >STRTYPE</Note> <!-- optional -->
|
||||
</ShipAddress>
|
||||
<ShipAddressBlock> <!-- optional -->
|
||||
<Addr1 >STRTYPE</Addr1> <!-- optional -->
|
||||
<Addr2 >STRTYPE</Addr2> <!-- optional -->
|
||||
<Addr3 >STRTYPE</Addr3> <!-- optional -->
|
||||
<Addr4 >STRTYPE</Addr4> <!-- optional -->
|
||||
<Addr5 >STRTYPE</Addr5> <!-- optional -->
|
||||
</ShipAddressBlock>
|
||||
<IsPending >BOOLTYPE</IsPending> <!-- optional -->
|
||||
<IsFinanceCharge >BOOLTYPE</IsFinanceCharge> <!-- optional -->
|
||||
<PONumber >STRTYPE</PONumber> <!-- optional -->
|
||||
<TermsRef> <!-- optional -->
|
||||
<ListID >IDTYPE</ListID> <!-- optional -->
|
||||
<FullName >STRTYPE</FullName> <!-- optional -->
|
||||
</TermsRef>
|
||||
<DueDate >DATETYPE</DueDate> <!-- optional -->
|
||||
<SalesRepRef> <!-- optional -->
|
||||
<ListID >IDTYPE</ListID> <!-- optional -->
|
||||
<FullName >STRTYPE</FullName> <!-- optional -->
|
||||
</SalesRepRef>
|
||||
<FOB >STRTYPE</FOB> <!-- optional -->
|
||||
<ShipDate >DATETYPE</ShipDate> <!-- optional -->
|
||||
<ShipMethodRef> <!-- optional -->
|
||||
<ListID >IDTYPE</ListID> <!-- optional -->
|
||||
<FullName >STRTYPE</FullName> <!-- optional -->
|
||||
</ShipMethodRef>
|
||||
<Subtotal >AMTTYPE</Subtotal> <!-- optional -->
|
||||
<ItemSalesTaxRef> <!-- optional -->
|
||||
<ListID >IDTYPE</ListID> <!-- optional -->
|
||||
<FullName >STRTYPE</FullName> <!-- optional -->
|
||||
</ItemSalesTaxRef>
|
||||
<SalesTaxPercentage >PERCENTTYPE</SalesTaxPercentage> <!-- optional -->
|
||||
<SalesTaxTotal >AMTTYPE</SalesTaxTotal> <!-- optional -->
|
||||
<AppliedAmount >AMTTYPE</AppliedAmount> <!-- optional -->
|
||||
<BalanceRemaining >AMTTYPE</BalanceRemaining> <!-- optional -->
|
||||
<CurrencyRef> <!-- optional -->
|
||||
<ListID >IDTYPE</ListID> <!-- optional -->
|
||||
<FullName >STRTYPE</FullName> <!-- optional -->
|
||||
</CurrencyRef>
|
||||
<ExchangeRate >FLOATTYPE</ExchangeRate> <!-- optional -->
|
||||
<BalanceRemainingInHomeCurrency >AMTTYPE</BalanceRemainingInHomeCurrency> <!-- optional -->
|
||||
<Memo >STRTYPE</Memo> <!-- optional -->
|
||||
<IsPaid >BOOLTYPE</IsPaid> <!-- optional -->
|
||||
<CustomerMsgRef> <!-- optional -->
|
||||
<ListID >IDTYPE</ListID> <!-- optional -->
|
||||
<FullName >STRTYPE</FullName> <!-- optional -->
|
||||
</CustomerMsgRef>
|
||||
<IsToBePrinted >BOOLTYPE</IsToBePrinted> <!-- optional -->
|
||||
<IsToBeEmailed >BOOLTYPE</IsToBeEmailed> <!-- optional -->
|
||||
<IsTaxIncluded >BOOLTYPE</IsTaxIncluded> <!-- optional -->
|
||||
<CustomerSalesTaxCodeRef> <!-- optional -->
|
||||
<ListID >IDTYPE</ListID> <!-- optional -->
|
||||
<FullName >STRTYPE</FullName> <!-- optional -->
|
||||
</CustomerSalesTaxCodeRef>
|
||||
<SuggestedDiscountAmount >AMTTYPE</SuggestedDiscountAmount> <!-- optional -->
|
||||
<SuggestedDiscountDate >DATETYPE</SuggestedDiscountDate> <!-- optional -->
|
||||
<Other >STRTYPE</Other> <!-- optional -->
|
||||
<ExternalGUID >GUIDTYPE</ExternalGUID> <!-- optional -->
|
||||
<LinkedTxn> <!-- optional, may repeat -->
|
||||
<TxnID >IDTYPE</TxnID> <!-- required -->
|
||||
<!-- TxnType may have one of the following values: ARRefundCreditCard, Bill, BillPaymentCheck, BillPaymentCreditCard, BuildAssembly, Charge, Check, CreditCardCharge, CreditCardCredit, CreditMemo, Deposit, Estimate, InventoryAdjustment, Invoice, ItemReceipt, JournalEntry, LiabilityAdjustment, Paycheck, PayrollLiabilityCheck, PurchaseOrder, ReceivePayment, SalesOrder, SalesReceipt, SalesTaxPaymentCheck, Transfer, VendorCredit, YTDAdjustment -->
|
||||
<TxnType >ENUMTYPE</TxnType> <!-- required -->
|
||||
<TxnDate >DATETYPE</TxnDate> <!-- required -->
|
||||
<RefNumber >STRTYPE</RefNumber> <!-- optional -->
|
||||
<!-- LinkType may have one of the following values: AMTTYPE, QUANTYPE -->
|
||||
<LinkType >ENUMTYPE</LinkType> <!-- optional -->
|
||||
<Amount >AMTTYPE</Amount> <!-- required -->
|
||||
</LinkedTxn>
|
||||
<!-- BEGIN OR -->
|
||||
<InvoiceLineRet> <!-- optional -->
|
||||
<TxnLineID >IDTYPE</TxnLineID> <!-- required -->
|
||||
<ItemRef> <!-- optional -->
|
||||
<ListID >IDTYPE</ListID> <!-- optional -->
|
||||
<FullName >STRTYPE</FullName> <!-- optional -->
|
||||
</ItemRef>
|
||||
<Desc >STRTYPE</Desc> <!-- optional -->
|
||||
<Quantity >QUANTYPE</Quantity> <!-- optional -->
|
||||
<UnitOfMeasure >STRTYPE</UnitOfMeasure> <!-- optional -->
|
||||
<OverrideUOMSetRef> <!-- optional -->
|
||||
<ListID >IDTYPE</ListID> <!-- optional -->
|
||||
<FullName >STRTYPE</FullName> <!-- optional -->
|
||||
</OverrideUOMSetRef>
|
||||
<!-- BEGIN OR -->
|
||||
<Rate >PRICETYPE</Rate> <!-- optional -->
|
||||
<!-- OR -->
|
||||
<RatePercent >PERCENTTYPE</RatePercent> <!-- optional -->
|
||||
<!-- END OR -->
|
||||
<ClassRef> <!-- optional -->
|
||||
<ListID >IDTYPE</ListID> <!-- optional -->
|
||||
<FullName >STRTYPE</FullName> <!-- optional -->
|
||||
</ClassRef>
|
||||
<Amount >AMTTYPE</Amount> <!-- optional -->
|
||||
<InventorySiteRef> <!-- optional -->
|
||||
<ListID >IDTYPE</ListID> <!-- optional -->
|
||||
<FullName >STRTYPE</FullName> <!-- optional -->
|
||||
</InventorySiteRef>
|
||||
<InventorySiteLocationRef> <!-- optional -->
|
||||
<ListID >IDTYPE</ListID> <!-- optional -->
|
||||
<FullName >STRTYPE</FullName> <!-- optional -->
|
||||
</InventorySiteLocationRef>
|
||||
<!-- BEGIN OR -->
|
||||
<SerialNumber >STRTYPE</SerialNumber> <!-- optional -->
|
||||
<!-- OR -->
|
||||
<LotNumber >STRTYPE</LotNumber> <!-- optional -->
|
||||
<!-- END OR -->
|
||||
<ExpirationDateForSerialLotNumber>STRTYPE</ExpirationDateForSerialLotNumber>
|
||||
<ServiceDate >DATETYPE</ServiceDate> <!-- optional -->
|
||||
<SalesTaxCodeRef> <!-- optional -->
|
||||
<ListID >IDTYPE</ListID> <!-- optional -->
|
||||
<FullName >STRTYPE</FullName> <!-- optional -->
|
||||
</SalesTaxCodeRef>
|
||||
<Other1 >STRTYPE</Other1> <!-- optional -->
|
||||
<Other2 >STRTYPE</Other2> <!-- optional -->
|
||||
<DataExtRet> <!-- optional, may repeat -->
|
||||
<OwnerID >GUIDTYPE</OwnerID> <!-- optional -->
|
||||
<DataExtName >STRTYPE</DataExtName> <!-- required -->
|
||||
<!-- DataExtType may have one of the following values: AMTTYPE, DATETIMETYPE, INTTYPE, PERCENTTYPE, PRICETYPE, QUANTYPE, STR1024TYPE, STR255TYPE -->
|
||||
<DataExtType >ENUMTYPE</DataExtType> <!-- required -->
|
||||
<DataExtValue >STRTYPE</DataExtValue> <!-- required -->
|
||||
</DataExtRet>
|
||||
</InvoiceLineRet>
|
||||
<!-- OR -->
|
||||
<InvoiceLineGroupRet> <!-- optional -->
|
||||
<TxnLineID >IDTYPE</TxnLineID> <!-- required -->
|
||||
<ItemGroupRef> <!-- required -->
|
||||
<ListID >IDTYPE</ListID> <!-- optional -->
|
||||
<FullName >STRTYPE</FullName> <!-- optional -->
|
||||
</ItemGroupRef>
|
||||
<Desc >STRTYPE</Desc> <!-- optional -->
|
||||
<Quantity >QUANTYPE</Quantity> <!-- optional -->
|
||||
<UnitOfMeasure >STRTYPE</UnitOfMeasure> <!-- optional -->
|
||||
<OverrideUOMSetRef> <!-- optional -->
|
||||
<ListID >IDTYPE</ListID> <!-- optional -->
|
||||
<FullName >STRTYPE</FullName> <!-- optional -->
|
||||
</OverrideUOMSetRef>
|
||||
<IsPrintItemsInGroup >BOOLTYPE</IsPrintItemsInGroup> <!-- required -->
|
||||
<TotalAmount >AMTTYPE</TotalAmount> <!-- required -->
|
||||
<InvoiceLineRet> <!-- optional, may repeat -->
|
||||
<TxnLineID >IDTYPE</TxnLineID> <!-- required -->
|
||||
<ItemRef> <!-- optional -->
|
||||
<ListID >IDTYPE</ListID> <!-- optional -->
|
||||
<FullName >STRTYPE</FullName> <!-- optional -->
|
||||
</ItemRef>
|
||||
<Desc >STRTYPE</Desc> <!-- optional -->
|
||||
<Quantity >QUANTYPE</Quantity> <!-- optional -->
|
||||
<UnitOfMeasure >STRTYPE</UnitOfMeasure> <!-- optional -->
|
||||
<OverrideUOMSetRef> <!-- optional -->
|
||||
<ListID >IDTYPE</ListID> <!-- optional -->
|
||||
<FullName >STRTYPE</FullName> <!-- optional -->
|
||||
</OverrideUOMSetRef>
|
||||
<!-- BEGIN OR -->
|
||||
<Rate >PRICETYPE</Rate> <!-- optional -->
|
||||
<!-- OR -->
|
||||
<RatePercent >PERCENTTYPE</RatePercent> <!-- optional -->
|
||||
<!-- END OR -->
|
||||
<ClassRef> <!-- optional -->
|
||||
<ListID >IDTYPE</ListID> <!-- optional -->
|
||||
<FullName >STRTYPE</FullName> <!-- optional -->
|
||||
</ClassRef>
|
||||
<Amount >AMTTYPE</Amount> <!-- optional -->
|
||||
<InventorySiteRef> <!-- optional -->
|
||||
<ListID >IDTYPE</ListID> <!-- optional -->
|
||||
<FullName >STRTYPE</FullName> <!-- optional -->
|
||||
</InventorySiteRef>
|
||||
<InventorySiteLocationRef> <!-- optional -->
|
||||
<ListID >IDTYPE</ListID> <!-- optional -->
|
||||
<FullName >STRTYPE</FullName> <!-- optional -->
|
||||
</InventorySiteLocationRef>
|
||||
<!-- BEGIN OR -->
|
||||
<SerialNumber >STRTYPE</SerialNumber> <!-- optional -->
|
||||
<!-- OR -->
|
||||
<LotNumber >STRTYPE</LotNumber> <!-- optional -->
|
||||
<!-- END OR -->
|
||||
<ExpirationDateForSerialLotNumber>STRTYPE</ExpirationDateForSerialLotNumber>
|
||||
<ServiceDate >DATETYPE</ServiceDate> <!-- optional -->
|
||||
<SalesTaxCodeRef> <!-- optional -->
|
||||
<ListID >IDTYPE</ListID> <!-- optional -->
|
||||
<FullName >STRTYPE</FullName> <!-- optional -->
|
||||
</SalesTaxCodeRef>
|
||||
<Other1 >STRTYPE</Other1> <!-- optional -->
|
||||
<Other2 >STRTYPE</Other2> <!-- optional -->
|
||||
<DataExtRet> <!-- optional, may repeat -->
|
||||
<OwnerID >GUIDTYPE</OwnerID> <!-- optional -->
|
||||
<DataExtName >STRTYPE</DataExtName> <!-- required -->
|
||||
<!-- DataExtType may have one of the following values: AMTTYPE, DATETIMETYPE, INTTYPE, PERCENTTYPE, PRICETYPE, QUANTYPE, STR1024TYPE, STR255TYPE -->
|
||||
<DataExtType >ENUMTYPE</DataExtType> <!-- required -->
|
||||
<DataExtValue >STRTYPE</DataExtValue> <!-- required -->
|
||||
</DataExtRet>
|
||||
</InvoiceLineRet>
|
||||
<DataExtRet> <!-- optional, may repeat -->
|
||||
<OwnerID >GUIDTYPE</OwnerID> <!-- optional -->
|
||||
<DataExtName >STRTYPE</DataExtName> <!-- required -->
|
||||
<!-- DataExtType may have one of the following values: AMTTYPE, DATETIMETYPE, INTTYPE, PERCENTTYPE, PRICETYPE, QUANTYPE, STR1024TYPE, STR255TYPE -->
|
||||
<DataExtType >ENUMTYPE</DataExtType> <!-- required -->
|
||||
<DataExtValue >STRTYPE</DataExtValue> <!-- required -->
|
||||
</DataExtRet>
|
||||
</InvoiceLineGroupRet>
|
||||
<!-- END OR -->
|
||||
<DataExtRet> <!-- optional, may repeat -->
|
||||
<OwnerID >GUIDTYPE</OwnerID> <!-- optional -->
|
||||
<DataExtName >STRTYPE</DataExtName> <!-- required -->
|
||||
<!-- DataExtType may have one of the following values: AMTTYPE, DATETIMETYPE, INTTYPE, PERCENTTYPE, PRICETYPE, QUANTYPE, STR1024TYPE, STR255TYPE -->
|
||||
<DataExtType >ENUMTYPE</DataExtType> <!-- required -->
|
||||
<DataExtValue >STRTYPE</DataExtValue> <!-- required -->
|
||||
</DataExtRet>
|
||||
</InvoiceRet>
|
||||
<ErrorRecovery> <!-- optional -->
|
||||
<!-- BEGIN OR -->
|
||||
<ListID >IDTYPE</ListID> <!-- optional -->
|
||||
<!-- OR -->
|
||||
<OwnerID >GUIDTYPE</OwnerID> <!-- optional -->
|
||||
<!-- OR -->
|
||||
<TxnID >IDTYPE</TxnID> <!-- optional -->
|
||||
<!-- END OR -->
|
||||
<TxnNumber >INTTYPE</TxnNumber> <!-- optional -->
|
||||
<EditSequence >STRTYPE</EditSequence> <!-- optional -->
|
||||
<ExternalGUID >GUIDTYPE</ExternalGUID> <!-- optional -->
|
||||
</ErrorRecovery>
|
||||
</InvoiceAddRs>
|
||||
</QBXMLMsgsRq>
|
||||
</QBXML>
|
||||
@ -495,13 +495,81 @@ class InvoiceAdd(baseQBQuery):
|
||||
if 'SetCredit_Override' in kwargs:
|
||||
self.QBDict[self.classNameRq][self.__class__.__name__]["SetCredit"]["Override"]=kwargs['SetCredit_Override']
|
||||
#add InvoiceLineAdd kwargs here
|
||||
|
||||
self.InvoiceLineAdd = []
|
||||
if 'InvoiceLineAdd' in kwargs:
|
||||
LineAdd = kwargs.get('InvoiceLineAdd')
|
||||
self.isLineAddOk = True
|
||||
if isinstance(LineAdd, dict ):
|
||||
LineAdd = [LineAdd]
|
||||
elif isinstance(LineAdd, list):
|
||||
pass
|
||||
else:
|
||||
self.isLineAddOk = False
|
||||
|
||||
if self.isLineAddOk: #check if each instance in the list are all dictionary.
|
||||
for eachLineAdd in LineAdd:
|
||||
if not isinstance(eachLineAdd, dict):
|
||||
self.isLineAddOk = False
|
||||
break
|
||||
else:
|
||||
print("InvoiceLineAdd Not OK. has to be lisst of dict or a dict")
|
||||
|
||||
|
||||
if self.isLineAddOk: #if everything good
|
||||
for eachLineAdd in LineAdd:
|
||||
self.LineAddDict = {}
|
||||
if 'ItemRef_ListID' in eachLineAdd:
|
||||
if 'ItemRef' in self.QBDict[self.classNameRq][self.__class__.__name__]:
|
||||
self.LineAddDict["ItemRef"]['ListID']= eachLineAdd['ItemRef_ListID']
|
||||
else:
|
||||
self.LineAddDict["ItemRef"]={'ListID': eachLineAdd['ItemRef_ListID']}
|
||||
if 'ItemRef_FullName' in eachLineAdd:
|
||||
self.LineAddDict["ItemRef"]={'FullName': eachLineAdd['ItemRef_FullName']}
|
||||
if 'Desc' in eachLineAdd:
|
||||
self.LineAddDict["Desc"]=eachLineAdd['Desc']
|
||||
if 'Quantity' in eachLineAdd:
|
||||
self.LineAddDict["Quantity"]=eachLineAdd['Quantity']
|
||||
if 'UnitOfMeasure' in eachLineAdd:
|
||||
self.LineAddDict["UnitOfMeasure"]=eachLineAdd['UnitOfMeasure']
|
||||
if 'Rate' in eachLineAdd:
|
||||
self.LineAddDict["Rate"]=eachLineAdd['Rate']
|
||||
elif 'RatePercent' in eachLineAdd:
|
||||
self.LineAddDict["RatePercent"]=eachLineAdd['RatePercent']
|
||||
elif 'PriceLevelRef_ListID' in eachLineAdd:
|
||||
if 'PriceLevelRef' in self.QBDict[self.classNameRq][self.__class__.__name__]:
|
||||
self.LineAddDict["PriceLevelRef"]['ListID']= eachLineAdd['PriceLevelRef_ListID']
|
||||
else:
|
||||
self.LineAddDict["PriceLevelRef"]={'ListID': eachLineAdd['PriceLevelRef_ListID']}
|
||||
elif 'PriceLevelRef_FullName' in eachLineAdd:
|
||||
self.LineAddDict["PriceLevelRef"]={'FullName': eachLineAdd['PriceLevelRef_FullName']}
|
||||
|
||||
if 'Amount' in eachLineAdd:
|
||||
self.LineAddDict["Amount"]=eachLineAdd['Amount']
|
||||
# Others
|
||||
if 'Other1' in eachLineAdd:
|
||||
self.LineAddDict["Other1"]=eachLineAdd['Other1']
|
||||
if 'Other2' in eachLineAdd:
|
||||
self.LineAddDict["Other2"]=eachLineAdd['Other2']
|
||||
if len(self.LineAddDict)>0:
|
||||
self.InvoiceLineAdd.append(self.LineAddDict)
|
||||
if 'LinkToTxn_TxnID' in eachLineAdd and 'LinkToTxn_TxnLineID' in eachLineAdd:
|
||||
self.LineAddDict["LinkToTxn"]={'TxnID': eachLineAdd['LinkToTxn_TxnID'], 'TxnLineID': eachLineAdd['LinkToTxn_TxnLineID']}
|
||||
|
||||
#skip the rest, not too important
|
||||
else:
|
||||
print("InvoiceLineAdd has to be list of dict or a dict")
|
||||
# print(f'{self.InvoiceLineAdd = }')
|
||||
if len(self.InvoiceLineAdd)>0:
|
||||
self.QBDict[self.classNameRq][self.__class__.__name__]['InvoiceLineAdd']=self.InvoiceLineAdd
|
||||
|
||||
|
||||
|
||||
if 'IncludeRetElement' in kwargs:
|
||||
self.QBDict[self.classNameRq]["IncludeRetElement"]=kwargs['IncludeRetElement']
|
||||
|
||||
# print(self.classNameRq)
|
||||
# print(self.QBDict)
|
||||
# pprint.pprint(self.QBDict, sort_dicts=False)
|
||||
|
||||
|
||||
|
||||
|
||||
@ -116,7 +116,7 @@ class baseQBQuery:
|
||||
# print(xmltodict.parse(self.response_string))
|
||||
self.varDict = xmltodict.parse(self.response_string)
|
||||
if self.class_debug:
|
||||
pprint.pprint("isDataOK", self.varDict)
|
||||
print("isDataOK", self.varDict)
|
||||
self.listOfDict.varDict = self.varDict
|
||||
self.listOfDict.filterKey = ["@requestID"]
|
||||
self.requestID = self.listOfDict.firstValue().get('@requestID',None)
|
||||
|
||||
145
exim.py
145
exim.py
@ -241,6 +241,7 @@ def process_data(iq_list, so_dict):
|
||||
checklist = ['ItemRef', ]
|
||||
if len([ i for i in checklist if i in so_line])==0:
|
||||
continue
|
||||
sotxnlineid = so_line['TxnLineID']
|
||||
soitemref_fullname = so_line.get('ItemRef',{}).get('FullName')
|
||||
soquantity:str = so_line.get('Quantity')
|
||||
# print(f'{soquantity = }')
|
||||
@ -278,16 +279,18 @@ def process_data(iq_list, so_dict):
|
||||
print(f"{inv_line['ItemRef']['FullName'] = } Some detail not equal")
|
||||
continue
|
||||
#add to the spesific invoiceline
|
||||
inv_line['soline']= {'RefNumber':sodt['RefNumber'],
|
||||
'TxnDate':sodt['TxnDate'],
|
||||
'ItemRef_FullName':soitemref_fullname,
|
||||
'Quantity':soquantity,
|
||||
'UnitOfMeasure':sounitofmeasure,
|
||||
'Rate':sorate,
|
||||
'Amount':soamount,
|
||||
'Invoiced':soinvoiced,
|
||||
'IsManuallyClosed':soismanuallyclosed,
|
||||
'Other2':soother2}
|
||||
inv_line['soline']= {'TxnID':sodt['TxnID'],
|
||||
'RefNumber':sodt['RefNumber'],
|
||||
'TxnDate':sodt['TxnDate'],
|
||||
'TxnLineID': sotxnlineid,
|
||||
'ItemRef_FullName':soitemref_fullname,
|
||||
'Quantity':soquantity,
|
||||
'UnitOfMeasure':sounitofmeasure,
|
||||
'Rate':sorate,
|
||||
'Amount':soamount,
|
||||
'Invoiced':soinvoiced,
|
||||
'IsManuallyClosed':soismanuallyclosed,
|
||||
'Other2':soother2}
|
||||
break
|
||||
except Exception as e:
|
||||
print(f"SO {sodt['RefNumber'] = } {txn['RefNumber'] = }")
|
||||
@ -325,16 +328,18 @@ def checking_iqwith_so(iq_list):
|
||||
print(f"{txn['RefNumber'] = } doesnt have InvoiceLineRet")
|
||||
inv_nolineret.append(txn['RefNumber'])
|
||||
continue
|
||||
# if 'LinkedTxn'
|
||||
if not isinstance(txn['InvoiceLineRet'], list):
|
||||
txn['InvoiceLineRet'] = [txn['InvoiceLineRet']]
|
||||
for idx, inv_line in enumerate(txn['InvoiceLineRet']):
|
||||
if 'soline' in inv_line:
|
||||
continue
|
||||
if 'ItemRef' not in inv_line:
|
||||
inv_line_no_itemref.append({'RefNumber':txn['RefNumber'],
|
||||
'idx':idx,})
|
||||
continue
|
||||
if '400_Sales' not in inv_line['ItemRef']['FullName']:
|
||||
if 'soline' in inv_line:
|
||||
continue
|
||||
|
||||
if '400_Sales' not in inv_line['ItemRef']['FullName'] and 'Sales Promo Discount' not in inv_line['ItemRef']['FullName']:
|
||||
inv_line_no_soline.append({'RefNumber':txn['RefNumber'],
|
||||
'idx':idx,
|
||||
'ItemRef_FullName':inv_line['ItemRef']['FullName'],
|
||||
@ -348,6 +353,117 @@ def checking_iqwith_so(iq_list):
|
||||
return True
|
||||
|
||||
|
||||
def make_invoiceadd_dict(iq_list):
|
||||
print('make_invoiceadd_dict')
|
||||
# status = checking_iqwith_so(iq_list)
|
||||
# print(status)
|
||||
# if not status:
|
||||
# return False
|
||||
inv_nolineret = []
|
||||
inv_line_no_soline = []
|
||||
inv_line_no_itemref = []
|
||||
invoiceaddlist = []
|
||||
for inv_line in iq_list:
|
||||
# if 'InvoiceLineRet' not in txn:
|
||||
# print(f"{txn['RefNumber'] = } doesnt have InvoiceLineRet")
|
||||
# inv_nolineret.append(txn['RefNumber'])
|
||||
# continue
|
||||
# if not isinstance(txn['InvoiceLineRet'], list):
|
||||
# txn['InvoiceLineRet'] = [txn['InvoiceLineRet']]
|
||||
# for idx, inv_line in enumerate(txn['InvoiceLineRet']):
|
||||
invadddict = {}
|
||||
# pprint(inv_line, sort_dicts=False)
|
||||
invadddict['CustomerRef_FullName'] = inv_line['CustomerRef']['FullName']
|
||||
invadddict['ARAccountRef_FullName']= inv_line['ARAccountRef']['FullName']
|
||||
invadddict['TemplateRef_FullName'] = inv_line['TemplateRef']['FullName']
|
||||
invadddict['TxnDate'] = inv_line['TxnDate']
|
||||
invadddict['RefNumber'] = inv_line['RefNumber']
|
||||
invadddict['BillAddress_Addr1'] = inv_line['BillAddress'].get('Addr1')
|
||||
invadddict['BillAddress_Addr2'] = inv_line['BillAddress'].get('Addr2')
|
||||
invadddict['BillAddress_Addr3'] = inv_line['BillAddress'].get('Addr3')
|
||||
invadddict['BillAddress_Addr4'] = inv_line['BillAddress'].get('Addr4')
|
||||
invadddict['BillAddress_Addr5'] = inv_line['BillAddress'].get('Addr5')
|
||||
invadddict['BillAddress_City'] = inv_line['BillAddress'].get('City')
|
||||
invadddict['BillAddress_State'] = inv_line['BillAddress'].get('State')
|
||||
invadddict['BillAddress_PostalCode'] = inv_line['BillAddress'].get('PostalCode')
|
||||
invadddict['BillAddress_Country'] = inv_line['BillAddress'].get('Country')
|
||||
invadddict['BillAddress_Note'] = inv_line['BillAddress'].get('Note')
|
||||
if 'ShipAddress' in inv_line:
|
||||
invadddict['ShipAddress_Addr1'] = inv_line['ShipAddress'].get('Addr1')
|
||||
invadddict['ShipAddress_Addr2'] = inv_line['ShipAddress'].get('Addr2')
|
||||
invadddict['ShipAddress_Addr3'] = inv_line['ShipAddress'].get('Addr3')
|
||||
invadddict['ShipAddress_Addr4'] = inv_line['ShipAddress'].get('Addr4')
|
||||
invadddict['ShipAddress_Addr5'] = inv_line['ShipAddress'].get('Addr5')
|
||||
invadddict['ShipAddress_City'] = inv_line['ShipAddress'].get('City')
|
||||
invadddict['ShipAddress_State'] = inv_line['ShipAddress'].get('State')
|
||||
invadddict['ShipAddress_PostalCode'] = inv_line['ShipAddress'].get('PostalCode')
|
||||
invadddict['ShipAddress_Country'] = inv_line['ShipAddress'].get('Country')
|
||||
invadddict['ShipAddress_Note'] = inv_line['ShipAddress'].get('Note')
|
||||
if inv_line.get('PONumber'):
|
||||
invadddict['PONumber'] = inv_line.get('PONumber')
|
||||
invadddict['TermsRef_FullName'] = inv_line['TermsRef']['FullName']
|
||||
invadddict['DueDate'] = inv_line['DueDate']
|
||||
if 'SalesRepRef' in inv_line:
|
||||
invadddict['SalesRepRef_FullName'] = inv_line['SalesRepRef']['FullName']
|
||||
invadddict['ShipDate'] = inv_line['ShipDate']
|
||||
if inv_line.get('Memo'):
|
||||
invadddict['Memo'] = inv_line['Memo']
|
||||
invadddict['IsToBePrinted'] = "false"
|
||||
invadddict['IsToBeEmailed'] = "false"
|
||||
if 'Other' in inv_line :
|
||||
invadddict['Other'] = inv_line['Other']
|
||||
|
||||
#InvoiceLineAdd BEGIN
|
||||
invoicelineadd_list = []
|
||||
txnid_list = []
|
||||
if not isinstance(inv_line['InvoiceLineRet'], list):
|
||||
inv_line['InvoiceLineRet'] = [inv_line['InvoiceLineRet']]
|
||||
|
||||
for idx, invlineret in enumerate(inv_line['InvoiceLineRet']):
|
||||
print(f'{invlineret = }')
|
||||
if 'ItemRef' not in invlineret:
|
||||
inv_line_no_itemref.append({'RefNumber':inv_line['RefNumber'],
|
||||
'idx':idx,})
|
||||
continue
|
||||
invlineadd={}
|
||||
if 'soline' not in invlineret:
|
||||
invlineadd['ItemRef_FullName'] = invlineret['ItemRef']['FullName']
|
||||
# invlineadd['Desc'] = invlineret['Desc']
|
||||
if 'Quantity' in invlineret:
|
||||
invlineadd['Quantity'] = invlineret['Quantity']
|
||||
if 'UnitOfMeasure' in invlineret:
|
||||
invlineadd['UnitOfMeasure'] = invlineret['UnitOfMeasure']
|
||||
invlineadd['Rate'] = invlineret['Rate']
|
||||
invlineadd['Amount'] = invlineret['Amount']
|
||||
if 'Other1' in invlineret:
|
||||
invlineadd['Other1'] = invlineret['Other1']
|
||||
if 'Other2' in invlineret:
|
||||
invlineadd['Other2'] = invlineret['Other2']
|
||||
# print(f"{invlineadd = } {invlineret['ItemRef']['FullName']=}")
|
||||
### WARNING, check with the real TxnID in new QB. Replace the soline TxnID and TxnLineID with New QB SalesOrder
|
||||
if 'soline' in invlineret: ### WARNING, check with the real TxnID in new QB
|
||||
invlineadd['LinkToTxn_TxnID'] = invlineret['soline']['TxnID']
|
||||
invlineadd['LinkToTxn_TxnLineID'] = invlineret['soline']['TxnLineID']
|
||||
txnid_list.append(invlineret['soline']['TxnID'])
|
||||
invoicelineadd_list.append(invlineadd)
|
||||
# print(invlineadd)
|
||||
# print(invoicelineadd_list)
|
||||
txnid = list(set(txnid_list))
|
||||
# if txnid:
|
||||
# invadddict['LinkToTxnID']=txnid
|
||||
invadddict['InvoiceLineAdd'] = invoicelineadd_list
|
||||
invoiceaddlist.append(invadddict)
|
||||
|
||||
pprint(invadddict, sort_dicts=False)
|
||||
for x in invoiceaddlist:
|
||||
if '10671' in x['RefNumber']:
|
||||
pprint(x, sort_dicts=False)
|
||||
break
|
||||
# for y in x['InvoiceLineAdd']:
|
||||
# if '10671' in y['ItemRef_FullName']:
|
||||
# pprint(x, sort_dicts=False)
|
||||
# break
|
||||
print(f'{len(invoiceaddlist) = }')
|
||||
|
||||
def writeToFile(iq_list=None, so_dict=None, filename = "", suffix="", indent=2):
|
||||
if not filename:
|
||||
@ -440,6 +556,7 @@ def main(fromtxndate, totxndate, maxreturned:int=None):
|
||||
print(len(iq_list))
|
||||
print(f'Seems {invqueryfilename}{suffix}.json is {checking_iqwith_so(iq_list)}') #checking the iq_list. is it good to import to new QB?
|
||||
|
||||
make_invoiceadd_dict(iq_list)
|
||||
|
||||
if __name__=='__main__':
|
||||
# print(np.arange('2021-02', '2021-03', dtype='datetime64[D]'))
|
||||
@ -448,4 +565,4 @@ if __name__=='__main__':
|
||||
_fromdate = datetime.datetime.fromisoformat(fromtxndate)
|
||||
|
||||
print(fromtxndate)
|
||||
main(fromtxndate, totxndate)
|
||||
main(fromtxndate, totxndate)
|
||||
|
||||
98
exim_testimport.py
Normal file
98
exim_testimport.py
Normal file
@ -0,0 +1,98 @@
|
||||
dt = {'CustomerRef_FullName': 'JM Abadi',
|
||||
'ARAccountRef_FullName': 'Accounts Receivable',
|
||||
'TemplateRef_FullName': 'DBW Invoice (11%)',
|
||||
'TxnDate': '2022-08-26',
|
||||
'RefNumber': '10671',
|
||||
'BillAddress_Addr1': 'JM Abadi',
|
||||
'BillAddress_Addr2': 'Jl. Raya Ps. Minggu No. 75',
|
||||
'BillAddress_Addr3': None,
|
||||
'BillAddress_Addr4': None,
|
||||
'BillAddress_Addr5': None,
|
||||
'BillAddress_City': None,
|
||||
'BillAddress_State': None,
|
||||
'BillAddress_PostalCode': None,
|
||||
'BillAddress_Country': None,
|
||||
'BillAddress_Note': None,
|
||||
'ShipAddress_Addr1': 'JM Abadi',
|
||||
'ShipAddress_Addr2': 'Jl. Raya Ps. Minggu No. 75',
|
||||
'ShipAddress_Addr3': None,
|
||||
'ShipAddress_Addr4': None,
|
||||
'ShipAddress_Addr5': None,
|
||||
'ShipAddress_City': None,
|
||||
'ShipAddress_State': None,
|
||||
'ShipAddress_PostalCode': None,
|
||||
'ShipAddress_Country': None,
|
||||
'ShipAddress_Note': None,
|
||||
'TermsRef_FullName': '30 Hari',
|
||||
'DueDate': '2022-09-25',
|
||||
'SalesRepRef_FullName': 'W',
|
||||
'ShipDate': '2022-08-26',
|
||||
'IsToBePrinted': 'false',
|
||||
'IsToBeEmailed': 'false',
|
||||
# 'LinkToTxnID': 'A289A-1661495309',
|
||||
'InvoiceLineAdd': [{
|
||||
|
||||
'Quantity': '12',
|
||||
'UnitOfMeasure': 'Box',
|
||||
'Rate': '35000',
|
||||
'Amount': '420000.00',
|
||||
'LinkToTxn_TxnID': 'A289A-1661495309',
|
||||
'LinkToTxn_TxnLineID': 'A289C-1661495309'},
|
||||
{
|
||||
|
||||
'Quantity': '6',
|
||||
'UnitOfMeasure': 'Box',
|
||||
'Rate': '122500',
|
||||
'Amount': '735000.00',
|
||||
'LinkToTxn_TxnID': 'A289A-1661495309',
|
||||
'LinkToTxn_TxnLineID': 'A289D-1661495309'}]}
|
||||
# print(dt)
|
||||
|
||||
dt = {'CustomerRef_FullName': 'JM Abadi',
|
||||
'ARAccountRef_FullName': 'Accounts Receivable',
|
||||
'TemplateRef_FullName': 'DBW Invoice (11%)',
|
||||
'TxnDate': '2022-08-26',
|
||||
'RefNumber': '10671',
|
||||
'BillAddress_Addr1': 'JM Abadi',
|
||||
'BillAddress_Addr2': 'Jl. Raya Ps. Minggu No. 75',
|
||||
'BillAddress_Addr3': None,
|
||||
'BillAddress_Addr4': None,
|
||||
'BillAddress_Addr5': None,
|
||||
'BillAddress_City': None,
|
||||
'BillAddress_State': None,
|
||||
'BillAddress_PostalCode': None,
|
||||
'BillAddress_Country': None,
|
||||
'BillAddress_Note': None,
|
||||
'ShipAddress_Addr1': 'JM Abadi',
|
||||
'ShipAddress_Addr2': 'Jl. Raya Ps. Minggu No. 75',
|
||||
'ShipAddress_Addr3': None,
|
||||
'ShipAddress_Addr4': None,
|
||||
'ShipAddress_Addr5': None,
|
||||
'ShipAddress_City': None,
|
||||
'ShipAddress_State': None,
|
||||
'ShipAddress_PostalCode': None,
|
||||
'ShipAddress_Country': None,
|
||||
'ShipAddress_Note': None,
|
||||
'TermsRef_FullName': '30 Hari',
|
||||
'DueDate': '2022-09-25',
|
||||
'SalesRepRef_FullName': 'W',
|
||||
'ShipDate': '2022-08-26',
|
||||
'IsToBePrinted': 'false',
|
||||
'IsToBeEmailed': 'false',
|
||||
'InvoiceLineAdd': [{'Quantity': '12',
|
||||
'UnitOfMeasure': 'Box',
|
||||
'Rate': '35000',
|
||||
'Amount': '420000.00',
|
||||
'LinkToTxn_TxnID': 'A289A-1661495309',
|
||||
'LinkToTxn_TxnLineID': 'A289C-1661495309'},
|
||||
{'Quantity': '6',
|
||||
'UnitOfMeasure': 'Box',
|
||||
'Rate': '122500',
|
||||
'Amount': '735000.00',
|
||||
'LinkToTxn_TxnID': 'A289A-1661495309',
|
||||
'LinkToTxn_TxnLineID': 'A289D-1661495309'}]}
|
||||
from QBClass.QBClasses import InvoiceAdd
|
||||
|
||||
IA = InvoiceAdd(**dt, debug=True)
|
||||
print(IA.all())
|
||||
|
||||
Loading…
Reference in New Issue
Block a user