} } else { if ($_POST["removeEmployee"]) { $employeeid = $_POST["employeeid"]; $query = new Query(); if (!$query->update("employee", "status = 0", "employeeid = {$employeeid}", "")) { $miArray = array("error" => "No se pudo eliminar empleado."); echo json_encode($miArray); } else { $miArray = array("respuesta" => "ok"); echo json_encode($miArray); } } else { if ($_POST["getTransactions"]) { $branchid = getBranchId(); $employeeid = getUsuId(); $res = ""; $query = new Query(); $transaccionesArr = $query->select("transitionid, t.date_transition_down, employeeid_sender, \n \t\t\t\t\t\t\t\t\tt.date_transition_up, employeeid_transporter, employeeid_receiber,\n \t\t\t\t\t\t\t\t\tconcat(eo.firstname,' ',eo.lastname,' ',eo.matname) as employee_order, employeeid_order, \n \t\t\t\t\t\t\t\t\tconcat(bo.name,' ',bo.address) as branch_origin, branch_origin_id,\n \t\t\t\t\t\t\t\t\tconcat(bd.name,' ',bd.address) as branch_destination, branch_destination_id,\n \t\t\t\t\t\t\t\t\tm.title as model, c.title as color, sz.size, s.stockid", "transition_shoe_log t\n\t\t\t\tjoin employee eo on t.employeeid_order = eo.employeeid\n\t\t\t\tjoin branch bo on t.branch_origin_id = bo.branchid \n\t\t\t\tjoin branch bd on t.branch_destination_id = bd.branchid\n\t\t\t\tjoin detail_stock s on t.stockid = s.stockid\n\t\t\t\tjoin shoe sh on s.shoeid = sh.shoeid\n\t\t\t\tjoin model m on sh.modelid = m.modelid\n\t\t\t\tjoin color c on sh.colorid = c.colorid\n\t\t\t\tjoin sizes sz on sh.sizesid = sz.sizesid", "branch_origin_id = {$branchid} or branch_destination_id = {$branchid}", "order by t.date_transition_down desc", "obj"); if (count($transaccionesArr) > 0) { $res = $res . '<div class="panel-group" id="accordion" role="tablist" aria-multiselectable="true">'; foreach ((array) $transaccionesArr as $t) { $e_transporter = "Sin confirmar"; $e_sender = "Sin confirmar"; $e_receiver = "Sin confirmar"; if ($t->employeeid_transporter != null) { $e_transporter_tmp = $query->select("concat(firstname,' ',lastname,' ',matname)", "employee", "employeeid = {$t->employeeid_transporter}", "", "arr"); $e_transporter = utf8_encode($e_transporter_tmp[0]); } if ($t->employeeid_sender != null) { $e_sender_tmp = $query->select("concat(firstname,' ',lastname,' ',matname)", "employee", "employeeid = {$t->employeeid_sender}", "", "arr");
?> " class="table table-striped"> <thead> <tr> <th>Modelo</th> <th>Talla</th> <th>Color</th> <th>Precio</th> <th>Adicional</th> <th>Acción</th> </tr> </thead> <tbody> <?php if (existSaleList(getUsuId()) != 0) { getSaleList(getUsuId()); } ?> </tbody> </table> </div> </div> </div> </div> </div> </div> <?php include "footer.php"; ?>