Exemple #1
0
$table .= "    <td></td>";
$table .= "    <td style=\"border-bottom: 1px;border-bottom-color: black;border-style: solid;\">" . FormatMoney($total_efectivo_real) . "</td>";
$table .= "    <td></td>";
$table .= "  </tr>";
#------------------------------------
$table .= "  <tr>";
$table .= "    <td></td>";
$table .= "    <td></td>";
$table .= "    <td></td>";
$table .= "    <td></td>";
$table .= "    <td></td>";
$table .= "    <td></td>";
$table .= "    <td></td>";
$table .= "    <td></td>";
$table .= "  </tr>";
#------------------------------------
$flujo_efectivo = $total_efectivo_real - $total_efectivo_disponible;
$color = $flujo_efectivo >= 0 ? "black" : "red";
$table .= "  <tr style = \"background:#C4E8F8;\">";
$table .= "    <td colspan = \"7\"><b>Flujo de efectivo (Corto):</b></td>";
$table .= "    <td><b style = \"color:{$color};\">" . FormatMoney(abs($flujo_efectivo)) . "</b></td>";
$table .= "  </tr>";
#------------------------------------
$table .= "</table>";
$page->addComponent($table);
$submit = new ApiActionComponent("api/sucursal/corte");
$submit->SetCaption("Realizar corte");
$submit->setSuccessRedirection("corte.lista.php");
$submit->setArguments(array("fecha_final" => time(), "id_sucursal" => $_GET["sid"], "total_efectivo" => 99));
$page->addcomponent($submit);
$page->render();