Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision a8d9f325

Von Philip Reetz vor etwa 19 Jahren hinzugefügt

  • ID a8d9f325b9a5d7b7336b8c6f16f12080a5bdba39
  • Vorgänger a8dd913f
  • Nachfolger 9a7318d4

Fehler bei Drucken und Buchen und Preisgruppen behoben, Preisgruppen Quelltext ein wenig modifiziert

Unterschiede anzeigen:

bin/mozilla/io.pl
416 416
# build html-code for pricegroups in variable $form->{prices_$j}
417 417

  
418 418
sub set_pricegroup {
419
  my $rowcount = shift;
419 420
  $lxdebug->enter_sub();
420
print STDERR "io.pl-set_pricegroup-i-$i\n";
421
  for $j (1 .. $i) {
421
  for $j (1 .. $rowcount) {
422 422

  
423 423
    my $pricegroup_old = $form->{"pricegroup_old_$i"};
424 424
    if ($form->{PRICES}{ $j }) {
......
426 426
      $prices = '';
427 427
      $price = 0;
428 428
      foreach $item (@{ $form->{PRICES}{ $j } }) {
429
print STDERR "TEST--i--$i--jjj-$j\n";
430 429
# print STDERR "-VOR   PREIS--$item->{price}--PREISGRUOP-$item->{pricegroup_id}\n";
431 430
        $price         = $form->round_amount($myconfig, $item->{price},5);
432 431
        $price         = $form->format_amount($myconfig, $item->{price},2);
......
452 451
      }
453 452
    }
454 453
  }
455
  print (STDERR "", Dumper($form->{PRICES}));
456 454
  $lxdebug->leave_sub();
457 455
}
458 456

  
......
748 746

  
749 747
sub display_form {
750 748
  $lxdebug->enter_sub();
751
print STDERR "io.pl-display_form\n";
749

  
752 750
  # if we have a display_form
753 751
  if ($form->{display_form}) {
754 752
    &{"$form->{display_form}"};
755
print STDERR "        --------------------- exit\n";
756 753
    exit;
757 754
  }
758 755
  if (   $form->{print_and_post}
......
777 774
    $form->{second_run} = 1;
778 775
    $form->{action}     = "display_form";
779 776
    $form->{rowcount}--;
777
    my $rowcount =  $form->{rowcount};
778
    # get pricegroups for parts
779
    IS->get_pricegroups_for_parts(\%myconfig, \%$form, "new");
780
    # build up html code for prices_$i
781
    set_pricegroup($rowcount);
782
  
780 783

  
781 784
    $form->{resubmit} = 1;
782 785

  
......
787 790
  $subroutine = "display_row";
788 791

  
789 792
  if ($form->{item} eq 'part') {
790
print STDERR "  part\n";
791 793
    #set preisgruppenanzahl
792 794
    $numrows    = $form->{price_rows};
793 795
    $subroutine = "price_row";
......
798 800
    $subroutine = "makemodel_row";
799 801
  }
800 802
  if ($form->{item} eq 'assembly') {
801
print STDERR "  assembly\n";
802 803
    $numrows    = ++$form->{price_rows};
803 804
    $subroutine = "price_row";
804 805

  
......
814 815
    $subroutine = "assembly_row";
815 816
  }
816 817
  if ($form->{item} eq 'service') {
817
print STDERR "  service\n";
818 818
    $numrows    = ++$form->{price_rows};
819 819
    $subroutine = "price_row";
820 820

  
......
828 828

  
829 829
  &form_footer;
830 830

  
831
  #   if ($form->{print_and_post}) {
832
  #     &display_form;
833
  #   }
834

  
835 831
  $lxdebug->leave_sub();
836 832
}
837 833

  
......
942 938
  }
943 939
  
944 940
  #sk 
945
print STDERR "LEVEL--$form->{level}\n";
946
print STDERR "Type--$form->{type}\n";
947 941
  # if pricegroups
948 942
  if ($form->{type} =~ (/sales_quotation/) or (($form->{level} =~ /Sales/) and ($form->{type} =~ /invoice/)) or (($form->{level} eq undef) and ($form->{type} =~ /invoice/)) or ($form->{type} =~ /sales_order/)) {
949 943
  
......
1017 1011

  
1018 1012
sub order {
1019 1013
  $lxdebug->enter_sub();
1020

  
1014
  if ($form->{second_run}) {
1015
    $form->{print_and_post} = 0;
1016
  }
1021 1017
  $form->{ordnumber} = $form->{invnumber};
1022 1018

  
1023 1019
  map { delete $form->{$_} } qw(id printed emailed queued);
......
1070 1066

  
1071 1067
sub quotation {
1072 1068
  $lxdebug->enter_sub();
1073

  
1069
  if ($form->{second_run}) {
1070
    $form->{print_and_post} = 0;
1071
  }
1074 1072
  map { delete $form->{$_} } qw(id printed emailed queued);
1075 1073

  
1076 1074
  if ($form->{script} eq 'ir.pl' || $form->{type} eq 'purchase_order') {
......
1122 1120

  
1123 1121
sub e_mail {
1124 1122
  $lxdebug->enter_sub();
1125

  
1123
  if ($form->{second_run}) {
1124
    $form->{print_and_post} = 0;
1125
    $form->{resubmit} = 0;
1126
  }
1126 1127
  if ($myconfig{role} eq 'admin') {
1127 1128
    $bcc = qq|
1128 1129
 	  <th align=right nowrap=true>| . $locale->text('Bcc') . qq|</th>
......
1391 1392

  
1392 1393
sub print {
1393 1394
  $lxdebug->enter_sub();
1394
print STDERR "io.pl-print\n";
1395
  if ($form->{second_run}) {
1396
    $form->{print_and_post} = 0;
1397
  }
1395 1398
  # if this goes to the printer pass through
1396 1399
  if ($form->{media} eq 'printer' || $form->{media} eq 'queue') {
1397 1400
    $form->error($locale->text('Select postscript or PDF!'))
......
1409 1412
sub print_form {
1410 1413
  $lxdebug->enter_sub();
1411 1414
  my ($old_form) = @_;
1412
print STDERR "io.pl-print_form\n";
1415

  
1413 1416
  $inv = "inv";
1414 1417
  $due = "due";
1415
#print (STDERR "", Dumper($form));
1416 1418
  $numberfld = "invnumber";
1417 1419

  
1418 1420
  $display_form =
......
1735 1737

  
1736 1738
sub ship_to {
1737 1739
  $lxdebug->enter_sub();
1738
print STDERR "io.pl-ship_to\n";
1740
  if ($form->{second_run}) {
1741
    $form->{print_and_post} = 0;
1742
  }
1743

  
1739 1744
  $title = $form->{title};
1740 1745
  $form->{title} = $locale->text('Ship to');
1741 1746

  
bin/mozilla/is.pl
216 216
        qw(partnumber description unit partnotes);
217 217
      $form->{rowcount} = $i;
218 218

  
219
#      # build up html code for prices_$i
220
# print STDERR "set_pricegroup aus is.pl-prepare_invoice\n";
221
#      set_pricegroup();
222 219
    }
223 220
  }
224 221
  $lxdebug->leave_sub();
......
860 857

  
861 858
sub update {
862 859
  $lxdebug->enter_sub();
863
print STDERR "is.pl-update\n";
860

  
864 861
  map { $form->{$_} = $form->parse_amount(\%myconfig, $form->{$_}) }
865 862
    qw(exchangerate creditlimit creditremaining);
866

  
863
  if ($form->{second_run}) {
864
    $form->{print_and_post} = 0;
865
  }
867 866
  &check_name(customer);
868 867

  
869 868
  &check_project;
......
985 984
        IS->get_pricegroups_for_parts(\%myconfig, \%$form, "new");
986 985

  
987 986
        # build up html code for prices_$i
988
        set_pricegroup();
987
        &set_pricegroup($i);
989 988
      }
990 989

  
991 990
      &display_form;
......
1016 1015

  
1017 1016
sub post {
1018 1017
  $lxdebug->enter_sub();
1019
print STDERR "is.pl-post\n";
1020 1018
  $form->isblank("invdate",  $locale->text('Invoice Date missing!'));
1021 1019
  $form->isblank("customer", $locale->text('Customer missing!'));
1022 1020

  
......
1025 1023
    &update;
1026 1024
    exit;
1027 1025
  }
1026
  if ($form->{second_run}) {
1027
    $form->{print_and_post} = 0;
1028
  }
1028 1029

  
1029 1030
  &validate_items;
1030 1031

  
......
1085 1086
  $print_post             = 1;
1086 1087
  $form->{print_and_post} = 1;
1087 1088
  &post();
1089

  
1088 1090
  &display_form();
1089 1091
  $lxdebug->leave_sub();
1090 1092

  
......
1105 1107

  
1106 1108
sub delete {
1107 1109
  $lxdebug->enter_sub();
1108

  
1110
  if ($form->{second_run}) {
1111
    $form->{print_and_post} = 0;
1112
  }
1109 1113
  $form->header;
1110 1114

  
1111 1115
  print qq|
bin/mozilla/oe.pl
961 961
        IS->get_pricegroups_for_parts(\%myconfig, \%$form);
962 962

  
963 963
        # build up html code for prices_$i
964
        set_pricegroup();
964
        &set_pricegroup($i);
965 965
      }
966 966

  
967 967
      &display_form;

Auch abrufbar als: Unified diff