Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision e6ffa928

Von Moritz Bunkus vor mehr als 14 Jahren hinzugefügt

  • ID e6ffa928b78feb3cf0fa2c38da388144543a76dd
  • Vorgänger 8e009de4
  • Nachfolger eed84962

Globale Variablen entfernt/umgewandelt.

Unterschiede anzeigen:

bin/mozilla/ap.pl
661 661
";
662 662

  
663 663
  my @triggers  = ();
664
  my $totalpaid = 0;
664
  $form->{totalpaid} = 0;
665 665

  
666 666
  $form->{paidaccounts}++ if ($form->{"paid_$form->{paidaccounts}"});
667 667
  for my $i (1 .. $form->{paidaccounts}) {
......
676 676
                           '-labels' => \%AP_paid_labels,
677 677
                           '-default' => $form->{"AP_paid_$i"}));
678 678

  
679
    $totalpaid += $form->{"paid_$i"};
679
    $form->{totalpaid} += $form->{"paid_$i"};
680 680

  
681 681
    # format amounts
682 682
    if ($form->{"paid_$i"}) {
......
732 732
    push(@triggers, "datepaid_$i", "BL", "trigger_datepaid_$i");
733 733
  }
734 734

  
735
  my $paid_missing = $form->{invtotal_unformatted} - $totalpaid;
735
  my $paid_missing = $form->{invtotal_unformatted} - $form->{totalpaid};
736 736

  
737 737
  print qq|
738 738
        <tr>
739 739
          <td></td>
740 740
          <td></td>
741 741
          <td align="center">| . $locale->text('Total') . qq|</td>
742
          <td align="center">| . H($form->format_amount(\%myconfig, $totalpaid, 2)) . qq|</td>
742
          <td align="center">| . H($form->format_amount(\%myconfig, $form->{totalpaid}, 2)) . qq|</td>
743 743
        </tr>
744 744
        <tr>
745 745
          <td></td>
......
818 818
|;
819 819
    }
820 820
    # ToDO: - insert a global check for stornos, so that a storno is only possible a limited time after saving it
821
    our $total_paid;
822 821
    print qq| <input class=submit type=submit name=action value="| . $locale->text('Storno') . qq|"> |
823
      if ($form->{id} && !IS->has_storno(\%myconfig, $form, 'ap') && !IS->is_storno(\%myconfig, $form, 'ap', $form->{id}) && (($total_paid == 0) || ($total_paid eq "")));
822
      if ($form->{id} && !IS->has_storno(\%myconfig, $form, 'ap') && !IS->is_storno(\%myconfig, $form, 'ap', $form->{id}) && (($form->{totalpaid} == 0) || ($form->{totalpaid} eq "")));
824 823

  
825 824
    print qq| <input class=submit type=submit name=action value="| . $locale->text('Post Payment') . qq|">
826 825
              <input class=submit type=submit name=action value="| . $locale->text('Use As Template') . qq|">
......
973 972

  
974 973
  $form->{defaultcurrency} = $form->get_default_currency(\%myconfig);
975 974

  
976
  our $invdate;
977 975
  for my $i (1 .. $form->{paidaccounts}) {
978 976
    if ($form->parse_amount(\%myconfig, $form->{"paid_$i"})) {
979 977
      my $datepaid = $form->datetonum($form->{"datepaid_$i"}, \%myconfig);
......
985 983

  
986 984
      if ($form->{defaultcurrency} && ($form->{currency} ne $form->{defaultcurrency})) {
987 985
        $form->{"exchangerate_$i"} = $form->{exchangerate}
988
          if ($invdate == $datepaid);
986
          if ($form->{transdate} == $datepaid);
989 987
        $form->isblank("exchangerate_$i",
990 988
                       $locale->text('Exchangerate for payment missing!'));
991 989
      }
bin/mozilla/ca.pl
274 274
        </tr>
275 275
|;
276 276

  
277
    our $checked;
278 277
    print qq|
279 278
        <tr>
280 279
                <td align=right>
......
283 282
                <th align=left colspan=3>| . $locale->text('Monthly') . qq|</th>
284 283
        </tr>
285 284
        <tr>
286
                <td align=right>&nbsp; <input name=duetyp class=radio type=radio value="13"
287
$checked></td>
288
                <td><input name=duetyp class=radio type=radio value="A" $checked >&nbsp;1. | . $locale->text('Quarter') . qq|</td>
289
|;
290
    $checked = "checked";
291
    print qq|
292
                <td><input name=duetyp class=radio type=radio value="1" $checked >&nbsp;| . $locale->text('January') . qq|</td>
293
|;
294
    $checked = "";
295
    print qq|
296
                <td><input name=duetyp class=radio type=radio value="5" $checked >&nbsp;| . $locale->text('May') . qq|</td>
297
                <td><input name=duetyp class=radio type=radio value="9" $checked >&nbsp;| . $locale->text('September') . qq|</td>
285
                <td align=right>&nbsp; <input name=duetyp class=radio type=radio value="13"></td>
286
                <td><input name=duetyp class=radio type=radio value="A">&nbsp;1. | . $locale->text('Quarter') . qq|</td>
287
                <td><input name=duetyp class=radio type=radio value="1" "checked">&nbsp;| . $locale->text('January') . qq|</td>
288
                <td><input name=duetyp class=radio type=radio value="5" >&nbsp;| . $locale->text('May') . qq|</td>
289
                <td><input name=duetyp class=radio type=radio value="9" >&nbsp;| . $locale->text('September') . qq|</td>
298 290

  
299 291
        </tr>
300 292
        <tr>
301 293
                <td align= right>&nbsp;</td>
302
                <td><input name=duetyp class=radio type=radio value="B" $checked>&nbsp;2. | . $locale->text('Quarter') . qq|</td>
303
                <td><input name=duetyp class=radio type=radio value="2" $checked >&nbsp;| . $locale->text('February') . qq|</td>
304
                <td><input name=duetyp class=radio type=radio value="6" $checked >&nbsp;| . $locale->text('June') . qq|</td>
305
                <td><input name=duetyp class=radio type=radio value="10" $checked >&nbsp;| . $locale->text('October') . qq|</td>
294
                <td><input name=duetyp class=radio type=radio value="B">&nbsp;2. | . $locale->text('Quarter') . qq|</td>
295
                <td><input name=duetyp class=radio type=radio value="2" >&nbsp;| . $locale->text('February') . qq|</td>
296
                <td><input name=duetyp class=radio type=radio value="6" >&nbsp;| . $locale->text('June') . qq|</td>
297
                <td><input name=duetyp class=radio type=radio value="10" >&nbsp;| . $locale->text('October') . qq|</td>
306 298
        </tr>
307 299
        <tr>
308 300
                <td> &nbsp;</td>
309
                <td><input name=duetyp class=radio type=radio value="C" $checked>&nbsp;3. | . $locale->text('Quarter') . qq|</td>
310
                <td><input name=duetyp class=radio type=radio value="3" $checked >&nbsp;| . $locale->text('March') . qq|</td>
311
                <td><input name=duetyp class=radio type=radio value="7" $checked >&nbsp;| . $locale->text('July') . qq|</td>
312
                <td><input name=duetyp class=radio type=radio value="11" $checked >&nbsp;| . $locale->text('November') . qq|</td>
301
                <td><input name=duetyp class=radio type=radio value="C">&nbsp;3. | . $locale->text('Quarter') . qq|</td>
302
                <td><input name=duetyp class=radio type=radio value="3" >&nbsp;| . $locale->text('March') . qq|</td>
303
                <td><input name=duetyp class=radio type=radio value="7" >&nbsp;| . $locale->text('July') . qq|</td>
304
                <td><input name=duetyp class=radio type=radio value="11" >&nbsp;| . $locale->text('November') . qq|</td>
313 305

  
314 306
        </tr>
315 307
        <tr>
316 308
                <td> &nbsp;</td>
317
                <td><input name=duetyp class=radio type=radio value="D" $checked>&nbsp;4. | . $locale->text('Quarter') . qq|&nbsp;</td>
318
                <td><input name=duetyp class=radio type=radio value="4" $checked >&nbsp;| . $locale->text('April') . qq|</td>
319
                <td><input name=duetyp class=radio type=radio value="8" $checked >&nbsp;| . $locale->text('August') . qq|</td>
320
                <td><input name=duetyp class=radio type=radio value="12" $checked >&nbsp;| . $locale->text('December') . qq|</td>
309
                <td><input name=duetyp class=radio type=radio value="D">&nbsp;4. | . $locale->text('Quarter') . qq|&nbsp;</td>
310
                <td><input name=duetyp class=radio type=radio value="4" >&nbsp;| . $locale->text('April') . qq|</td>
311
                <td><input name=duetyp class=radio type=radio value="8" >&nbsp;| . $locale->text('August') . qq|</td>
312
                <td><input name=duetyp class=radio type=radio value="12" >&nbsp;| . $locale->text('December') . qq|</td>
321 313

  
322 314
        </tr>
323 315
        <tr>
324 316
                   <td colspan=5><hr size=3 noshade></td>
325 317
        </tr>
326 318
        <tr>
327
          <th align=left><input name=reporttype class=radio type=radio value="free" $checked> | . $locale->text('Free report period') . qq|</th>
319
          <th align=left><input name=reporttype class=radio type=radio value="free"> | . $locale->text('Free report period') . qq|</th>
328 320
          <td align=left colspan=4>| . $locale->text('From') . qq|&nbsp;
329 321
              $button1
330 322
              $button1_2&nbsp;
bin/mozilla/ir.pl
258 258

  
259 259
  $main::auth->assert('invoice_edit');
260 260

  
261
  our %TMPL_VAR = ();
261
  my %TMPL_VAR = ();
262 262
  my @custom_hiddens;
263 263

  
264 264
  $form->{employee_id} = $form->{old_employee_id} if $form->{old_employee_id};

Auch abrufbar als: Unified diff