commitall

This commit is contained in:
Sampanna Rimal
2024-07-10 18:28:19 +05:45
parent 140abda4e6
commit 9cd05ef3cb
15723 changed files with 4818733 additions and 0 deletions

View File

@@ -0,0 +1,47 @@
<?php defined('BASEPATH') or exit('No direct script access allowed');
class Importvouchers extends CI_Controller
{
function __construct()
{
parent::__construct();
checkLogin();
}
function index()
{
$data['pageTitle'] = "Import Vouchers";
$importedData = array();
if (isset($_FILES['voucher_list'])) {
$filename = $_FILES["voucher_list"]["tmp_name"];
if ($_FILES["voucher_list"]["size"] > 0) {
$file = fopen($filename, "r");
while (($getData = fgetcsv($file, 100000, ",")) !== FALSE) {
$importedData[] = $getData;
}
fclose($file);
}
$data['importedData'] = $importedData;
switch ($_POST['import_type']) {
case 'Groups':
loadView("accounts/importgroups", $data);
break;
case 'Categories':
loadView("accounts/importcategories", $data);
break;
case 'Accounts':
loadView("accounts/importaccounts", $data);
break;
case 'Vouchers':
loadView("accounts/importvouchers", $data);
break;
case 'VoucherDetails':
loadView("accounts/importvoucherdetails", $data);
break;
default:
//loadView("accounts/importvouchers", $data);
break;
}
} else {
loadView("accounts/importvouchers", $data);
}
}
}