Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 877a603b

Von Kivitendo Admin vor 10 Monaten hinzugefügt

  • ID 877a603b6980a33e392907296995e1141a092de9
  • Vorgänger f8c31b75
  • Nachfolger 853e4147

Einkaufsrechnungen - fx_paid -> defaultcurrency_paid

siehe Ticket #563, Währung und Fremdwährung waren vertauscht.

Unterschiede anzeigen:

bin/mozilla/ir.pl
200 200
        $form->{"memo_$i"}   = $form->{acc_trans}{$key}->[$i - 1]->{memo};
201 201

  
202 202
        $form->{paidaccounts} = $i;
203
        # hook for calc of of fx_paid and check if banktransaction has a record exchangerate
203
        # hook for calc of of defaultcurrency_paid and check if banktransaction has a record exchangerate
204 204
        if ($form->{"exchangerate_$i"}) {
205 205
          my $bt_acc_trans = SL::DB::Manager::BankTransactionAccTrans->find_by(acc_trans_id => $form->{"acc_trans_id_$i"});
206 206
          if ($bt_acc_trans) {
......
210 210
              $form->{"record_forex_$i"} = 1;
211 211
            }
212 212
          }
213
          $form->{"fx_paid_$i"} = $form->{"paid_$i"} / $form->{"exchangerate_$i"};
214
          $form->{"fx_totalpaid"} +=  $form->{"fx_paid_$i"};
215
        } # end hook fx_paid
213
          $form->{"defaultcurrency_paid_$i"} = $form->{"paid_$i"} * $form->{"exchangerate_$i"};
214
          $form->{"defaultcurrency_totalpaid"} +=  $form->{"defaultcurrency_paid_$i"};
215
        } # end hook defaultcurrency_paid
216 216
      }
217 217
    } else {
218 218
      $form->{$key} =
templates/webpages/ir/_payments.html
80 80
     <td align="center">
81 81
  [% SET forex        = 'forex_'        _ i %]
82 82
  [% SET exchangerate = 'exchangerate_' _ i %]
83
  [% SET fx_paid      = 'fx_paid_'      _ i %]
83
  [% SET defaultcurrency_paid  = 'defaultcurrency_paid_' _ i %]
84 84
  [% SET record_forex = 'record_forex_' _ i %]
85 85
  [% IF $forex %]
86 86
        <input type="hidden" name="exchangerate_[% i %]" value="[% LxERP.format_amount($exchangerate, 5) %]">
87 87
        <input type="hidden" name="record_forex_[% i %]" value="[% $record_forex %]">
88 88
        <input type="hidden" name="forex_[% i %]"        value="[% $forex %]">
89
        <input type="hidden" name="fx_paid_[% i %]"      value="[% $fx_paid %]">
90
          [% LxERP.format_amount($forex, 5) %] = [% LxERP.format_amount($fx_paid, 5) %] [% currency %] </br>
89
        <input type="hidden" name="defaultcurrency_paid_[% i %]"      value="[% $defaultcurrency_paid %]">
90
          [% LxERP.format_amount($forex, 5) %] = [% LxERP.format_amount($defaultcurrency_paid, 5) %] [% defaultcurrency %] </br>
91 91
          [% IF $record_forex %][% 'bank transaction exchange rate' | $T8 %][%- ELSE %][% 'default exchange rate' | $T8 %][%- END %]
92 92
  [% ELSE %]
93 93
     [% IF $changeable %]
......
117 117
      <td></td>
118 118
      <td></td>
119 119
      <td align="center">[%- 'Total' | $T8 %]</td>
120
      <td align="center">[% LxERP.format_amount(totalpaid, 2) | html %] [% defaultcurrency %]</td>
120
      <td align="center">[% LxERP.format_amount(totalpaid, 2) | html %] [% currency %]</td>
121 121
      <td></td>
122 122
      [% IF show_exchangerate %]
123
        <td align="center">[% LxERP.format_amount(fx_totalpaid, 2) | html %] [% currency %]</td>
124
        <input type="hidden" name="fx_totalpaid" value="[% fx_totalpaid %]">
123
        <td align="center">[% LxERP.format_amount(defaultcurrency_totalpaid, 2) | html %] [% defaultcurrency %]</td>
124
        <input type="hidden" name="defaultcurrency_totalpaid" value="[% defaultcurrency_totalpaid %]">
125 125
      [% END %]
126 126
    </tr>
127 127
[% UNLESS show_exchangerate %]

Auch abrufbar als: Unified diff