Revision eefbbed3
Von Jan Büren vor etwa 5 Jahren hinzugefügt
SL/VK.pm | ||
---|---|---|
# so we extract both versions in our query and later overwrite the description in article mode
|
||
|
||
my $query =
|
||
qq|SELECT ct.id as customerid, ct.name as customername,ct.customernumber,ct.country,ar.invnumber,ar.id,ar.transdate,p.partnumber,p.description as description, pg.partsgroup,i.parts_id,i.qty,i.price_factor,i.discount,i.description as invoice_description,i.lastcost,i.sellprice,i.fxsellprice,i.marge_total,i.marge_percent,i.unit,b.description as business,e.name as employee,e2.name as salesman, to_char(ar.transdate,'Month') as month, to_char(ar.transdate, 'YYYYMM') as nummonth, p.unit as parts_unit, p.weight, ar.taxincluded | .
|
||
qq|SELECT ct.id as customerid, ct.name as customername,ct.customernumber,ct.country,ar.invnumber,ar.shipvia,ar.id,ar.transdate,p.partnumber,p.description as description, pg.partsgroup,i.parts_id,i.qty,i.price_factor,i.discount,i.description as invoice_description,i.lastcost,i.sellprice,i.fxsellprice,i.marge_total,i.marge_percent,i.unit,b.description as business,e.name as employee,e2.name as salesman, to_char(ar.transdate,'Month') as month, to_char(ar.transdate, 'YYYYMM') as nummonth, p.unit as parts_unit, p.weight, ar.taxincluded | .
|
||
qq|, COALESCE(er.buy, 1) | .
|
||
qq|FROM invoice i | .
|
||
qq|RIGHT JOIN ar on (i.trans_id = ar.id) | .
|
bin/mozilla/vk.pl | ||
---|---|---|
$form->{title} = $locale->text('Sales Report');
|
||
|
||
@columns =
|
||
qw(description invnumber transdate customernumber customername partnumber partsgroup country business transdate qty parts_unit weight sellprice sellprice_total discount lastcost lastcost_total marge_total marge_percent employee salesman);
|
||
qw(description invnumber transdate shipvia customernumber customername partnumber partsgroup country business transdate qty parts_unit weight sellprice sellprice_total discount lastcost lastcost_total marge_total marge_percent employee salesman);
|
||
|
||
my @includeable_custom_variables = grep { $_->{includeable} } @{ $cvar_configs_ic }, @{ $cvar_configs_ct };
|
||
my @searchable_custom_variables = grep { $_->{searchable} } @{ $cvar_configs_ic }, @{ $cvar_configs_ct };
|
||
... | ... | |
'salesman' => { 'text' => $locale->text('Salesperson'), },
|
||
'invnumber' => { 'text' => $locale->text('Invoice Number'), },
|
||
'transdate' => { 'text' => $locale->text('Invoice Date'), },
|
||
'shipvia' => { 'text' => $locale->text('Ship via'), },
|
||
'qty' => { 'text' => $locale->text('Quantity'), },
|
||
'parts_unit' => { 'text' => $locale->text('Base unit'), },
|
||
'weight' => { 'text' => $locale->text('Weight'), },
|
||
... | ... | |
push @options, $locale->text('Department') . " : " . SL::DB::Department->new(id => $form->{department_id})->load->description if $form->{department_id};
|
||
push @options, $locale->text('Invoice Number') . " : $form->{invnumber}" if $form->{invnumber};
|
||
push @options, $locale->text('Invoice Date') . " : $form->{invdate}" if $form->{invdate};
|
||
push @options, $locale->text('Ship via') . " : $form->{shipvia}" if $form->{shipvia};
|
||
push @options, $locale->text('Part Number') . " : $form->{partnumber}" if $form->{partnumber};
|
||
push @options, $locale->text('Partsgroup') . " : " . SL::DB::PartsGroup->new(id => $form->{partsgroup_id})->load->partsgroup if $form->{partsgroup_id};
|
||
push @options, $locale->text('Country') . " : $form->{country}" if $form->{country};
|
templates/webpages/vk/search_invoice.html | ||
---|---|---|
<td align=left><input name="l_country" class=checkbox type=checkbox value=Y>[% 'Country' | $T8 %]</td>
|
||
<td align=left><input name="l_business" class=checkbox type=checkbox value=Y>[% 'Customer type' | $T8 %]</td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td align=left><input name="l_shipvia" class=checkbox type=checkbox value=Y>[% 'Ship via' | $T8 %]</td>
|
||
</tr>
|
||
<tr>
|
||
<th colspan="4" align="left">
|
||
[% 'Customer variables' | $T8 %] ([% 'Only shown in item mode' | $T8 %])
|
Auch abrufbar als: Unified diff
Verkaufsbericht: Transportmittel in Bericht mitausgeben