Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision a0a30f41

Von Sven Schöling vor etwa 15 Jahren hinzugefügt

  • ID a0a30f41301f5f52c26febd9366182be858e54bb
  • Vorgänger 59f7af73
  • Nachfolger 134120bc

Pricegruppen in Verkaufsrechnungen anzeigen.

Unterschiede anzeigen:

bin/mozilla/io.pl
151 151
    {  id => 'serialnr',      width => 10,    value => $locale->text('Serial No.'),           display => 0, },
152 152
    {  id => 'projectnr',     width => 10,    value => $locale->text('Project'),              display => 0, },
153 153
    {  id => 'sellprice',     width => 15,    value => $locale->text('Price'),                display => !$is_delivery_order, },
154
    {  id => 'sellprice_pg',  width => 8,     value => $locale->text('Pricegroup'),           display => ($form->{type} =~ /^sales_/) && !$is_delivery_order,  },
154
    {  id => 'sellprice_pg',  width => 8,     value => $locale->text('Pricegroup'),           display => ($form->{type} =~ /^(sales_|invoice)/) && !$is_delivery_order,  },
155 155
    {  id => 'discount',      width => 5,     value => $locale->text('Discount'),             display => !$is_delivery_order, },
156 156
    {  id => 'linetotal',     width => 10,    value => $locale->text('Extended'),             display => !$is_delivery_order, },
157 157
    {  id => 'bin',           width => 10,    value => $locale->text('Bin'),                  display => 0, },
bin/mozilla/is.pl
264 264

  
265 265
  if ($form->{id}) {
266 266

  
267

  
268
    #     # get pricegroups for parts
269
    #     IS->get_pricegroups_for_parts(\%myconfig, \%$form);
270

  
271 267
    my $i = 0;
272 268

  
273 269
    foreach my $ref (@{ $form->{invoice_details} }) {
274 270
      $i++;
275 271

  
276 272
      map { $form->{"${_}_$i"} = $ref->{$_} } keys %{$ref};
277
      $form->{"discount_$i"} =
278
        $form->format_amount(\%myconfig, $form->{"discount_$i"} * 100);
279
      my ($dec) = ($form->{"sellprice_$i"} =~ /\.(\d+)/);
280
      $dec           = length $dec;
281
      my $decimalplaces = ($dec > 2) ? $dec : 2;
282 273

  
283
      $form->{"sellprice_$i"} =
284
        $form->format_amount(\%myconfig, $form->{"sellprice_$i"},
285
                             $decimalplaces);
274
      $form->{"discount_$i"}   = $form->format_amount(\%myconfig, $form->{"discount_$i"} * 100);
275
      my ($dec)                = ($form->{"sellprice_$i"} =~ /\.(\d+)/);
276
      $dec                     = length $dec;
277
      my $decimalplaces        = ($dec > 2) ? $dec : 2;
286 278

  
287
      (my $dec_qty) = ($form->{"qty_$i"} =~ /\.(\d+)/);
288
      $dec_qty = length $dec_qty;
279
      $form->{"sellprice_$i"}  = $form->format_amount(\%myconfig, $form->{"sellprice_$i"}, $decimalplaces);
280
      (my $dec_qty)            = ($form->{"qty_$i"} =~ /\.(\d+)/);
281
      $dec_qty                 = length $dec_qty;
289 282

  
290
      $form->{"qty_$i"} =
291
        $form->format_amount(\%myconfig, $form->{"qty_$i"}, $dec_qty);
283
      $form->{"qty_$i"}        = $form->format_amount(\%myconfig, $form->{"qty_$i"}, $dec_qty);
292 284

  
293
      $form->{rowcount} = $i;
285
      $form->{rowcount}        = $i;
294 286

  
295 287
    }
288

  
289
    # get pricegroups for parts
290
    IS->get_pricegroups_for_parts(\%myconfig, \%$form);
291
    set_pricegroup($_) for 1 .. $form->{rowcount};
296 292
  }
297 293
  $main::lxdebug->leave_sub();
298 294
}

Auch abrufbar als: Unified diff