'Uttar Pradesh', // 'merchant_name'=>'Style Avenue Pvt. Ltd.', // 'address'=>'Maldahiya', // 'city' => 'Varanasi', // 'display_phone'=>'8744949294', // 'reg_no'=>'09AUDPJ2349X2XP', // 'user_email'=>'styleavenue@gmail.com', // ]; //$party_info = [ //Will be sent by post request // 'name' => 'Kushagra Jaiswal', // 'phone' => '8744949294', // 'gstin' => 'AUDPJ2381E', // 'state' => 'Uttar Pradesh(09)' //]; //$bill_info = [ // 'voucher_no' => '123', // 'date' => '2018-01-23', // 'items' => [ // [ // 'particulars' => 'Billfree Subscription for 1 year', // 'hsn' => '', // 'gst'=>'16', // 'mrp' => '2560', // 'qty' => '2', // 'discount' => '1180' // ], // [ // 'particulars' => 'Billfree Feedback Service', // 'hsn' => '', // 'gst' => '18', // 'mrp' => '860', // 'qty' => '1', // 'discount' => '300' // ], // [ // 'particulars' => 'Billfree Offers Service', // 'hsn' => 'HSN002', // 'gst' => '12', // 'mrp' => '700', // 'qty' => '2', // 'discount' => '700' // ] // ] //]; $hsnArr = [];$arr['gstVal'] = 0;$arr['taxable']=0; foreach($bill_info['items'] as $item){ $hsnArr[$item['hsn']]['gst'] = $item['gst']; $gstVal = ($item['gst']/100)*$item['mrp']; $arr['gstVal'] += $gstVal; $arr['taxable'] += ($item['mrp'])*$item['qty'] - $item['discount'] - $gstVal; $hsnArr[$item['hsn']]['gstVal'] = $arr['gstVal']; $hsnArr[$item['hsn']]['taxable'] = $arr['taxable']; } ?>

TAX INVOICE

This is a Computer Generated Invoice