Exemplo n.º 1
0
function get_barcode($barcode)
{
    //this is wrapper for check site origins for barcode
    $site = 0;
    $site = get_barcodes_from_db($barcode);
    return $site;
}
Exemplo n.º 2
0
    $ref_sell = $_SESSION['ref_sell_number'];
    $buyer_id = $_SESSION['site_id_s_s'];
    $insert_invoice = "";
    $result_barcode = mysql_query($insert_barcode) or die(mysql_error());
    $last_barcode = mysql_insert_id();
    if ($result_barcode) {
        echo "Added waste_barcode";
    }
    echo "BATCH DATE" . $batch_date;
    $batch_date = $_SESSION['batch_date1'];
    $insert_sell = "INSERT transaction_waste(ref_sell_number,buyer_id,finished,invoice_waste_idinvoice_waste,waste_barcode_idwaste_barcode,date_sold) Values('{$ref_sell}','{$buyer_id}','1','{$invoice_id}','{$last_barcode}','{$batch_date}')";
    $result_sell = mysql_query($insert_sell) or die(mysql_error());
    if ($result_sell) {
        echo "Added transaction sell";
        //this function may causing a problem no return value in prtotype
        $site_1 = get_barcodes_from_db($barcode2);
        if (!empty($site_1)) {
            $update = "UPDATE waste_barcode SET site='{$site_1}' WHERE idwaste_barcode='{$last_barcode}'";
            mysql_query($update) or die(mysql_error());
        } else {
            if (empty($site_1) and !strncmp(strtoupper($barcode), "FAU", 3)) {
                $update = "UPDATE waste_barcode SET site='18' WHERE idwaste_barcode='{$last_barcode}'";
                mysql_query($update) or die(mysql_error());
            }
        }
    }
    $url = "sell_item_waste1.php?item_type={$item_type}&MESSG=2";
    redirect($url, $TEST_T);
    exit;
}
?>
Exemplo n.º 3
0
function check_collected_stocked($barcode)
{
    //this is a wrapper to the functions imported from function_site_header
    $has_site = get_barcodes_from_db($barcode);
    if ($has_site != 0) {
        echo "<td><b>Item collected. SDA WASTE</b></td>";
    } else {
        if (substr($barcode, 0, 3) == "ONS") {
            echo "<td><b>Label not used. ON SITE Sticker";
        } else {
            echo "<td><b>Label not used</b></td>";
        }
    }
}
Exemplo n.º 4
0
    $s_serial = 1;
    //if part number is not empty
    $V_SERIAL = $serial;
}
echo "BEFORE CROOS" . $EXTENDED_MODULE;
// functions returns to a buffer that is not in use yet. Fun returns hash format. While barcode is still slash format. Thoough javna conversion is needed, before adding barcode
$barcode3 = check_unq($barcode);
if ($EXTENDED_MODULE == 1) {
    $barcode2 = validate_barcode($barcode);
    if (isset($_POST['barcode2'])) {
        echo "<BR />Container barcode set.";
        $barcode_cont = $_POST['barcode2'];
        $barcode_container = get_barcodes_from_db($barcode_cont);
    }
} else {
    $barcode2 = validate_barcode(get_barcodes_from_db($barcode));
}
echo '</br>barcode after validateing: ' . $barcode2;
$connect = mysql_connect('localhost', 'root', 'krasnal') or die(mysql_error());
mysql_select_db('dbs3');
//user is written as a session
$user = $_SESSION['id_user'];
//$barcode=swap_hash($barcode);
echo "KLINIETO BARCODE EXEXEXEXEXXEXXXEXEXE";
echo "VBAR EXRR:" . $V_BAR_EX . "s_itemRR:" . $s_item . $s_brand . $s_serial . "sesjaRR:" . $sesja . "MESSAGERR:" . $MESSG_EX;
// if barcode does not exist in database or barcode read from db exist but doesnt fit the barcode inputed and everything else is set than
// if barcode does not exist in databse and everything is set and site place
if ($v_bar_exist == 0 and $s_item != 0 and $s_brand != 0 and $s_serial != 0 and isset($sesja) and $MESSG_EX != 0) {
    //HERE WE GIVE A MODUL FOR aggind slash format
    $item = add_db_format($item);
    $brand = add_db_format($brand);
Exemplo n.º 5
0
function small_barcodes_waste($ref_sell)
{
    $sql_waste = "select Barcode_waste,site,type_item from waste_barcode INNER JOIN transaction_waste ON waste_barcode.idwaste_barcode=transaction_waste.waste_barcode_idwaste_barcode\r\n WHERE ref_sell_number='" . $ref_sell . "' order by idwaste_barcode DESC";
    $result = mysql_query($sql_waste) or die(mysql_error());
    global $SITE_REFERENCE_SEARCH;
    global $SITE_DETAILS;
    echo '<table>';
    while ($rek = mysql_fetch_array($result)) {
        echo '<tr>';
        echo '<td>+';
        echo $rek[0];
        echo '</td>';
        echo '<td>';
        echo 'Untested item';
        echo '</td>';
        echo '<td>';
        if ($SITE_REFERENCE_SEARCH == 1) {
            // $stime = microtime();
            //     $stime = explode(" ",$stime);
            //    $stime = $stime[1] + $stime[0];
            echo site_communicate($site_token = get_barcodes_from_db($rek[0]));
            //    $sstime = microtime();
            //    $sstime = explode(" ",$sstime);
            //    $sstime = $sstime[1] + $sstime[0];
            //    $totaltime = ($sstime - $stime);
            //   echo $totaltime;
        } else {
            if ($SITE_REFERENCE_SEARCH == 2) {
            } else {
            }
        }
        echo '</td>';
        if ($SITE_DETAILS == 1 and $SITE_REFERENCE_SEARCH != 0) {
            echo '<td>';
            if (get_site_id_waste_bar($rek[0]) == 18) {
                echo "GRR WD257DL";
            } else {
                if (!empty($site_token)) {
                    echo site_origins($site_token);
                } else {
                    echo site_origins($rek[1]);
                }
                //echo site_origins(get_barcodes_from_db($rek[0])); //here that should be changes since it connect db wit 2 circulization set
            }
            echo '</td>';
        }
        echo '<td>';
        echo get_item_name($rek[2]);
        echo '</td>';
        echo "</tr>";
    }
    echo '</table>';
}
Exemplo n.º 6
0
        echo "<BR/><BR/>STATUS: <BR/>";
        echo "<BR/>First Label: ";
        if (!empty($start_dbs_stat)) {
            echo "Set";
        } else {
            echo "Not set";
        }
        echo "<BR/>Last Label: ";
        if (!empty($end_dbs_stat)) {
            echo "Set";
        } else {
            echo "Not set";
        }
        $barcode = $start_dbs_stat;
        echo "<BR/>Labels coherency: ";
        if (get_barcodes_from_db($barcode) == 0) {
            echo "Coherent";
        } else {
            echo "Not Cohernet";
        }
    }
}
//END of STATUS CHECK
//prepering to import att delivery site and categories
if ($imported == 1) {
    //first we take every detail
    //sleep(2);
    echo "<BR/>Loading Site details into transfering module " . $siteid . " ";
    $mtime = microtime();
    $mtime = explode(" ", $mtime);
    $mtime = $mtime[1] + $mtime[0];
Exemplo n.º 7
0
      echo "<BR/>";  
      echo "<BR/>Braekin Bad";   
      return 0;  
       
      
    }
      
    }
*/
//end of functions
//validation starts
if (isset($_POST['Submit_stock'])) {
    echo "IN Submit stock";
    if (isset($_POST['barcode'])) {
        echo "IN parcode post";
        $BAR_EX = get_barcodes_from_db($_POST['barcode']);
        //$BAR_EX=$_POST['barcode'];
    }
    if (isset($_POST['brand'])) {
        $BRAND_EX = $_POST['brand'];
    }
    if (isset($_POST['serial'])) {
        $SERIAL_EX = $_POST['serial'];
    }
    if (isset($_POST['item'])) {
        $ITEM_EX = $_POST['item'];
    }
}
if (isset($ITEM_EX) and isset($BAR_EX) and isset($BRAND_EX) and isset($SERIAL_EX)) {
    echo "checkin weights";
    $SELECT_CAT = "SELECT Category_id FROM sub_cat Where id_c={$ITEM_EX}";
Exemplo n.º 8
0
// recommended to prevent caching of event
$filename = "diagnosis/overlapped" . str_replace($FLAG_BARCODE, '/', '') . ".txt";
echo $filename;
$fw = fopen($filename, "a");
$filename = "diagnosis/empty" . str_replace($FLAG_BARCODE, '/', '') . ".txt";
$fwe = fopen($filename, "a");
$all_overlapped = array();
$overlapped = 0;
if ($FLAG_GO == 1) {
    do {
        $barcode = split_barcode($barcode);
        // A loop for query. We will observe the complexity and efficiency of site acgureing function
        $stime = microtime();
        $stime = explode(" ", $stime);
        $stime = $stime[1] + $stime[0];
        $conf_barcode = get_barcodes_from_db($barcode);
        $sstime = microtime();
        $sstime = explode(" ", $sstime);
        $sstime = $sstime[1] + $sstime[0];
        $totaltime = $sstime - $stime;
        if ($conf_barcode == -5) {
            echo "<font color='red'>";
            echo $barcode . " -  Overlapped";
            echo '</font>';
            $overlapped++;
            $all_overlapped[$overlapped] = $barcode;
            fwrite($fw, $overlapped);
            fwrite($fw, PHP_EOL);
        } else {
            if ($conf_barcode > 0) {
                $state = 0;