Revision 778abbc9
Von Tamino Steinert vor mehr als 1 Jahr hinzugefügt
SL/CT.pm | ||
---|---|---|
"insertdate" => "ct.itime",
|
||
"salesman" => "e.name",
|
||
"payment" => "pt.description",
|
||
"taxzone" => "tz.description",
|
||
"pricegroup" => "pg.pricegroup",
|
||
"ustid" => "ct.ustid",
|
||
"creditlimit" => "ct.creditlimit",
|
||
... | ... | |
push(@values, $form->{payment_id});
|
||
}
|
||
|
||
if ($form->{taxzone_id}) {
|
||
$where .= qq| AND (ct.taxzone_id = ?)|;
|
||
push(@values, $form->{taxzone_id});
|
||
}
|
||
|
||
if($form->{insertdatefrom}) {
|
||
$where .= qq| AND (ct.itime::DATE >= ?)|;
|
||
push@values, conv_date($form->{insertdatefrom});
|
||
... | ... | |
}
|
||
my $query =
|
||
qq|SELECT ct.*, ct.itime::DATE AS insertdate, b.description AS business, e.name as salesman, | .
|
||
qq| pt.description as payment | .
|
||
qq| pt.description as payment, tz.description as taxzone | .
|
||
$pg_select .
|
||
$main_cp_select .
|
||
(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) .
|
||
... | ... | |
qq|LEFT JOIN business b ON (ct.business_id = b.id) | .
|
||
qq|LEFT JOIN employee e ON (ct.salesman_id = e.id) | .
|
||
qq|LEFT JOIN payment_terms pt ON (ct.payment_id = pt.id) | .
|
||
qq|LEFT JOIN tax_zones tz ON (ct.taxzone_id = tz.id) | .
|
||
$pg_join .
|
||
qq|WHERE $where|;
|
||
|
bin/mozilla/ct.pl | ||
---|---|---|
use SL::DB::Default;
|
||
use SL::DB::DeliveryTerm;
|
||
use SL::DB::Manager::PaymentTerm;
|
||
use SL::DB::Manager::TaxZone;
|
||
use SL::ReportGenerator;
|
||
use SL::Locale::String qw(t8);
|
||
use SL::MoreCommon qw(uri_encode);
|
||
... | ... | |
$form->get_lists("business_types" => "ALL_BUSINESS_TYPES",
|
||
"salesmen" => "ALL_SALESMEN");
|
||
$form->{ALL_PAYMENT_TERMS} = SL::DB::Manager::PaymentTerm->get_all_sorted;
|
||
$form->{ALL_TAXZONES} = SL::DB::Manager::TaxZone ->get_all_sorted;
|
||
$form->{SHOW_BUSINESS_TYPES} = scalar @{ $form->{ALL_BUSINESS_TYPES} } > 0;
|
||
|
||
$form->{CUSTOM_VARIABLES} = CVar->get_configs('module' => 'CT');
|
||
... | ... | |
}
|
||
}
|
||
|
||
if ($form->{taxzone_id}) {
|
||
my $tax_zone = SL::DB::Manager::TaxZone->find_by(id => $form->{taxzone_id});
|
||
if ($tax_zone) {
|
||
push @options, $locale->text('Tax rate') . " : " . $tax_zone->description;
|
||
}
|
||
}
|
||
|
||
if ( $form->{insertdatefrom} or $form->{insertdateto} ) {
|
||
push @options, $locale->text('Insert Date');
|
||
push @options, $locale->text('From') . " " . $locale->date(\%myconfig, $form->{insertdatefrom}, 1) if $form->{insertdatefrom};
|
||
... | ... | |
'id', 'name', "$form->{db}number", 'contact', 'main_contact_person',
|
||
'department_1', 'department_2', 'phone', 'discount',
|
||
'fax', 'email', 'taxnumber', 'street', 'zipcode' , 'city',
|
||
'business', 'payment', 'invnumber', 'ordnumber', 'quonumber', 'salesman',
|
||
'business', 'payment', 'taxzone', 'invnumber', 'ordnumber', 'quonumber', 'salesman',
|
||
'country', 'gln', 'insertdate', 'pricegroup', 'contact_origin', 'invoice_mail',
|
||
'creditlimit', 'ustid', 'commercial_court', 'delivery_order_mail', 'dunning_lock'
|
||
);
|
||
... | ... | |
'salesman' => { 'text' => $locale->text('Salesman'), },
|
||
'discount' => { 'text' => $locale->text('Discount'), },
|
||
'payment' => { 'text' => $locale->text('Payment Terms'), },
|
||
'taxzone' => { 'text' => $locale->text('Tax rate'), },
|
||
'insertdate' => { 'text' => $locale->text('Insert Date'), },
|
||
'pricegroup' => { 'text' => $locale->text('Pricegroup'), },
|
||
'invoice_mail' => { 'text' => $locale->text('Email of the invoice recipient'), },
|
||
... | ... | |
my @hidden_variables = ( qw(
|
||
db status obsolete name contact email cp_name addr_street addr_zipcode
|
||
addr_city addr_country addr_gln business_id salesman_id insertdateto insertdatefrom all
|
||
all_phonenumbers dunning_lock department_1 department_2 payment_id
|
||
all_phonenumbers dunning_lock department_1 department_2 payment_id taxzone_id
|
||
), "$form->{db}number",
|
||
map({ "cvar_$_->{name}" } @searchable_custom_variables),
|
||
map({'cvar_'. $_->{name} .'_from'} grep({$_->{type} eq 'date'} @searchable_custom_variables)),
|
templates/design40_webpages/ct/search.html | ||
---|---|---|
<th>[% 'Payment Term' | $T8 %]</th>
|
||
<td>[% L.select_tag('payment_id', ALL_PAYMENT_TERMS, with_empty=1, title_key='description', with_empty=1, class="wi-lightwide") %]</td>
|
||
</tr>
|
||
<tr>
|
||
<th>[% 'Tax rate' | $T8 %]</th>
|
||
<td>[% L.select_tag('taxzone_id', ALL_TAXZONES, with_empty=1, title_key='description', class="wi-lightwide") %]</td>
|
||
</tr>
|
||
[% CUSTOM_VARIABLES_FILTER_CODE %]
|
||
<tr>
|
||
<th>[% 'Scope' | $T8 %] </th>
|
||
... | ... | |
<input name="l_payment" id="l_payment" type="checkbox" value="Y">
|
||
<label for="l_payment"> [% 'Payment Terms' | $T8 %] </label>
|
||
</div>
|
||
<div>
|
||
<input name="l_taxzone" id="l_taxzone" type="checkbox" value="Y">
|
||
<label for="l_taxzone"> [% 'Tax rate' | $T8 %] </label>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="list col">
|
templates/webpages/ct/search.html | ||
---|---|---|
<td>[% L.select_tag('payment_id', ALL_PAYMENT_TERMS, with_empty=1, title_key='description', with_empty=1) %]</td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<th align="right">[% 'Tax rate' | $T8 %]</th>
|
||
<td>[% L.select_tag('taxzone_id', ALL_TAXZONES, with_empty=1, title_key='description') %]</td>
|
||
</tr>
|
||
|
||
[% IF IS_CUSTOMER %]
|
||
<tr>
|
||
<th align="right" nowrap>[% LxERP.t8("Factur-X/ZUGFeRD settings") %]</th>
|
||
... | ... | |
<input name="l_payment" id="l_payment" type="checkbox" class="checkbox" value="Y">
|
||
<label for="l_payment">[% 'Payment Terms' | $T8 %]</label>
|
||
</td>
|
||
<td>
|
||
<input name="l_taxzone" id="l_taxzone" type="checkbox" class="checkbox" value="Y">
|
||
<label for="l_taxzone">[% 'Tax rate' | $T8 %]</label>
|
||
</td>
|
||
<td>
|
||
<input name="l_insertdate" id="l_insertdate" class="checkbox" type="checkbox" value="Y">
|
||
<label for="l_insertdate">[% 'Insert Date' | $T8 %]</label>
|
Auch abrufbar als: Unified diff
Kunden/Lieferanten-Bericht: nach Steuerrate filtern und anzeigen