'.$branch_id; } $data = array(); $get_invoices_sql = mysqli_query($db, "SELECT `filter`, `total`, `invoices_status_id`, `how_pay_id` FROM `r_month_user_invoices` WHERE DATE_FORMAT(`filter`, '%Y-%m') = '$today' AND `branch_id` $branch_sql "); 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': $data['inv'][$get_invoices['filter']]['stuck'] += $get_invoices['total']; 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': $data['back'][$get_invoices['filter']]['stuck'] += $get_invoices['total']; break; } break; case '4': echo""; break; } } $get_invoices_sql = mysqli_query($db, "SELECT `filter`, `total`, `bonds_status_id`, `how_pay_id` FROM `r_month_user_bonds` WHERE DATE_FORMAT(`filter`, '%Y-%m') = '$today' AND `branch_id` $branch_sql "); 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': $data['bonds'][$get_invoices['filter']]['stuck'] += $get_invoices['total']; 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': $data['back'][$get_invoices['filter']]['stuck'] += $get_invoices['total']; break; } break; case '4': echo""; break; } } ?>
| التاريخ | البيان | المتحصلات اليومية | الإيرادات - الفواتير | الايرادات بدون الضريبة | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| كاش | شبكة | تحويل | إجمالي المتحصلات | عن فواتير / كاش / شبكة | عن فواتير/ محول من ارصدة دائنة للعملاء | إيرادات مرتجعة ( فاتورة مرتجعات ) | إجمالي الإيرادات | |||
| =$frist_day?> | فواتير | =round($data['inv'][$frist_day]['cash'],2)?> | =round($data['inv'][$frist_day]['card'],2)?> | =round(0,2)?> | =round($data['inv'][$frist_day]['cash'] + $data['inv'][$frist_day]['card'],2)?> | =round($data['inv'][$frist_day]['cash'] + $data['inv'][$frist_day]['card'],2)?> | =round($data['inv'][$frist_day]['stuck'],2)?> | =round(-($data['back'][$frist_day]['cash'] + $data['back'][$frist_day]['card'] + $data['back'][$frist_day]['stuck']),2)?> | =round(($data['inv'][$frist_day]['cash'] + $data['inv'][$frist_day]['card']) + $data['inv'][$frist_day]['stuck'] - ($data['back'][$frist_day]['cash'] + $data['back'][$frist_day]['card'] + $data['back'][$frist_day]['stuck']),2)?> | =round((($data['inv'][$frist_day]['cash'] + $data['inv'][$frist_day]['card']) + $data['inv'][$frist_day]['stuck'] - ($data['back'][$frist_day]['cash'] + $data['back'][$frist_day]['card'] + $data['back'][$frist_day]['stuck']))/1.15,2)?> |
| أرصدة دائنة للعملاء | =round($data['bonds'][$frist_day]['cash'],2)?> | =round($data['bonds'][$frist_day]['card'],2)?> | =round(0,2)?> | =round($data['bonds'][$frist_day]['cash'] + $data['bonds'][$frist_day]['card'],2)?> | ||||||
| إيرادات مرتجعة | =round(-($data['back'][$frist_day]['cash'] + $data['back'][$frist_day]['card'] + $data['back'][$frist_day]['stuck']),2)?> | =round(0,2)?> | =round(0,2)?> | =round(-($data['back'][$frist_day]['cash'] + $data['back'][$frist_day]['card'] + $data['back'][$frist_day]['stuck']),2)?> | ||||||
| مجموع | =round($data['inv'][$frist_day]['cash'] + $data['bonds'][$frist_day]['cash'] - ($data['back'][$frist_day]['cash'] + $data['back'][$frist_day]['card'] + $data['back'][$frist_day]['stuck']),2)?> | =round($data['inv'][$frist_day]['card'] + $data['bonds'][$frist_day]['card'],2)?> | =round(0,2)?> | =round(($data['inv'][$frist_day]['cash'] + $data['inv'][$frist_day]['card']) + ($data['bonds'][$frist_day]['cash'] + $data['bonds'][$frist_day]['card']) - ($data['back'][$frist_day]['cash'] + $data['back'][$frist_day]['card'] + $data['back'][$frist_day]['stuck']),2)?> | ||||||
| المجموع الكلي | =round($t1,2)?> | =round($t2,2)?> | =round($t3,2)?> | =round($t4,2)?> | =round($t5,2)?> | =round($t6,2)?> | =round(-$t7,2)?> | =round($t8,2)?> | =round($t9,2)?> | |