当前位置: 首页>>代码示例>>PHP>>正文


PHP OperationData类代码示例

本文整理汇总了PHP中OperationData的典型用法代码示例。如果您正苦于以下问题:PHP OperationData类的具体用法?PHP OperationData怎么用?PHP OperationData使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了OperationData类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: array

	</div>
	</div>
<br><!--- -->
<div class="row">
	
	<div class="col-md-12">
		<?php 
if (isset($_GET["sd"]) && isset($_GET["ed"])) {
    if ($_GET["sd"] != "" && $_GET["ed"] != "") {
        ?>
			<?php 
        $operations = array();
        if ($_GET["product_id"] == "") {
            $operations = OperationData::getAllByDateOfficial($_GET["sd"], $_GET["ed"]);
        } else {
            $operations = OperationData::getAllByDateOfficialBP($_GET["product_id"], $_GET["sd"], $_GET["ed"]);
        }
        ?>

			 <?php 
        if (count($operations) > 0) {
            ?>
<table class="table table-bordered">
	<thead>
		<th>Id</th>
		<th>Producto</th>
		<th>Cantidad</th>
		<th>Operacion</th>
		<th>Fecha</th>
	</thead>
<?php 
开发者ID:kpocha,项目名称:inventio-lite,代码行数:31,代码来源:widget-default.php

示例2:

    ?>
</h1>
</center>
</div>
<div class="clearfix"></div>
<br>
<?php 
    ?>

</div>

	<div class="col-md-4">


	<?php 
    $ototal = -1 * OperationData::GetOutputQNoF($product->id, $cut->id);
    ?>
<div class="jumbotron">
<center>
	<h2>Salidas</h2>
	<h1><?php 
    echo $ototal;
    ?>
</h1>
</center>
</div>


<div class="clearfix"></div>
<br>
<?php 
开发者ID:evilnapsis,项目名称:cazueliyas,代码行数:31,代码来源:widget-default.php

示例3: foreach

$go = true;
if (strtotime($_POST["start_at"]) > strtotime($_POST["finish_at"])) {
    $go = false;
}
if ($go && isset($_SESSION["cart"])) {
    $cart = $_SESSION["cart"];
    if (count($cart) > 0) {
        /*			$sell = new SellData();
        			$sell->user_id = $_SESSION["user_id"];
        			$sell->total = $_POST["total"];
        			$sell->discount = $_POST["discount"];
        			$s = $sell->add();
        */
        foreach ($cart as $c) {
            $op = new OperationData();
            $op->item_id = $c["item_id"];
            $op->client_id = $_POST["client_id"];
            $op->start_at = $_POST["start_at"];
            $op->finish_at = $_POST["finish_at"];
            $op->user_id = $_SESSION["user_id"];
            $add = $op->add();
            $item = ItemData::getById($c["item_id"]);
            $item->unavaiable();
            unset($_SESSION["cart"]);
            setcookie("selled", "selled");
        }
        ////////////////////
    }
}
if ($go) {
开发者ID:mriveros,项目名称:library-php,代码行数:30,代码来源:action-default.php

示例4: foreach

    <li><a href="report/onere-word.php?id=<?php 
echo $_GET["id"];
?>
">Word 2007 (.docx)</a></li>
  </ul>
</div>
<h1>Resumen de Reabastecimiento</h1>
<?php 
if (isset($_GET["id"]) && $_GET["id"] != "") {
    $sell = SellData::getById($_GET["id"]);
    $operations = OperationData::getAllProductsBySellId($_GET["id"]);
    $total = 0;
    if (isset($_COOKIE["selled"])) {
        foreach ($operations as $operation) {
            //		print_r($operation);
            $qx = OperationData::getQYesF($operation->product_id);
            // print "qx=$qx";
            $p = $operation->getProduct();
            if ($qx == 0) {
                echo "<p class='alert alert-danger'>El producto <b style='text-transform:uppercase;'> {$p->name}</b> no tiene existencias en inventario.</p>";
            } else {
                if ($qx <= $p->inventary_min / 2) {
                    echo "<p class='alert alert-danger'>El producto <b style='text-transform:uppercase;'> {$p->name}</b> tiene muy pocas existencias en inventario.</p>";
                } else {
                    if ($qx <= $p->inventary_min) {
                        echo "<p class='alert alert-warning'>El producto <b style='text-transform:uppercase;'> {$p->name}</b> tiene pocas existencias en inventario.</p>";
                    }
                }
            }
        }
        setcookie("selled", "", time() - 18600);
开发者ID:kpocha,项目名称:inventio-lite,代码行数:31,代码来源:widget-default.php

示例5:

<?php

$sell = SellData::getById($_GET["id"]);
$operations = OperationData::getAllProductsBySellId($_GET["id"]);
foreach ($operations as $op) {
    $op->del();
}
$sell->del();
Core::redir("./index.php?view=res");
开发者ID:leanet,项目名称:inventio-lite,代码行数:9,代码来源:widget-default.php

示例6:

<?php

$operations = OperationData::getAllByProductId($_GET["id"]);
foreach ($operations as $op) {
    $op->del();
}
$product = ProductData::getById($_GET["id"]);
$product->del();
Core::redir("./index.php?view=products");
开发者ID:kpocha,项目名称:inventio-lite,代码行数:9,代码来源:widget-default.php

示例7: unset

    }
    if ($process == false) {
        unset($_SESSION["cartn"]);
        $_SESSION["errorsn"] = $errors;
        ?>
	
<script>
	window.location="index.php?view=selln";
</script>
<?php 
    }
} else {
    $found = false;
    $cart = $_SESSION["cartn"];
    $index = 0;
    $q = OperationData::getQYesF($_POST["product_id"], $cut->id);
    $can = true;
    if ($_POST["q"] <= $q) {
    } else {
        $error = array("product_id" => $_POST["product_id"], "message" => "No hay suficiente cantidad de producto en inventario.");
        $errors[count($errors)] = $error;
        $can = false;
    }
    if ($can == false) {
        $_SESSION["errors"] = $errors;
        ?>
	
<script>
	window.location="index.php?view=selln";
</script>
<?php 
开发者ID:leanet,项目名称:inventio-lite,代码行数:31,代码来源:widget-default.php

示例8: foreach

">Adelante <i class="glyphicon glyphicon-chevron-right"></i></a>
<?php 
    }
    ?>
</div>
<div class="clearfix"></div>
<br><table class="table table-bordered table-hover">
	<thead>
		<th>Codigo</th>
		<th>Nombre</th>
		<th>Disponible</th>
		<th></th>
	</thead>
	<?php 
    foreach ($curr_products as $product) {
        $q = OperationData::getQYesF($product->id, $_GET["id"]);
        ?>
	<tr class="<?php 
        if ($q == 0) {
            echo "danger";
        } else {
            if ($q <= 5) {
                echo "warning";
            }
        }
        ?>
">
		<td><?php 
        echo $product->id;
        ?>
</td>
开发者ID:evilnapsis,项目名称:cazueliyas,代码行数:31,代码来源:widget-default.php

示例9:

if (isset($_GET["finish_at"]) && $_GET["finish_at"] != "") {
    echo $_GET["finish_at"];
}
?>
" class="form-control" placeholder="Palabra clave">
		</div>
    </div>
    <div class="col-lg-6">
    <button class="btn btn-primary btn-block">Procesar</button>
    </div>

  </div>
</form>
<?php 
if (isset($_GET["start_at"]) && $_GET["start_at"] != "" && isset($_GET["finish_at"]) && $_GET["finish_at"] != "") {
    $users = OperationData::getByRange($_GET["start_at"], $_GET["finish_at"]);
    if (count($users) > 0) {
        // si hay usuarios
        $_SESSION["report_data"] = $users;
        ?>
			<div class="panel panel-default">
			<div class="panel-heading">
			Reportes</div>
			<table class="table table-bordered table-hover">
			<thead>
			<th>Ejemplar</th>
			<th>Titulo</th>
			<th>Cliente</th>
			<th>Fecha</th>
			</thead>
			<?php 
开发者ID:mriveros,项目名称:library-php,代码行数:31,代码来源:widget-default.php

示例10: array

		</div>
    </div>
    <div class="col-lg-6">
    <button class="btn btn-primary btn-block">Procesar</button>
    </div>

  </div>
</form>
<?php 
$products = array();
if (isset($_GET["start_at"]) && $_GET["start_at"] != "" && isset($_GET["finish_at"]) && $_GET["finish_at"] != "") {
    if ($_GET["start_at"] < $_GET["finish_at"]) {
        $products = OperationData::getAllByClientIdAndRange($client->id, $_GET["start_at"], $_GET["finish_at"]);
    }
} else {
    $products = OperationData::getAllByClientId($client->id);
}
if (count($products) > 0) {
    ?>
<br>
<table class="table table-bordered table-hover	">
	<thead>
		<th>Ejemplar</th>
		<th>Libro</th>
		<th>Cliente</th>
		<th>Inicio</th>
		<th>Fin</th>
		<th>Regreso</th>
	</thead>
	<?php 
    foreach ($products as $sell) {
开发者ID:mriveros,项目名称:library-php,代码行数:31,代码来源:widget-default.php

示例11: foreach

">Adelante <i class="glyphicon glyphicon-chevron-right"></i></a>
<?php 
    }
    ?>
</div>
<div class="clearfix"></div>
<br><table class="table table-bordered table-hover">
	<thead>
		<th>Codigo</th>
		<th>Nombre</th>
		<th>Disponible</th>
		<th></th>
	</thead>
	<?php 
    foreach ($curr_products as $product) {
        $q = OperationData::getQYesF($product->id);
        ?>
	<tr class="<?php 
        if ($q <= $product->inventary_min / 2) {
            echo "danger";
        } else {
            if ($q <= $product->inventary_min) {
                echo "warning";
            }
        }
        ?>
">
		<td><?php 
        echo $product->id;
        ?>
</td>
开发者ID:leanet,项目名称:inventio-lite,代码行数:31,代码来源:widget-default.php

示例12: array

$section1 = $word->AddSection();
$section1->addText("HISTORIAL DE CAJA", array("size" => 22, "bold" => true, "align" => "right"));
$boxes = BoxData::getAll();
$products = SellData::getSellsUnBoxed();
$styleTable = array('borderSize' => 6, 'borderColor' => '888888', 'cellMargin' => 40);
$styleFirstRow = array('borderBottomColor' => '0000FF', 'bgColor' => 'AAAAAA');
$table1 = $section1->addTable("table1");
$table1->addRow();
$table1->addCell()->addText("Total");
$table1->addCell()->addText("Fecha");
$total_total = 0;
foreach ($boxes as $box) {
    $sells = SellData::getByBoxId($box->id);
    $total = 0;
    foreach ($sells as $sell) {
        $operations = OperationData::getAllProductsBySellId($sell->id);
        foreach ($operations as $operation) {
            $product = $operation->getProduct();
            $total += $operation->q * $product->price_out;
        }
    }
    $total_total += $total;
    $table1->addRow();
    $table1->addCell(5000)->addText("\$ " . number_format($total, 2, ".", ","));
    $table1->addCell(2500)->addText($box->created_at);
}
$section1->addText("");
$section1->addText("Total: \$" . number_format($total_total, 2, ".", ","), array("size" => 22));
$word->addTableStyle('table1', $styleTable, $styleFirstRow);
/// datos bancarios
$filename = "boxhistory-" . time() . ".docx";
开发者ID:evilnapsis,项目名称:inventio-lite,代码行数:31,代码来源:boxhistory-word.php

示例13: array

<?php

$user = UserData::getById(Session::getUID());
$operations = null;
$category = null;
if (!isset($_GET["cat_id"])) {
    $operations = OperationData::getAllByDate($_GET["date"]);
    $spents = SpentData::getAllByDate($_GET["date"]);
} else {
    $operations = OperationData::getAllByDateAndCategoryId($_GET["date"], $_GET["cat_id"]);
    $spents = SpentData::getAllByDateAndCategoryId($_GET["date"], $_GET["cat_id"]);
    $category = CategoryData::getById($_GET["cat_id"]);
}
$sell = 0;
$spent = 0;
$money = 0;
foreach ($operations as $career) {
    $sell += $career->q * $career->price;
}
foreach ($spents as $career) {
    $spent += $career->price;
}
$money = $sell - $spent;
?>
 <section class="content-header">
	<h1>Resumen <small><?php 
$months = array("01" => "Enero", "02" => "Febrero", "03" => "Marzo", "04" => "Abril", "05" => "Mayo", "06" => "Junio", "07" => "Julio", "08" => "Agosto", "09" => "Septiembre", "10" => "Octubre", "11" => "Noviembre", "12" => "Diciembre");
echo "<b>" . date("d", strtotime($_GET["date"])) . " de " . $months[date("m", strtotime($_GET["date"]))] . " del " . date("Y", strtotime($_GET["date"])) . "</b>";
?>
</small></h1>
<ol class="breadcrumb">
开发者ID:evilnapsis,项目名称:cazueliyas,代码行数:31,代码来源:widget-default.php

示例14: array

include "../core/autoload.php";
include "../core/modules/index/model/ProductData.php";
include "../core/modules/index/model/CategoryData.php";
include "../core/modules/index/model/OperationData.php";
include "../core/modules/index/model/OperationTypeData.php";
require_once '../PhpWord/Autoloader.php';
use PhpOffice\PhpWord\Autoloader;
use PhpOffice\PhpWord\Settings;
Autoloader::register();
$word = new PhpOffice\PhpWord\PhpWord();
$product = ProductData::getById($_GET["id"]);
$operations = OperationData::getAllByProductId($product->id);
$entradas = OperationData::GetInputQYesF($product->id);
$disponibles = OperationData::GetQYesF($product->id);
$salidas = -1 * OperationData::GetOutputQYesF($product->id);
$section1 = $word->AddSection();
$section1->addText($product->name, array("size" => 22, "bold" => true, "align" => "right"));
$section1->addText("Historial del Producto", array("size" => 14, "bold" => true, "align" => "right"));
$styleTable = array('borderSize' => 6, 'borderColor' => '888888', 'cellMargin' => 40);
$styleFirstRow = array('borderBottomColor' => '0000FF', 'bgColor' => 'AAAAAA');
$table0 = $section1->addTable("table0");
$table0->addRow();
$table0->addCell()->addText("Entradas");
$table0->addCell()->addText("Disponibles");
$table0->addCell()->addText("Salidas");
$table0->addRow();
$table0->addCell(4000)->addText($entradas);
$table0->addCell(4000)->addText($disponibles);
$table0->addCell(4000)->addText($salidas);
$word->addTableStyle('table0', $styleTable, $styleFirstRow);
开发者ID:proyectoseb,项目名称:facturacion,代码行数:30,代码来源:history-word.php

示例15: Upload

    if ($_POST["inventary_min"] != "") {
        $inventary_min = $_POST["inventary_min"];
    }
    $product->category_id = $category_id;
    $product->inventary_min = $inventary_min;
    $product->user_id = Session::getUID();
    if (isset($_FILES["image"])) {
        $image = new Upload($_FILES["image"]);
        if ($image->uploaded) {
            $image->Process("storage/products/");
            if ($image->processed) {
                $product->image = $image->file_dst_name;
                $product->add_with_image();
            }
        } else {
            $product = $product->add();
        }
    } else {
        $product = $product->add();
    }
    if ($_POST["q"] != "" || $_POST["q"] != "0") {
        $op = new OperationData();
        $op->product_id = $product[1];
        $op->operation_type_id = OperationTypeData::getByName("entrada")->id;
        $op->q = $_POST["q"];
        $op->sell_id = "NULL";
        $op->is_oficial = 1;
        $op->add();
    }
    print "<script>window.location='index.php?view=products';</script>";
}
开发者ID:leanet,项目名称:inventio-lite,代码行数:31,代码来源:widget-default.php


注:本文中的OperationData类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。