I have a jQuery ajax function and would like to submit an entire form as post data and will transfer some data parameter as well.
var serial = $("#formProjectBilling").serialize();
$.ajax({
url: base_url+"sales/Sales_invoice_form/saveSalesInvoice",
type: 'post',
data: serial + {
'orderItems': orderItems,
'orderTotal': totalamt,
'freight': freight,
'gen_disc':gen_disc,
'otp': otp,
'notes': $("#notes").val(),
'idno': $("#idno").val(),
'acctno': $("#hdnAcctNo").val(),
'itemlocid': $("#location_id").val(),
'shipping_id': $("#shipping_id").val(),
'sales_date': $("#sales_date").val(),
'discamt': $("#discount").text(),
'gendisctype': $("#gen_disc_type").val()
},
It only transfers the serialized form, but not the other data in parameters.