<?php    include_once('../config/db.php');  include_once('../config/check.php'); //include_once('../functions/sale/sale.php');



       
               $stmt = $conn->prepare(" SELECT * FROM acctransactionsdetails where 
                                        partner= 69 and transmove=5 ");
                $stmt->execute();
                $cashsales = $stmt->fetchAll();     

   
    // Inserting into Detailes / Items debeting 
    foreach($cashsales as  $cashsale)  
        {  
          
           $sql = "UPDATE acctransactions SET transtype=:transtype  WHERE id=:id " ;
           $stmt = $conn->prepare($sql)->execute([ 'transtype' =>10 ,'id'=>$cashsale['transid']  ]);

        }
       
?>

