Solved

Sales Invoice REST API error The system failed to commit the CurrentDocument row.

  • 14 July 2022
  • 1 reply
  • 138 views

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": [

        {

            

            "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

    }

}

icon

Best answer by jinin 15 July 2022, 15:52

View original

1 reply

Userlevel 7
Badge +11

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": [

        {

            "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


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved