Revision 3431644a
Von Moritz Bunkus vor fast 14 Jahren hinzugefügt
SL/DN.pm | ||
---|---|---|
36 | 36 |
|
37 | 37 |
use SL::Common; |
38 | 38 |
use SL::DBUtils; |
39 |
use SL::GenericTranslations; |
|
39 | 40 |
use SL::IS; |
40 | 41 |
use SL::Mailer; |
41 | 42 |
use SL::MoreCommon; |
... | ... | |
782 | 783 |
$form->{total_open_amount} = $form->format_amount($myconfig, $form->round_amount($ref->{total_open_amount}, 2), 2); |
783 | 784 |
$form->{total_amount} = $form->format_amount($myconfig, $form->round_amount($ref->{fee} + $ref->{total_interest} + $ref->{total_open_amount}, 2), 2); |
784 | 785 |
|
786 |
$self->set_customer_cvars($myconfig, $form); |
|
785 | 787 |
$self->set_template_options($myconfig, $form); |
786 | 788 |
|
787 | 789 |
my $filename = "dunning_${dunning_id}_" . Common::unique_id() . ".pdf"; |
... | ... | |
832 | 834 |
$query = |
833 | 835 |
qq|SELECT |
834 | 836 |
ar.invnumber, ar.transdate AS invdate, ar.amount, ar.netamount, |
835 |
ar.duedate, ar.notes, ar.notes AS invoicenotes, |
|
837 |
ar.duedate, ar.notes, ar.notes AS invoicenotes, ar.customer_id,
|
|
836 | 838 |
|
837 | 839 |
c.name, c.department_1, c.department_2, c.street, c.zipcode, c.city, c.country, |
838 | 840 |
c.contact, c.customernumber, c.phone, c.fax, c.email, |
... | ... | |
873 | 875 |
|
874 | 876 |
map { $form->{$_} = $form->format_amount($myconfig, $form->{$_}, 2) } qw(fee interest invamount); |
875 | 877 |
|
878 |
$self->set_customer_cvars($myconfig, $form); |
|
876 | 879 |
$self->set_template_options($myconfig, $form); |
877 | 880 |
|
878 | 881 |
my $filename = Common::unique_id() . "dunning_invoice_${dunning_id}.pdf"; |
... | ... | |
896 | 899 |
$main::lxdebug->leave_sub(); |
897 | 900 |
} |
898 | 901 |
|
902 |
sub set_customer_cvars { |
|
903 |
my ($self, $myconfig, $form) = @_; |
|
904 |
|
|
905 |
my $custom_variables = CVar->get_custom_variables(dbh => $form->get_standard_dbh, |
|
906 |
module => 'CT', |
|
907 |
trans_id => $form->{customer_id}); |
|
908 |
map { $form->{"vc_cvar_$_->{name}"} = $_->{value} } @{ $custom_variables }; |
|
909 |
|
|
910 |
$form->{cp_greeting} = GenericTranslations->get(dbh => $form->get_standard_dbh, |
|
911 |
translation_type => 'greetings::' . ($form->{cp_gender} eq 'f' ? 'female' : 'male'), |
|
912 |
language_id => $form->{language_id}, |
|
913 |
allow_fallback => 1); |
|
914 |
} |
|
915 |
|
|
899 | 916 |
1; |
Auch abrufbar als: Unified diff
Benutzerdefinierte Variablen für Kunden beim Drucken von Mahnungen zur Verfügung stellen
Betrifft sowohl die Mahnung selber als auch eine eventuell für die
Zinsen und Gebühren erstellte Rechnung.
Fix für Bug 1376.