add customer type and tax profile in customer

This commit is contained in:
Yan
2017-08-09 10:51:13 +06:30
parent 1685713ff5
commit cc6e422c8b
4 changed files with 16 additions and 7 deletions

View File

@@ -129,7 +129,14 @@ $(document).on('click',".customer_tr",function(){
url: url,
data: {},
dataType: "json",
success: function(data) {
success: function(data) {
// Selected for Taxes
//var taxes = JSON.stringify(data.tax_profiles);
var parse_taxes = JSON.parse(data.tax_profiles);
$.each(parse_taxes, function(i, value){
$("#customer_tax_profiles option[value='" + value + "']").attr("selected","selected");
});
$('#customer_id').val(data.id);
$('#customer_name').val(data.name);
$('#customer_company').val(data.company);
@@ -138,6 +145,7 @@ $(document).on('click',".customer_tr",function(){
$('#customer_salutation').val(data.salutation);
$('#customer_nrc_no').val(data.nrc_no);
$('#customer_card_no').val(data.card_no);
$('#customer_type').val(data.customer_type);
$('#paypar_account_no').val(data.paypar_account_no);
$('#customer_address').val(data.address);
$('#customer_date_of_birth').val(data.date_of_birth);