Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 88583bb3

Von Moritz Bunkus vor fast 18 Jahren hinzugefügt

  • ID 88583bb350e24b54422269fc36d6fd740c9c0b98
  • Vorgänger 377ff409
  • Nachfolger 8f98fc19

Stammdatenverwaltung: Anpassung von format_amount()-Aufrufen an die aktuell gültige Syntax. Preise nicht forciert auf zwei Stellen runden.

Unterschiede anzeigen:

bin/mozilla/ic.pl
1309 1309

  
1310 1310
    $column_data{number} =
1311 1311
        "<td align=right>"
1312
      . $form->format_amount(\%myconfig, $ref->{number}, '', "&nbsp;")
1312
      . $form->format_amount(\%myconfig, $ref->{number})
1313 1313
      . "</td>";
1314 1314
    $column_data{partnumber} =
1315 1315
      "<td align=$align>$ref->{partnumber}&nbsp;</a></td>";
......
1318 1318

  
1319 1319
    $column_data{onhand} =
1320 1320
        "<td align=right>"
1321
      . $form->format_amount(\%myconfig, $ref->{onhand}, '', "&nbsp;")
1321
      . $form->format_amount(\%myconfig, $ref->{onhand})
1322 1322
      . "</td>";
1323 1323
    $column_data{sellprice} =
1324 1324
        "<td align=right>"
1325
      . $form->format_amount(\%myconfig, $ref->{sellprice}, 2, "&nbsp;")
1325
      . $form->format_amount(\%myconfig, $ref->{sellprice})
1326 1326
      . "</td>";
1327 1327
    $column_data{listprice} =
1328 1328
        "<td align=right>"
1329
      . $form->format_amount(\%myconfig, $ref->{listprice}, 2, "&nbsp;")
1329
      . $form->format_amount(\%myconfig, $ref->{listprice})
1330 1330
      . "</td>";
1331 1331
    $column_data{lastcost} =
1332 1332
        "<td align=right>"
1333
      . $form->format_amount(\%myconfig, $ref->{lastcost}, 2, "&nbsp;")
1333
      . $form->format_amount(\%myconfig, $ref->{lastcost})
1334 1334
      . "</td>";
1335 1335

  
1336 1336
    $column_data{linetotalsellprice} = "<td align=right>"
1337
      . $form->format_amount(\%myconfig, $ref->{onhand} * $ref->{sellprice},
1338
                             2, "&nbsp;")
1337
      . $form->format_amount(\%myconfig, $ref->{onhand} * $ref->{sellprice}, 2)
1339 1338
      . "</td>";
1340 1339
    $column_data{linetotallastcost} = "<td align=right>"
1341
      . $form->format_amount(\%myconfig, $ref->{onhand} * $ref->{lastcost},
1342
                             2, "&nbsp;")
1340
      . $form->format_amount(\%myconfig, $ref->{onhand} * $ref->{lastcost}, 2)
1343 1341
      . "</td>";
1344 1342
    $column_data{linetotallistprice} = "<td align=right>"
1345
      . $form->format_amount(\%myconfig, $ref->{onhand} * $ref->{listprice},
1346
                             2, "&nbsp;")
1343
      . $form->format_amount(\%myconfig, $ref->{onhand} * $ref->{listprice}, 2)
1347 1344
      . "</td>";
1348 1345

  
1349 1346
    if (!$ref->{assemblyitem}) {
......
1359 1356

  
1360 1357
    $column_data{rop} =
1361 1358
      "<td align=right>"
1362
      . $form->format_amount(\%myconfig, $ref->{rop}, '', "&nbsp;") . "</td>";
1359
      . $form->format_amount(\%myconfig, $ref->{rop}) . "</td>";
1363 1360
    $column_data{weight} =
1364 1361
        "<td align=right>"
1365
      . $form->format_amount(\%myconfig, $ref->{weight}, '', "&nbsp;")
1362
      . $form->format_amount(\%myconfig, $ref->{weight})
1366 1363
      . "</td>";
1367 1364
    $column_data{unit}        = "<td>$ref->{unit}&nbsp;</td>";
1368 1365
    $column_data{bin}         = "<td>$ref->{bin}&nbsp;</td>";
......
1419 1416
    map { $column_data{$_} = "<td>&nbsp;</td>" } @column_index;
1420 1417
    $column_data{linetotalsellprice} =
1421 1418
        "<th class=listtotal align=right>"
1422
      . $form->format_amount(\%myconfig, $totalsellprice, 2, "&nbsp;")
1419
      . $form->format_amount(\%myconfig, $totalsellprice, 2)
1423 1420
      . "</th>";
1424 1421
    $column_data{linetotallastcost} =
1425 1422
        "<th class=listtotal align=right>"
1426
      . $form->format_amount(\%myconfig, $totallastcost, 2, "&nbsp;")
1423
      . $form->format_amount(\%myconfig, $totallastcost, 2)
1427 1424
      . "</th>";
1428 1425
    $column_data{linetotallistprice} =
1429 1426
        "<th class=listtotal align=right>"
1430
      . $form->format_amount(\%myconfig, $totallistprice, 2, "&nbsp;")
1427
      . $form->format_amount(\%myconfig, $totallistprice, 2)
1431 1428
      . "</th>";
1432 1429

  
1433 1430
    print "<tr class=listtotal>";
......
1861 1858

  
1862 1859
    $column_data{onhand} =
1863 1860
        "<td align=right>"
1864
      . $form->format_amount(\%myconfig, $ref->{onhand}, '', "&nbsp;")
1861
      . $form->format_amount(\%myconfig, $ref->{onhand})
1865 1862
      . "</td>";
1866 1863
    $column_data{sellprice} =
1867 1864
        "<td align=right>"
1868
      . $form->format_amount(\%myconfig, $ref->{sellprice}, 2, "&nbsp;")
1865
      . $form->format_amount(\%myconfig, $ref->{sellprice}, -2)
1869 1866
      . "</td>";
1870 1867
    $column_data{listprice} =
1871 1868
        "<td align=right>"
1872
      . $form->format_amount(\%myconfig, $ref->{listprice}, 2, "&nbsp;")
1869
      . $form->format_amount(\%myconfig, $ref->{listprice}, -2)
1873 1870
      . "</td>";
1874 1871
    $column_data{lastcost} =
1875 1872
        "<td align=right>"
1876
      . $form->format_amount(\%myconfig, $ref->{lastcost}, 2, "&nbsp;")
1873
      . $form->format_amount(\%myconfig, $ref->{lastcost}, -2)
1877 1874
      . "</td>";
1878 1875

  
1879 1876
    $column_data{linetotalsellprice} = "<td align=right>"
1880
      . $form->format_amount(\%myconfig, $ref->{onhand} * $ref->{sellprice},
1881
                             2, "&nbsp;")
1877
      . $form->format_amount(\%myconfig, $ref->{onhand} * $ref->{sellprice}, 2)
1882 1878
      . "</td>";
1883 1879
    $column_data{linetotallastcost} = "<td align=right>"
1884
      . $form->format_amount(\%myconfig, $ref->{onhand} * $ref->{lastcost},
1885
                             2, "&nbsp;")
1880
      . $form->format_amount(\%myconfig, $ref->{onhand} * $ref->{lastcost}, 2)
1886 1881
      . "</td>";
1887 1882
    $column_data{linetotallistprice} = "<td align=right>"
1888
      . $form->format_amount(\%myconfig, $ref->{onhand} * $ref->{listprice},
1889
                             2, "&nbsp;")
1883
      . $form->format_amount(\%myconfig, $ref->{onhand} * $ref->{listprice}, 2)
1890 1884
      . "</td>";
1891 1885

  
1892 1886
    if (!$ref->{assemblyitem}) {
......
1902 1896

  
1903 1897
    $column_data{rop} =
1904 1898
      "<td align=right>"
1905
      . $form->format_amount(\%myconfig, $ref->{rop}, '', "&nbsp;") . "</td>";
1899
      . $form->format_amount(\%myconfig, $ref->{rop}) . "</td>";
1906 1900
    $column_data{weight} =
1907 1901
        "<td align=right>"
1908
      . $form->format_amount(\%myconfig, $ref->{weight}, '', "&nbsp;")
1902
      . $form->format_amount(\%myconfig, $ref->{weight})
1909 1903
      . "</td>";
1910 1904
    $column_data{unit}        = "<td>$ref->{unit}&nbsp;</td>";
1911 1905
    $column_data{bin}         = "<td>$ref->{bin}&nbsp;</td>";
......
1943 1937

  
1944 1938
    $column_data{soldtotal} =
1945 1939
        "<td align=right>"
1946
      . $form->format_amount(\%myconfig, $ref->{soldtotal}, '', "&nbsp;")
1940
      . $form->format_amount(\%myconfig, $ref->{soldtotal})
1947 1941
      . "</td>";
1948 1942

  
1949 1943
    $column_data{deliverydate} = "<td>$ref->{deliverydate}</td>";
......
1968 1962
    map { $column_data{$_} = "<td>&nbsp;</td>" } @column_index;
1969 1963
    $column_data{linetotalsellprice} =
1970 1964
        "<th class=listtotal align=right>"
1971
      . $form->format_amount(\%myconfig, $totalsellprice, 2, "&nbsp;")
1965
      . $form->format_amount(\%myconfig, $totalsellprice, 2)
1972 1966
      . "</th>";
1973 1967
    $column_data{linetotallastcost} =
1974 1968
        "<th class=listtotal align=right>"
1975
      . $form->format_amount(\%myconfig, $totallastcost, 2, "&nbsp;")
1969
      . $form->format_amount(\%myconfig, $totallastcost, 2)
1976 1970
      . "</th>";
1977 1971
    $column_data{linetotallistprice} =
1978 1972
        "<th class=listtotal align=right>"
1979
      . $form->format_amount(\%myconfig, $totallistprice, 2, "&nbsp;")
1973
      . $form->format_amount(\%myconfig, $totallistprice, 2)
1980 1974
      . "</th>";
1981 1975

  
1982 1976
    print "<tr class=listtotal>";
......
2028 2022

  
2029 2023
  $column_data{onhand} =
2030 2024
      "<th class=listsubtotal align=right>"
2031
    . $form->format_amount(\%myconfig, $subtotalonhand, '', "&nbsp;")
2025
    . $form->format_amount(\%myconfig, $subtotalonhand)
2032 2026
    . "</th>";
2033 2027

  
2034 2028
  $column_data{linetotalsellprice} =
2035 2029
      "<th class=listsubtotal align=right>"
2036
    . $form->format_amount(\%myconfig, $subtotalsellprice, 2, "&nbsp;")
2030
    . $form->format_amount(\%myconfig, $subtotalsellprice, 2)
2037 2031
    . "</th>";
2038 2032
  $column_data{linetotallistprice} =
2039 2033
      "<th class=listsubtotal align=right>"
2040
    . $form->format_amount(\%myconfig, $subtotallistprice, 2, "&nbsp;")
2034
    . $form->format_amount(\%myconfig, $subtotallistprice, 2)
2041 2035
    . "</th>";
2042 2036
  $column_data{linetotallastcost} =
2043 2037
      "<th class=listsubtotal align=right>"
2044
    . $form->format_amount(\%myconfig, $subtotallastcost, 2, "&nbsp;")
2038
    . $form->format_amount(\%myconfig, $subtotallastcost, 2)
2045 2039
    . "</th>";
2046 2040

  
2047 2041
  $subtotalonhand    = 0;
......
2170 2164
sub form_header {
2171 2165
  $lxdebug->enter_sub();
2172 2166

  
2173
  my $dec = '';
2174

  
2175
  #decimalplaces for listprice
2176
  ($dec) = ($form->{listprice} =~ /\.(\d+)/);
2177
  $dec = length $dec;
2178
  my $decimalplaces = ($dec == 2) ? $dec : 2;
2179
  $form->{listprice} =
2180
    $form->format_amount(\%myconfig, $form->{listprice}, $decimalplaces);
2181

  
2182
  #decimalplaces for sellprice and gv
2183
  ($dec) = ($form->{sellprice} =~ /\.(\d+)/);
2184
  $dec = length $dec;
2185
  my $decimalplaces = ($dec == 2) ? $dec : 2;
2186

  
2187
  map {
2188
    $form->{$_} =
2189
      $form->format_amount(\%myconfig, $form->{$_}, $decimalplaces)
2190
  } qw(sellprice gv);
2191

  
2192
  ($dec) = ($form->{lastcost} =~ /\.(\d+)/);
2193
  $dec = length $dec;
2194
  my $decimalplaces = ($dec == 2) ? $dec : 2;
2195

  
2196
  $form->{lastcost} =
2197
    $form->format_amount(\%myconfig, $form->{lastcost}, $decimalplaces);
2167
  map({ $form->{$_} = $form->format_amount(\%myconfig, $form->{$_}, -2) }
2168
      qw(sellprice listprice lastcost gv));
2198 2169

  
2199 2170
  map { $form->{$_} = $form->format_amount(\%myconfig, $form->{$_}) }
2200 2171
    qw(weight rop stock);
......
3312 3283
    $column_data{bin}    = qq|<td>$ref->{bin}&nbsp;</td>|;
3313 3284
    $column_data{onhand} =
3314 3285
        qq|<td align=right>|
3315
      . $form->format_amount(\%myconfig, $ref->{onhand}, '', "&nbsp;")
3286
      . $form->format_amount(\%myconfig, $ref->{onhand})
3316 3287
      . qq|</td>|;
3317 3288
    $column_data{rop} =
3318 3289
        qq|<td align=right>|
3319
      . $form->format_amount(\%myconfig, $ref->{rop}, '', "&nbsp;")
3290
      . $form->format_amount(\%myconfig, $ref->{rop})
3320 3291
      . qq|</td>|;
3321 3292
    $column_data{stock} = qq|<td width=10%><input name="qty_$i" size=10></td>|;
3322 3293

  

Auch abrufbar als: Unified diff