fill exchange rate on auftrag creation for foreign currency

Not sure why Bruno commented this out. Who is Bruno?
This commit is contained in:
faser2k 2025-02-28 14:37:03 +01:00
parent 834588c347
commit b7caf63c82
2 changed files with 9 additions and 2 deletions

View File

@ -33269,7 +33269,7 @@ function Firmendaten($field,$projekt="")
}
if($kurs<>0)
{
$this->app->DB->Update("UPDATE $typ SET kurs='$kurs' WHERE id='$id' LIMIT 1");
$this->app->DB->Update("UPDATE $typ SET kurs='$kurs' WHERE id='$id' AND kurs = 0 LIMIT 1");
}
}
@ -34128,7 +34128,7 @@ function Firmendaten($field,$projekt="")
}
//$this->LoadSteuersaetze($id,$art); //03.01.2019 Bruno entfernt, da Shopaufträge umsgestellt werden
//$this->LoadKurs($id,$art); //03.01.2019 Bruno entfernt
$this->LoadKurs($id,$art); //03.01.2019 Bruno entfernt
$belegarr = $this->app->DB->SelectRow("SELECT * FROM $art WHERE id='$id' LIMIT 1");
if(empty($belegarr))
{

View File

@ -220,4 +220,11 @@ class Waehrungumrechnung {
}
public function GetWaehrungUmrechnungskurs($von, $nach, $onlytable) {
$result = $this->app->DB->Select("SELECT kurs FROM waehrung_umrechnung WHERE waehrung_von = '$von' AND waehrung_nach = '$nach' AND gueltig_bis is NULL");
if (!is_null($result)) {
return $result;
}
return 0;
}
}