Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 1ee0a247

Von G. Richardson vor fast 13 Jahren hinzugefügt

  • ID 1ee0a24734aefd23212f06419289980366fa3803
  • Vorgänger b3b1b699
  • Nachfolger 21c964b9

Bug 1756 - Ertrag in Bruttorechnung gefixed

Bei Rechnungen mit "Steuer im Preis inbegriffen":
Ertrag wurde berechnet als ob sellprice netto und lastcost netto war.
Sellprice wird jetzt erst auf den Nettobetrag umgerechnet, bevor der Ertrag berechnet wird.

Unterschiede anzeigen:

bin/mozilla/io.pl
341 341
    $form->{"marge_percent_$i"} = 0;
342 342

  
343 343
    my $marge_color;
344
    my $real_sellprice           = $linetotal;
344
    my $real_sellprice;
345
    if ( $form->{taxincluded} and $form->{"qty_$i"} * 1  and $form->{$form->{"taxaccounts_$i"} . "_rate"} * 1) {
346
      # if we use taxincluded we need to calculate the marge from the net_value
347
      # all the marge calculations are based on linetotal which we need to
348
      # convert to net first
349

  
350
      # there is no direct form value for the tax_rate of the item, but
351
      # form->{taxaccounts_$i} gives the tax account (e.g. 3806) and 3806_rate
352
      # gives the tax percentage (e.g. 0.19)
353
      $real_sellprice = $linetotal / (1 + $form->{$form->{"taxaccounts_$i"} . "_rate"});
354
    } else {
355
      $real_sellprice            = $linetotal;
356
    };
345 357
    my $real_lastcost            = $form->{"lastcost_$i"} * $form->{"qty_$i"} / ( $form->{"marge_price_factor_$i"} || 1 );
346 358
    my $marge_percent_warn       = $myconfig{marge_percent_warn} * 1 || 15;
347 359
    my $marge_adjust_credit_note = $form->{type} eq 'credit_note' ? -1 : 1;
locale/de/all
931 931
  'Include in Report'           => 'In Bericht aufnehmen',
932 932
  'Include in drop-down menus'  => 'In Aufklappmenü aufnehmen',
933 933
  'Includeable in reports'      => 'In Berichten anzeigbar',
934
  'Including'                   => 'Enthaltene',
934 935
  'Income Statement'            => 'GuV',
935 936
  'Income accno'                => 'Erlöskonto',
936 937
  'Incoming Payments'           => 'Zahlungseingänge',
......
1143 1144
  'National'                    => 'Inand',
1144 1145
  'National Expenses'           => 'Aufwand Inland',
1145 1146
  'National Revenues'           => 'Erlöse Inland',
1147
  'Net amount'                  => 'Nettobetrag',
1146 1148
  'Netto Terms'                 => 'Zahlungsziel netto',
1147 1149
  'New Buchungsgruppe #1'       => 'Neue Buchungsgruppe #1',
1148 1150
  'New Templates'               => 'Erzeuge Vorlagen, Name',
templates/webpages/ir/form_footer.html
51 51
[% SET total_ref       = item _ '_total' %]
52 52
[% SET netto_ref       = item _ '_netto' %]
53 53
       <tr>
54
        <th align="right">Enthaltene [% $description_ref | html %]&nbsp;[% $rate_ref * 100 %]%</th>
54
        <th align="right">[% 'Including' | $T8 %] [% $description_ref | html %]&nbsp;[% $rate_ref * 100 %]%</th>
55 55
        <td align="right">[% LxERP.format_amount($total_ref, 2) %]</td>
56 56
       </tr>
57 57
  [%- IF taxincluded %]
58 58
       <tr>
59
        <th align="right">Nettobetrag</th>
59
        <th align="right">[% 'Net amount' | $T8 %]</th>
60 60
        <td align="right">[% LxERP.format_amount($netto_ref, 2) %]</td>
61 61
       </tr>
62 62
  [%- END %]
templates/webpages/is/form_footer.html
79 79
[% SET total_ref       = item _ '_total' %]
80 80
[% SET netto_ref       = item _ '_netto' %]
81 81
       <tr>
82
        <th align="right">Enthaltene [% $description_ref | html %]&nbsp;[% $rate_ref * 100 %]%</th>
82
        <th align="right">[% 'Including' | $T8 %] [% $description_ref | html %]&nbsp;[% $rate_ref * 100 %]%</th>
83 83
        <td align="right">[% LxERP.format_amount($total_ref, 2) %]</td>
84 84
       </tr>
85 85
  [%- IF taxincluded %]
86 86
       <tr>
87
        <th align="right">Nettobetrag</th>
87
        <th align="right">[% 'Net amount' | $T8 %]</th>
88 88
        <td align="right">[% LxERP.format_amount($netto_ref, 2) %]</td>
89 89
       </tr>
90 90
  [%- END %]

Auch abrufbar als: Unified diff