GL BRANCH - PHP Online
Form of PHP Sandbox
Enter Your PHP code here for testing/debugging in the Online PHP Sandbox. As in the usual PHP files, you can also add HTML, but do not forget to add the tag <?php
in the places where the PHP script should be executed.
Result of php executing
Full code of GL BRANCH.php
- <?php
- $service_charge = '10.00';
- $product_amount = '150.00';
- $total_amount = '165.00';
- $printing_cost = '1.30';
- $additional_charge = '5.00';
- $coverage_amt = '75000.00';
- $cbo_unit = '3';
- $service_charge = number_format(round($service_charge,2), 2);
- $product_amount = number_format(round($product_amount,2), 2);
- $total_amount = number_format(round($total_amount,2), 2);
- $commission = number_format(round($service_charge * $cbo_unit,2), 2);
- $net_of_vat_admin_fee = number_format(round($commission / 1.12,2), 2);
- $wh_tax = number_format(round($net_of_vat_admin_fee * 0.02,2), 2);
- $tax_admin_fee = number_format(round($commission - $wh_tax,2), 2);
- $printing_cost = number_format(round($printing_cost,2), 2);
- $printing_cost_net_vat = number_format(round($printing_cost / 1.12,2), 2);
- $wh_tax_oe = number_format(round($printing_cost_net_vat * 0.02,2), 2);
- $net_premium = number_format(round(($product_amount - ($commission - $wh_tax) - ($printing_cost - $wh_tax_oe)),2),2);
- $coverage_amt = number_format(round($coverage_amt * $cbo_unit,2), 2);
- $insurance_commission = number_format(round(($service_charge + $commission + $additional_charge) / 1.12,2), 2);
- $vat = number_format(round($insurance_commission * 0.12,2), 2);
- $misc = number_format(round($printing_cost-$printing_cost_net_vat,2), 2);
- $wt_tax_computed = number_format(round($wh_tax+$wh_tax_oe,2), 2);
- //Printing Cost Net Vat = 1.1607 (Printing Cost / 1.12)
- //Miscellaneous = 0.1393 (Printing Cost - Printing Cost Net Vat)
- //Insurance Commission = 40.1785 (Service Charge + Commission + Additional) / 1.12
- //Vat = 4.8214 (Insurance Commission x 0.12)
- echo 'COH: '.number_format(round($total_amount+$wt_tax_computed,2), 2).'<br><br>';
- echo 'Creditable WTAX: '.number_format(round($wt_tax_computed,2), 2).'<br><br>';
- echo 'OUTPUT TAX: '.number_format(round($vat+$misc,2), 2).'<br><br>';
- echo 'COMM INSURANCE: '.number_format(round($insurance_commission,2), 2).'<br><br>';
- echo 'MISCE: '.number_format(round($printing_cost-$printing_cost_net_vat,2), 2).'<br><br>';
File Description
- GL BRANCH
- PHP Code
- 29 Oct-2020
- 2.46 Kb
You can Share it:
Latest PHP Pastes