Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision ab1df08b

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

  • ID ab1df08bfae3ef3361c7b5e4e16d91ae3cb34961
  • Vorgänger 35182445
  • Nachfolger 518ed6b5

ct->get_delivery auf template umgestellt

Unterschiede anzeigen:

bin/mozilla/ct.pl
542 542

  
543 543
  CT->get_delivery(\%myconfig, \%$form );
544 544

  
545
  @column_index =
546
    $form->sort_columns(shiptoname,
547
                        invnumber,
548
                        ordnumber,
549
                        transdate,
550
                        description,
551
                        qty,
552
                        unit,
553
                        sellprice);
554

  
555

  
556

  
557
  $column_header{shiptoname} =
558
    qq|<th class=listheading>| . $locale->text('Shipping Address') . qq|</th>|;
559
  $column_header{invnumber} =
560
      qq|<th class=listheading>|. $locale->text('Invoice'). qq|</th>|;
561
  $column_header{ordnumber} =
562
      qq|<th class=listheading>|. $locale->text('Order'). qq|</th>|;
563
  $column_header{transdate} =
564
    qq|<th class=listheading>| . $locale->text('Invdate') . qq|</th>|;
565
  $column_header{description} =
566
    qq|<th class=listheading>| . $locale->text('Description') . qq|</th>|;
567
  $column_header{qty} =
568
    qq|<th class=listheading>| . $locale->text('Qty') . qq|</th>|;
569
  $column_header{unit} =
570
    qq|<th class=listheading>| . $locale->text('Unit') . qq|</th>|;
571
  $column_header{sellprice} =
572
    qq|<th class=listheading>| . $locale->text('Sell Price') . qq|</th>|;
573
  $result .= qq|
574

  
575
<table width=100%>
576
  <tr>
577
    <td>
578
      <table width=100%>
579
	<tr class=listheading>
580
|;
581

  
582
  map { $result .= "$column_header{$_}\n" } @column_index;
583

  
584
  $result .= qq|
585
        </tr>
586
|;
587

  
588

  
589
  foreach $ref (@{ $form->{DELIVERY} }) {
590

  
591
    if ($ref->{shiptoname} eq $sameshiptoname) {
592
      map { $column_data{$_} = "<td>$ref->{$_}&nbsp;</td>" } @column_index;
593
      $column_data{shiptoname} = "<td>&nbsp;</td>";
594
    } else {
595
      map { $column_data{$_} = "<td>$ref->{$_}&nbsp;</td>" } @column_index;
596
    }
597
    $column_data{sellprice} = "<td>". $form->format_amount(\%myconfig,$ref->{sellprice},2)."&nbsp;</td>";
598
    $i++;
599
    $i %= 2;
600
    $result .= "
601
        <tr class=listrow$i>
602
";
603

  
604
    map { $result .= "$column_data{$_}\n" } @column_index;
605

  
606
    $result .= qq|
607
        </tr>
608
|;
609

  
610
    $sameshiptoname = $ref->{shiptoname};
611

  
612
  }
613

  
614
  $result .= qq|
615
      </table>
616
|;
617

  
618

  
619
  my $q = new CGI;
620
  print $q->header();
621
  print $result;
545
  print CGI->new->header();
546
  print $form->parse_html_template('ct/get_delivery');
622 547
  $lxdebug->leave_sub();
623

  
624 548
}
625 549

  
626 550
sub continue { call_sub($form->{nextsub}); }

Auch abrufbar als: Unified diff