#======================================================================
use SL::CP;
-use SL::OP;
use SL::IS;
use SL::IR;
}
# departments
- if (@{ $form->{all_departments} }) {
+ if (@{ $form->{all_departments} || [] }) {
$form->{selectdepartment} = "<option>\n";
$form->{department} = "$form->{department}--$form->{department_id}";
map {
$form->{selectdepartment} .=
"<option>$_->{description}--$_->{id}\n"
- } (@{ $form->{all_departments} });
+ } (@{ $form->{all_departments} || [] });
}
CP->paymentaccounts(\%myconfig, \%$form);
$form->format_amount(\%myconfig, $form->{exchangerate});
if ($form->{forex}) {
$exchangerate = qq|
- <tr>
- <th align=right nowrap>| . $locale->text('Exchangerate') . qq|</th>
- <td colspan=3><input type=hidden name=exchangerate size=10 value=$form->{exchangerate}>$form->{exchangerate}</td>
- </tr>
+ <tr>
+ <th align=right nowrap>| . $locale->text('Exchangerate') . qq|</th>
+ <td colspan=3><input type=hidden name=exchangerate size=10 value=$form->{exchangerate}>$form->{exchangerate}</td>
+ </tr>
|;
} else {
$exchangerate = qq|
- <tr>
- <th align=right nowrap>| . $locale->text('Exchangerate') . qq|</th>
- <td colspan=3><input name=exchangerate size=10 value=$form->{exchangerate}></td>
- </tr>
+ <tr>
+ <th align=right nowrap>| . $locale->text('Exchangerate') . qq|</th>
+ <td colspan=3><input name=exchangerate size=10 value=$form->{exchangerate}></td>
+ </tr>
|;
}
}
$jsscript
|;
+ if ($form->{openinvoices_other_currencies}) {
+ my $warning = $form->{vc} eq 'customer' ? $::locale->text('There are #1 more open invoices for this customer with other currencies.', $form->{openinvoices_other_currencies})
+ : $::locale->text('There are #1 more open invoices from this vendor with other currencies.', $form->{openinvoices_other_currencies});
+
+ print qq|
+
+ <input type="hidden" name="openinvoices_other_currencies" value="| . H($form->{openinvoices_other_currencies}) . qq|">
+ <tr>
+ <td><b>| . $::locale->text('Note') . qq|: $warning</b></td>
+ </tr>
+|;
+ }
+
$lxdebug->leave_sub();
}
<tr>
<td>
<table width=100%>
- <tr>
- <th class=listheading colspan=$colspan>$invoice</th>
- </tr>
+ <tr>
+ <th class=listheading colspan=$colspan>$invoice</th>
+ </tr>
|;
$column_data{invnumber} =
$j++;
$j %= 2;
print qq|
- <tr class=listrow$j>
+ <tr class=listrow$j>
|;
map { print "$column_data{$_}\n" } @column_index;
print qq|
$format .= qq|
<option value=postscript $form->{DF}{postscript}>|
. $locale->text('Postscript') . qq|
- <option value=pdf $form->{DF}{pdf}>| . $locale->text('PDF');
+ <option value=pdf $form->{DF}{pdf}>| . $locale->text('PDF');
}
print qq|