Invoice financing

Custom purpose

> The purpose of the contract is to act like a invoice financing contract.
Invoice financing is a general term used for asset based lending products that allow companies to finance slow-paying accounts receivable.


owner: the contract owner address; is the contract creator
InvoiceDetails invoice details structure that has as subparameters:

  • invoiceCustomerAddress is the customer address (has to pay the invoice)
  • invoiceAmount total invoice amount
  • invoiceCoveredAmount is the amount covered by factoring
  • invoiceClosedAmount is the amount received from the
  • invoiceDueDate is the invoice due date
  • status 0 waiting to be financed; 1 financed; 2 with problems; 3 invoiced payed

financedInvoices is the mapping(financedCustomerAddress => (invoiceNumber => InvoiceDetails))
invoiceList is the mapping(financedCustomerAddress => invoices[])
allowedCustomersToBeFinanced the list of allowed customers to be financed
allowedCustomersToBeFinancedList the address list of allowed customers to be financed

Exposed methods

addAllowedFinancedCustomer add a customer to be financed
disableAllowedFinancedCustomer disable a financed customer
getFinancedCustomersList gets the financed customer list
addInvoiceToBeFinanced add an invoice to e financed
getFinancedInvoiceList get financed invoices list per customer
getFinancedInvoiceDetailsByInvoiceNumber get details about an invoiced - used by contract owner
financeInvoice finance the invoice
**payInvoiceinvoice paid by invoice-customer in full amount


Reviewed by Modex
Buy Contract Test Contract

Create an account or login to purchase this smart contract