Compare commits

..

No commits in common. "011f2915c1084bc02e187c3dbaf95662d1cc6e28" and "fea7a173dc0fc13bedcd39f8617a14c93fc38e37" have entirely different histories.

3 changed files with 20 additions and 21 deletions

View File

@ -907,14 +907,14 @@ class Artikel extends GenArtikel {
$defaultorder = 7; $defaultorder = 7;
// headings // headings
$heading = array('Artikel', 'Nummer','Referenz','Menge', 'Einheit', 'Lager', 'Reserviert', 'Menü'); $heading = array('Artikel', 'Nummer','Menge', 'Einheit', 'Lager', 'Reserviert', 'Menü');
$width = array('50%', '10%', '5%', '5%', '5%','5%', '5%', '9%'); $width = array('50%', '10%', '5%', '5%','5%', '5%', '9%');
$findcols = array('a.name_de', 'a.nummer','s.referenz', 's.menge','a.einheit', $findcols = array('a.name_de', 'a.nummer', 's.menge','a.einheit',
'lag.menge', 'CASE WHEN (SELECT SUM(lr.menge) FROM lager_reserviert lr WHERE lr.artikel=a.id) > 0 'lag.menge', 'CASE WHEN (SELECT SUM(lr.menge) FROM lager_reserviert lr WHERE lr.artikel=a.id) > 0
THEN (SELECT SUM(lr.menge) FROM lager_reserviert lr WHERE lr.artikel=a.id) THEN (SELECT SUM(lr.menge) FROM lager_reserviert lr WHERE lr.artikel=a.id)
ELSE 0 ELSE 0
END','id'); END','id');
$searchsql = array('a.name_de', 'a.nummer','s.referenz','a.einheit', 's.menge','s.art',"CONCAT(IF(s.art='' OR s.art='et','Einkaufsteil',''),IF(s.art='it','Informationsteil/Dienstleistung',''),IF(s.art='bt','Beistellung',''))"); $searchsql = array('a.name_de', 'a.nummer','a.einheit', 's.menge','s.art',"CONCAT(IF(s.art='' OR s.art='et','Einkaufsteil',''),IF(s.art='it','Informationsteil/Dienstleistung',''),IF(s.art='bt','Beistellung',''))");
$menu = "<table cellpadding=0 cellspacing=0>"; $menu = "<table cellpadding=0 cellspacing=0>";
$menu .= "<tr>"; $menu .= "<tr>";
@ -932,18 +932,19 @@ class Artikel extends GenArtikel {
$alignright = array(3,5,6); $alignright = array(3,5,6);
// SQL statement // SQL statement
$sql = "SELECT SQL_CALC_FOUND_ROWS $sql = "SELECT SQL_CALC_FOUND_ROWS s.id,
s.id,
CONCAT('<a href=\"index.php?module=artikel&action=edit&id=',a.id,'\" target=\"_blank\">',a.name_de,'</a>&nbsp;', CONCAT('<a href=\"index.php?module=artikel&action=edit&id=',a.id,'\" target=\"_blank\">',a.name_de,'</a>&nbsp;',
IF(s.art='it','<br><i style=color:#999>- Informationsteil/Dienstleistung</i>',''),IF(s.art='bt','<br><i style=color:#999>- Beistellung</i>',''), COALESCE((SELECT GROUP_CONCAT('<br><i style=color:#999>- ', art.nummer, ' ', art.name_de, ' (', alt.reason, ')', '</i>' SEPARATOR '') FROM parts_list_alternative AS alt INNER JOIN artikel AS art ON art.id = alt.alternative_article_id WHERE alt.parts_list_id = s.id), '')) as artikel, IF(s.art='it','<br><i style=color:#999>- Informationsteil/Dienstleistung</i>',''),IF(s.art='bt','<br><i style=color:#999>- Beistellung</i>',''), COALESCE((SELECT GROUP_CONCAT('<br><i style=color:#999>- ', art.nummer, ' ', art.name_de, ' (', alt.reason, ')', '</i>' SEPARATOR '') FROM parts_list_alternative AS alt INNER JOIN artikel AS art ON art.id = alt.alternative_article_id WHERE alt.parts_list_id = s.id), '')) as artikel,
CONCAT('<a href=\"index.php?module=artikel&action=edit&id=',a.id,'\" target=\"_blank\">',a.nummer,'</a>') as nummer, CONCAT('<a href=\"index.php?module=artikel&action=edit&id=',a.id,'\" target=\"_blank\">',a.nummer,'</a>') as nummer,
s.referenz,
".$this->app->erp->FormatMenge('s.menge').' as menge, a.einheit, ".$this->app->erp->FormatMenge('s.menge').' as menge, a.einheit,
'.$this->app->erp->FormatMenge('ifnull(lag.menge,0)').' as lager, '.$this->app->erp->FormatMenge('ifnull(lag.menge,0)').' as lager,
CASE WHEN (SELECT SUM(lr.menge) FROM lager_reserviert lr WHERE lr.artikel=a.id) > 0 CASE WHEN (SELECT SUM(lr.menge) FROM lager_reserviert lr WHERE lr.artikel=a.id) > 0
THEN (SELECT '.$this->app->erp->FormatMenge('SUM(lr.menge)')." FROM lager_reserviert lr WHERE lr.artikel=a.id) THEN (SELECT '.$this->app->erp->FormatMenge('SUM(lr.menge)')." FROM lager_reserviert lr WHERE lr.artikel=a.id)
ELSE 0 ELSE 0
END as reserviert, END as reserviert,
s.id as menu s.id as menu
FROM stueckliste s FROM stueckliste s
INNER JOIN artikel a ON s.artikel=a.id INNER JOIN artikel a ON s.artikel=a.id

View File

@ -976,9 +976,7 @@ class Fibu_buchungen {
} }
} }
$override = $this->app->Secure->GetPOST('override'); $override = $this->app->Secure->GetPOST('override');
$diff = round($gesamtnum-$von_saldonum,2); $diff = $gesamtnum-$von_saldonum;
$gesamtnum = round($von_saldonum,2);
$von_saldonum = round($von_saldonum,2);
if ( if (
($von_saldonum < 0 && ($gesamtnum < $von_saldonum)) || ($von_saldonum < 0 && ($gesamtnum < $von_saldonum)) ||

View File

@ -821,7 +821,7 @@ class Ticket {
// Attachments // Attachments
$files = $this->app->erp->GetDateiSubjektObjektDateiname('Anhang','Ticket',$drafted_messages[0]['id'],""); $files = $this->app->erp->GetDateiSubjektObjektDateiname('Anhang','Ticket',$drafted_messages[0]['id'],"");
$pattern = '/[a-z0-9_\-\+\.]+@[a-z0-9\-]+\.([a-z]{2,63})(?:\.[a-z]{2,63})?/i'; $pattern = '/[a-z0-9_\-\+\.]+@[a-z0-9\-]+\.([a-z]{2,63})(?:\.[a-z]{2})?/i';
preg_match_all($pattern, $drafted_messages[0]['mail'], $matches); preg_match_all($pattern, $drafted_messages[0]['mail'], $matches);
$to = $matches[0]; $to = $matches[0];