X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=js%2Fkivi.SalesPurchase.js;h=2b63a1a33178bbc19e4ee8738045c619aab4f384;hb=6e8c0011e9724aa7e06cd04e62fb95dcc97cdf10;hp=8d54864cb838c479aba132a59f2d9d3a4819a8e6;hpb=d9ff130dc4087394f2fcbe04d0ea99fc31643a3c;p=kivitendo-erp.git diff --git a/js/kivi.SalesPurchase.js b/js/kivi.SalesPurchase.js index 8d54864cb..2b63a1a33 100644 --- a/js/kivi.SalesPurchase.js +++ b/js/kivi.SalesPurchase.js @@ -170,8 +170,9 @@ namespace('kivi.SalesPurchase', function(ns) { $('#shiptoname').focus(); }; - this.submit_custom_shipto = function() { - $('#shipto_id').val(''); + this.submit_custom_shipto = function(id_selector) { + id_selector = id_selector || '#shipto_id'; + $(id_selector).val(''); $('#shipto_dialog').data('confirmed', true); $('#shipto_dialog').dialog('close'); }; @@ -268,22 +269,23 @@ namespace('kivi.SalesPurchase', function(ns) { var vc = $('#vc').val(); var data = { - action: 'show_sales_purchase_email_dialog', - cp_id: $('#cp_id').val(), + action: 'show_sales_purchase_email_dialog', + cp_id: $('#cp_id').val(), direct_debit: $('#direct_debit').prop('checked') ? 1 : 0, - donumber: $('#donumber').val(), - format: $('#format').val(), - formname: $('#formname').val(), - id: $('#id').val(), - invnumber: $('#invnumber').val(), - language_id: $('#language_id').val(), - media: 'email', - ordnumber: $('#ordnumber').val(), - rowcount: $('#rowcount').val(), - quonumber: $('#quonumber').val(), - type: $('#type').val(), - vc: vc, - vc_id: $('#' + vc + '_id').val(), + donumber: $('#donumber').val(), + format: $('#format').val(), + formname: $('#formname').val(), + id: $('#id').val(), + invnumber: $('#invnumber').val(), + language_id: $('#language_id').val(), + media: 'email', + ordnumber: $('#ordnumber').val(), + cusordnumber: $('#cusordnumber').val(), + rowcount: $('#rowcount').val(), + quonumber: $('#quonumber').val(), + type: $('#type').val(), + vc: vc, + vc_id: $('#' + vc + '_id').val(), }; $('[name^=id_],[name^=partnumber_]').each(function(idx, elt) {