Add php files

This commit is contained in:
2025-05-12 15:44:39 +00:00
parent c951760058
commit 82d5804ac4
9534 changed files with 2638137 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
<?php
function ProductToOrder($focus, $field, $value, $view) {
$db = $focus->db;
$query = "SELECT q3, ems_qty_in_stock from ecmproducts WHERE id='".$focus->id."';";
$result = $db->query($query);
$row = $db->fetchByAssoc($result);
$q3 = $row['q3'];
$stock = $row['ems_qty_in_stock'];
if ( intval($stock) < 3 * intval($q3)) return 1; else return 0;
}
?>