project QadFinancials > class BCInvoice

business class
inherited from Database Component
business area Purchase Ledger

API annotation

Investigation-results on creating an invoice based upon minimal information:
? Only the option of creating an initial and non-taxable invoice makes sense unless the calling application would provide all required data about the taxes, the posting, .... to compose a complete xml including all invoice-details and the posting. That's in fact what the some existing customer do: they first gather all required information by reading it from the db and then provide this data as input.
? Initial invoices can either be marked as taxable, either as non-taxable. But if they are marked as taxable, then the tax-information will always be just the default one (the tax-info in CinvoiceVat passed in by the caller is simply ignored).
? The taxes can only be passed in by the caller (and thus stored and used by the Fin-application) in case the caller passes in the SI-posting as well. In all other cases the actual taxes will just be the default ones.
? If the taxes are passed in by the caller then it is required that all tax-data is properly filled in by the caller including the TaxTransactionType, TaxUsage, TaxEnvironment, TaxClass, TaxType, the required accounts/sub-accounts and the base- and tax-amount.

Conclusion:
? We have no proper way to smoothly integrate a simple SI-scanning - unless of course the caller wants to compose a complete xml-document including all tax-details and all-posting-info like it was done by other customers. But this will require them a lot of effort.
? The best we can do for is the scanning to create an initial invoice with the tax-information stored in the comment of the invoice; when they later pickup the initial invoice in the Fin-application they will have to properly key in the taxes based upon what they then have in the invoice-comments.


Example of the xml for creating an initial invoice with PO-links and without tax-information:

<?xml version="1.0" encoding="UTF-8" ?>
<BCInvoice xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

<tContextInfo>
<tcCompanyCode>1000</tcCompanyCode>
<tcInvolvedCompanyCodes>1000</tcInvolvedCompanyCodes>
<tcAction>SAVE</tcAction>
<tcCBFVersion>9.2</tcCBFVersion>
<tlPartialUpdate>false</tlPartialUpdate>
<tcPartialUpdateExceptionList/>
</tContextInfo>

<tCInvoice>

<tcCreditorCode>PETRA</tcCreditorCode>
<CInvoiceType>INVOICE</CInvoiceType>

<tcJournalCode>XI</tcJournalCode>

<CInvoiceDate>2009-11-12</CInvoiceDate>
<CInvoicePostingDate>2009-11-12</CInvoicePostingDate>

<CInvoiceReference>RS001-X-TAX-023</CInvoiceReference>

<tcCurrencyCode>EUR</tcCurrencyCode>
<CInvoiceOriginalDebitTC>0.0000</CInvoiceOriginalDebitTC>
<CInvoiceOriginalCreditTC>77.0000</CInvoiceOriginalCreditTC>

<tcReasonCode>InitBeforeRM</tcReasonCode>

<CInvoicePostingYear>2009</CInvoicePostingYear>
<CInvoicePostingPeriod>11</CInvoicePostingPeriod>

<CInvoiceIsTaxable>TRUE</CInvoiceIsTaxable>
<CInvoiceIsTaxConfirmed>false</CInvoiceIsTaxConfirmed>
<CInvoiceIsTaxExcluded>false</CInvoiceIsTaxExcluded>

<CInvoiceDueDate>2010-02-13</CInvoiceDueDate>
<CInvoiceDiscountDueDate>2009-11-15</CInvoiceDiscountDueDate>


<!-- The Project and CostCentre need to be passed as the control-account of the supplier requires this
-->
<tcProjectCode>500</tcProjectCode>
<tcCostCentreCode>X</tcCostCentreCode>




<!-- OPTIONAL FIELDS !!!!!!!!!!!!!!! -->
<!-- Not needed to pass CInvoiceTaxPointDate: when empty it gets set to the invoice-date
Not needed to pass CInvoiceCreationDate: when empty it gets set to the date the invoice is uploaded into the system
<CInvoiceTaxPointDate>2009-11-12</CInvoiceTaxPointDate>
<CInvoiceCreationDate>2009-11-12</CInvoiceCreationDate>
-->
<!-- Leaving the description empty results in this string to be in there: 'Supplier Invoice Import'
<CInvoiceDescription>RS001Lorre</CInvoiceDescription>
-->
<!-- No need to pass the voucher for initial invoices - cfr InvoiceStatusCode=ReasonCode
<CInvoiceVoucher>0</CInvoiceVoucher>
-->
<!-- Specify the CInvoiceOriginalDebitLC and CInvoiceOriginalCreditLC in case you have a foreign currency and you do not want to use the standard exchange-rates for it
<CInvoiceOriginalDebitLC>0.0000</CInvoiceOriginalDebitLC>
<CInvoiceOriginalCreditLC>111.0000</CInvoiceOriginalCreditLC>
-->




<!-- UNNEEDED FIELDS !!!!!!!!!!!!!!! -->
<!-- Not needed to pass the CInvoiceBalanceTC; this gets set based upon the OriginalDebitTC and OriginalCreditTC
CInvoiceRegistrationNr is just an internal used sequenece that gets set internaly
CInvoiceOriginalTC and CInvoiceOriginalLC are set based upon the CInvoiceOriginalCreditTC and CInvoiceOriginalDebitTC
<CInvoiceBalanceTC>-1000.0000</CInvoiceBalanceTC>
<CInvoiceRegistrationNr></CInvoiceRegistrationNr>
<tdCInvoiceOriginalTC></tdCInvoiceOriginalTC>
<tdCInvoiceOriginalLC></tdCInvoiceOriginalLC>
-->
<!-- It is no use passing in the rates as they are not used anyway
<CInvoiceExchangeRate>1.0000000000</CInvoiceExchangeRate>
<CInvoiceRateScale>1.0000000000</CInvoiceRateScale>
-->
<!-- Not needed to pass CInvoiceClosingDate: it gets ste to 9999-12-31 when not filled
<CInvoiceClosingDate>9999-12-31</CInvoiceClosingDate>
-->
<!-- Not needed to pass the NormalPaymentConditionCode when passing the DuesDates
<tcNormalPaymentConditionCode></tcNormalPaymentConditionCode>
-->

<tc_Rowid>9999999</tc_Rowid>
<tc_ParentRowid/>
<tc_Status/>

<!-- These are the links between the invoice and the PO
Note that this link was initialy not stored in the dev-env 20091201 and this was added there during testing
-->
<tCInvoicePO>
<CInvoicePOPoDomain>Domain1</CInvoicePOPoDomain>
<CInvoicePOPoNbr>RS001</CInvoicePOPoNbr>
<tc_Rowid>CIPO001</tc_Rowid>
<tc_ParentRowid>9999999</tc_ParentRowid>
<tc_Status/>
</tCInvoicePO>


<tCInvoiceVat>
<CInvoiceVatSequence>1</CInvoiceVatSequence>
<CInvoiceVatVatBaseDebitTC>170.0000</CInvoiceVatVatBaseDebitTC>
<CInvoiceVatVatBaseCreditTC>0.0000</CInvoiceVatVatBaseCreditTC>
<CInvoiceVatVatDebitTC>17.0000</CInvoiceVatVatDebitTC>
<CInvoiceVatVatCreditTC>0.0000</CInvoiceVatVatCreditTC>
<CInvoiceVatIsTaxable>true</CInvoiceVatIsTaxable>
<tc_Rowid>CIVAT001</tc_Rowid>
<tc_ParentRowid>9999999</tc_ParentRowid>
<tc_Status/>
</tCInvoiceVat>


</tCInvoice>

</BCInvoice>

Description

component that handles the functionality concerning the creditor invoices...


public data items


other data items


API queries


API methods


public methods


other methods


activities