From 15c36925a22b1176cbe9e1258bd6c18c48018d23 Mon Sep 17 00:00:00 2001 From: OpenXE <> Date: Wed, 19 Jun 2024 21:31:40 +0200 Subject: [PATCH] shopimport preview table --- www/pages/shopimport.php | 19 +++++++++++------- www/themes/new/images/lupe.svg | 36 ++++++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+), 7 deletions(-) create mode 100644 www/themes/new/images/lupe.svg diff --git a/www/pages/shopimport.php b/www/pages/shopimport.php index 0a1112d1..171e0112 100644 --- a/www/pages/shopimport.php +++ b/www/pages/shopimport.php @@ -52,6 +52,7 @@ class Shopimport $this->app->ActionHandler("list","ShopimportList"); $this->app->ActionHandler("alle","ShopimportAlle"); $this->app->ActionHandler("import","ShopimportImport"); + $this->app->ActionHandler("view","ShopimportView"); $this->app->ActionHandler("einzelimport","ShopimportEinzelimport"); $this->app->ActionHandler("navigation","ShopimportNavigation"); $this->app->ActionHandler("logout","ShopimportLogout"); @@ -339,9 +340,9 @@ class Shopimport $this->app->Tpl->Set('TAB1','
Es läuft gerade ein Cronjob der Aufträge abholt. Die manuelle Auftragsabholung ist in dieser Zeit gesperrt. Bitte warten Sie ein paar Minuten und versuchen Sie es erneut.
'); }else{ $table = new EasyTable($this->app); - $table->Query("SELECT ae.bezeichnung,p.abkuerzung, + $table->Query("SELECT ae.bezeichnung,p.abkuerzung as Projekt, ae.id FROM shopexport ae LEFT JOIN projekt p ON p.id=ae.projekt WHERE ae.aktiv='1'"); - $table->DisplayNew('INHALT',"  "); + $table->DisplayNew('INHALT',"   "); $this->app->Tpl->Parse('TAB1','rahmen.tpl'); } $this->app->Tpl->Set('INHALT',''); @@ -949,6 +950,10 @@ class Shopimport $bekanntezahlungsweisen = $this->app->erp->GetZahlungsweise(); $tmpauftragid = $this->app->erp->ImportAuftrag($adresse,$warenkorb,$projekt,$shopid); + if ($tmpauftragid > 0) { + $sucess_import = true; + } + $doctype = 'auftrag'; if($this->app->DB->Select("SELECT angeboteanlegen FROM shopexport WHERE id = '$shopid' LIMIT 1")) { @@ -971,7 +976,7 @@ class Shopimport } } - if($shopimportid) + if($shopimportid && $tmpauftragid) { $this->app->DB->Update("UPDATE shopimport_auftraege SET imported='1' WHERE id='$shopimportid' LIMIT 1"); } @@ -985,10 +990,7 @@ class Shopimport } $this->app->erp->RunHook('Shopimportwarenkorb', 4, $doctype, $tmpauftragid, $shopid, $warenkorb); $this->app->erp->RunHook('Shopimport', 3, $doctype, $tmpauftragid, $shopid); - - $adresse =''; - $sucess_import++; return $sucess_import; } @@ -1112,6 +1114,10 @@ class Shopimport return ['codingerror'=>$umlautefehler, 'success' => $succes]; } + public function ShopimportView() { + $this->ShopimportImport(showonly: true); + } + public function ShopimportImport($id='', $count = 0, $returncount = false, $showonly = false) { $deletedRows = 0; @@ -2002,7 +2008,6 @@ class Shopimport $htmltable->AddCol(''); $htmltable->AddCol($arr[$i]['abkuerzung']); - $htmltable->AddCol(($doppelteonlinebestellnummer?'':'').$warenkorb['onlinebestellnummer'].($doppelteonlinebestellnummer?'':'')); $htmltable->AddCol($warenkorb['name'].$kdr_name.'
'.$warenkorb['email'].$email); $htmltable->AddCol($warenkorb['internebezeichnung']); diff --git a/www/themes/new/images/lupe.svg b/www/themes/new/images/lupe.svg new file mode 100644 index 00000000..ef5adf6b --- /dev/null +++ b/www/themes/new/images/lupe.svg @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +