Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 07d71c33

Von Stephan Köhler vor fast 19 Jahren hinzugefügt

  • ID 07d71c33315605fcfc450d3b9abf0fd10e92bed5
  • Vorgänger becc49b1
  • Nachfolger ee583bd5

Merge von 599-602,605,614,615 aus unstable: Preisgruppen Teil 1
--Preisgruppenerweiterung auf Basis von Andres Patch - Thanks
-Preisgruppenverwaltung
-Preiseingabe der Preisgruppen in Masken Waren,etc.
-Auswahl der Preisgruppen in den Verkaufsmasken
-Erweiterung Datenbankschema
-Übersetzungen für Preisgruppen
-Bugfix Preisgruppen, in der Warenmaske zeigte er eine Preisgruppe a
"Gruppe 1" als "Gruppe" an
-Anpassung locale
--Fehler bei negativen Umsaetzen behoben
--Fehler beim Speichern von Rechnungen und Angeboten/Auftraegen wenn keine Preisgruppen vorhanden
--Fehler bei Drucken und Buchen und Preisgruppen behoben, Preisgruppen Quelltext ein wenig modifiziert

Unterschiede anzeigen:

bin/mozilla/is.pl
33 33

  
34 34
use SL::IS;
35 35
use SL::PE;
36
use Data::Dumper;
36 37

  
37 38
require "$form->{path}/io.pl";
38 39
require "$form->{path}/arap.pl";
......
66 67

  
67 68
sub edit {
68 69
  $lxdebug->enter_sub();
69

  
70
print STDERR "is.pl-edit\n";
70 71
  $form->{title} = $locale->text('Edit Sales Invoice');
71 72

  
72 73
  if ($myconfig{acs} =~ "AR--Add Sales Invoice" || $myconfig{acs} =~ "AR--AR")
......
83 84

  
84 85
sub invoice_links {
85 86
  $lxdebug->enter_sub();
86

  
87
print STDERR "is.pl-invoice_links\n";
87 88
  $form->{vc} = 'customer';
88 89

  
89 90
  # create links
......
183 184

  
184 185
sub prepare_invoice {
185 186
  $lxdebug->enter_sub();
186

  
187
print STDERR "is.pl-prepare_invoice\n";
187 188
  $form->{type}     = "invoice";
188 189
  $form->{formname} = "invoice";
189 190
  $form->{format}   = "html";
......
194 195
    map { $form->{$_} =~ s/\"/"/g }
195 196
      qw(invnumber ordnumber quonumber shippingpoint shipvia notes intnotes);
196 197

  
198
#     # get pricegroups for parts
199
#     IS->get_pricegroups_for_parts(\%myconfig, \%$form);
200

  
197 201
    foreach $ref (@{ $form->{invoice_details} }) {
198 202
      $i++;
199 203
      map { $form->{"${_}_$i"} = $ref->{$_} } keys %{$ref};
200 204
      $form->{"discount_$i"} =
201 205
        $form->format_amount(\%myconfig, $form->{"discount_$i"} * 100);
202

  
203 206
      ($dec) = ($form->{"sellprice_$i"} =~ /\.(\d+)/);
204 207
      $dec           = length $dec;
205 208
      $decimalplaces = ($dec > 2) ? $dec : 2;
......
212 215
      map { $form->{"${_}_$i"} =~ s/\"/"/g }
213 216
        qw(partnumber description unit partnotes);
214 217
      $form->{rowcount} = $i;
218

  
215 219
    }
216 220
  }
217 221
  $lxdebug->leave_sub();
......
219 223

  
220 224
sub form_header {
221 225
  $lxdebug->enter_sub();
222

  
226
print STDERR "is.pl-form_header\n";
223 227
  # set option selected
224 228
  foreach $item (qw(AR customer currency department employee contact)) {
225 229
    $form->{"select$item"} =~ s/ selected//;
......
389 393
	      <tr>
390 394
		<th align=right nowrap>| . $locale->text('Customer') . qq|</th>
391 395
		<td colspan=3>$customer</td>
396
    <input type=hidden name=customer_klass value=$form->{customer_klass}>
392 397
		<input type=hidden name=customer_id value=$form->{customer_id}>
393 398
		<input type=hidden name=oldcustomer value="$form->{oldcustomer}">
394 399
                <th align=richt nowrap>|
......
514 519

  
515 520
sub form_footer {
516 521
  $lxdebug->enter_sub();
517

  
522
print STDERR "is.pl-form_footer\n";
518 523
  $form->{invtotal} = $form->{invsubtotal};
519 524

  
520 525
  if (($rows = $form->numtextrows($form->{notes}, 26, 8)) < 2) {
......
855 860

  
856 861
  map { $form->{$_} = $form->parse_amount(\%myconfig, $form->{$_}) }
857 862
    qw(exchangerate creditlimit creditremaining);
858

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

  
861 868
  &check_project;
......
916 923
      } else {
917 924

  
918 925
        $sellprice = $form->format_amount(\%myconfig, $form->{"sellprice_$i"});
919

  
926
#print STDERR " SELLPRICE-111- $sellprice\n";
920 927
        map { $form->{item_list}[$i]{$_} =~ s/\"/&quot;/g }
921 928
          qw(partnumber description unit);
922 929
        map { $form->{"${_}_$i"} = $form->{item_list}[0]{$_} }
......
973 980
          }
974 981
        }
975 982

  
983
        # get pricegroups for parts
984
        IS->get_pricegroups_for_parts(\%myconfig, \%$form, "new");
985

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

  
978 990
      &display_form;
......
1003 1015

  
1004 1016
sub post {
1005 1017
  $lxdebug->enter_sub();
1006

  
1007 1018
  $form->isblank("invdate",  $locale->text('Invoice Date missing!'));
1008 1019
  $form->isblank("customer", $locale->text('Customer missing!'));
1009 1020

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

  
1016 1030
  &validate_items;
1017 1031

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

  
1075 1090
  &display_form();
1076 1091
  $lxdebug->leave_sub();
1077 1092

  
......
1092 1107

  
1093 1108
sub delete {
1094 1109
  $lxdebug->enter_sub();
1095

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

  
1098 1115
  print qq|

Auch abrufbar als: Unified diff