Skip to main content
Solved

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

  • 14 July 2022
  • 1 reply
  • 172 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

    }

}

Best answer by jinin

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"

        }

    }

}

View original
Did this topic help you find an answer to your question?

1 reply

jinin
Pro I
Forum|alt.badge.img+11
  • Pro I
  • 680 replies
  • Answer
  • July 15, 2022

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


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings