Page 1 of 1

existing sales order mark as paid in cashbook by using Api

PostPosted: Thu Dec 14, 2023 2:02 pm
by kranil7701
Hello , I want existing sales order mark as paid in cashbook by using Api.
Please let me know is there any api.
Thanks

Re: existing sales order mark as paid in cashbook by using

PostPosted: Thu Dec 14, 2023 4:19 pm
by SBarnes
There is a section on the sales order called payments, the structure is shown below having this on the sales order structure will create a cashbook entry for the payment, I know this works for sales order post route, I have never tried it for an existing one with a patch, if you don't specify the payment type it will use the default type.

Code: Select all
  "Payments": [
    {
      "HistoryNo": 0,
      "PaymentType": {
        "PaymentTypeID": "string",
        "Name": "string",
        "Code": "string",
        "ItemNo": 0,
        "IsEnabled": true,
        "IsDefault": true,
        "IsCreditCard": true,
        "IsPOS": true,
        "GeneralLedgerAccount": {
          "LedgerID": "string",
          "AccountNo": "string",
          "Description": "string"
        }
      },
      "AmountPaid": 0,
      "PaymentDate": "2023-12-14T05:07:27.069Z",
      "ProcessPayment": true,
      "AuthorisationStatus": "string",
      "PaymentGatewayReturnCode": 0,
      "Processed": true,
      "CardExpiry": "2023-12-14T05:07:27.069Z",
      "PaymentID": "string",
      "PaymentRef": "string",
      "AuthorisationNumber": "string",
      "PaymentGatewayReturnMessage": "string",
      "CardNumber": "string",
      "CardHolder": "string",
      "BankName": "string",
      "BSBN": "string",
      "BankAcc": "string",
      "AccountName": "string"
    }

Re: existing sales order mark as paid in cashbook by using  Topic is solved

PostPosted: Thu Dec 14, 2023 5:17 pm
by Mike.Sheen
You really don't ever "mark" or flag a sales order as paid in Jiwa.

Processing a sales order will create a debtor invoice transaction. When you receive the money, or the invoice is credited, the allocating the invoice to the credit is what settles the debtor invoice transaction.

As Stuart pointed out, you can add payments to a sales order, and when processed that will create or update an existing cash book receipt batch - and when THAT is activated (usually at the end of the day), it will create the debtor credit transaction and allocate it to the invoice thereby indicating that invoice has been settled.