コード例 #1
0
<?php

if (isset($_GET["product_id"])) {
    $product = ProductData::getById($_GET["product_id"]);
    $operations = OperationData::getAllByProductIdCutId($product->id, $cut->id);
    ?>
<div class="row">
	<div class="col-md-12">
<a href="" class="btn btn-default pull-right btn-lg">Sin Factura</a>

<h1><?php 
    echo $product->name;
    ?>
 <small>Operaciones con factura</small></h1>
	</div>
	</div>

<div class="row">
	<div class="col-md-4">
	<?php 
    $total = OperationData::GetQ($product->id, $cut->id);
    $no_oficial = OperationData::GetQNoF($product->id, $cut->id);
    $oficial = OperationData::GetQYesF($product->id, $cut->id);
    $nof100 = 0;
    $of100 = 0;
    if ($no_oficial > 0) {
        $nof100 = $no_oficial / $total;
    }
    if ($oficial > 0) {
        $of100 = $oficial / $total;
    }