brixxbox Wiki
Ask or search…
K

saveStructure

Saves a Config Structure with embedded child entities. All Ids are automatically assigned from parent to childs. All arrays must be grids with the subdatasource of config. You only need to specify the fields you would like to insert.
app.saveStructure({
"inboundInvoice":[
{
"iiBarcode":"ERA30321",
"iiTransferType":"ERA",
"iiTransferDate":"2024-07-29",
"iiPeriod":"07.2024",
"iiTransNumber":"",
"iiPersonalAccount":"60005",
"iiGrandTotalAmount":"1762.000000000000000000",
"iiVatTotalAmount":"281.000000000000000000",
"iiNetTotalAmount":"1481.000000000000000000",
"iiBrixxboxCreateDate":"2023-07-10 10:25:00",
"iiApprovalDate":"2023-07-11 12:44:00",
"iiApprovalUserId":"8",
"iiDiamantApprovalDate":"2023-07-11 08:41:00",
"linesGrid":[
{
"iilInboundInvoiceId":null,
"iilQuantity":null,
"iilUnitPrice":698.5,
"iilTotalAmount":698.5,
"iilInvoiceOrderId":null
},
{
"iilInboundInvoiceId":null,
"iilQuantity":null,
"iilUnitPrice":195.6,
"iilTotalAmount":782.4,
"iilInvoiceOrderId":null
}
]
}
]
})
In this example we are creating an inbound Invoice with two lines