From 473bc1dabd34e538a17320a99f5151fecdd2aa1a Mon Sep 17 00:00:00 2001 From: zeeshan Date: Tue, 26 May 2026 12:26:51 +0530 Subject: [PATCH] Horizon Changes --- ...f6ae-5950-4a39-9c3a-bf1e1ebbe700.blade.php | 151 ++++++++++++++++-- 1 file changed, 135 insertions(+), 16 deletions(-) diff --git a/resources/views/form/rapport-horizon/1776162763-2593f6ae-5950-4a39-9c3a-bf1e1ebbe700.blade.php b/resources/views/form/rapport-horizon/1776162763-2593f6ae-5950-4a39-9c3a-bf1e1ebbe700.blade.php index 3452420b..af0a5dd4 100644 --- a/resources/views/form/rapport-horizon/1776162763-2593f6ae-5950-4a39-9c3a-bf1e1ebbe700.blade.php +++ b/resources/views/form/rapport-horizon/1776162763-2593f6ae-5950-4a39-9c3a-bf1e1ebbe700.blade.php @@ -22,8 +22,8 @@ $brandData = [ ['brand'=>"OFLOX 200 TAB (10'S)", 'slug'=>'oflox_200_tab_10s_units','pseudoId'=>'oflox_200_tab_10s_value'], ['brand'=>"OFLOX 400 10'S", 'slug'=>'oflox_400_10s_units','pseudoId'=>'oflox_400_10s_value'], ['brand'=>'OFLOX 50MG REDIUSE 60ML', 'slug'=>'oflox_50mg_rediuse_60ml_units','pseudoId'=>'oflox_50mg_rediuse_60ml_value'], -['brand'=>'OFLOX EYE DROPS', 'slug'=>'oflox_eye_drops_units','pseudoId'=>'oflox_eye_drops_value'], - +/* ['brand'=>'OFLOX EYE DROPS', 'slug'=>'oflox_eye_drops_units','pseudoId'=>'oflox_eye_drops_value'], + */ ['brand'=>'OFLOX OZ TABLETS IP', 'slug'=>'oflox_oz_tablets_ip_units','pseudoId'=>'oflox_oz_tablets_ip_value'], ['brand'=>'OFLOX REDIUSE', 'slug'=>'oflox_rediuse_units','pseudoId'=>'oflox_rediuse_value'], ['brand'=>"OFLOX-200 MG 10's TABLETS (IP)", 'slug'=>'oflox_200_mg_10s_tablets_ip_units','pseudoId'=>'oflox_200_mg_10s_tablets_ip_value'], @@ -58,7 +58,7 @@ $brandData = [ ['brand'=>'Mucinac AB Tablet', 'slug'=>'mucinac_ab_tablet_units','pseudoId'=>'mucinac_ab_tablet_value'], -['brand'=>"MUCINAC C Tablets 1 x 15'S", 'slug'=>'mucinac_c_tablets_1_x_15s_units','pseudoId'=>'mucinac_c_tablets_1_x_15s_value'], +/* ['brand'=>"MUCINAC C Tablets 1 x 15'S", 'slug'=>'mucinac_c_tablets_1_x_15s_units','pseudoId'=>'mucinac_c_tablets_1_x_15s_value'], */ ['brand'=>"Mucinac Oral Solution 100ml", 'slug'=>'mucinac_oral_solution_100ml_units','pseudoId'=>'mucinac_oral_solution_100ml_value'], ['brand'=>'NOVAMOX 500', 'slug'=>'novamox_500_units','pseudoId'=>'novamox_500_value'], ['brand'=>"NOVAMOX 125 REDIUSE 30 ML", 'slug'=>'novamox_125_rediuse_30_ml_units','pseudoId'=>'novamox_125_rediuse_30_ml_value'], @@ -92,15 +92,21 @@ $brandData = [ ['brand'=>"Bilafav M ODT Pedia Tablets 1X10s 10/4", 'slug'=>'bilafav_m_odt_pedia_tablets_1x10s_104_units','pseudoId'=>'bilafav_m_odt_pedia_tablets_1x10s_104_value'], ['brand'=>"Bilafav M Oral suspension", 'slug'=>'bilafav_m_oral_suspension_units','pseudoId'=>'bilafav_m_oral_suspension_value'], -['brand'=>"NEKSIUM 20mg TAB (IP)", 'slug'=>'neksium_20mg_tab_ip_units','pseudoId'=>'neksium_20mg_tab_ip_value'], -['brand'=>"NEKSIUM 40mg TAB", 'slug'=>'neksium_40mg_tab_units','pseudoId'=>'neksium_40mg_tab_value'], -['brand'=>"NEKSIUM-D 20/30mg CAPS 15s (IP)", 'slug'=>'neksium_d_2030mg_caps_15s_ip_units','pseudoId'=>'neksium_d_2030mg_caps_15s_ip_value'], +/* ['brand'=>"NEKSIUM 20mg TAB (IP)", 'slug'=>'neksium_20mg_tab_ip_units','pseudoId'=>'neksium_20mg_tab_ip_value'], */ +/* ['brand'=>"NEKSIUM 40mg TAB", 'slug'=>'neksium_40mg_tab_units','pseudoId'=>'neksium_40mg_tab_value'], */ +/* ['brand'=>"NEKSIUM-D 20/30mg CAPS 15s (IP)", 'slug'=>'neksium_d_2030mg_caps_15s_ip_units','pseudoId'=>'neksium_d_2030mg_caps_15s_ip_value'], */ ['brand'=>"NEKSIUM-D 40/30mg CAPS 15s (IP)", 'slug'=>'neksium_d_4030mg_caps_15s_ip_units','pseudoId'=>'neksium_d_4030mg_caps_15s_ip_value'], ['brand'=>"TASIRON 15 CHEW TABS 3X10'S (B12)", 'slug'=>'tasiron_15_chew_tabs_3x10s_b12_units','pseudoId'=>'tasiron_15_chew_tabs_3x10s_b12_value'], ['brand'=>"TASIRON 30 CHEW TABS", 'slug'=>'tasiron_30_chew_tabs_units','pseudoId'=>'tasiron_30_chew_tabs_value'], ['brand'=>"TASIRON DROPS 30ML WITH EXTERNAL DROPPER", 'slug'=>'tasiron_drops_30ml_with_external_dropper_units','pseudoId'=>'tasiron_drops_30ml_with_external_dropper_value'], ['brand'=>"TASIRON SACHET(1X15'S)", 'slug'=>'tasiron_sachet1x15s_units','pseudoId'=>'tasiron_sachet1x15s_value'], -['brand'=>"TASIRON SUSPENSION-150ML", 'slug'=>'tasiron_suspension_150ml_units','pseudoId'=>'tasiron_suspension_150ml_value'] +['brand'=>"TASIRON SUSPENSION-150ML", 'slug'=>'tasiron_suspension_150ml_units','pseudoId'=>'tasiron_suspension_150ml_value'], + +['brand'=>"Pansec 80 MG Tablets", 'slug'=>'pansec_80_mg_tablets_units','pseudoId'=>'pansec_80_mg_tablets_value'], +['brand'=>"PANSEC D SR CAPSULES 15'S", 'slug'=>'pansec_d_sr_capsules_15s_units','pseudoId'=>'pansec_d_sr_capsules_15s_value'], +['brand'=>"PANSEC TABLETS 15'S", 'slug'=>'pansec_tablets_15s_units','pseudoId'=>'pansec_tablets_15s_value'], +['brand'=>"PANSEC-L CAPSULES", 'slug'=>'pansec_l_capsules_units','pseudoId'=>'pansec_l_capsules_value'] + @@ -518,7 +524,14 @@ if (!empty($submissions->data->submissions)) { "tasiron_30_chew_tabs": 840.68, "tasiron_drops_30ml_with_external_dropper": 202.71, "tasiron_sachet1x15s": 217.14, - "tasiron_suspension_150ml": 202.71 + "tasiron_suspension_150ml": 202.71, + + + "pansec_80_mg_tablets":226.2, + "pansec_d_sr_capsules_15s":235.2, + "pansec_tablets_15s":197.7, + "pansec_l_capsules":132.2, + // 👉 Continue adding all products same way }; @@ -545,6 +558,11 @@ if (!empty($submissions->data->submissions)) { $('#field-total_pob_value').val(totalValue.toFixed(1)); $('#field-total_pob_units').val(totalUnits); + + + $.each(productGroups, function(groupName, keys) { + calculateGroupTotals(groupName, keys); + }); }); @@ -558,16 +576,117 @@ if (!empty($submissions->data->submissions)) { }); $('#field-upload_supporting_document').on('change', function () { - let file = this.files[0]; - if (file) { - let allowedTypes = ['image/png', 'image/jpg', 'image/jpeg']; + let file = this.files[0]; + if (file) { + let allowedTypes = ['image/png', 'image/jpg', 'image/jpeg']; - if (!allowedTypes.includes(file.type)) { - alert('Only PNG, JPG, and JPEG files are allowed.'); - $(this).val(''); // reset input + if (!allowedTypes.includes(file.type)) { + alert('Only PNG, JPG, and JPEG files are allowed.'); + $(this).val(''); // reset input + } + } + }); + + + const productGroups = { + emeset: ["emeset_4_odtindia1_x_10s","emeset_4mg_10s","emeset_8mg_10s","emeset_syrup","emeset_syrup_strawberry_30_ml"], + oflox: [ + "oflox_100mg_rediuse_60ml", + "oflox_200_tab_10s", + "oflox_400_10s", + "oflox_50mg_rediuse_60ml", + "oflox_eye_drops", + "oflox_oz_tablets_ip", + "oflox_rediuse", + "oflox_200_mg_10s_tablets_ip", + "oflox_400_mg_10s_tablets_ip" + ], + cefoprox: ["cefoprox_100_30ml60","cefoprox_100dt","cefoprox_200_10s","cefoprox_50_30ml","cefoprox_cv_325_tab"], + cheston: ["cheston_duo_100ml_syrup","cheston_ls_junior_100_ml","cheston_d_cough_syrup_100_ml","cheston_d_plus_1_x_10s","cheston_ls_cough_syrup_100_ml","cheston_ls_junior_60_ml"], + + dalacin:["dalacin_c_150mg_caps_10s","dalacin_c_300mg_caps_10s"], + dolonex:["dolonex_disp_20mg_tabs_ip","dolonex_im_20mg1ml_inj","dolonex_im_40mg_2ml_inj_hosp_ip","dolonex_im_40mg2ml_inj_ip"], + duonase:["duonase_f_70_md","duonase_nasal_spray"], + ibugesic:["ibugesic_plus_susp","ibugesic_plus_susp_1","ibugesic_plus_suspension_100ml_orange"], + mucinac:["mucinac_200_tablet_1_x_10s","mucinac_600_tablets","mucinac_ab_1_x_10_tablets","mucinac_ab_tablet","mucinac_c_tablets_1_x_15s","mucinac_oral_solution_100ml"], + novamox:["novamox_500","novamox_125_rediuse_30_ml","novamox_125_rediuse_60_ml","novamox_250_dt_15s","novamox_250_ru_30","novamox_250_rediuse","novamox_30ml","novamox_60ml","novamox_cv_1000_mg","novamox_cv_2285_dt_tablets","novamox_cv_2285_mg_syrup","novamox_cv_375_tab_10s","novamox_cv_457_dt_10s","novamox_cv_625_tablets_10","novamox_cv_drops","novamox_cv_dry_syrup_30_ml","novamox_cv_ds","novamox_cv_forte_syp","novamox_cv_forte_syp_60_ml","novamox_drops","novamox_lb_500","novamox_rdu_drops","novamox_125_dt_15s","novamox_250_15s"], + + tedispan:["tedispan_200_tablets_6s"], + bilafav:["bilafav_m","bilafav_m_odt_adult_tablets_1x10s_2010","bilafav_m_odt_pedia_tablets_1x10s_104","bilafav_m_oral_suspension"], + neksium:["neksium_20mg_tab_ip","neksium_40mg_tab","neksium_d_2030mg_caps_15s_ip","neksium_d_4030mg_caps_15s_ip"], + tasiron:["tasiron_15_chew_tabs_3x10s_b12","tasiron_30_chew_tabs","tasiron_drops_30ml_with_external_dropper","tasiron_sachet1x15s","tasiron_suspension_150ml"], + pansec:["pansec_80_mg_tablets","pansec_d_sr_capsules_15s","pansec_tablets_15s","pansec_l_capsules"], + + + + + + + + }; + + + function calculateGroupTotals(groupName, keys) { + let totalUnits = 0; + let totalValue = 0; + + keys.forEach(key => { + totalUnits += parseInt($(`#field-${key}_units`).val()) || 0; + totalValue += parseFloat($(`#field-${key}_value`).val()) || 0; + }); + + $(`#field-${groupName}_units`).val(totalUnits); + $(`#field-${groupName}_value`).val(totalValue.toFixed(1)); } - } -}); + + + + $('#report-form').append(''); + $('#report-form').append(''); + + $('#report-form').append(''); + $('#report-form').append(''); + + $('#report-form').append(''); + $('#report-form').append(''); + + $('#report-form').append(''); + $('#report-form').append(''); + + + $('#report-form').append(''); + $('#report-form').append(''); + + + $('#report-form').append(''); + $('#report-form').append(''); + + $('#report-form').append(''); + $('#report-form').append(''); + + $('#report-form').append(''); + $('#report-form').append(''); + + $('#report-form').append(''); + $('#report-form').append(''); + + $('#report-form').append(''); + $('#report-form').append(''); + + $('#report-form').append(''); + $('#report-form').append(''); + + $('#report-form').append(''); + $('#report-form').append(''); + + $('#report-form').append(''); + $('#report-form').append(''); + + $('#report-form').append(''); + $('#report-form').append(''); + + + $('#report-form').on('submit', function(event) { event.preventDefault();