コード例 #1
0
<?php

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);
コード例 #2
0
<h1><i class="glyphicon glyphicon-time"></i> Historial</h1>
<h2><?php 
    echo $product->name;
    ?>
 <small>Operaciones con factura</small></h2>
	</div>
	</div>

<div class="row">


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


	<?php 
    $itotal = OperationData::GetInputQYesF($product->id, $_GET["cutid"]);
    ?>
<div class="jumbotron">
<center>
	<h2>Entradas</h2>
	<h1><?php 
    echo $itotal;
    ?>
</h1>
</center>
</div>

<br>
<?php 
    ?>
コード例 #3
0
    ?>
%</b> </div>
<div class="clearfix"></div>
<br>
<?php 
    ?>

</div>

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


	<?php 
    $itotal = OperationData::GetInputQ($product->id, $cut->id);
    $ino_oficial = OperationData::GetInputQNoF($product->id, $cut->id);
    $ioficial = OperationData::GetInputQYesF($product->id, $cut->id);
    $nof100 = 0;
    $of100 = 0;
    if ($ino_oficial > 0) {
        $nof100 = $ino_oficial / $itotal;
    }
    if ($ioficial > 0) {
        $of100 = $ioficial / $itotal;
    }
    ?>
	<h1 class="pull-right"><?php 
    echo $itotal;
    ?>
</h1>
	<h2>Entradas</h2>
コード例 #4
0
</div>
<h1><?php 
    echo $product->name;
    ?>
 <small>Historial</small></h1>
	</div>
	</div>

<div class="row">


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


	<?php 
    $itotal = OperationData::GetInputQYesF($product->id);
    ?>
<div class="jumbotron">
<center>
	<h2>Entradas</h2>
	<h1><?php 
    echo $itotal;
    ?>
</h1>
</center>
</div>

<br>
<?php 
    ?>