CSV Import Error Handling

- Leerzeilen ignorieren
 - Prüfung der Pflichtfelder
Zeitsperre
 - Nicht Zeitaufzeichnungsrelevante Zeitsperren parallell zu
   Zeitaufzeichnungen möglich
This commit is contained in:
Andreas Österreicher
2022-03-04 14:45:44 +01:00
parent 091fd3487f
commit fd209efe55
4 changed files with 178 additions and 413 deletions
+7 -2
View File
@@ -25,7 +25,7 @@ class zeitsperre extends basis_db
{
const NUR_BLOCKIERENDE_ZEITSPERREN = true;
const BLOCKIERENDE_ZEITSPERREN = "'Krank','Urlaub','ZA','DienstV','PflegeU','DienstF','CovidSB','CovidKS'";
public $new; // boolean
public $result = array(); // news Objekt
@@ -60,6 +60,11 @@ class zeitsperre extends basis_db
$this->load($zeitsperre_id);
}
public static function getBlockierendeZeitsperren()
{
return explode("','",trim(self::BLOCKIERENDE_ZEITSPERREN, '\''));
}
/**
* Laedt alle Zeitsperren eines Benutzers wo ende>=now() ist
* @param $uid
@@ -390,7 +395,7 @@ class zeitsperre extends basis_db
if( $nurblockierend ) {
$qry .= " AND zeitsperretyp_kurzbz in (" . self::BLOCKIERENDE_ZEITSPERREN . ")";
}
if(!is_null($stunde))
$qry.=" AND
((vondatum=".$this->db_add_param($datum)." AND vonstunde<=".$this->db_add_param($stunde).") OR vonstunde is null OR vondatum<>".$this->db_add_param($datum).") AND