Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision de6cead5

Von Sven Schöling vor etwa 15 Jahren hinzugefügt

  • ID de6cead5597b9a1f7491f7b73a13f824589364b5
  • Vorgänger cb0dfa9a
  • Nachfolger 0c095a8e

is form_footer: weitere exportierte variablen

Unterschiede anzeigen:

bin/mozilla/is.pl
385 385
  my $form     = $main::form;
386 386
  my %myconfig = %main::myconfig;
387 387
  my $locale   = $main::locale;
388
  my $cgi      = $main::cgi;
389 388

  
390 389
  $main::auth->assert('invoice_edit');
391 390

  
392
  $form->{invtotal} = $form->{invsubtotal};
391
  $form->{invtotal}    = $form->{invsubtotal};
392
  $form->{oldinvtotal} = $form->{invtotal};
393

  
394
  # note rows
395
  $form->{rows} = max 2,
396
    $form->numtextrows($form->{notes},    26, 8),
397
    $form->numtextrows($form->{intnotes}, 35, 8);
393 398

  
394
  my ($rows, $introws);
395
  if (($rows    = $form->numtextrows($form->{notes}, 26, 8)) < 2)    { $rows    = 2; }
396
  if (($introws = $form->numtextrows($form->{intnotes}, 35, 8)) < 2) { $introws = 2; }
397
  $form->{rows} = ($rows > $introws) ? $rows : $introws;
398 399

  
400
  # tax, total and subtotal calculations
399 401
  my ($tax, $subtotal);
400 402
  $form->{taxaccounts_array} = [ split / /, $form->{taxaccounts} ];
401 403

  
......
412 414
    }
413 415
  }
414 416

  
415
  $form->{oldinvtotal} = $form->{invtotal};
416

  
417 417
  # unfortunately locales doesn't support extended syntax
418 418
  if ($form->{id}) {
419 419
    my $follow_ups = FU->follow_ups('trans_id' => $form->{id});
......
424 424
    }
425 425
  }
426 426

  
427

  
428
# payments
427
  # payments
429 428
  my $totalpaid = 0;
430

  
431 429
  $form->{paidaccounts}++ if ($form->{"paid_$form->{paidaccounts}"});
432 430
  $form->{paid_indices} = [ 1 .. $form->{paidaccounts} ];
433 431

  
434 432
  for my $i (1 .. $form->{paidaccounts}) {
435 433
    $form->{"selectAR_paid_$i"} = $form->{selectAR_paid};
436 434
    $form->{"selectAR_paid_$i"} =~ s/option>\Q$form->{"AR_paid_$i"}\E/option selected>$form->{"AR_paid_$i"}/;
437

  
438
    # format amounts
439 435
    $totalpaid += $form->{"paid_$i"};
440 436
  }
441 437

  
442
  $form->{print_options} = print_options(inline => 1);
443

  
444
  print $form->parse_html_template('is/form_footer');
445
# print $form->parse_html_template('is/_payments'); # parser
438
  print $form->parse_html_template('is/form_footer', {
439
    is_type_credit_note => ($form->{type} eq "credit_note"),
440
    totalpaid           => $totalpaid,
441
    paid_missing        => $form->{invtotal} - $totalpaid,
442
    print_options       => print_options(inline => 1),
443
    show_storno         => $form->{id} && !$form->{storno} && !IS->has_storno(\%myconfig, $form, "ar") && !$totalpaid,
444
    show_delete         => ($form->current_date(\%myconfig) eq $form->{gldate}),
445
  });
446
##print $form->parse_html_template('is/_payments'); # parser
446 447

  
447 448

  
448 449

  
templates/webpages/is/_payments_de.html
3 3
   <td>
4 4
    <table width="100%">
5 5
     <tr class="listheading">
6
[% IF is_credit_note %]
6
[% IF is_type_credit_note %]
7 7
      <th colspan="6" class="listheading">Zahlungsausg?nge</th>
8 8
[% ELSE %]
9 9
      <th colspan="6" class="listheading">Zahlungseing?nge</th>
templates/webpages/is/_payments_master.html
3 3
   <td>
4 4
    <table width="100%">
5 5
     <tr class="listheading">
6
[% IF is_credit_note %]
6
[% IF is_type_credit_note %]
7 7
      <th colspan="6" class="listheading"><translate>Payments</translate></th>
8 8
[% ELSE %]
9 9
      <th colspan="6" class="listheading"><translate>Incoming Payments</translate></th>
templates/webpages/is/form_footer_de.html
148 148
    <input class="submit" type="submit" name="action" value="Zahlung buchen">
149 149
    <input class="submit" type="submit" name="action" value="Als Vorlage verwenden">
150 150

  
151
[% IF id && is_credit_note %]
151
[% IF id && is_type_credit_note %]
152 152
    <input class="submit" type="submit" name="action" value="Gutschrift">
153 153
[% END %]
154 154
[% IF show_delete %]
templates/webpages/is/form_footer_master.html
148 148
    <input class="submit" type="submit" name="action" value="<translate>Post Payment</translate>">
149 149
    <input class="submit" type="submit" name="action" value="<translate>Use As Template</translate>">
150 150

  
151
[% IF id && is_credit_note %]
151
[% IF id && is_type_credit_note %]
152 152
    <input class="submit" type="submit" name="action" value="<translate>Credit Note</translate>">
153 153
[% END %]
154 154
[% IF show_delete %]

Auch abrufbar als: Unified diff