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
- tFcMessages
Contains a list of messages to display on the client side. Records in the table should not be created directly, but by using method SetMessage.
- vcClientPrincipalObject
- vcCompanyCC
Consolidation currency code of active company.
- vcCompanyCode
- vcCompanyLC
Local currency code of active company.
- vcCompanyMC
Code of the management currency as defined on system-level
- vcComponentsWithFS
- vcCurrencyDecimalsList
comma seperated list of currency codes and number of decimals
- vcDomainCode
The domain code of the domain to which this session is logged in.
- vcDomainLngCode
session value
- vcDraftClass
- vcExternalControlItems
Items to lock in external control
- vcFcComponentName
Short name of the target business class.
- vcFcDateFormat
Display format for dates to be used in all displayable strings.
- vcFcMaskList
Data item to temporarily store the returned values of a value list method (or any other use).
- vcFcNumericFormat
Display format for decimal values to be used in all displayable strings.
- vcFieldSecurityDisabledFields
- vcForceDeleteRowids
A comma separated list of rowids of the records that have a forced delete status (tc_status = "D" coming from the input dataset from an external party)
- vcGlobalSessionId
This data item holds the global session token. This is set in CheckLogin on QADFC level and passed with ApplicationLogin in Login. Is also set in ApplicationLogin.
- vcInstructionList
Chr(4) seperated list of Instructions that should be used to mail to
- vcListAllocStatuses
The content of the related preprocessor.
- vcListCAPostingsCreatedInAddUpd
ListCAPostingsCreatedInAddUpd: list with all the posting-ids of the CA-postings created from method AdditionalUpdatesAllCreateCA.
- vcListInvoiceTypes
The content of the related preprocessor.
- vcLocalisationCode
- vcObjectSecurityLoaded
- vcPOCDefaultDaybookSet
Property retrieved from the Purchasing Control file and staored in an instance-less class-data-item as this value only depends upon the current-domain.
Retrieved once and then used troughout the complete class.
- vcPrimKeyCI
- vcReleaseWHTNumberListCI
This is a chr(4) seperated list that stores the WHT numbers that are retrieved in this class. We need to store these numbers in a data item, since the temp-table records that normally hold this number can be emptied (before the number is released) when an error occurs.
- vcRoleNameList
Chr(4) seperated list of RoleNames that should be used to mail to
- vcRowId
- vcTableType
S if SharedSet_ID fields in main table
C if Company_ID field in main table
N if no SharedSet_Id and Company_ID in main table
- vcUserLogin
Current User login ID
- vcUserName
Current user name
- vcValidationExceptionList
Comma separated list of business field names.
This data item should be initialised in method MainBlock.
Method ValidateComponent will check this data item. If updates available in the class temp-tables are limited to updates to fields listed in the data item, ValidateComponent will be skipped.
- vcXmlNewStatus
- vcXmlOldStatus
- vdMovementDiscountTC
Movement Discount Value
- vhBuffer
handle to the table
- vhCacher
Handle to the technical class
- vhDatasetToReturnCI
- vhFcComponent
field of t_FC_active_components.
Also a normal data item used for all direct calls from business to business components.
- vhFcPersistence
In a stateless setup, when the server component is started, an instance of the persistence component is started automatically, which will stay active for the complete session.
That way, each Loadstate of any component can use the same instance of the persistence component.
- vhFcStateDataSet
This is the handle to the dynamic dataset that holds all temp-tables defined in the business class making up the state of this business class.
You can add your own temp-table to this dataset to enable you to persist the contents of that temp-table, using the add-buffer() method on vhFcStateDataSet in method DefineState.
- vhFcSuper
Handle to the component at the top of the inheritance tree (the server component), as it is used to run iStartComponent.
- vhField
handle to the field of the table
- viCompanyCCDec
Number of decimals for the consolidation currency of active company.
- viCompanyCCId
Internal ID of the consolidation currency of active company.
- viCompanyLCDec
Number of decimals for the local currency of active company.
- viCompanyLCId
Internal ID of the local currency of active company.
- viCompanyMCDec
Number of decimals of the management currency as defined on system-level
- viCompanyMCID
ID of the management currency as defined on system-level
- viCompanyPriceDec
Number of decimals for prices in active company.
- viCompanyQtyDec
Number of decimals for quantities in active company.
- viCurrentDraftInstanceId
when opening a draft instance, this data item contains the original instance ID of the draft
- viFcCount1
Counter variable for general use.
- viFcCount2
Counter variable for general use.
- viFcCount3
Counter variable for general use.
- viFcCount4
Counter variable for general use.
- viFcCount5
Counter variable for general use.
- viFcCurrentInstanceId
instance ID
- viFcIncludeReturn
Return status used by the standard includes. Avoid using this data item !
- viFcMaxInstancesInTransaction
The maximum instances in 1 transaction.
- viFcNumberForNew
Keep a unique (negative) number for new records in the generated temp-tables for database maintenance.
- viFcQueryReturn
Return status used by query calls. Avoid using this data item !
- viFcReturnSuper
General purpose data item that can be used for the return status of any method call.
- viLogger
Logger
- viMfgProMajorVersionBCI
- viMfgProMinorVersionBCI
- viSessionDebugLevel
- viTimeOffset
Specifies the time offset in minutes between local time and UTC.
This value will be assigned to the session:timezone attribute to be able to control the output of the progress functions today and time.
- viUsrId
Current user identifier
- vlBAPMatchingInvoice
- vlBAPMStartedFromCI
- vlBDocLinkSartedFromCI
- vlBJEIsStartedFromCI
Is instance of JournalEntry started from here ?
- vlCBFActive
Custom Business Fields
- vlCBFActiveCache
- vlCIREC
Is the CI Posting on a CIREC Account or not ?
- vlDataLoadKeepPrevious
Keeps the value of parameter ilKeepPrevious of method DataLoad for usage by submethods of DataLoad.
- vlDataLoadSkipCalculate
When set to true, method DataLoad will not run the Calculate method.
This is useful in case method DataLoad is run inside a loop, and you will run method Calculate yourself after this loop.
- vlDomainIsFiscalConfirmBCI
- vlDomainIsStatutory
Flag to indicate if the statutory-currency mechanism is activated on the current domain or not
- vlDraftsActive
- vlDraftsActiveCache
- vlEnablePersistentCache
- vlEventPublishingActive
Flag indicates if event publishing is active.
If not, skip all time consuming queries on event publishing.
- vlEventPublishingActiveCache
- vlEventPublishingNeeded
- vlEventsPublished
This data item will be set to true as soon as one event is published from AdditionalUpdates (and so an instance of class BEventDaemonqueu is open and must be closed).
- vlFcDataValidated
This flag indicates whether or not the data in the class temp-tables has already been validated.
- vlFcOk
Logical data item for general use.
- vlFcQueryRecordsAvailable
Support query existance calls. Returns true if at least one record has been found.
- vlFcStarted
Used in BC_run.i.
If the component was started in BC_run, it must also be ended in BC_run. If the component was already running before BC_run, it should stay running.
- vlFieldSecurityActive
Indicates whether the field security is active on system level.
- vlFieldSecurityActiveCache
- vlFieldSecurityActiveOnBC
- vlGLVerificationActive
- vlGLVerificationActiveCache
- vlInitializeTranslations
Load default value for active language codes without translation.
- vlInstanceDataIsLoaded
This flag indicates if the instance data of current instance was loaded from the state database.
This is true when :
- Any instance is opened in stateless mode.
- A draft instance is opened in state-reset mode.
- vlIsCompanyTaxInCityCI
tax In city flag of the head office address of the business relation of the company
- vlIsInExternalControl
When a database object is in external control, this flag will be set to true in method CheckActivityEnabling.
- vlIsPaySelUnconfirm
- vlObjectSecurityActive
Flag indicates if row security is in use.
If not, skip all time consuming queries on row security.
- vlObjectSecurityActiveCache
- vlObjectTranslationsActive
Value of system setting "Use Language Specific Object descriptions".
- vlPartialUpdate
Indication whether the execution of the logic in MaintainByDataset* is done in a partial update mode.
In that case, variablele vcNeglectableFields andvc vcForceDeleteRowids need to be used to "correct" the S buffers before validation.
- vlPOCAllowUpdateDaybookOnInv
Property retrieved from the Purchasing Control file and staored in an instance-less class-data-item as this value only depends upon the current-domain.
Retrieved once and then used troughout the complete class.
- vlPOCUseDaybookSetBySet
Property retrieved from the Purchasing Control file and staored in an instance-less class-data-item as this value only depends upon the current-domain.
Retrieved once and then used troughout the complete class.
- vlReturnDatasetCI
- vlTransactionActive
This flag will be true if current instance started an instance of another business class as a subtransaction, but current instance is not part of a transaction.
In this case, current instance already started a transaction of it's own. Now it must also commit this transaction of it's own.
- vlTransactionMainInstance
Role-based security is mandatory on main instance in transaction (= first instance added) and optional on all others.
- vlTransactionOpen
A special-purpose flag for the transaction class only.
- vlTranslationTracing
- vlUICustomizationActive
user setting = instance dependent
- vlWorkFlowActive
workflow active
- vlWorkFlowActiveCache
API queries
API methods
public methods
other methods
activities
- Allocate
Allocate the creditor invoice
The activity can only be run on objects with object status (CInvoiceAllocationStatus) {&ALLOCSTATUS-ANY}.
The activity will set the object status (CInvoiceAllocationStatus) to {&ALLOCSTATUS-TRANSALLOC}.
The activity can only be run on objects with object status (CInvoiceAllocationStatus) {&ALLOCSTATUS-ANY}.
The activity will set the object status (CInvoiceAllocationStatus) to {&ALLOCSTATUS-ALLOC}.
The activity can only be run on objects with object status (CInvoiceAllocationStatus) {&ALLOCSTATUS-NOALLOC}.
The activity will set the object status (CInvoiceAllocationStatus) to {&ALLOCSTATUS-TRANSALLOC}.
The activity can only be run on objects with object status (CInvoiceAllocationStatus) {&ALLOCSTATUS-NOALLOC}.
The activity will set the object status (CInvoiceAllocationStatus) to {&ALLOCSTATUS-ALLOC}.
The activity can only be run on objects with object status (CInvoiceAllocationStatus) {&ALLOCSTATUS-TRANSALLOC}.
The activity will set the object status (CInvoiceAllocationStatus) to {&ALLOCSTATUS-ALLOC}.
The activity can only be run on objects with object status (CInvoiceIsLogisticMatching) false.
- Approve
Approve a Creditor Invoice
The activity can only be run on objects with object status (CInvoiceIsInvoiceApproved) false.
The activity will set the object status (CInvoiceIsInvoiceApproved) to true.
- BrowseDrafts
- CInvoiceGOTOCInvoiceMovementSelect
- CInvoiceGOTOCInvoiceSelect
- Create
- Delete
- InitialCreate
- Modify
- PaymentReferenceModify
- Prepare Allocation
Prepare Allocation of a creditor invoice
The activity can only be run on objects with object status (CInvoiceAllocationStatus) {&ALLOCSTATUS-ANY}.
The activity will set the object status (CInvoiceAllocationStatus) to {&ALLOCSTATUS-TRANSALLOC}.
The activity can only be run on objects with object status (CInvoiceAllocationStatus) {&ALLOCSTATUS-NOALLOC}.
The activity will set the object status (CInvoiceAllocationStatus) to {&ALLOCSTATUS-TRANSALLOC}.
The activity can only be run on objects with object status (CInvoiceIsLogisticMatching) false.
- Release For Payment
Release for Payment of a Creditor Invoice
The activity can only be run on objects with object status (CInvoiceIsLockPayment) true.
- Replace
Replace original (already reversed) supplier invocie with new one (similar).
- ReturnToSender
This activity cannot be actually performed on an object, but must be defined in the system anyway so it can be assigned to the system role 'Workflow user'.
- Reverse
Reverse supplier invoice
- View