mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-21 08:52:21 +00:00
Bei ungültiger Eingabe von Betrag und MwSt wird eine Fehlermeldung angezeigt, statt wie jetzt der Datenbank Error
This commit is contained in:
@@ -188,7 +188,16 @@ class wawi_bestelldetail extends basis_db
|
||||
$this->errormsg ="Artikelnummer fehlerhaft.";
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!is_numeric($this->preisprove))
|
||||
{
|
||||
$this->errormsg="Ungültiger Preis eingegeben.";
|
||||
return false;
|
||||
}
|
||||
if(!is_numeric($this->mwst) && $this->mwst != '')
|
||||
{
|
||||
$this->errormsg="Ungültige MWSt. eingegeben.";
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -203,7 +212,7 @@ class wawi_bestelldetail extends basis_db
|
||||
return false;
|
||||
|
||||
$mwst = ($this->mwst == '' ? '0':$this->mwst);
|
||||
|
||||
$this->mwst = $mwst;
|
||||
if($this->new)
|
||||
{
|
||||
// insert
|
||||
|
||||
@@ -419,6 +419,18 @@ class wawi_rechnung extends basis_db
|
||||
*/
|
||||
public function save_betrag()
|
||||
{
|
||||
if(!is_numeric($this->betrag))
|
||||
{
|
||||
$this->errormsg = "Ungültiger Betrag.";
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!is_numeric($this->mwst))
|
||||
{
|
||||
$this->errormsg = "Ungültiger Betrag.";
|
||||
return false;
|
||||
}
|
||||
|
||||
if($this->new)
|
||||
{
|
||||
$qry = 'BEGIN;INSERT INTO wawi.tbl_rechnungsbetrag(rechnung_id, mwst, betrag, bezeichnung) VALUES('.
|
||||
@@ -449,6 +461,7 @@ class wawi_rechnung extends basis_db
|
||||
{
|
||||
$this->rechnugnsbetrag_id=$row->id;+
|
||||
$this->db_query('COMMIT;');
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user