tmc and gst

This commit is contained in:
heama 2023-11-16 15:14:43 +05:30
parent bedb92842f
commit 4719ce6c74
7 changed files with 33 additions and 12 deletions

View File

@ -455,7 +455,7 @@ class Corporate extends CI_Controller {
$data['inv_received'] = 1; $data['inv_received'] = 1;
$this->db->where('td_id', $res1->ti_tdid); $this->db->where('td_id', $res1->ti_tdid);
$this->db->update('tmc_data', $data); $this->db->update('tmc_data', $data);
$res1->d_remarks = 'Invoice Received'; $res1->d_remarks = 'Invoice Manual Received';
} }
else{ else{
$data['inv_received'] = 2; $data['inv_received'] = 2;

View File

@ -766,7 +766,19 @@ function() {
window.jQuery.FormPickers.init() window.jQuery.FormPickers.init()
}(); }();
</script> </script>
<script>
// Get the current date in the format "YYYY-MM-DD"
function getCurrentDate() {
const today = new Date();
const year = today.getFullYear();
const month = (today.getMonth() + 1).toString().padStart(2, '0');
const day = today.getDate().toString().padStart(2, '0');
return `${year}-${month}-${day}`;
}
// Set the value of the "TO" input to today's date
document.getElementById('to').value = getCurrentDate();
</script>
</body> </body>
</html> </html>

View File

@ -764,7 +764,19 @@ function() {
window.jQuery.FormPickers.init() window.jQuery.FormPickers.init()
}(); }();
</script> </script>
<script>
// Get the current date in the format "YYYY-MM-DD"
function getCurrentDate() {
const today = new Date();
const year = today.getFullYear();
const month = (today.getMonth() + 1).toString().padStart(2, '0');
const day = today.getDate().toString().padStart(2, '0');
return `${year}-${month}-${day}`;
}
// Set the value of the "TO" input to today's date
document.getElementById('to').value = getCurrentDate();
</script>
</body> </body>
</html> </html>

View File

@ -880,16 +880,13 @@ function() {
"width": 300, "width": 300,
"render": function ( data, type, full, meta ) { "render": function ( data, type, full, meta ) {
console.log(full['inv']); console.log(full['inv']);
if (full['inv'] != " ") { if (full['inv'] !== " ") {
return 'Invoice Received'; return 'Invoice Received';
} else if (full['ti_recieved'] === "0") { } else {
return 'Invoice Received (Manual)'; // Show d_remarks here
} return full['d_remarks'];
else{ }
return 'Invoice Not Received'; }
}
}
}, },
{ {

View File

@ -881,7 +881,7 @@ function() {
"width": 300, "width": 300,
"render": function ( data, type, full, meta ) { "render": function ( data, type, full, meta ) {
console.log(full['inv']); console.log(full['inv']);
if (full['inv'] != " ") { if (full['inv'] !=" ") {
return 'Invoice Received'; return 'Invoice Received';
} else if (full['ti_recieved'] === "0") { } else if (full['ti_recieved'] === "0") {
return 'Invoice Received (Manual)'; return 'Invoice Received (Manual)';