Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 7464fcbd

Von Bernd Bleßmann vor etwa 5 Jahren hinzugefügt

  • ID 7464fcbd11174679dd59d9953fe22eb8285c7eac
  • Vorgänger 36965d41
  • Nachfolger be8c4415

Lagerstandsbericht: Listenpreis anzeigbar machen

Unterschiede anzeigen:

SL/WH.pm
809 809
     "partunit"             => "p.unit",
810 810
     "stock_value"          => "p.lastcost / COALESCE(pfac.factor, 1)",
811 811
     "purchase_price"       => "p.lastcost",
812
     "list_price"           => "p.listprice",
812 813
  );
813 814
  $form->{l_classification_id}  = 'Y';
814 815
  $form->{l_part_type}          = 'Y';
bin/mozilla/wh.pl
791 791
  my $sort_col     = $form->{sort};
792 792

  
793 793
  my %filter;
794
  my @columns = qw(warehousedescription bindescription partnumber type_and_classific partdescription chargenumber bestbefore comment qty partunit purchase_price stock_value);
794
  my @columns = qw(warehousedescription bindescription partnumber type_and_classific partdescription chargenumber bestbefore comment qty partunit list_price purchase_price stock_value);
795 795

  
796 796
  # filter stuff
797 797
  map { $filter{$_} = $form->{$_} if ($form->{$_}) } qw(warehouse_id bin_id classification_id partnumber description chargenumber bestbefore date include_invalid_warehouses);
......
878 878
    'partunit'             => { 'text' => $locale->text('Unit'), },
879 879
    'stock_value'          => { 'text' => $locale->text('Stock value'), },
880 880
    'purchase_price'       => { 'text' => $locale->text('Purchase price'), },
881
    'list_price'           => { 'text' => $locale->text('List Price'), },
881 882
  );
882 883

  
883 884
  my $href = build_std_url('action=generate_report', grep { $form->{$_} } @hidden_variables);
......
885 886

  
886 887
  map { $column_defs{$_}->{link} = $href . "&page=".$page."&sort=${_}&order=" . Q($_ eq $sort_col ? 1 - $form->{order} : $form->{order}) } @columns;
887 888

  
888
  my %column_alignment = map { $_ => 'right' } qw(qty purchase_price stock_value);
889
  my %column_alignment = map { $_ => 'right' } qw(qty list_price purchase_price stock_value);
889 890

  
890 891
  map { $column_defs{$_}->{visible} = $form->{"l_${_}"} ? 1 : 0 } @columns;
891 892

  
......
927 928
#                                                       'conv_units' => 'convertible');
928 929
    $entry->{stock_value} = $form->format_amount(\%myconfig, $entry->{stock_value} * 1, 2);
929 930
    $entry->{purchase_price} = $form->format_amount(\%myconfig, $entry->{purchase_price} * 1, 2);
931
    $entry->{list_price}     = $form->format_amount(\%myconfig, $entry->{list_price}     * 1, 2);
930 932

  
931 933
    my $row_set = [ { map { $_ => { 'data' => $entry->{$_}, 'align' => $column_alignment{$_} } } @columns } ];
932 934

  
......
941 943
#                                                               'conv_units' => 'convertible');
942 944
      $row->{stock_value}->{data} = $form->format_amount(\%myconfig, $subtotals{stock_value} * 1, 2);
943 945
      $row->{purchase_price}->{data} = $form->format_amount(\%myconfig, $subtotals{purchase_price} * 1, 2);
946
      $row->{list_price}->{data}     = $form->format_amount(\%myconfig, $subtotals{list_price}     * 1, 2);
944 947

  
945 948
      %subtotals                  = map { $_ => 0 } @subtotals_columns;
946 949

  
templates/webpages/wh/report_filter.html
186 186
        <td nowrap><label for="l_stock_value">[% 'Stock value' | $T8 %]</label></td>
187 187
        <td align="right"><input name="l_purchase_price" id="l_purchase_price" class="checkbox" type="checkbox" value="Y"></td>
188 188
        <td nowrap><label for="l_purchase_price">[% 'Purchase price' | $T8 %]</label></td>
189
        <td align="right"><input name="l_list_price" id="l_list_price" class="checkbox" type="checkbox" value="Y"></td>
190
        <td nowrap><label for="l_list_price">[% 'List Price' | $T8 %]</label></td>
189 191
       </tr>
190 192

  
191 193
      </table>

Auch abrufbar als: Unified diff