Added myob fields to products table. Are appended to the description for PDF generation with in document_add_edit.js

This commit is contained in:
Karl Cordes 2011-11-14 15:02:49 +11:00
parent 0c37d1ee3a
commit 14c8d56a37

View file

@ -258,12 +258,26 @@ $(function() {
var productID = getSelectedID('#productSelect');
$.get('/documents/getProductDetails/'+productID, function(data) {
$("#lineItemDetails").show();
$("#LineItemProductId").val(data.id);
$("#LineItemTitle").val(data.title);
$("#LineItemDescription").val(data.description);
var descText = '';
if(data.item_code) {
descText = descText + '<b>Item Code:</b> ' + data.item_code;
}
if(data.item_description) {
descText = descText + '<br><b>Item Description:</b> ' + data.item_description + '<br>';
}
descText = descText + data.description;
$("#LineItemDescription").val(descText);
}, "json");