Revision 429593d0
Von Tamino Steinert vor mehr als 1 Jahr hinzugefügt
- ID 429593d00b33a76a53e5ad6e96330e5fe5fe89ca
- Vorgänger fe70b1f3
SL/CT.pm | ||
---|---|---|
86 | 86 |
"insertdate" => "ct.itime", |
87 | 87 |
"salesman" => "e.name", |
88 | 88 |
"payment" => "pt.description", |
89 |
"taxzone" => "tz.description", |
|
89 | 90 |
"pricegroup" => "pg.pricegroup", |
90 | 91 |
"ustid" => "ct.ustid", |
91 | 92 |
"creditlimit" => "ct.creditlimit", |
... | ... | |
229 | 230 |
push(@values, $form->{payment_id}); |
230 | 231 |
} |
231 | 232 |
|
233 |
if ($form->{taxzone_id}) { |
|
234 |
$where .= qq| AND (ct.taxzone_id = ?)|; |
|
235 |
push(@values, $form->{taxzone_id}); |
|
236 |
} |
|
237 |
|
|
232 | 238 |
if($form->{insertdatefrom}) { |
233 | 239 |
$where .= qq| AND (ct.itime::DATE >= ?)|; |
234 | 240 |
push@values, conv_date($form->{insertdatefrom}); |
... | ... | |
300 | 306 |
} |
301 | 307 |
my $query = |
302 | 308 |
qq|SELECT ct.*, ct.itime::DATE AS insertdate, b.description AS business, e.name as salesman, | . |
303 |
qq| pt.description as payment | . |
|
309 |
qq| pt.description as payment, tz.description as taxzone | .
|
|
304 | 310 |
$pg_select . |
305 | 311 |
$main_cp_select . |
306 | 312 |
(qq|, NULL AS invnumber, NULL AS ordnumber, NULL AS quonumber, NULL AS invid, NULL AS module, NULL AS formtype, NULL AS closed | x!! $join_records) . |
... | ... | |
308 | 314 |
qq|LEFT JOIN business b ON (ct.business_id = b.id) | . |
309 | 315 |
qq|LEFT JOIN employee e ON (ct.salesman_id = e.id) | . |
310 | 316 |
qq|LEFT JOIN payment_terms pt ON (ct.payment_id = pt.id) | . |
317 |
qq|LEFT JOIN tax_zones tz ON (ct.taxzone_id = tz.id) | . |
|
311 | 318 |
$pg_join . |
312 | 319 |
qq|WHERE $where|; |
313 | 320 |
|
bin/mozilla/ct.pl | ||
---|---|---|
56 | 56 |
use SL::DB::Default; |
57 | 57 |
use SL::DB::DeliveryTerm; |
58 | 58 |
use SL::DB::Manager::PaymentTerm; |
59 |
use SL::DB::Manager::TaxZone; |
|
59 | 60 |
use SL::ReportGenerator; |
60 | 61 |
use SL::Locale::String qw(t8); |
61 | 62 |
use SL::MoreCommon qw(uri_encode); |
... | ... | |
85 | 86 |
$form->get_lists("business_types" => "ALL_BUSINESS_TYPES", |
86 | 87 |
"salesmen" => "ALL_SALESMEN"); |
87 | 88 |
$form->{ALL_PAYMENT_TERMS} = SL::DB::Manager::PaymentTerm->get_all_sorted; |
89 |
$form->{ALL_TAXZONES} = SL::DB::Manager::TaxZone ->get_all_sorted; |
|
88 | 90 |
$form->{SHOW_BUSINESS_TYPES} = scalar @{ $form->{ALL_BUSINESS_TYPES} } > 0; |
89 | 91 |
|
90 | 92 |
$form->{CUSTOM_VARIABLES} = CVar->get_configs('module' => 'CT'); |
... | ... | |
187 | 189 |
} |
188 | 190 |
} |
189 | 191 |
|
192 |
if ($form->{taxzone_id}) { |
|
193 |
my $tax_zone = SL::DB::Manager::TaxZone->find_by(id => $form->{taxzone_id}); |
|
194 |
if ($tax_zone) { |
|
195 |
push @options, $locale->text('Tax rate') . " : " . $tax_zone->description; |
|
196 |
} |
|
197 |
} |
|
198 |
|
|
190 | 199 |
if ( $form->{insertdatefrom} or $form->{insertdateto} ) { |
191 | 200 |
push @options, $locale->text('Insert Date'); |
192 | 201 |
push @options, $locale->text('From') . " " . $locale->date(\%myconfig, $form->{insertdatefrom}, 1) if $form->{insertdatefrom}; |
... | ... | |
197 | 206 |
'id', 'name', "$form->{db}number", 'contact', 'main_contact_person', |
198 | 207 |
'department_1', 'department_2', 'phone', 'discount', |
199 | 208 |
'fax', 'email', 'taxnumber', 'street', 'zipcode' , 'city', |
200 |
'business', 'payment', 'invnumber', 'ordnumber', 'quonumber', 'salesman', |
|
209 |
'business', 'payment', 'taxzone', 'invnumber', 'ordnumber', 'quonumber', 'salesman',
|
|
201 | 210 |
'country', 'gln', 'insertdate', 'pricegroup', 'contact_origin', 'invoice_mail', |
202 | 211 |
'creditlimit', 'ustid', 'commercial_court', 'delivery_order_mail', 'dunning_lock' |
203 | 212 |
); |
... | ... | |
233 | 242 |
'salesman' => { 'text' => $locale->text('Salesman'), }, |
234 | 243 |
'discount' => { 'text' => $locale->text('Discount'), }, |
235 | 244 |
'payment' => { 'text' => $locale->text('Payment Terms'), }, |
245 |
'taxzone' => { 'text' => $locale->text('Tax rate'), }, |
|
236 | 246 |
'insertdate' => { 'text' => $locale->text('Insert Date'), }, |
237 | 247 |
'pricegroup' => { 'text' => $locale->text('Pricegroup'), }, |
238 | 248 |
'invoice_mail' => { 'text' => $locale->text('Email of the invoice recipient'), }, |
... | ... | |
251 | 261 |
my @hidden_variables = ( qw( |
252 | 262 |
db status obsolete name contact email cp_name addr_street addr_zipcode |
253 | 263 |
addr_city addr_country addr_gln business_id salesman_id insertdateto insertdatefrom all |
254 |
all_phonenumbers dunning_lock department_1 department_2 payment_id |
|
264 |
all_phonenumbers dunning_lock department_1 department_2 payment_id taxzone_id
|
|
255 | 265 |
), "$form->{db}number", |
256 | 266 |
map({ "cvar_$_->{name}" } @searchable_custom_variables), |
257 | 267 |
map({'cvar_'. $_->{name} .'_from'} grep({$_->{type} eq 'date'} @searchable_custom_variables)), |
templates/design40_webpages/ct/search.html | ||
---|---|---|
110 | 110 |
<th>[% 'Payment Term' | $T8 %]</th> |
111 | 111 |
<td>[% L.select_tag('payment_id', ALL_PAYMENT_TERMS, with_empty=1, title_key='description', with_empty=1, class="wi-lightwide") %]</td> |
112 | 112 |
</tr> |
113 |
<tr> |
|
114 |
<th>[% 'Tax rate' | $T8 %]</th> |
|
115 |
<td>[% L.select_tag('taxzone_id', ALL_TAXZONES, with_empty=1, title_key='description', class="wi-lightwide") %]</td> |
|
116 |
</tr> |
|
113 | 117 |
[% CUSTOM_VARIABLES_FILTER_CODE %] |
114 | 118 |
<tr> |
115 | 119 |
<th>[% 'Scope' | $T8 %] </th> |
... | ... | |
277 | 281 |
<input name="l_payment" id="l_payment" type="checkbox" value="Y"> |
278 | 282 |
<label for="l_payment"> [% 'Payment Terms' | $T8 %] </label> |
279 | 283 |
</div> |
284 |
<div> |
|
285 |
<input name="l_taxzone" id="l_taxzone" type="checkbox" value="Y"> |
|
286 |
<label for="l_taxzone"> [% 'Tax rate' | $T8 %] </label> |
|
287 |
</div> |
|
280 | 288 |
</div> |
281 | 289 |
|
282 | 290 |
<div class="list col"> |
templates/webpages/ct/search.html | ||
---|---|---|
79 | 79 |
<td>[% L.select_tag('payment_id', ALL_PAYMENT_TERMS, with_empty=1, title_key='description', with_empty=1) %]</td> |
80 | 80 |
</tr> |
81 | 81 |
|
82 |
<tr> |
|
83 |
<th align="right">[% 'Tax rate' | $T8 %]</th> |
|
84 |
<td>[% L.select_tag('taxzone_id', ALL_TAXZONES, with_empty=1, title_key='description') %]</td> |
|
85 |
</tr> |
|
86 |
|
|
82 | 87 |
[% IF IS_CUSTOMER %] |
83 | 88 |
<tr> |
84 | 89 |
<th align="right" nowrap>[% LxERP.t8("Factur-X/ZUGFeRD settings") %]</th> |
... | ... | |
218 | 223 |
<input name="l_payment" id="l_payment" type="checkbox" class="checkbox" value="Y"> |
219 | 224 |
<label for="l_payment">[% 'Payment Terms' | $T8 %]</label> |
220 | 225 |
</td> |
226 |
<td> |
|
227 |
<input name="l_taxzone" id="l_taxzone" type="checkbox" class="checkbox" value="Y"> |
|
228 |
<label for="l_taxzone">[% 'Tax rate' | $T8 %]</label> |
|
229 |
</td> |
|
221 | 230 |
<td> |
222 | 231 |
<input name="l_insertdate" id="l_insertdate" class="checkbox" type="checkbox" value="Y"> |
223 | 232 |
<label for="l_insertdate">[% 'Insert Date' | $T8 %]</label> |
Auch abrufbar als: Unified diff
Kunden/Lieferanten-Bericht: nach Steuerrate filtern und anzeigen