Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 9035c755

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

  • ID 9035c75520b38a06de076b53689f82c228b3d22c
  • Vorgänger 2e798373
  • Nachfolger 3ef788be

invoice_io strict

Unterschiede anzeigen:

bin/mozilla/invoice_io.pl
43 43

  
44 44
require "bin/mozilla/common.pl";
45 45

  
46
use strict;
47

  
46 48
# any custom scripts for this one
47 49
if (-f "bin/mozilla/custom_invoice_io.pl") {
48 50
  eval { require "bin/mozilla/custom_ivvoice_io.pl"; };
49 51
}
50
if (-f "bin/mozilla/$form->{login}_invoice_io.pl") {
51
  eval { require "bin/mozilla/$form->{login}_invoice_io.pl"; };
52
if (-f "bin/mozilla/$main::form->{login}_invoice_io.pl") {
53
  eval { require "bin/mozilla/$main::form->{login}_invoice_io.pl"; };
52 54
}
53 55

  
54 56
1;
......
91 93
# neue Optik im Rechnungsformular      #
92 94
########################################
93 95
#sub display_row {
94
#  $lxdebug->enter_sub();
96
#  $main::lxdebug->enter_sub();
95 97
#  my $numrows = shift;
96 98
#
97 99
#  my $is_sales =
......
400 402
#        # for last row
401 403
#        $column_data{sellprice_pg} = qq|<td align="right">&nbsp;</td>|;
402 404
#        }
403
#        
405
#
404 406
#      $column_data{sellprice} =
405 407
#      qq|<td><input name="sellprice_$i" size="10" onBlur=\"check_right_number_format(this)\" value="|
406 408
#        . $form->format_amount(\%myconfig, $form->{"sellprice_$i"},
......
546 548
#    $form->{marge_percent} = ($form->{sellprice_total} - $form->{lastcost_total}) / $form->{sellprice_total} * 100;
547 549
#  }
548 550
#
549
#  $lxdebug->leave_sub();
551
#  $main::lxdebug->leave_sub();
550 552
#}
551 553

  
552 554
sub set_pricegroup {
553
  $lxdebug->enter_sub();
555
  $main::lxdebug->enter_sub();
556

  
557
  my $form     = $main::form;
558
  my %myconfig = %main::myconfig;
559
  my $locale   = $main::locale;
560

  
554 561
  my $rowcount = shift;
555
  for $j (1 .. $rowcount) {
556
    my $pricegroup_old = $form->{"pricegroup_old_$i"};
562
  for my $j (1 .. $rowcount) {
563
    my $pricegroup_old = $form->{"pricegroup_old_$j"};
557 564
    if ($form->{PRICES}{$j}) {
558
      $len    = 0;
559
      $prices = '<option value="--">' . $locale->text("none (pricegroup)") . '</option>';
560
      $price  = 0;
561
      foreach $item (@{ $form->{PRICES}{$j} }) {
565
      my $len    = 0;
566
      my $prices = '<option value="--">' . $locale->text("none (pricegroup)") . '</option>';
567
      my $price  = 0;
568
      foreach my $item (@{ $form->{PRICES}{$j} }) {
562 569

  
563 570
        #$price = $form->round_amount($myconfig,  $item->{price}, 5);
564 571
        #$price = $form->format_amount($myconfig, $item->{price}, 2);
565
        $price         = $item->{price};
566
        $pricegroup_id = $item->{pricegroup_id};
567
        $pricegroup    = $item->{pricegroup};
572
        my $price         = $item->{price};
573
        my $pricegroup_id = $item->{pricegroup_id};
574
        my $pricegroup    = $item->{pricegroup};
568 575

  
569 576
        # build drop down list for pricegroups
570 577
        $prices .=
......
590 597
      $form->{"prices_$j"} = $prices;
591 598
    }
592 599
  }
593
  $lxdebug->leave_sub();
600
  $main::lxdebug->leave_sub();
594 601
}
595 602

  
596 603
sub display_form {
597
  $lxdebug->enter_sub();
604
  $main::lxdebug->enter_sub();
605

  
606
  my $form     = $main::form;
607
  my %myconfig = %main::myconfig;
598 608

  
599
  $auth->assert('part_service_assembly_edit   | vendor_invoice_edit       | sales_order_edit    | invoice_edit |' .
609
  $main::auth->assert('part_service_assembly_edit   | vendor_invoice_edit       | sales_order_edit    | invoice_edit |' .
600 610
                'request_quotation_edit       | sales_quotation_edit      | purchase_order_edit | '.
601 611
                'purchase_delivery_order_edit | sales_delivery_order_edit');
602 612

  
......
614 624
    exit;
615 625
  }
616 626

  
617
  Common::webdav_folder($form) if ($webdav);
627
  Common::webdav_folder($form) if ($main::webdav);
618 628

  
619 629
  #   if (   $form->{print_and_post}
620 630
  #       && $form->{second_run}
......
651 661
  #   }
652 662
  &form_header;
653 663

  
654
  $numrows    = ++$form->{rowcount};
655
  $subroutine = "display_row";
664
  my $numrows    = ++$form->{rowcount};
665
  my $subroutine = "display_row";
656 666

  
657 667
  if ($form->{item} eq 'part') {
658 668

  
......
694 704

  
695 705
  &form_footer;
696 706

  
697
  $lxdebug->leave_sub();
707
  $main::lxdebug->leave_sub();
698 708
}

Auch abrufbar als: Unified diff