From: Moritz Bunkus Date: Wed, 8 Jan 2014 09:06:37 +0000 (+0100) Subject: Merge branch 'wiederkehrende-rechnungen-druckvariablen-2247' X-Git-Tag: release-3.1.0beta1~22^2~22^2~19^2~5 X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/commitdiff_plain/3266c24ccc8ec12e60a2a60a35e7760422e7862f?hp=142628e0282159c5c7f06b8cd6ec1c7707a69e55 Merge branch 'wiederkehrende-rechnungen-druckvariablen-2247' --- diff --git a/SL/CP.pm b/SL/CP.pm index 29ac35ab0..451cc7b30 100644 --- a/SL/CP.pm +++ b/SL/CP.pm @@ -147,13 +147,17 @@ sub get_openinvoices { my $buysell = $form->{vc} eq 'customer' ? "buy" : "sell"; my $arap = $form->{arap} eq "ar" ? "ar" : "ap"; + + my $whereinvoice = $form->{invnumber} ? qq| AND a.invnumber = '| . $form->{invnumber} . qq|' | : undef; my $query = qq|SELECT a.id, a.invnumber, a.transdate, a.amount, a.paid, cu.name AS curr | . qq|FROM $arap a | . qq|LEFT JOIN currencies cu ON (cu.id=a.currency_id)| . qq|WHERE (a.${vc}_id = ?) AND cu.name = ? AND NOT (a.amount = a.paid)| . + $whereinvoice . qq|ORDER BY a.id|; + my $sth = prepare_execute_query($form, $dbh, $query, conv_i($form->{"${vc}_id"}), "$form->{currency}"); diff --git a/bin/mozilla/cp.pl b/bin/mozilla/cp.pl index b9aed484a..737cb307e 100644 --- a/bin/mozilla/cp.pl +++ b/bin/mozilla/cp.pl @@ -324,13 +324,13 @@ sub update { $updated = &check_name($form->{vc}); }; - if ($new_name_selected || $updated) { + # if ($new_name_selected || $updated) { # get open invoices from ar/ap using $form->{vc} and a.${vc}_id, i.e. customer_id CP->get_openinvoices(\%myconfig, \%$form); ($newvc) = split /--/, $form->{ $form->{vc} }; $form->{"old$form->{vc}"} = qq|$newvc--$form->{"$form->{vc}_id"}|; $updated = 1; - } + # } if ($form->{currency} ne $form->{oldcurrency}) { $form->{oldcurrency} = $form->{currency}; diff --git a/bin/mozilla/is.pl b/bin/mozilla/is.pl index d0e501473..a83e4bcc7 100644 --- a/bin/mozilla/is.pl +++ b/bin/mozilla/is.pl @@ -1023,6 +1023,10 @@ sub yes { $main::lxdebug->leave_sub(); } +sub post_and_e_mail { + e_mail(); +}; + sub e_mail { $main::lxdebug->enter_sub(); diff --git a/js/kivi.CustomerVendor.js b/js/kivi.CustomerVendor.js index e8f412a61..59c07354e 100644 --- a/js/kivi.CustomerVendor.js +++ b/js/kivi.CustomerVendor.js @@ -44,32 +44,25 @@ namespace('kivi.CustomerVendor', function(ns) { this.selectContact = function(params) { var contactId = $('#contact_cp_id').val(); - if( contactId ) { - var url = 'controller.pl?action=CustomerVendor/ajaj_get_contact&id='+ $('#cv_id').val() +'&db='+ $('#db').val() +'&contact_id='+ contactId; + var url = 'controller.pl?action=CustomerVendor/ajaj_get_contact&id='+ $('#cv_id').val() +'&db='+ $('#db').val() +'&contact_id='+ contactId; - $.getJSON(url, function(data) { - var contact = data.contact; - for(var key in contact) - $(document.getElementById('contact_'+ key)).val(contact[key]) + $.getJSON(url, function(data) { + var contact = data.contact; + for(var key in contact) + $(document.getElementById('contact_'+ key)).val(contact[key]) - var cvars = data.contact_cvars; - for(var key in cvars) - $(document.getElementById('contact_cvar_'+ key)).val(cvars[key]); + var cvars = data.contact_cvars; + for(var key in cvars) + $(document.getElementById('contact_cvars_'+ key)).val(cvars[key]); + if ( contactId ) $('#action_delete_contact').show(); + else + $('#action_delete_contact').hide(); - if( params.onFormSet ) - params.onFormSet(); - }); - } - else { - $('#contacts :input').not(':button, :submit, :reset, :hidden').val('').removeAttr('checked').removeAttr('selected'); - - $('#action_delete_contact').hide(); - - if( params.onFormSet ) + if ( params.onFormSet ) params.onFormSet(); - } + }); $('#contact_cp_title_select, #contact_cp_abteilung_select').val(''); }; diff --git a/locale/de/all b/locale/de/all index ddc1a1db7..08bb3fc42 100755 --- a/locale/de/all +++ b/locale/de/all @@ -1608,6 +1608,7 @@ $self->{texts} = { 'Portrait' => 'Hochformat', 'Post' => 'Buchen', 'Post Payment' => 'Zahlung buchen', + 'Post and E-mail' => 'Buchen und E-Mail', 'Post payments' => 'Zahlungen buchen', 'Posting Configuration' => 'Buchungskonfiguration', 'Postscript' => 'Postscript', diff --git a/templates/webpages/is/form_footer.html b/templates/webpages/is/form_footer.html index 6b3426b60..5ab55b739 100644 --- a/templates/webpages/is/form_footer.html +++ b/templates/webpages/is/form_footer.html @@ -176,7 +176,7 @@ - +