Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 195883fd

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

  • ID 195883fdfd3b10f329036767f027baa6e7c402b9
  • Vorgänger c103dedd
  • Nachfolger 054ec89e

Preisgruppenerweiterung auf Basis von Andres Patch - Thanks
Preisgruppenverwaltung
-Preiseingabe der Preisgruppen in Masken Waren,etc.
-Auswahl der Preisgruppen in den Verkaufsmasken
...

Erweiterung Datenbankschema

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

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

  
220 227
sub form_header {
221 228
  $lxdebug->enter_sub();
222

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

  
515 523
sub form_footer {
516 524
  $lxdebug->enter_sub();
517

  
525
print STDERR "is.pl-form_footer\n";
518 526
  $form->{invtotal} = $form->{invsubtotal};
519 527

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

  
853 861
sub update {
854 862
  $lxdebug->enter_sub();
855

  
863
print STDERR "is.pl-update\n";
856 864
  map { $form->{$_} = $form->parse_amount(\%myconfig, $form->{$_}) }
857 865
    qw(exchangerate creditlimit creditremaining);
858 866

  
......
916 924
      } else {
917 925

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

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

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

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

  
978 991
      &display_form;
......
1003 1016

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

  
1019
print STDERR "is.pl-post\n";
1007 1020
  $form->isblank("invdate",  $locale->text('Invoice Date missing!'));
1008 1021
  $form->isblank("customer", $locale->text('Customer missing!'));
1009 1022

  

Auch abrufbar als: Unified diff