$where .= " AND a.ordnumber ILIKE ?";
push(@values, like($form->{ordnumber}));
}
+ if ($form->{taxzone_id}) {
+ $where .= " AND a.taxzone_id = ?";
+ push(@values, $form->{taxzone_id});
+ }
if ($form->{transaction_description}) {
$where .= " AND a.transaction_description ILIKE ?";
push(@values, like($form->{transaction_description}));
$where .= " AND c.business_id = ?";
push(@values, $business_id);
}
- if ($form->{department_id}) {
- $where .= " AND a.department_id = ?";
- push(@values, $form->{department_id});
+ if ($form->{taxzone_id}) {
+ $where .= " AND a.taxzone_id = ?";
+ push(@values, $form->{taxzone_id});
}
foreach my $column (qw(invnumber ordnumber cusordnumber notes transaction_description shipvia shippingpoint)) {
if ($form->{$column}) {
$form->{title} = $locale->text('Vendor Invoices & AP Transactions');
$::form->{ALL_DEPARTMENTS} = SL::DB::Manager::Department->get_all_sorted;
+ $::form->{ALL_TAXZONES} = SL::DB::Manager::TaxZone ->get_all_sorted;
+
# constants and subs for template
$form->{vc_keys} = sub { "$_[0]->{name}--$_[0]->{id}" };
my @hidden_variables = map { "l_${_}" } @columns;
push @hidden_variables, "l_subtotal", qw(open closed vendor invnumber ordnumber transaction_description notes project_id transdatefrom transdateto
- parts_partnumber parts_description department_id);
+ parts_partnumber parts_description department_id taxzone_id);
my $href = build_std_url('action=ap_transactions', grep { $form->{$_} } @hidden_variables);
$form->{ALL_EMPLOYEES} = SL::DB::Manager::Employee->get_all_sorted(query => [ deleted => 0 ]);
$form->{ALL_DEPARTMENTS} = SL::DB::Manager::Department->get_all_sorted;
$form->{ALL_BUSINESS_TYPES} = SL::DB::Manager::Business->get_all_sorted;
+ $form->{ALL_TAXZONES} = SL::DB::Manager::TaxZone ->get_all_sorted;
$form->{CT_CUSTOM_VARIABLES} = CVar->get_configs('module' => 'CT');
($form->{CT_CUSTOM_VARIABLES_FILTER_CODE},
my @hidden_variables = map { "l_${_}" } @columns;
push @hidden_variables, "l_subtotal", qw(open closed customer invnumber ordnumber cusordnumber transaction_description notes project_id transdatefrom transdateto duedatefrom duedateto
employee_id salesman_id business_id parts_partnumber parts_description department_id show_marked_as_closed show_not_mailed
- shippingpoint shipvia);
+ shippingpoint shipvia taxzone_id);
push @hidden_variables, map { "cvar_$_->{name}" } @ct_searchable_custom_variables;
$href = $params{want_binary_pdf} ? '' : build_std_url('action=ar_transactions', grep { $form->{$_} } @hidden_variables);
<th align=right nowrap>[% 'Order Number' | $T8 %]</th>
<td>[% L.input_tag("ordnumber", "", style=style) %]</td>
</tr>
+ <tr>
+ <th align="right">[% 'Steuersatz' | $T8 %]</th>
+ <td>[% L.select_tag('taxzone_id', ALL_TAXZONES, with_empty=1, title_key='description', style=style) %]</td>
+ </tr>
<tr>
<th align="right" nowrap>[% 'Transaction description' | $T8 %]</th>
<td>[% L.input_tag("transaction_description", "", style=style) %]</td>
<th align="right">[% 'Salesman' | $T8 %]</th>
<td>[% L.select_tag('salesman_id', ALL_EMPLOYEES, title_key = 'safe_name', with_empty = 1, style=style) %]</td>
</tr>
+ <tr>
+ <th align="right">[% 'Steuersatz' | $T8 %]</th>
+ <td>[% L.select_tag('taxzone_id', ALL_TAXZONES, with_empty=1, title_key='description', style=style) %]</td>
+ </tr>
<tr>
<th align=right nowrap>[% 'Transaction description' | $T8 %]</th>
<td>[% L.input_tag("transaction_description", "", style=style) %]</td>