You are on page 1of 2

We need a new object Invoice. Invoice is related to Account and Application_Form.

Both are 1:N (one-to-many) relationschips.


(Note: the relation to Application__Form must be otional. Maybe in a later stage we also want to
create Invoices directly from the Account object and then there’s no relation with an
Application__Form record)

An Invoice has the following fields:


- Invoice number. Format “YY-MM999”. YY representing the current year, MM representing
the currenct month and 999 is an auto index number, starting with 101 etc, resetting for
every new year-month combination. The Invoice number is generated by SF.
- Account (FK to account)
- Application Form (FK to Application Form)
- Regarding: Text(50)
- Invoice date: Date
- Expiration date: Date
- Invoice description: text(2000)
- Invoice amount: Amount
- VAT amount: Amount
- Total amount: Amount
- Footer description: Tekst(150)
- Stage (picklist values Concept, Verzonden, Betaald, Ingetrokken)
-

Process
1. First select the Application Form for which we want to generate a new invoice.
We have two options:
- Generate Invoice or,
- Manual Invoice.

2. After selecting one of the two possibilities a window opens showing the following fields:
Field Default value Generated Invoice Default value Manual Invoice
Invoice number Generated value Generated value
Regarding Opportunity.Name <empty>
Invoice date Currenct date Current date
Expiration date Currenct date + 30 Current date + 30
Invoice Formatted string (*1) <empty>
description
Invoice amount Contract.Successfee / 100 * 0
AF.Allocated_amount
VAT 0,21 * Invoice amount 0
Total amount Invoice amount + VAT 0
Footer Formatted string (2) String (3)
Description
Status Concept Concept
E-mail Account.E-mail-invoice + Account.e-mail-invoice +
“,verkoop.77235029@ublcloud.nl” “,verkoop.77235029@ublcloud.nl”

(*) AF = Application__Form
FormattedString(*1)
Line 1: “Aanvraag voor “ + Opportunity.Name + “ - Periode: “ + AF.Period_start + “ t/m “ AF
Period_end + “ - Beschikt bedrag “ + AF.Allocated_amount
Line 2: “Succesfee “ + Contract.Success_fee
Line 3: “Extra afgenomen: “ + If( Versneller=True) Then “ module Subsidieversneller” +
If(Onderrealisatie=True) Then [ if(Versneller=True) then “, module Onderrealisatie” Else “ module
Onderrealisatie) ] +
If(Verantwoording=True) Then [ If(Versneller = true or Onderrealisatie=True) Then “, module
Urenverantwoording” Else “ module Urenverantwoording”

FormattedString(*2)
If(Contract.Versneller=True) Then “ Deze factuur wordt verrekend met het overeengekomen bedrag
van de subsidieversneller. U hoeft deze factuur niet te betalen.” Else String(*3)

String(*3)
“Betaling binnen 30 dagen na factuurdatum op bankrekening nummer NL83RABO0352265604 o.v.v.
factuurnummer”

3. Except ‘Invoice number’ all fields can be adjusted by the user.

4. You can edit and save the Concept Invoice as many times as you like. Or delete it (only if status =
Concept). After Saving the record a new pdf file for the invoice is created and saved. The old pdf must
be deleted. The user can open and view the pdf without any changes made to the invoice record.

5. Approval of the invoice. When you select the Invoice and click on ‘Approval’ the Invoice is send to
the E-mail address (or Addresses) in Invoice.E-mail. Status is set to ‘Verzonden’. No more changes
can be made to the invoice.

6. It’s only possible to delete an Invoice record when status = Concept.


(Stages must be set in order Concept -> Verzonden -> Betaald -> Ingetrokken)

You might also like