Skip to content

Commit ab291c1

Browse files
authored
Merge pull request #204 from tutorcruncher/pfi-min-change
Update docs for ability to raise pfi without sending email
2 parents 44146ea + 523960e commit ab291c1

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@
33
/env/
44
.idea
55
/__pycache__/
6+
.DS_Store
67
.env
Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
### Create a Proforma Invoice
1+
### Create a Proforma Invoice
22

33
Creating a Proforma Invoice can be done by simply supplying the `amount`, the `client` who you want to create it for,
4-
and whether you want to send it immediately (`send_pfi`). If you have `send_pfi` set to `True`, the PFI will have the
5-
status 'Unpaid', and an email will be sent to them with the details about the PFI including the PDF.
4+
and whether you want to send it immediately or not using the `raise_behaviour` variable.
5+
6+
`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
7+
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.
68

79
**Note that, if a Proforma Invoice exists that is either Draft or Confirmed, TutorCruncher will simply add a
8-
new item to it and it will NOT be raised, even if `send_pfi` is set to `true`.**
10+
new item to it and it will NOT be raised, even if `raise` or `raise-and-send` are passed.**

pages/proforma-invoices/create-a-pfi.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
data = {
55
'amount': 120,
66
'client': 312,
7-
'send_pfi': True,
7+
'raise_behaviour': 'raise-and-send',
88
'description': 'Credit Request for Billy Holiday'
99
}
1010
r = requests.post('https://secure.tutorcruncher.com/api/proforma-invoices/', json=data, headers=headers)

0 commit comments

Comments
 (0)