%{ $self->{TEMPLATE_DRIVER_OPTIONS} || {} });
# Copy the notes from the invoice/sales order etc. back to the variable "notes" because that is where most templates expect it to be.
%{ $self->{TEMPLATE_DRIVER_OPTIONS} || {} });
# Copy the notes from the invoice/sales order etc. back to the variable "notes" because that is where most templates expect it to be.
if (!$self->{employee_id}) {
$self->{"employee_${_}"} = $myconfig->{$_} for qw(email tel fax name signature);
if (!$self->{employee_id}) {
$self->{"employee_${_}"} = $myconfig->{$_} for qw(email tel fax name signature);
my ($self, $dbh, $key) = @_;
$key = "all_taxzones" unless ($key);
my ($self, $dbh, $key) = @_;
$key = "all_taxzones" unless ($key);
my ($language_tc, $output_numberformat, $output_dateformat, $output_longdates);
if ($self->{language_id}) {
($language_tc, $output_numberformat, $output_dateformat, $output_longdates) = AM->get_language_details(\%::myconfig, $self, $self->{language_id});
my ($language_tc, $output_numberformat, $output_dateformat, $output_longdates);
if ($self->{language_id}) {
($language_tc, $output_numberformat, $output_dateformat, $output_longdates) = AM->get_language_details(\%::myconfig, $self, $self->{language_id});
- $self->{myconfig_output_dateformat} = $output_dateformat;
- $self->{myconfig_output_longdates} = $output_longdates;
- $self->{myconfig_output_numberformat} = $output_numberformat;
+ $output_dateformat ||= $::myconfig{dateformat};
+ $output_numberformat ||= $::myconfig{numberformat};
+ $output_longdates //= 1;
+
+ $self->{myconfig_output_dateformat} = $output_dateformat // $::myconfig{dateformat};
+ $self->{myconfig_output_longdates} = $output_longdates // 1;
+ $self->{myconfig_output_numberformat} = $output_numberformat // $::myconfig{numberformat};
# Retrieve accounts for tax calculation.
IC->retrieve_accounts(\%::myconfig, $self, map { $_ => $self->{"id_$_"} } 1 .. $self->{rowcount});
# Retrieve accounts for tax calculation.
IC->retrieve_accounts(\%::myconfig, $self, map { $_ => $self->{"id_$_"} } 1 .. $self->{rowcount});