Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
/env/
.idea
/__pycache__/
.DS_Store
10 changes: 6 additions & 4 deletions pages/proforma-invoices/create-a-pfi.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
### Create a Proforma Invoice
### Create a Proforma Invoice

Creating a Proforma Invoice can be done by simply supplying the `amount`, the `client` who you want to create it for,
and whether you want to send it immediately (`send_pfi`). If you have `send_pfi` set to `True`, the PFI will have the
status 'Unpaid', and an email will be sent to them with the details about the PFI including the PDF.
and whether you want to send it immediately or not using the `raise_behaviour` variable.

`send_pfi` is being replaced with `raise_behaviour`. The options are `dont-raise`,`raise` or `raise-and-send`. If no value is passed or `dont-raise` is passed then the
PFI will be created as draft. If `raise` is passed then the PFI will be created and raised to the status 'Unpaid' but no notifcations will be sent to clients. If `raise-and-send` is passed then the PFI will be created and raised to the status 'Unpaid' and notifcations will be sent to clients to request payment.

**Note that, if a Proforma Invoice exists that is either Draft or Confirmed, TutorCruncher will simply add a
new item to it and it will NOT be raised, even if `send_pfi` is set to `true`.**
new item to it and it will NOT be raised, even if `raise` or `raise-and-send` are passed.**
2 changes: 1 addition & 1 deletion pages/proforma-invoices/create-a-pfi.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
data = {
'amount': 120,
'client': 312,
'send_pfi': True,
'raise_behaviour': 'raise-and-send',
'description': 'Credit Request for Billy Holiday'
}
r = requests.post('https://secure.tutorcruncher.com/api/proforma-invoices/', json=data, headers=headers)
Expand Down