From f8eadeafbf0628bce3f057d0d7bebf75af3f2eea Mon Sep 17 00:00:00 2001 From: Henty Date: Thu, 26 Jun 2025 12:27:20 +0100 Subject: [PATCH] inti --- .gitignore | 1 + pages/proforma-invoices/create-a-pfi.md | 10 ++++++---- pages/proforma-invoices/create-a-pfi.py | 2 +- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 698b7c1..472e36f 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ /env/ .idea /__pycache__/ +.DS_Store \ No newline at end of file diff --git a/pages/proforma-invoices/create-a-pfi.md b/pages/proforma-invoices/create-a-pfi.md index ca7c2f1..0de9c11 100644 --- a/pages/proforma-invoices/create-a-pfi.md +++ b/pages/proforma-invoices/create-a-pfi.md @@ -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`.** \ No newline at end of file +new item to it and it will NOT be raised, even if `raise` or `raise-and-send` are passed.** \ No newline at end of file diff --git a/pages/proforma-invoices/create-a-pfi.py b/pages/proforma-invoices/create-a-pfi.py index e9c6b1d..8964e34 100644 --- a/pages/proforma-invoices/create-a-pfi.py +++ b/pages/proforma-invoices/create-a-pfi.py @@ -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)