本文整理汇总了PHP中Entrepot::list_array方法的典型用法代码示例。如果您正苦于以下问题:PHP Entrepot::list_array方法的具体用法?PHP Entrepot::list_array怎么用?PHP Entrepot::list_array使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Entrepot
的用法示例。
在下文中一共展示了Entrepot::list_array方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
if ($action == 'modif') {
$text = $langs->trans('ConfirmUnvalidateBill', $object->ref);
$formquestion = array();
$qualified_for_stock_change = 0;
if (empty($conf->global->STOCK_SUPPORTS_SERVICES)) {
$qualified_for_stock_change = $object->hasProductsOrServices(2);
} else {
$qualified_for_stock_change = $object->hasProductsOrServices(1);
}
if ($object->type != Facture::TYPE_DEPOSIT && !empty($conf->global->STOCK_CALCULATE_ON_BILL) && $qualified_for_stock_change) {
$langs->load("stocks");
require_once DOL_DOCUMENT_ROOT . '/product/class/html.formproduct.class.php';
require_once DOL_DOCUMENT_ROOT . '/product/stock/class/entrepot.class.php';
$formproduct = new FormProduct($db);
$warehouse = new Entrepot($db);
$warehouse_array = $warehouse->list_array();
if (count($warehouse_array) == 1) {
$label = $object->type == Facture::TYPE_CREDIT_NOTE ? $langs->trans("WarehouseForStockDecrease", current($warehouse_array)) : $langs->trans("WarehouseForStockIncrease", current($warehouse_array));
$value = '<input type="hidden" id="idwarehouse" name="idwarehouse" value="' . key($warehouse_array) . '">';
} else {
$label = $object->type == Facture::TYPE_CREDIT_NOTE ? $langs->trans("SelectWarehouseForStockDecrease") : $langs->trans("SelectWarehouseForStockIncrease");
$value = $formproduct->selectWarehouses(GETPOST('idwarehouse') ? GETPOST('idwarehouse') : 'ifone', 'idwarehouse', '', 1);
}
$formquestion = array(array('type' => 'other', 'name' => 'idwarehouse', 'label' => $label, 'value' => $value));
}
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?facid=' . $object->id, $langs->trans('UnvalidateBill'), $text, 'confirm_modif', $formquestion, "yes", 1);
}
// Confirmation du classement paye
if ($action == 'paid' && $resteapayer <= 0) {
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?facid=' . $object->id, $langs->trans('ClassifyPaid'), $langs->trans('ConfirmClassifyPaidBill', $object->ref), 'confirm_paid', '', "yes", 1);
}
示例2:
print "</td></tr>";
print "<tr><td>".$langs->trans("Date")."</td>";
print "<td>".dol_print_date($commande->date,'dayhourtext')."</td>\n";
print '<td>'.$langs->trans("Order").'</td><td><a href="'.DOL_URL_ROOT.'/commande/fiche.php?id='.$commande->id.'">'.img_object($langs->trans("ShowOrder"),'order').' '.$commande->ref.'</a>';
print "</td></tr>\n";
print '<tr>';
if (!$conf->expedition_bon->enabled && $conf->stock->enabled)
{
print '<td>'.$langs->trans("Warehouse").'</td>';
print '<td>';
$ents = $entrepot->list_array();
print '<a href="'.DOL_URL_ROOT.'/product/stock/fiche.php?id='.$_GET["entrepot_id"].'">'.img_object($langs->trans("ShowWarehouse"),'stock').' '.$ents[$_GET["entrepot_id"]].'</a>';
print '</td>';
}
print "<td>".$langs->trans("Author")."</td><td>".$author->getFullName($langs)."</td>\n";
if ($commande->note)
{
print '<tr><td colspan="3">Note : '.nl2br($commande->note)."</td></tr>";
}
print "</table>";
/*
* Lignes de commandes
*
示例3: Entrepot
$disabled=1;
if ($conf->global->STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER) $disabled=0;
/*
* Lignes de commandes
*/
if ($commande->statut <= 2 || $commande->statut >= 6)
{
print $langs->trans("OrderStatusNotReadyToDispatch");
}
if ($commande->statut == 3 || $commande->statut == 4 || $commande->statut == 5)
{
$entrepot = new Entrepot($db);
$listwarehouses=$entrepot->list_array(1);
print '<form method="POST" action="dispatch.php?id='.$commande->id.'">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="action" value="dispatch">';
print '<table class="noborder" width="100%">';
$sql = "SELECT cfd.fk_product, sum(cfd.qty) as qty";
$sql.= " FROM ".MAIN_DB_PREFIX."commande_fournisseur_dispatch as cfd";
$sql.= " WHERE cfd.fk_commande = ".$commande->id;
$sql.= " GROUP BY cfd.fk_product";
$resql = $db->query($sql);
if ($resql)
{
while ( $row = $db->fetch_row($resql) )