'2023-09-25' AND `r_month_user_invoices`.`branch_id` = 12 AND `branch`.`commercial_register_id` = 3 " ); if (mysqli_num_rows($get_invoices_sql) > 0) { while ($get_invoices = mysqli_fetch_assoc($get_invoices_sql)) { switch ($get_invoices['invoices_status_id']) { case '1': case '2': switch ($get_invoices['how_pay_id']) { case '1': $data['inv'][$get_invoices['filter']]['cash'] += $get_invoices['total']; break; case '2': $data['inv'][$get_invoices['filter']]['card'] += $get_invoices['total']; break; case '3': case '4': $data['inv'][$get_invoices['filter']]['stuck'] += $get_invoices['total']; break; case '6': case '7': case '8': case '9': case '10': $data['inv'][$get_invoices['filter']]['trans'] += $get_invoices['total']; break; default: $data['inv'][$get_invoices['filter']]['else'] += $get_invoices['total']; $error++; break; } break; case '3': switch ($get_invoices['how_pay_id']) { case '1': $data['back'][$get_invoices['filter']]['cash'] += $get_invoices['total']; break; case '2': $data['back'][$get_invoices['filter']]['card'] += $get_invoices['total']; break; case '3': case '4': $data['back'][$get_invoices['filter']]['stuck'] += $get_invoices['total']; break; case '5': $data['back'][$get_invoices['filter']]['trans'] += $get_invoices['total']; break; default: $data['back'][$get_invoices['filter']]['else'] += $get_invoices['total']; $error++; break; } break; default: $error++; break; } } } $get_invoices_sql = mysqli_query( $db, "SELECT `r_month_user_bonds`.`filter`, `r_month_user_bonds`.`total`, `r_month_user_bonds`.`bonds_status_id`, `r_month_user_bonds`.`how_pay_id` FROM `r_month_user_bonds` INNER JOIN `branch` ON `branch`.`id` = `r_month_user_bonds`.`branch_id` WHERE `r_month_user_bonds`.`filter` > '2023-09-25' AND `r_month_user_bonds`.`branch_id` = 12 AND `branch`.`commercial_register_id` = 3 AND `branch`.`commercial_register_id` <> 5 " ); if (mysqli_num_rows($get_invoices_sql) > 0) { while ($get_invoices = mysqli_fetch_assoc($get_invoices_sql)) { switch ($get_invoices['bonds_status_id']) { case '1': case '2': switch ($get_invoices['how_pay_id']) { case '1': $data['bonds'][$get_invoices['filter']]['cash'] += $get_invoices['total']; break; case '2': $data['bonds'][$get_invoices['filter']]['card'] += $get_invoices['total']; break; case '3': case '4': $data['bonds'][$get_invoices['filter']]['stuck'] += $get_invoices['total']; break; case '6': case '7': case '8': case '9': case '10': $data['bonds'][$get_invoices['filter']]['trans'] += $get_invoices['total']; break; default: $data['bonds'][$get_invoices['filter']]['else'] += $get_invoices['total']; $error++; break; } break; case '3': switch ($get_invoices['how_pay_id']) { case '1': $data['bond_back'][$get_invoices['filter']]['cash'] += $get_invoices['total']; break; case '2': $data['bond_back'][$get_invoices['filter']]['card'] += $get_invoices['total']; break; case '3': case '4': $data['bond_back'][$get_invoices['filter']]['stuck'] += $get_invoices['total']; break; case '5': $data['bond_back'][$get_invoices['filter']]['trans'] += $get_invoices['total']; break; default: $data['bond_back'][$get_invoices['filter']]['else'] += $get_invoices['total']; $error++; break; } break; default: $error++; break; } } } $get_bonds_details_has_services_sql = mysqli_query( $db, "SELECT DATE_FORMAT(`bonds_details_has_services`.`date_time`, '%Y-%m-%d') AS `date`, `services`.`price`, `services`.`name`,`services`.`id`, count(`services`.`id`) AS `count`, `bonds_details_has_services`.`bonds_details_id` FROM `bonds_details_has_services` INNER JOIN `bonds_details` ON `bonds_details_has_services`.`bonds_details_id` = `bonds_details`.`id` INNER JOIN `services` ON `bonds_details_has_services`.`services_id` = `services`.`id` WHERE `bonds_details_has_services`.`discount` = 50 AND `bonds_details_has_services`.`just_for_branch` = 12 GROUP BY DATE_FORMAT(`bonds_details_has_services`.`date_time`, '%Y-%m-%d'), `services_id` ORDER BY `bonds_details_has_services`.`bonds_details_id` ASC " ); if (mysqli_num_rows($get_bonds_details_has_services_sql) > 0) { while ($get_bonds_details_has_services = mysqli_fetch_assoc($get_bonds_details_has_services_sql)) { $data['serv'][$get_bonds_details_has_services['date']]['serv'][$get_bonds_details_has_services['id']] = array( 'name' => $get_bonds_details_has_services['name'], 'count' => $get_bonds_details_has_services['count'], 'price' => round((round(($get_bonds_details_has_services['price']) + (($get_bonds_details_has_services['price'] * 15)/100),2) * $get_bonds_details_has_services['count']) / 2, 2) ); } } ?>

تقرير خصومات النسائي 50%

التاريخ البيان المتحصلات اليومية الباقات ب خصم 50%
كاش شبكة تحويل اخرى إجمالي المتحصلات السندات خدمات خصم 50% المبلغ المستفاد من ال50%
فواتير 0) { foreach ($data['serv'][$frist_day]['serv'] as $key => $value) { ?>
إيرادات مرتجعة - - - -
أرصدة دائنة للعملاء
مرتجع أرصدة دائنة - - - - -
مجموع
المجموع الكلي
فواتير
إيرادات مرتجعة - - - - -
أرصدة دائنة للعملاء
مرتجع أرصدة دائنة - - - - -
مجموع