Revision c19f41e1
Von Sven Schöling vor mehr als 15 Jahren hinzugefügt
SL/IC.pm | ||
---|---|---|
748 | 748 |
# not working: |
749 | 749 |
# onhand - as above, but masking the simple itemstatus results (doh!) |
750 | 750 |
# masking of onhand in bsooqr mode - ToDO: fixme |
751 |
# warehouse onhand |
|
751 | 752 |
# |
752 | 753 |
# disabled sanity checks and changes: |
753 | 754 |
# - searchitems = assembly will no longer disable bought |
... | ... | |
775 | 776 |
my @all_columns = (@simple_filters, @makemodel_filters, @apoe_filters, qw(serialnumber)); |
776 | 777 |
my @simple_l_switches = (@all_columns, qw(listprice sellprice lastcost priceupdate weight unit bin rop image)); |
777 | 778 |
my @oe_flags = qw(bought sold onorder ordered rfq quoted); |
778 |
my @qsooqr_flags = qw(invnumber ordnumber quonumber trans_id name module); |
|
779 |
my @qsooqr_flags = qw(invnumber ordnumber quonumber trans_id name module qty);
|
|
779 | 780 |
my @deliverydate_flags = qw(deliverydate); |
780 | 781 |
# my @other_flags = qw(onhand); # ToDO: implement these |
781 | 782 |
# my @inactive_flags = qw(l_subtotal short l_linetotal); |
... | ... | |
803 | 804 |
); |
804 | 805 |
my @join_order = qw(partsgroup makemodel invoice_oi apoe cv pfac); |
805 | 806 |
my %joins_needed; |
807 |
my %table_prefix; |
|
808 |
my %renamed_columns; |
|
806 | 809 |
|
807 | 810 |
if (($form->{searchitems} eq 'assembly') && $form->{l_lastcost}) { |
808 | 811 |
@simple_l_switches = grep { $_ ne 'lastcost' } @simple_l_switches; |
... | ... | |
907 | 910 |
push @bsooqr_tokens, q|module = 'oe' AND quotation AND cv = 'vendor'| if $form->{rfq}; |
908 | 911 |
push @where_tokens, join ' OR ', map { "($_)" } @bsooqr_tokens if $bsooqr; |
909 | 912 |
|
913 |
$renamed_columns{onhand} = 'onhand_before_bsooqr'; |
|
914 |
$renamed_columns{qty} = 'onhand'; |
|
915 |
|
|
910 | 916 |
$joins_needed{partsgroup} = 1; |
911 | 917 |
$joins_needed{pfac} = 1; |
912 | 918 |
$joins_needed{makemodel} = 1 if grep { $form->{$_} || $form->{"l_$_"} } @makemodel_filters; |
... | ... | |
937 | 943 |
|
938 | 944 |
#============= build query ================# |
939 | 945 |
|
940 |
my %table_prefix; |
|
941 | 946 |
%table_prefix = ( |
942 | 947 |
%table_prefix, |
943 | 948 |
deliverydate => 'apoe.', serialnumber => 'ioi.', |
... | ... | |
953 | 958 |
|
954 | 959 |
$table_prefix{$q_assembly_lastcost} = ' '; |
955 | 960 |
|
956 |
my %renamed_columns = ( |
|
961 |
%renamed_columns = ( |
|
962 |
%renamed_columns, |
|
957 | 963 |
'factor' => 'price_factor', |
958 | 964 |
'SUM(ioi.qty)' => 'soldtotal', |
959 | 965 |
); |
Auch abrufbar als: Unified diff
Warenreport: im bsooqr Modus qty -> onhand mappen.
Dadurch werden die Mengen der Aufträge/Rechnungen angegeben, statt die
vorhandene Menge.