Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 6ac037ce

Von Sven Schöling vor mehr als 15 Jahren hinzugefügt

  • ID 6ac037ceaeb565f385267b2f8794e28e7ce50af8
  • Vorgänger 3879426c
  • Nachfolger 11ddf508

Whitespace

Unterschiede anzeigen:

bin/mozilla/io.pl
5 5
# Web http://www.lx-office.org
6 6
#############################################################################
7 7
# Changelog: Wann - Wer - Was
8
# Veraendert 2005-01-05 - Marco Welter <mawe@linux-studio.de> - Neue Optik   			
9
# 08.11.2008 - information@richardson-bueren.de jb  - Backport von Revision 7339 xplace - E-Mail-Vorlage automatisch auswählen  
8
# Veraendert 2005-01-05 - Marco Welter <mawe@linux-studio.de> - Neue Optik
9
# 08.11.2008 - information@richardson-bueren.de jb  - Backport von Revision 7339 xplace - E-Mail-Vorlage automatisch auswählen
10 10
# 02.02.2009 - information@richardson-bueren.de jb - Backport von Revision 8535 xplace - Erweiterung der Waren bei Lieferantenauftrag um den Eintrag Mindestlagerbestand. Offen: Auswahlliste auf Lieferantenaufträge einschränken -> Erledigt 2.2.09 Prüfung wie das Skript heisst (oe.pl) -> das ist nur die halbe Miete, nochmal mb fragen -> mb gefragt und es gibt die variable is_purchase
11 11
#############################################################################
12 12
# SQL-Ledger, Accounting
......
149 149
    {  id => 'linetotal',     width => 10,    value => $locale->text('Extended'),             display => !$is_delivery_order, },
150 150
    {  id => 'bin',           width => 10,    value => $locale->text('Bin'),                  display => 0, },
151 151
    {  id => 'stock_in_out',  width => 10,    value => $stock_in_out_title,                   display => $is_delivery_order, },
152
  ); 
152
  );
153 153
  my @column_index = map { $_->{id} } grep { $_->{display} } @HEADER;
154 154

  
155 155
  # cache units
......
162 162
  $form->{invsubtotal} = 0;
163 163
  map { $form->{"${_}_base"} = 0 } (split(/ /, $form->{taxaccounts}));
164 164

  
165
  # about details 
165
  # about details
166 166
  $myconfig{show_form_details} = 1                            unless (defined($myconfig{show_form_details}));
167 167
  $form->{show_details}        = $myconfig{show_form_details} unless (defined($form->{show_details}));
168 168
  # /about details
......
302 302

  
303 303
    # second row
304 304
    my @ROW2 = ();
305
    push @ROW2, { value => qq|<b>$serialnumber</b> <input name="serialnumber_$i" size="15" value="$form->{"serialnumber_$i"}">| } 
305
    push @ROW2, { value => qq|<b>$serialnumber</b> <input name="serialnumber_$i" size="15" value="$form->{"serialnumber_$i"}">| }
306 306
      if $form->{type} !~ /_quotation/;
307 307
    push @ROW2, { value => qq|<b>$projectnumber</b> | . NTI($cgi->popup_menu('-name'  => "project_id_$i",        '-values'  => \@projectnumber_values,
308 308
                                                                             '-labels' => \%projectnumber_labels, '-default' => $form->{"project_id_$i"})) };
309 309
    push @ROW2, { value => qq|<b>$reqdate</b> <input name="reqdate_$i" size="11" onBlur="check_right_date_format(this)" value="$form->{"reqdate_$i"}">| }
310 310
      if ($form->{type} =~ /order/ ||  $form->{type} =~ /invoice/);
311
    push @ROW2, { value => sprintf qq|<b>%s</b>&nbsp;<input type="checkbox" name="subtotal_$i" value="1" %s>|, 
311
    push @ROW2, { value => sprintf qq|<b>%s</b>&nbsp;<input type="checkbox" name="subtotal_$i" value="1" %s>|,
312 312
                   $locale->text('Subtotal'), $form->{"subtotal_$i"} ? 'checked' : '' };
313 313

  
314 314
# begin marge calculations
......
351 351
    my @HIDDENS = map { value => $_}, (
352 352
          $cgi->hidden("-name" => "unit_old_$i", "-value" => $form->{"selected_unit_$i"}),
353 353
          $cgi->hidden("-name" => "price_new_$i", "-value" => $form->format_amount(\%myconfig, $form->{"price_new_$i"})),
354
          map { ($cgi->hidden("-name" => $_, "-value" => $form->{$_})); } map { $_."_$i" } 
354
          map { ($cgi->hidden("-name" => $_, "-value" => $form->{$_})); } map { $_."_$i" }
355 355
            (qw(orderitems_id bo pricegroup_old price_old id inventory_accno bin partsgroup partnotes
356 356
                income_accno expense_accno listprice assembly taxaccounts ordnumber transdate cusordnumber
357 357
                longdescription basefactor marge_absolut marge_percent marge_price_factor lastcost), @hidden_vars)
......
388 388
    next unless $form->{PRICES}{$j};
389 389
    # build drop down list for pricegroups
390 390
    my $option_tmpl = qq|<option value="%s--%s" %s>%s</option>|;
391
    $form->{"prices_$j"}  = join '', map { sprintf $option_tmpl, @$_{qw(price pricegroup_id selected pricegroup)} } 
391
    $form->{"prices_$j"}  = join '', map { sprintf $option_tmpl, @$_{qw(price pricegroup_id selected pricegroup)} }
392 392
                                         (+{ pricegroup => $locale->text("none (pricegroup)") }, @{ $form->{PRICES}{$j} });
393 393

  
394 394
    foreach $item (@{ $form->{PRICES}{$j} }) {
......
416 416
    qq|<th class="listheading">| . $locale->text('Part Description') . qq|</th>|;
417 417
  $column_data{sellprice} =
418 418
    qq|<th class="listheading">| . $locale->text('Price') . qq|</th>|;
419
    if ($is_purchase){ 
419
    if ($is_purchase){
420 420
      $column_data{rop} =
421 421
      qq|<th class="listheading">| . $locale->text('ROP') . qq|</th>|;
422 422
    }# ende if $is_purchase -> Überschrift Mindestlagerbestand - ähnliche Prüfung weiter unten
......
482 482
      qq|<td align="right"><input name="new_onhand_$i" type="hidden" value="$ref->{onhand}">|
483 483
      . $form->format_amount(\%myconfig, $ref->{onhand}, '', "&nbsp;")
484 484
      . qq|</td>|;
485
    if ($is_purchase){ 
485
    if ($is_purchase){
486 486
    $column_data{rop} =
487 487
      qq|<td align="right"><input name="new_rop$i" type="hidden" value="$ref->{rop}">|
488 488
      . $form->format_amount(\%myconfig, $ref->{rop}, '', "&nbsp;")
......
600 600

  
601 601
  $form->{sellprice} += ($form->{"sellprice_$i"} * $form->{"qty_$i"});
602 602
  $form->{weight}    += ($form->{"weight_$i"} * $form->{"qty_$i"});
603
  
603

  
604 604
  if ($form->{"not_discountable_$i"}) {
605 605
    $form->{"discount_$i"} = 0;
606 606
  }
......
1022 1022
# generate the printing options displayed at the bottom of oe and is forms.
1023 1023
# this function will attempt to guess what type of form is displayed, and will generate according options
1024 1024
#
1025
# about the coding: 
1025
# about the coding:
1026 1026
# this version builds the arrays of options pretty directly. if you have trouble understanding how,
1027 1027
# the opthash function builds hashrefs which are then pieced together for the template arrays.
1028
# unneeded options are "undef"ed out, and then grepped out. 
1028
# unneeded options are "undef"ed out, and then grepped out.
1029 1029
#
1030 1030
# the inline options is untested, but intended to be used later in metatemplating
1031 1031
sub print_options {
......
1055 1055
  push @FORMNAME, grep $_,
1056 1056
    ($form->{type} eq 'purchase_order') ? (
1057 1057
      opthash("purchase_order",      $form->{PD}{purchase_order},      $locale->text('Purchase Order')),
1058
      opthash("bin_list",            $form->{PD}{bin_list},            $locale->text('Bin List')) 
1058
      opthash("bin_list",            $form->{PD}{bin_list},            $locale->text('Bin List'))
1059 1059
    ) : undef,
1060 1060
    ($form->{type} eq 'credit_note') ?
1061 1061
      opthash("credit_note",         $form->{PD}{credit_note},         $locale->text('Credit Note')) : undef,
......
1073 1073
    ) : undef,
1074 1074
    ($form->{type} eq 'invoice' && $form->{storno}) ? (
1075 1075
      opthash("storno_invoice",      $form->{PD}{storno_invoice},      $locale->text('Storno Invoice')),
1076
      opthash("storno_packing_list", $form->{PD}{storno_packing_list}, $locale->text('Storno Packing List')) 
1076
      opthash("storno_packing_list", $form->{PD}{storno_packing_list}, $locale->text('Storno Packing List'))
1077 1077
    ) : undef,
1078 1078
    ($form->{type} =~ /_delivery_order$/) ? (
1079 1079
      opthash($form->{type},         $form->{PD}{$form->{type}},       $locale->text('Delivery Order')),
......
1082 1082
    ($form->{type} eq 'credit_note') ?
1083 1083
      opthash("credit_note",         $form->{PD}{credit_note},         $locale->text('Credit Note')) : undef;
1084 1084

  
1085
  push @SENDMODE, 
1085
  push @SENDMODE,
1086 1086
    opthash("attachment",            $form->{SM}{attachment},          $locale->text('Attachment')),
1087 1087
    opthash("inline",                $form->{SM}{inline},              $locale->text('In-line'))
1088 1088
      if ($form->{media} eq 'email');
......
1108 1108
    ($opendocument_templates && !$options{no_opendocument}) ?
1109 1109
      opthash("opendocument",        $form->{DF}{opendocument},        $locale->text("OpenDocument/OASIS")) : undef;
1110 1110

  
1111
  push @LANGUAGE_ID, 
1111
  push @LANGUAGE_ID,
1112 1112
    map { opthash($_->{id}, ($_->{id} eq $form->{language_id} ? 'selected' : ''), $_->{description}) } +{}, @{ $form->{languages} }
1113 1113
      if (ref $form->{languages} eq 'ARRAY');
1114 1114

  
1115
  push @PRINTER_ID, 
1115
  push @PRINTER_ID,
1116 1116
    map { opthash($_->{id}, ($_->{id} eq $form->{printer_id} ? 'selected' : ''), $_->{printer_description}) } +{}, @{ $form->{printers} }
1117 1117
      if ((ref $form->{printers} eq 'ARRAY') && scalar @{ $form->{printers } });
1118 1118

  
......
1241 1241
    $form->{invdate} = $form->{"${inv}date"} = $form->{transdate};
1242 1242
    $form->{label} = $locale->text('Packing List');
1243 1243
    $order = 1;
1244
    # set invnumber for template packing_list 
1244
    # set invnumber for template packing_list
1245 1245
    $form->{invnumber}   = $form->{ordnumber};
1246 1246
  }
1247 1247
  if ($form->{formname} eq 'purchase_order') {
......
1298 1298
  $form->isblank("email", $locale->text('E-mail address missing!'))
1299 1299
    if ($form->{media} eq 'email');
1300 1300
  $form->isblank("${inv}date",
1301
           $locale->text($form->{label}) 
1301
           $locale->text($form->{label})
1302 1302
           . ": "
1303 1303
           . $locale->text(' Date missing!'));
1304 1304

  
......
1328 1328
      call_sub($display_form);
1329 1329
      # saving the history
1330 1330
  	  if(!exists $form->{addition}) {
1331
        $form->{snumbers} = qq|ordnumber_| . $form->{ordnumber}; 
1331
        $form->{snumbers} = qq|ordnumber_| . $form->{ordnumber};
1332 1332
  	    $form->{addition} = "PRINTED";
1333 1333
  	    $form->save_history($form->dbconnect(\%myconfig));
1334 1334
      }
......
1614 1614
  }
1615 1615
  if ($form->{printing}) {
1616 1616
   call_sub($display_form);
1617
   exit; 
1617
   exit;
1618 1618
  }
1619 1619

  
1620 1620
  $lxdebug->leave_sub();

Auch abrufbar als: Unified diff