Compare commits

...

2 Commits

Author SHA1 Message Date
zeeshan 51b921673e Merge branch 'main' of http://192.168.1.200:3000/Stratawiz/Rapport-Laravel
Specific Folder FTP Upload / ftp-deploy (push) Successful in 1m47s Details
2026-10-13 12:05:22 +05:30
zeeshan e04d428307 GlenmarkCV ( Xmet Rx Tracker) Calculate Total 2026-10-13 12:04:57 +05:30
1 changed files with 16 additions and 4 deletions

View File

@ -240,16 +240,28 @@
});
$(document).on(
'input',
'#field-xmet_group_rx',
function () {
$(document).on('input','#field-xmet_group_rx',function () {
this.value = this.value.replace(/[^0-9]/g, '');
}
);
let fields=['field-xmet_rx','field-xmet_sr_rx','field-xmet_trio_rx'];
function calculateTotal(){
let total=0;
fields.forEach((nums)=>{
let input=document.getElementById(nums).value;
total += parseInt(input) ||0;
document.getElementById('field-total_xmet_rx').value=total;
})
console.log("Total is : ",total);
}
fields.forEach((id)=>{
document.getElementById(id).addEventListener('input',calculateTotal);
})
$(document).on('change', '#field-contact_id', function () {