<?php
include_once("../public/con_reedbean.php");
$do = $_GET['do'];

if ($do == "assetsalecheck") {
    assetsalecheck();
}else if($do == "savedata") {
    savedata();
}
/* ===============================
  function in this CONTROLLER
  ================================ */

// add in Storerawmaterial tbl

function assetsalecheck()
{
    
    
   // echo 'nora';
    $assetsid = $_POST['assetsid'];
    $assetssale = R::getRow("SELECT * FROM `assetssale` WHERE assetsid = $assetsid");
    echo json_encode($assetssale);
}


function savedata()
{
    $saveid = $_POST['saveid'];
    $savedata = R::getRow("SELECT * FROM `save` WHERE saveid = 2");
    echo json_encode($savedata);
}
?>
