Update besar apk finance

This commit is contained in:
Wian Drs
2026-09-11 16:03:00 +07:00
parent d42483b350
commit 4ef15c22ae
897 changed files with 98056 additions and 15979 deletions
+12 -4
View File
@@ -1,7 +1,7 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Customers extends CI_Controller {
class Customers extends MY_Controller {
public function __construct()
{
@@ -73,7 +73,11 @@ class Customers extends CI_Controller {
'nama' => $this->input->post('nama'),
'alamat' => $this->input->post('alamat'),
'telp' => $this->input->post('telp'),
'email' => $this->input->post('email')
'email' => $this->input->post('email'),
'credit_limit' => max(0,(float)$this->input->post('credit_limit')),
'payment_term_days' => max(0,(int)$this->input->post('payment_term_days')),
'is_credit_blocked' => $this->input->post('is_credit_blocked') ? 1 : 0,
'tax_number' => $this->input->post('tax_number',true)
];
if (!$data['nama']) {
@@ -114,7 +118,11 @@ class Customers extends CI_Controller {
'nama' => $this->input->post('nama'),
'alamat' => $this->input->post('alamat'),
'telp' => $this->input->post('telp'),
'email' => $this->input->post('email')
'email' => $this->input->post('email'),
'credit_limit' => max(0,(float)$this->input->post('credit_limit')),
'payment_term_days' => max(0,(int)$this->input->post('payment_term_days')),
'is_credit_blocked' => $this->input->post('is_credit_blocked') ? 1 : 0,
'tax_number' => $this->input->post('tax_number',true)
];
$this->dm->setTable('customers')->update($id, $data);
@@ -149,4 +157,4 @@ class Customers extends CI_Controller {
echo json_encode(['status'=>true,'message'=>'Data berhasil dihapus']);
}
}
}