diff --git a/app/Controllers/Supplier.php b/app/Controllers/Supplier.php index f689d06c..c0a4495d 100644 --- a/app/Controllers/Supplier.php +++ b/app/Controllers/Supplier.php @@ -244,6 +244,7 @@ class Supplier extends BaseController $file2 = $this->request->getFile('Cert_GST'); $file3 = $this->request->getFile('Cert_BANK'); $path = ROOTPATH.'public/uploads/images/'; + if($PAN){ $supplier['PAN'] = $PAN;} if($GSTNo){ $supplier['GSTNO'] = $GSTNo;} if ($file2 && $file2->isValid() && !$file2->hasMoved()) { diff --git a/app/Views/companyview.php b/app/Views/companyview.php index a0e71b17..7d33f240 100644 --- a/app/Views/companyview.php +++ b/app/Views/companyview.php @@ -769,7 +769,7 @@ if (!empty($filenames)) { url: "companycontroller/deletefile", success: function(data) { if (data) { - $('#content').loader('hide'); + // $('#content').loader('hide'); alert(data); location.reload(); @@ -940,7 +940,7 @@ if (!empty($filenames)) { //if(bankname != '' || ifsccode != '' || bankaddress != '' ) //{ - $('#content').loader('show'); + // $('#content').loader('show'); $.ajax({ data: { @@ -951,7 +951,7 @@ if (!empty($filenames)) { success: function(data) { - $('#content').loader('hide'); + // $('#content').loader('hide'); alert(data); diff --git a/app/Views/dashboard.php b/app/Views/dashboard.php index ed16a770..b528da29 100644 --- a/app/Views/dashboard.php +++ b/app/Views/dashboard.php @@ -3,902 +3,997 @@ $Empcnt = ''; //echo $DEPCode; //echo ROLE_MANAGER; -if(!empty($EmpCount)) -{ - foreach ($EmpCount as $Emp) - { +if (!empty($EmpCount)) { + foreach ($EmpCount as $Emp) { $Empcnt = $Emp->EmpCount; } - - } ?>
-
- - -
- -
-

Accounts Department Dashboard

-
- -
- -
-
- -
-
-
- -
- Employees - -
-
-
+
+ + +
+ +
+
+

Accounts Department Dashboard

+
+
+ +
+ +
+
+ +
+
+
+ +
+ Employees + +
+
+
+
+
+ +
-
- -
-
- - + + - + }); + - + - - - - - - - -
- -
- -
- -
- -
- -
-
- -
-

TOTAL NO OF EMPLOYEES

-
- -

totemp;?>

-

 

- - - -
-
- -
-
-
-
- -
- -
-

TOTAL LOAN

-
- - -

totloan;?>

-

 

- - - -
- -
- -
- - - LOAN TO BE RECOVERED : - - - - totrec;?> - - -
-
- + }); + } + -
- - -
- -

SALARY COST

-
- -

-

- - - -
-
- -
- THIS MONTH :
-
+ + + + +
+ +
+ +
+ +
+ +
+ +
+
+ +
+ +

TOTAL NO OF EMPLOYEES

+
+
+ +

totemp; ?>

+

 

+ + +
-
- -
- -
-

TOTAL EMPLOYEES ABSENT

-

-
-

-

-

ABSENT


-
- -

-
-
- -
- -
-
- -
-
- -
- +
+ +
+
+
- -

- 'Select Employee'); - //print_r( $options); - if(!empty($emplist)) - { - foreach ($emplist as $SID): - $options[$SID->EmpID] = $SID->name.' '.' - '.' '.$SID->EmpID; - endforeach; - } - echo form_dropdown('emp', $options,set_value('emp'),'id="emp"' ,'class="form-control select2'); - ?> -

- - - Click here to Employee Performance Report + +
+ +
+ +

TOTAL LOAN

+
+
+ + +

totloan; ?>

+

 

+ + + +
+ +
+ +
+ + + LOAN TO BE RECOVERED : + + + + totrec; ?> + + +
+
+ + +
+ + +
+ + +

SALARY COST

+
+
+ +

+
+
+

+ + + +
+
+ + +
+ THIS MONTH : +
+
+
+
+ +
+ +
+ +

TOTAL EMPLOYEES ABSENT

+
+

+
+

+
+

+

ABSENT


+
+ +

+
+
+
-
-
-
-
-
-
-
-
-
-
-

0

-
Working Days
-
- -
-

0

-
Days Present
-
- -
-
-
- - - -
- -
-
- + echo form_dropdown('emp', $options, set_value('emp'), 'id="emp"', 'class="form-control select2'); + ?> + + + + Click here to Employee Performance Report +
+
+
+
+
+
+
+
+
+
+
+

0

+
Working Days
+
+ +
+

0

+
Days Present
+
+ +
+
-
-
-
-
-

0

-
Working Days
- -
- -
-

0

-
Days Present
- -
- - +
+ +
+
+ +
+
+
+
+
+

0

+
Working Days
+ +
+ +
+

0

+
Days Present
+ +
+ + - -
+ +
+
-
- + -
- +
+ - + + +
+ +
+
+

NAME OF ABSENTEES

+ +
+ + -
- -
-
-

NAME OF ABSENTEES

-
- - - - -
- -
- -
- +
+ +
+ +
+ -
- - - - - '; - - ?> - + '; -
- - - + + ?> + +
- - + + +
- - - + + +
- + + +
- + +
+ + + + + + - - - - - - -
- -
- - - + - + }); - - - + + + + -
+
- -
-
-
-
- Loading... -

Syncing with Zoho Books...

-
-
+ +
+
+
+
+ Loading... +

Syncing with Zoho Books...

- - - -
-
- - - +
+
+ + + +
+
+ + + +
+
+ + +
+
+ +
+
+
+
+
+
User Registrations
+

users) ? $UserCount[0]->users : 0; ?> +

+

+

+ EmpCount) ? $EmpCount[0]->EmpCount : 0; ?> + 1 ? '' . $employees . ' Employees ' : ($employees == 1 ? '' . $employees . ' Employee' : ''); ?> +

+
+
+ + + + + + +
+
- - -
-
- -
-
-
-
-
-
User Registrations
-

users) ? $UserCount[0]->users : 0 ;?> -

-

- EmpCount) ? $EmpCount[0]->EmpCount : 0 ;?> - 1 ? '' . $employees . ' Employees ' : ($employees == 1 ? '' . $employees . ' Employee' : ''); ?> -

-
-
- - - - - -
- -
-
-
-
- + - - - -
-
- -
-
-
- - - - - -
- -
-

Manager Department Dashboard

-
- -
- -
-
- -
-
-
- -
- Employees - -
-
+ +
+
+ +
-
- -
-
- - - - - - - + -
-
- -
-
- -
- - - - -
- TODAY'S REQUESTS - TODAY_REQUESTS;?> + - -
- - - + - -
+ +
-
- - - - - + -
-
-
-
-

Monthly Purchase Order

+
+
+
+
+

Monthly Purchase Order

- -
- -
-
-
-

- - = 4) { - $yearl = date('Y').'-'.(date('Y')+1); - } else { - $yearl = (date('Y')-1).'-'.date('Y'); - } - $ab=$yearl; - $fa=substr($ab,0,-5); - $aa=substr($ab,5,5); - echo '1 April, '.$fa.' - 31 March, '.$aa.''; - ?> - - -

+
+ +
+
+
+

+ + = 4) { + $yearl = date('Y') . '-' . (date('Y') + 1); + } else { + $yearl = (date('Y') - 1) . '-' . date('Y'); + } + $ab = $yearl; + $fa = substr($ab, 0, -5); + $aa = substr($ab, 5, 5); + echo '1 April, ' . $fa . ' - 31 March, ' . $aa . ''; + ?> -

- - + +

+ +
+ + +
+ +
+ + + +
+      BUDGET AMOUNT + +

+ +
+ + SERVICE   :  totalservicebudget; ?> + +
+ + +
+
+ +
+ + REVENUE :  totalrevenuebudget; ?> + + + +
+ +
+ +
+ + IMPORT    :  totalimportbudget; ?> + + + +
+
+ +
+ + CAPITAL    :  totalcapitalbudget; ?> + + + +
+ + + +
+ + +
- + + +
- - -
-      BUDGET AMOUNT - -

- -
- - SERVICE   :  totalservicebudget;?> - -
- - -
-
- -
- - REVENUE :  totalrevenuebudget;?> - - - -
- -
- -
- - IMPORT    :  totalimportbudget;?> - - - -
-
- -
- - CAPITAL    :  totalcapitalbudget;?> - - - -
- - - -
- - - +
- - - -
- -
-
-
- - + + + - - - + + + - - - - - - - - -
- -
- - - + - ] - }; - - - var salesChartOptions = { - //Boolean - If we should show the scale at all - showScale: true, - //Boolean - Whether grid lines are shown across the chart - scaleShowGridLines: false, - //String - Colour of the grid lines - scaleGridLineColor: "rgba(0,0,0,.05)", - //Number - Width of the grid lines - scaleGridLineWidth: 1, - //Boolean - Whether to show horizontal lines (except X axis) - scaleShowHorizontalLines: true, - //Boolean - Whether to show vertical lines (except Y axis) - scaleShowVerticalLines: true, - //Boolean - Whether the line is curved between points - bezierCurve: true, - //Number - Tension of the bezier curve between points - bezierCurveTension: 0.3, - //Boolean - Whether to show a dot for each point - pointDot: true, - //Number - Radius of each point dot in pixels - pointDotRadius: 4, - //Number - Pixel width of point dot stroke - pointDotStrokeWidth: 1, - //Number - amount extra to add to the radius to cater for hit detection outside the drawn point - pointHitDetectionRadius: 20, - //Boolean - Whether to show a stroke for datasets - datasetStroke: true, - //Number - Pixel width of dataset stroke - datasetStrokeWidth: 5, - //Boolean - Whether to fill the dataset with a color - datasetFill: true, - //String - A legend template - legendTemplate: "", - //Boolean - whether to maintain the starting aspect ratio or not when responsive, if set to false, will take up entire container - maintainAspectRatio: false, - //Boolean - whether to make the chart responsive to window resizing - responsive: true - }; + + + + + + + -legend\"><% for (var i=0; i
  • \"><%if(segments[i].label){%><%=segments[i].label%><%}%>
  • <%}%>", - //String - A tooltip template - tooltipTemplate: "<%=value %> <%=label%> users" - }; - //Create pie or douhnut chart - // You can switch between pie and douhnut using the method below. - pieChart.Doughnut(PieData, pieOptions); - // //----------------- - // //- END PIE CHART - - // //----------------- - - - - - - - - - - -
    + ?> +
    \ No newline at end of file diff --git a/app/Views/editSupplier.php b/app/Views/editSupplier.php index 031bb2f8..54179477 100644 --- a/app/Views/editSupplier.php +++ b/app/Views/editSupplier.php @@ -247,230 +247,234 @@ if (!empty($supplier)) {
    -
    - - getFlashdata('error'); - if ($error) { ?> -
    - - getFlashdata('error'); ?> -
    - - getFlashdata('success'); - if ($success) { ?> -
    - - getFlashdata('success'); ?> -
    - - -
    -
    - -
    -
      - -
    • - -
    -
    - - -
    - -
    -
    -
    -

    Edit Supplier Details

    -
    -
    -
    - - Back -
    -
    - -
    +
    + + getFlashdata('error'); + if ($error) { ?> +
    + + getFlashdata('error'); ?> +
    + + getFlashdata('success'); + if ($success) { ?> +
    + + getFlashdata('success'); ?> +
    + + +
    +
    + +
    +
      + +
    • + +
    +
    + + +
    + +
    +
    +
    +

    Edit Supplier Details

    +
    +
    +
    + + Back +
    +
    + +
    +
    +
    +
    +
    -
    -
    -
    -
    -
    -
    - -
    -
    - Supplier Information -
    -
    - name="isactive"> IsActive -
    -
    - - -
    -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    + +
    + +
    +
    + Supplier Information +
    +
    + name="isactive"> IsActive +
    +
    + + +
    +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    -
    -
    - -
    -
    - name="service" value="1"> SERVICE -
    -
    - name="rawmaterial" value="1"> RAW MATERIALS -
    -
    - name="maintanance" value="1"> MAINTENANCE -
    -
    -
    +
    +
    + +
    +
    + name="service" value="1"> SERVICE +
    +
    + name="rawmaterial" value="1"> RAW MATERIALS +
    +
    + name="maintanance" value="1"> MAINTENANCE +
    +
    +
    - - Address Details -
    -
    -
    - - -
    -
    -
    + + Address Details +
    +
    +
    + + +
    +
    +
    - - Tax Related Data -
    -
    -
    - - -
    -
    - - -
    -
    - - - -
    - - - -
    -
    + + Tax Related Data +
    +
    +
    + + +
    +
    + + +
    +
    + + + +
    + + + +
    +
    - Bank Details + Bank Details - -
    -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    - -
    -
    - - -
    -
    - - - -
    - - - -
    -
    + +
    +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + +
    +
    + + +
    +
    + + + +
    + + + +
    +
    - - Payment Details + + Payment Details - -
    -
    -
    - - - - - -
    -
    -
    + +
    +
    +
    + + + + + +
    +
    +
    -
    -
    -
    -
    - -
    -
    -
    - -
    - -
    -
    -
    -
    +
    +
    +
    +
    + +
    +
    +
    + +
    +
    -
    -
    -
    +
    +
    +
    +
    +
    +
    +
    diff --git a/app/Views/employeeListing.php b/app/Views/employeeListing.php index f93e2acb..0170e6fb 100644 --- a/app/Views/employeeListing.php +++ b/app/Views/employeeListing.php @@ -183,7 +183,7 @@ ], pageLength: 10, // Default rows per page lengthMenu: [ [10, 20, 30, 50, -1], [10, 20, 30, 50, "All"] ], // Rows per page options - responsive: true, // Responsive table + // responsive: true, // Responsive table order: [], // Default ordering (column index 0, descending) language: { paginate: { diff --git a/app/Views/expense_list.php b/app/Views/expense_list.php index 27269df7..aadf9369 100644 --- a/app/Views/expense_list.php +++ b/app/Views/expense_list.php @@ -204,7 +204,7 @@
    - +
    @@ -323,7 +323,7 @@ var expenseId = $(this).data('id'); var supplier_list = []; $('#supplierid').empty(); // Clear the supplier dropdown - $('#supplierid').append(''); + $('#supplierid').append(''); supplier_list[0].forEach(function(supplier) { $('#supplierid').append(''); }); @@ -392,7 +392,7 @@ $('#payment_method').val(''); var supplier_list = []; $('#supplierid').empty(); // Clear the supplier dropdown - $('#supplierid').append(''); + $('#supplierid').append(''); supplier_list[0].forEach(function(supplier) { $('#supplierid').append(''); @@ -405,36 +405,41 @@ $('#tempClick').on('click', function(e) { e.preventDefault(); - // Native HTML5 form validation - if ($('#expenseForm')[0].checkValidity()) { - var formData = new FormData($('#expenseForm')[0]); // Use FormData to handle file upload - console.log(formActionUrl); + if ($('#supplierid').val() != 0) { + // Native HTML5 form validation + if ($('#expenseForm')[0].checkValidity()) { - $.ajax({ - url: formActionUrl, - type: 'POST', - data: formData, - processData: false, - contentType: false, - success: function(response) { - console.log(response); + var formData = new FormData($('#expenseForm')[0]); // Use FormData to handle file upload + console.log(formActionUrl); - if (response) { - $('#expenseModal').modal('hide'); - $('#expenseForm')[0].reset(); - $('#file-name-display').text(''); // Clear the file name display - window.location.reload(); - } else { - console.log(response); - } - }, - error: function(xhr, status, error) { - alert('An error occurred: ' + error); - } - }); + $.ajax({ + url: formActionUrl, + type: 'POST', + data: formData, + processData: false, + contentType: false, + success: function(response) { + console.log(response); + + if (response) { + $('#expenseModal').modal('hide'); + $('#expenseForm')[0].reset(); + $('#file-name-display').text(''); // Clear the file name display + window.location.reload(); + } else { + console.log(response); + } + }, + error: function(xhr, status, error) { + alert('An error occurred: ' + error); + } + }); + } else { + // If form is invalid, show native validation messages + $('#expenseForm')[0].reportValidity(); + } } else { - // If form is invalid, show native validation messages - $('#expenseForm')[0].reportValidity(); + alert("Select Supplier"); } }); diff --git a/app/Views/supplierListing.php b/app/Views/supplierListing.php index fc48e3d0..7573c51b 100644 --- a/app/Views/supplierListing.php +++ b/app/Views/supplierListing.php @@ -178,7 +178,7 @@ url: "deletesupplier", success: function(data) { if (data) { - $('#content').loader('hide'); + // $('#content').loader('hide'); alert(data); location.reload(); }