<?php
include 'include/db.php';
include 'include/connect.php';
// $id = $_POST['invoice'];  
        if($_POST['receipt_iv'] != ""){
        $rs = $db->insert('tbreceipt',array(
         'receipt_iv' => $_POST['receipt_iv'],
         'receipt_pay' => $_POST['idpay'],
         'receipt_pay_type' => $_POST['receipt_pay_type'],
         'receipt_date' => $_POST['receipt_date'],
         'receipt_bank' => $_POST['receipt_bank'],
         'receipt_total' => $_POST['receipt_total'],
         'receipt_status' => '0'
        ));
        if($rs){
            echo '2';
           
            }else {
                
            echo '00';
            }           
        
    } else {
        echo "3";
    }
   
?>

