[Vtigercrm-developers] vtws_describe of LineItems is not really helpful
Alan Lord
alanslists at gmail.com
Fri Apr 24 10:12:03 GMT 2020
I'm working on something where I need to have programmatic knowledge of
the internal fieldnames used for LineItems of Inventory modules.
If you use vtws_describe to get the description, you basically get these
fields returned:
> parent_id, productid, sequence_no, quantity, listprice, discount_percent, discount_amount, comment, incrementondel, id, tax1, tax2, tax3, image, purchase_cost, margin, tax4.
However, when you are wanting to interrogate "real" data from an
Inventory record, the useful data is contained in the array called
"LineItems_FinalDetails".
> purchaseCost, margin, productDeleted, entityType, delRow, hdnProductId, productName, hdnProductcode, productDescription, comment, qtyInStock, qty, listPrice, unitPrice, productTotal150.00, subproduct_ids, subprod_names, discount_percent, discount_amount, checked_discount_zero, discountTotal, totalAfterDiscount, taxTotal, netPrice
You can clearly see the fieldnames are completely different! :-(
They also have an integer appended to the end of each fieldname within
each row, but that particular issue is not really a problem to deal with.
Al
More information about the vtigercrm-developers
mailing list