Skip to main content

Hi,

I am trying to create a Cash Sale in the SalesInvoice rest api endpoint "entity/Default/18.200.001/SalesInvoice” and it is giving out the error "The system failed to commit the CurrentDocument row." 

I tried removing/adding fields but it doesn't seem to work. 

Can anyone help see what is missing? 

I basically did a GET call to get an existing record and basically trying to  create the same Cash Sale with another RefNumber.

{

   

    "rowNumber": 1,

 

    "Amount": {

        "value": 20.0000

    },

    "Balance": {

        "value": 0.0000

    },

    "CashDiscount": {

        "value": 0.0000

    },

    "CreditHold": {

        "value": false

    },

    "Currency": {

        "value": "USD"

    },

    "CustomerID": {

        "value": "ABB001"

    },

    "CustomerOrder": {},

    "Date": {

        "value": "2022-07-14T00:00:00+00:00"

    },

   

    "Details": u

        {

            

            "rowNumber": 1,

           

            "Amount": {

                "value": 20.0000

            },

            "BranchID": {

                "value": "QI"

            },

            

            "Description": {

                "value": "Income : Sales"

            },

            "DiscountAmount": {

                "value": 0.0000

            },

            "DiscountPercent": {

                "value": 0.000000

            },

            

            "InventoryID": {

                "value": "115"

            },

           

            "LineNbr": {

                "value": 1

            },

            "Location": {

                "value": "XX"

            },

            "ManualDiscount": {

                "value": false

            },

            

            "Qty": {

                "value": 1.000000

            },

           

            "TaxCategory": {

                "value": "TAXABLE"

            },

            "TransactionDescr": {

                "value": "BOSC001 test"

            },

            "UnitPrice": {

                "value": 20.000000

            },

            "UOM": {

                "value": "EACH"

            },

            "WarehouseID": {

                "value": "01"

            }

        }

    ],

    "DueDate": {

        "value": "2022-10-12T00:00:00+00:00"

    },

    "FinancialDetails": {

        

        "rowNumber": 1,

       

        "BatchNbr": {

            "value": ""

        },

        "Branch": {

            "value": "QI"

        },

        "CustomerTaxZone": {

            "value": ""

        }

    },

    "Hold": {

        "value": true

    },

    "Project": {

        "value": "X"

    },

    "ReferenceNbr": {

        "value": "POS15841581"

    },

    

    "Type": {

        "value": "Cash Sale"

    },

    "VATExemptTotal": {

        "value": 0.0000

    },

    "VATTaxableTotal": {

        "value": 0.0000

    }

}

Hi @bryanvelez81 

Try the below sample. In the sample code, removed a few fields. you can add the required fields as per your requirement.

 

FYI: The Type should be CSL for cash sale.


Sample:

{

    "ReferenceNbr": {

        "value": "<NEW>"  // If manual Numbering, provide the Nbr here

    },

    "Type": {

        "value": "CSL"

    },

    "Amount": {

        "value": 20.0000

    },

    "Balance": {

        "value": 0.0000

    },

    "CustomerID": {

        "value": "AACUSTOMER"

    },

    "Date": {

        "value": "2022-07-14T00:00:00+00:00"

    },

    "Details": p

        {

            "Amount": {

                "value": 20.0000

            },

            "Description": {

                "value": "Income : Sales"

            },

            "DiscountAmount": {

                "value": 0.0000

            },

            "DiscountPercent": {

                "value": 0.000000

            },

            "InventoryID": {

                "value": "AALEGO500"

            },

            "Qty": {

                "value": 1.000000

            },

            "TransactionDescr": {

                "value": "BOSC001 test"

            },

            "UnitPrice": {

                "value": 20.000000

            }

        }

    ],

    "DueDate": {

        "value": "2022-10-12T00:00:00+00:00"

    },

    "FinancialDetails": {

        "Branch": {

            "value": "PRODWHOLE"

        }

    }

}


Reply