X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=js%2Fkivi.SalesPurchase.js;h=a350e1963d06f3f777bb0cb238e0de74b5812046;hb=43816cb7289ee9225c3bb229d077bd87a75562cc;hp=771351cf57ce5093e9c3b565554e568c914397e0;hpb=824735fcfa7c7bb9a5e76ceb2214c6a7cb42e60a;p=kivitendo-erp.git
diff --git a/js/kivi.SalesPurchase.js b/js/kivi.SalesPurchase.js
index 771351cf5..a350e1963 100644
--- a/js/kivi.SalesPurchase.js
+++ b/js/kivi.SalesPurchase.js
@@ -18,7 +18,7 @@ namespace('kivi.SalesPurchase', function(ns) {
this.edit_longdescription_with_params = function(params) {
var $container = $('#popup_edit_longdescription_input_container');
- var $edit = $('');
+ var $edit = $('');
$container.children().remove();
$container.append($edit);
@@ -274,10 +274,13 @@ namespace('kivi.SalesPurchase', function(ns) {
return true;
};
- this.show_email_dialog = function(send_action) {
+ this.show_email_dialog = function(send_action, vc, vc_id_selector) {
$('#form').data('send-email-action', send_action || 'send_sales_purchase_email');
- var vc = $('#vc').val();
+ vc = vc || $('#vc').val();
+ vc_id_selector = vc_id_selector || '#' + vc + '_id';
+ var vc_id = $(vc_id_selector).val();
+
var data = {
action: 'show_sales_purchase_email_dialog',
cp_id: $('#cp_id').val(),
@@ -295,7 +298,7 @@ namespace('kivi.SalesPurchase', function(ns) {
quonumber: $('#quonumber').val(),
type: $('#type').val(),
vc: vc,
- vc_id: $('#' + vc + '_id').val(),
+ vc_id: vc_id,
project_id: $('#globalproject_id').val(),
};