column_map => { id => 'ap_id' },
manager_args => { with_objects => [ 'sepa_export' ] }
},
+ sepa_exports => {
+ type => 'many to many',
+ map_class => 'SL::DB::SepaExportItem',
+ map_from => 'ap',
+ map_to => 'sepa_export',
+ },
custom_shipto => {
type => 'one to one',
class => 'SL::DB::Shipto',
use SL::IS;
use SL::PE;
use SL::DB::Default;
+use SL::DB::PurchaseInvoice;
use List::Util qw(max sum);
use List::UtilsBy qw(sort_by);
my %TMPL_VAR = ();
my @custom_hiddens;
+ $TMPL_VAR{invoice_obj} = SL::DB::PurchaseInvoice->new(id => $form->{id})->load if $form->{id};
$form->{employee_id} = $form->{old_employee_id} if $form->{old_employee_id};
$form->{salesman_id} = $form->{old_salesman_id} if $form->{old_salesman_id};
<span class="plus[% IF is_credit_remaining_negativ %]0[% ELSE %]1[% END %]">[% LxERP.format_amount(creditremaining,0 ,'0') %]</span>
</td>
</tr>
+[%- IF invoice_obj.sepa_exports.as_list.size %]
+ <tr>
+ <th align="right">[% LxERP.t8("SEPA exports") %]</th>
+ <td>
+ [% FOREACH export = invoice_obj.sepa_exports.as_list %]
+ <a href="sepa.pl?action=bank_transfer_edit&vc=vendor&id=[% HTML.url(export.id) %]">[% HTML.escape(export.id) %]</a>
+ [% UNLESS loop.last %], [% END %]
+ [% END %]
+ </td>
+ </tr>
+[%- END %]
[%- IF business %]
<tr>
<th align="right">[% 'Vendor type' | $T8 %]</th>