WIP Ivt Crediting import
This commit is contained in:
@@ -150,20 +150,20 @@ class AdminController extends mfBaseController {
|
||||
$this->layout()->set("products", $products);
|
||||
}
|
||||
|
||||
protected function ivtAdminImportAction() {
|
||||
protected function ivtContractImportAction() {
|
||||
exit;
|
||||
$doit = false;
|
||||
if($this->request->doit == 1) {
|
||||
$doit = true;
|
||||
}
|
||||
|
||||
require_once(realpath(dirname(__FILE__)."/functions")."/IvtAdminImport.php");
|
||||
require_once(realpath(dirname(__FILE__)."/functions")."/IvtContractImport.php");
|
||||
|
||||
if(class_exists("Admin_IvtAdminImport")) {
|
||||
$import = new Admin_IvtAdminImport($this->request);
|
||||
if(class_exists("Admin_IvtContractImport")) {
|
||||
$import = new Admin_IvtContractImport($this->request);
|
||||
$data = $import->run($doit);
|
||||
|
||||
$this->layout()->setTemplate("Admin/IvtAdminImport");
|
||||
$this->layout()->setTemplate("Admin/IvtContractImport");
|
||||
$this->layout()->set("data", $data);
|
||||
|
||||
if($doit) {
|
||||
@@ -173,4 +173,26 @@ class AdminController extends mfBaseController {
|
||||
}
|
||||
}
|
||||
|
||||
protected function ivtCreditImportAction() {
|
||||
$doit = false;
|
||||
if($this->request->doit == 1) {
|
||||
$doit = true;
|
||||
}
|
||||
|
||||
require_once(realpath(dirname(__FILE__)."/functions")."/IvtCreditImport.php");
|
||||
|
||||
if(class_exists("Admin_IvtCreditImport")) {
|
||||
$import = new Admin_IvtCreditImport($this->request);
|
||||
$data = $import->run($doit);
|
||||
|
||||
$this->layout()->setTemplate("Admin/IvtCreditImport");
|
||||
$this->layout()->set("data", $data);
|
||||
|
||||
if($doit) {
|
||||
$this->layout()->setFlash((count($data['contracts']) - $data['ignore'])." Gutschriften aus IVT importiert!", "success");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user