Revision 65f7a07e
Von Tamino Steinert vor mehr als 1 Jahr hinzugefügt
SL/AR.pm | ||
---|---|---|
qq| tz.description AS taxzone, | .
|
||
qq| pt.description AS payment_terms, | .
|
||
qq| d.description AS department, | .
|
||
qq| s.shiptoname, s.shiptodepartment_1, s.shiptodepartment_2, | .
|
||
qq| s.shiptostreet, s.shiptozipcode, s.shiptocity, s.shiptocountry, | .
|
||
qq{ ( SELECT ch.accno || ' -- ' || ch.description
|
||
FROM acc_trans at
|
||
LEFT JOIN chart ch ON ch.id = at.chart_id
|
||
... | ... | |
qq|LEFT JOIN tax_zones tz ON (tz.id = a.taxzone_id)| .
|
||
qq|LEFT JOIN payment_terms pt ON (pt.id = a.payment_id)| .
|
||
qq|LEFT JOIN business b ON (b.id = c.business_id)| .
|
||
qq|LEFT JOIN shipto s ON (
|
||
(a.shipto_id = s.shipto_id) or
|
||
(a.id = s.trans_id and s.module = 'AR')
|
||
)| .
|
||
qq|LEFT JOIN department d ON (d.id = a.department_id)|;
|
||
|
||
my $where = "1 = 1";
|
||
... | ... | |
$where .= ' AND COALESCE(paid_difference.amount, 0) + a.paid != 0';
|
||
}
|
||
|
||
if ($form->{shiptoname}) {
|
||
$where .= " AND s.shiptoname ILIKE ?";
|
||
push(@values, like($form->{shiptoname}));
|
||
}
|
||
if ($form->{shiptodepartment_1}) {
|
||
$where .= " AND s.shiptodepartment_1 ILIKE ?";
|
||
push(@values, like($form->{shiptodepartment_1}));
|
||
}
|
||
if ($form->{shiptodepartment_2}) {
|
||
$where .= " AND s.shiptodepartment_2 ILIKE ?";
|
||
push(@values, like($form->{shiptodepartment_2}));
|
||
}
|
||
if ($form->{shiptostreet}) {
|
||
$where .= " AND s.shiptostreet ILIKE ?";
|
||
push(@values, like($form->{shiptostreet}));
|
||
}
|
||
if ($form->{shiptozipcode}) {
|
||
$where .= " AND s.shiptozipcode ILIKE ?";
|
||
push(@values, like($form->{shiptozipcode}));
|
||
}
|
||
if ($form->{shiptocity}) {
|
||
$where .= " AND s.shiptocity ILIKE ?";
|
||
push(@values, like($form->{shiptocity}));
|
||
}
|
||
if ($form->{shiptocountry}) {
|
||
$where .= " AND s.shiptocountry ILIKE ?";
|
||
push(@values, like($form->{shiptocountry}));
|
||
}
|
||
|
||
my ($cvar_where, @cvar_values) = CVar->build_filter_query('module' => 'CT',
|
||
'trans_id_field' => 'c.id',
|
||
'filter' => $form,
|
bin/mozilla/ar.pl | ||
---|---|---|
|
||
my $report = SL::ReportGenerator->new(\%myconfig, $form);
|
||
|
||
@columns =
|
||
qw(ids transdate id type invnumber ordnumber cusordnumber donumber deliverydate name netamount tax amount paid
|
||
datepaid due duedate transaction_description notes salesman employee shippingpoint shipvia
|
||
marge_total marge_percent globalprojectnumber customernumber country ustid taxzone
|
||
payment_terms charts customertype direct_debit dunning_description department attachments
|
||
items customer_dunning_lock);
|
||
@columns = qw(
|
||
ids transdate id type invnumber ordnumber cusordnumber donumber
|
||
deliverydate name netamount tax amount paid datepaid due duedate
|
||
transaction_description notes salesman employee shippingpoint shipvia
|
||
marge_total marge_percent globalprojectnumber customernumber country
|
||
ustid taxzone payment_terms charts customertype direct_debit
|
||
dunning_description department attachments items customer_dunning_lock
|
||
shiptoname shiptodepartment_1 shiptodepartment_2 shiptostreet
|
||
shiptozipcode shiptocity shiptocountry
|
||
);
|
||
|
||
my $ct_cvar_configs = CVar->get_configs('module' => 'CT');
|
||
my @ct_includeable_custom_variables = grep { $_->{includeable} } @{ $ct_cvar_configs };
|
||
... | ... | |
push @columns, map { "cvar_$_->{name}" } @ct_includeable_custom_variables;
|
||
|
||
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 datepaidfrom datepaidto
|
||
employee_id salesman_id business_id parts_partnumber parts_description department_id show_marked_as_closed show_not_mailed
|
||
shippingpoint shipvia taxzone_id payment_id);
|
||
push @hidden_variables, "l_subtotal", qw(
|
||
open closed customer invnumber ordnumber cusordnumber
|
||
transaction_description notes project_id transdatefrom transdateto
|
||
duedatefrom duedateto datepaidfrom datepaidto employee_id salesman_id
|
||
business_id parts_partnumber parts_description department_id
|
||
show_marked_as_closed show_not_mailed shippingpoint shipvia taxzone_id
|
||
payment_id shiptoname shiptodepartment_1 shiptodepartment_2 shiptostreet
|
||
shiptozipcode shiptocity shiptocountry
|
||
);
|
||
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);
|
||
... | ... | |
attachments => { 'text' => $locale->text('Attachments'), },
|
||
items => { 'text' => $locale->text('Positions'), },
|
||
customer_dunning_lock => { 'text' => $locale->text('Dunning lock'), },
|
||
shiptoname => { 'text' => $locale->text('Name (Shipping)'), },
|
||
shiptodepartment_1 => { 'text' => $locale->text('Department 1 (Shipping)'), },
|
||
shiptodepartment_2 => { 'text' => $locale->text('Department 2 (Shipping)'), },
|
||
shiptostreet => { 'text' => $locale->text('Street (Shipping)'), },
|
||
shiptozipcode => { 'text' => $locale->text('Zipcode (Shipping)'), },
|
||
shiptocity => { 'text' => $locale->text('City (Shipping)'), },
|
||
shiptocountry => { 'text' => $locale->text('Country (Shipping)'), },
|
||
%column_defs_cvars,
|
||
);
|
||
|
||
... | ... | |
if ($form->{shippingpoint}) {
|
||
push @options, $locale->text('Shipping Point') . " : $form->{shippingpoint}";
|
||
}
|
||
|
||
if ($form->{shiptoname}) {
|
||
push @options, $locale->text('Name (Shipping)') . " : $form->{shiptoname}";
|
||
}
|
||
if ($form->{shiptodepartment_1}) {
|
||
push @options, $locale->text('Department 1 (Shipping)') . " : $form->{shiptodepartment_1}";
|
||
}
|
||
if ($form->{shiptodepartment_2}) {
|
||
push @options, $locale->text('Department 2 (Shipping)') . " : $form->{shiptodepartment_2}";
|
||
}
|
||
if ($form->{shiptostreet}) {
|
||
push @options, $locale->text('Street (Shipping)') . " : $form->{shiptostreet}";
|
||
}
|
||
if ($form->{shiptozipcode}) {
|
||
push @options, $locale->text('Zipcode (Shipping)') . " : $form->{shiptozipcode}";
|
||
}
|
||
if ($form->{shiptocity}) {
|
||
push @options, $locale->text('City (Shipping)') . " : $form->{shiptocity}";
|
||
}
|
||
if ($form->{shiptocountry}) {
|
||
push @options, $locale->text('Country (Shipping)') . " : $form->{shiptocountry}";
|
||
}
|
||
|
||
$form->{ALL_PRINTERS} = SL::DB::Manager::Printer->get_all_sorted;
|
||
|
locale/de/all | ||
---|---|---|
'Choose a Tax Number' => 'Bitte eine Steuernummer angeben',
|
||
'Choose bank account for reconciliation' => 'Wählen Sie das Bankkonto für den Kontenabgleich',
|
||
'City' => 'Stadt',
|
||
'City (Shipping)' => 'Stadt (Lieferung)',
|
||
'Classification' => 'Klassifizierung',
|
||
'Clear' => 'Löschen',
|
||
'Clear fields' => 'Felder leeren',
|
||
... | ... | |
'Could not spawn the printer command.' => 'Die Druckanwendung konnte nicht gestartet werden.',
|
||
'Could not update prices!' => 'Preise konnten nicht aktualisiert werden!',
|
||
'Country' => 'Land',
|
||
'Country (Shipping)' => 'Land (Lieferung)',
|
||
'Create' => 'Anlegen',
|
||
'Create Chart of Accounts' => 'Zu verwendender Kontenplan',
|
||
'Create Dataset' => 'Neue Datenbank anlegen',
|
||
... | ... | |
'Department (database ID)' => 'Abeilung (Datenbank-ID)',
|
||
'Department (description)' => 'Abteilung (Beschreibung)',
|
||
'Department 1' => 'Abteilung (1)',
|
||
'Department 1 (Shipping)' => 'Abteilung (1) (Lieferung)',
|
||
'Department 2' => 'Abteilung (2)',
|
||
'Department 2 (Shipping)' => 'Abteilung (2) (Lieferung)',
|
||
'Department Description' => 'Abteilungbeschreibung',
|
||
'Departments' => 'Abteilungen',
|
||
'Dependencies' => 'Abhängigkeiten',
|
||
... | ... | |
'Multiple addresses can be entered separated by commas.' => 'Mehrere Adressen können durch Kommata getrennt angegeben werden.',
|
||
'MwSt. inkl.' => 'MwSt. inkl.',
|
||
'Name' => 'Name',
|
||
'Name (Shipping)' => 'Name (Lieferung)',
|
||
'Name 2' => 'Name 2',
|
||
'Name 3' => 'Name 3',
|
||
'Name and Address' => 'Name & Adresse',
|
||
... | ... | |
'Storno (one letter abbreviation)' => 'S',
|
||
'Storno Invoice' => 'Stornorechnung',
|
||
'Street' => 'Straße',
|
||
'Street (Shipping)' => 'Straße (Lieferung)',
|
||
'Street 1' => 'Straße 1',
|
||
'Street 2' => 'Straße 2',
|
||
'Strict and halt' => 'Strikt und Abbruch',
|
||
... | ... | |
'Zip' => 'PLZ',
|
||
'Zip, City' => 'PLZ, Ort',
|
||
'Zipcode' => 'PLZ',
|
||
'Zipcode (Shipping)' => 'PLZ (Lieferung)',
|
||
'Zipcode and city' => 'PLZ und Stadt',
|
||
'[email]' => '[email]',
|
||
'absolute' => 'absolut',
|
locale/en/all | ||
---|---|---|
'Choose a Tax Number' => '',
|
||
'Choose bank account for reconciliation' => '',
|
||
'City' => '',
|
||
'City (Shipping)' => '',
|
||
'Classification' => '',
|
||
'Clear' => '',
|
||
'Clear fields' => '',
|
||
... | ... | |
'Could not spawn the printer command.' => '',
|
||
'Could not update prices!' => '',
|
||
'Country' => '',
|
||
'Country (Shipping)' => '',
|
||
'Create' => '',
|
||
'Create Chart of Accounts' => '',
|
||
'Create Dataset' => '',
|
||
... | ... | |
'Department (database ID)' => '',
|
||
'Department (description)' => '',
|
||
'Department 1' => '',
|
||
'Department 1 (Shipping)' => '',
|
||
'Department 2' => '',
|
||
'Department 2 (Shipping)' => '',
|
||
'Department Description' => '',
|
||
'Departments' => '',
|
||
'Dependencies' => '',
|
||
... | ... | |
'Multiple addresses can be entered separated by commas.' => '',
|
||
'MwSt. inkl.' => '',
|
||
'Name' => '',
|
||
'Name (Shipping)' => '',
|
||
'Name 2' => '',
|
||
'Name 3' => '',
|
||
'Name and Address' => '',
|
||
... | ... | |
'Storno (one letter abbreviation)' => '',
|
||
'Storno Invoice' => '',
|
||
'Street' => '',
|
||
'Street (Shipping)' => '',
|
||
'Street 1' => '',
|
||
'Street 2' => '',
|
||
'Strict and halt' => '',
|
||
... | ... | |
'Zip' => '',
|
||
'Zip, City' => '',
|
||
'Zipcode' => '',
|
||
'Zipcode (Shipping)' => '',
|
||
'Zipcode and city' => '',
|
||
'[email]' => '',
|
||
'absolute' => '',
|
templates/design40_webpages/ar/search.html | ||
---|---|---|
</tbody>
|
||
</table>
|
||
|
||
<table class="tbl-horizontal">
|
||
<caption>[% 'Shipping Address' | $T8 %]</caption>
|
||
<colgroup> <col class="wi-small"><col class="wi-wide"> </colgroup>
|
||
<tbody>
|
||
<tr>
|
||
<th>[% 'Name' | $T8 %]</th>
|
||
<td>[% L.input_tag("shiptoname", "") %]</td>
|
||
</tr>
|
||
<tr>
|
||
<th>[% 'Department 1' | $T8 %]</th>
|
||
<td>[% L.input_tag("shiptodepartment_1", "") %]</td>
|
||
</tr>
|
||
<tr>
|
||
<th>[% 'Department 2' | $T8 %]</th>
|
||
<td>[% L.input_tag("shiptodepartment_2", "") %]</td>
|
||
</tr>
|
||
<tr>
|
||
<th>[% 'Street' | $T8 %]</th>
|
||
<td>[% L.input_tag("shiptostreet", "") %]</td>
|
||
</tr>
|
||
<tr>
|
||
<th>[% 'Zipcode' | $T8 %]</th>
|
||
<td>[% L.input_tag("shiptozipcode", "") %]</td>
|
||
</tr>
|
||
<tr>
|
||
<th>[% 'City' | $T8 %]</th>
|
||
<td>[% L.input_tag("shiptocity", "") %]</td>
|
||
</tr>
|
||
<tr>
|
||
<th>[% 'Country' | $T8 %]</th>
|
||
<td>[% L.input_tag("shiptocountry", "") %]</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
|
||
<table class="tbl-horizontal">
|
||
<caption>[% 'Status' | $T8 %]</caption>
|
||
<colgroup> <col class="wi-small"><col class="wi-wide"> </colgroup>
|
||
... | ... | |
<input name="l_customer_dunning_lock" id="l_customer_dunning_lock" type="checkbox"><label for="l_customer_dunning_lock">[% 'Dunning lock' | $T8 %]</label>
|
||
</div>
|
||
</div>
|
||
<div class="list col">
|
||
<h4>[% 'Shipping Address' | $T8 %]</h4>
|
||
<div>
|
||
<input name="l_shiptoname" id="l_shiptoname" type="checkbox"><label for="l_shiptoname">[% 'Name' | $T8 %]</label>
|
||
</div>
|
||
<div>
|
||
<input name="l_shiptodepartment_1" id="l_shiptodepartment_1" type="checkbox"><label for="l_shiptodepartment_1">[% 'Department 1' | $T8 %]</label>
|
||
</div>
|
||
<div>
|
||
<input name="l_shiptodepartment_2" id="l_shiptodepartment_2" type="checkbox"><label for="l_shiptodepartment_2">[% 'Department 2' | $T8 %]</label>
|
||
</div>
|
||
<div>
|
||
<input name="l_shiptostreet" id="l_shiptostreet" type="checkbox"><label for="l_shiptostreet">[% 'Street' | $T8 %]</label>
|
||
</div>
|
||
<div>
|
||
<input name="l_shiptozipcode" id="l_shiptozipcode" type="checkbox"><label for="l_shiptozipcode">[% 'Zipcode' | $T8 %]</label>
|
||
</div>
|
||
<div>
|
||
<input name="l_shiptocity" id="l_shiptocity" type="checkbox"><label for="l_shiptocity">[% 'City' | $T8 %]</label>
|
||
</div>
|
||
<div>
|
||
<input name="l_shiptocountry" id="l_shiptocountry" type="checkbox"><label for="l_shiptocountry">[% 'Country' | $T8 %]</label>
|
||
</div>
|
||
</div>
|
||
<div class="list col">
|
||
<h4>[% 'Amounts' | $T8 %]</h4>
|
||
<div>
|
templates/webpages/ar/search.html | ||
---|---|---|
<th align="right">[% 'Ship via' | $T8 %]</th>
|
||
<td>[% L.input_tag("shipvia", "", style=style) %]</td>
|
||
</tr>
|
||
<tr>
|
||
<th align=right nowarp>[% 'Name (Shipping)' | $T8 %]</th>
|
||
<td>[% L.input_tag("shiptoname", "", style=style) %]</td>
|
||
</tr>
|
||
<tr>
|
||
<th align=right nowarp>[% 'Department 1 (Shipping)' | $T8 %]</th>
|
||
<td>[% L.input_tag("shiptodepartment_1", "", style=style) %]</td>
|
||
</tr>
|
||
<tr>
|
||
<th align=right nowarp>[% 'Department 2 (Shipping)' | $T8 %]</th>
|
||
<td>[% L.input_tag("shiptodepartment_2", "", style=style) %]</td>
|
||
</tr>
|
||
<tr>
|
||
<th align=right nowarp>[% 'Street (Shipping)' | $T8 %]</th>
|
||
<td>[% L.input_tag("shiptostreet", "", style=style) %]</td>
|
||
</tr>
|
||
<tr>
|
||
<th align=right nowarp>[% 'Zipcode (Shipping)' | $T8 %]</th>
|
||
<td>[% L.input_tag("shiptozipcode", "", style=style) %]</td>
|
||
</tr>
|
||
<tr>
|
||
<th align=right nowarp>[% 'City (Shipping)' | $T8 %]</th>
|
||
<td>[% L.input_tag("shiptocity", "", style=style) %]</td>
|
||
</tr>
|
||
<tr>
|
||
<th align=right nowarp>[% 'Country (Shipping)' | $T8 %]</th>
|
||
<td>[% L.input_tag("shiptocountry", "", style=style) %]</td>
|
||
</tr>
|
||
<tr>
|
||
<th align="right" nowrap>[% 'Payment Term' | $T8 %]</th>
|
||
<td>[% L.select_tag('payment_id', ALL_PAYMENT_TERMS, with_empty=1, title_key="description", style=style) %]</td>
|
||
... | ... | |
<td align=right><input name="l_customer_dunning_lock" id="l_customer_dunning_lock" class=checkbox type=checkbox value=Y></td>
|
||
<td nowrap>[% 'Dunning lock' | $T8 %]</td>
|
||
</tr>
|
||
<tr>
|
||
<td colspan=4 align=left><b>[% 'Shipping Address' | $T8 %]</b></td>
|
||
</tr>
|
||
<tr>
|
||
<td align=right><input name="l_shiptoname" id="l_shiptoname" type="checkbox"></td>
|
||
<td nowrap>[% 'Name' | $T8 %]</td>
|
||
<td align=right><input name="l_shiptodepartment_1" id="l_shiptodepartment_1" type="checkbox"></td>
|
||
<td nowrap>[% 'Department 1' | $T8 %]</td>
|
||
<td align=right><input name="l_shiptodepartment_2" id="l_shiptodepartment_2" type="checkbox"></td>
|
||
<td nowrap>[% 'Department 2' | $T8 %]</td>
|
||
</tr>
|
||
<tr>
|
||
<td align=right><input name="l_shiptostreet" id="l_shiptostreet" type="checkbox"></td>
|
||
<td nowrap>[% 'Street' | $T8 %]</td>
|
||
<td align=right><input name="l_shiptozipcode" id="l_shiptozipcode" type="checkbox"></td>
|
||
<td nowrap>[% 'Zipcode' | $T8 %]</td>
|
||
<td align=right><input name="l_shiptocity" id="l_shiptocity" type="checkbox"></td>
|
||
<td nowrap>[% 'City' | $T8 %]</td>
|
||
<td align=right><input name="l_shiptocountry" id="l_shiptocountry" type="checkbox"></td>
|
||
<td nowrap>[% 'Country' | $T8 %]</td>
|
||
</tr>
|
||
|
||
<table>
|
||
<tr><td align="right">
|
Auch abrufbar als: Unified diff
Rechnungsbericht: Lieferadresse anzeigen und filtern