Daily Invoice Export
Introduction
This is an export file that consists of invoices and credits that are generated on the day of export.
Purpose
Suppliers using visn platform requires a compilation of invoices and credits that are generated on the day of export as a single which they can further use for the internal monitoring purposes and cross checking the billing issued by customers.
File format
Comma Separated Values - *.csv
Terminology
Record Set | A set of rows exported into the CSV file, it consists of the records in the order as in below
* n denotes an index of parts/fluids added in a job line of specific enquiry | |||||||||||||||||||||||||||||||||
Record | A particular line of the export that is either of indicators allowed in a record set, along with one record for the entire file among the following
|
Blocks
Invoice | An invoice is a document that a supplier issues to a operator (lease), requesting payment for goods provided or services rendered. Invoices are essential for record-keeping as well. Below are examples of some goods and services that would be invoiced
|
Credit | A Credit is a way to adjust the final amount due, ensuring that the operator(lease) only pays for what they actually owe after any agreed-upon deductions
|
Setup Required
Database Configuration
Although this export is targeted to any lease company, The use of External SMR Codes is limited to few lease companies.
To prevent the external SMR Codes in the daily invoice export for all lease companies a , A flag needs to be enabled in the lease company's export configuration to restrict the usage of external SMR
location: /leasecompany/[leaseId]
attribute: includeExternalSMRCodesInExport
value: true
Note: This step is optional as there is provision available for enabling the same from Edit Customer Screen of DI Admin Portal
Generate Export
A Scheduler should be created cloud scheduler with the following parameters
- Name: Generate daily invoice export
- Region: europe-west2
- Frequency: 30 23 * * *
- TimeZone: GMT London
- Topic: projects/biddirect-2/topics/generateDailyInvoiceExport
Message body: a JSON object including the following parameters
- dateTimeStamp: in format yyyy-MMM-dd ex 2022-Sep-30 , when skipped it will default to current date
- leaseId: id of the lease company that the export is desired to be generated for
- exportFileName: file name prefix to be used for the export file generated, when skipped defaults to 'invoice'
- addLCLineForInvoice:
- True: When set to true, an LC line is included for each record in the file.
- False: When set to false, a single LC line is included for the entire file.