本文整理汇总了PHP中Entrepot类的典型用法代码示例。如果您正苦于以下问题:PHP Entrepot类的具体用法?PHP Entrepot怎么用?PHP Entrepot使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Entrepot类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: index
/**
* Envoie la liste de produit fini à la vue index.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
try {
$user = Auth::user();
$role = $user->role;
$entrepots = Entrepot::All();
$produits = ProduitFini::All();
//$listeProduitsEntrepot = entrepot->pivot->
} catch (ModelNotFoundException $e) {
App::abort(404);
}
return View::make('produitsFinis.index', compact('produits', 'role', 'entrepots'));
}
开发者ID:GBEY0402,项目名称:LesCuirsBermont3.0,代码行数:18,代码来源:ProduitsFinisController.php
示例2: nl2br
print $doleditor->Create(1);*/
print "</td></tr>";
// Note Private
print '<tr><td>' . $langs->trans("NotePrivate") . '</td>';
print '<td colspan="3">';
print nl2br($object->note_private);
/*$doleditor = new DolEditor('note_pprivate', $object->note_private, '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, 70);
print $doleditor->Create(1);*/
print "</td></tr>";
// Statut
print '<tr><td>' . $langs->trans("Status") . '</td>';
print '<td colspan="3">' . $object->getLibStatut(4) . "</td>\n";
print '</tr>';
if (!$conf->expedition_bon->enabled && !empty($conf->stock->enabled)) {
// Entrepot
$entrepot = new Entrepot($db);
$entrepot->fetch($object->entrepot_id);
print '<tr><td width="20%">' . $langs->trans("Warehouse") . '</td>';
print '<td colspan="3"><a href="' . DOL_URL_ROOT . '/product/stock/card.php?id=' . $entrepot->id . '">' . $entrepot->libelle . '</a></td>';
print '</tr>';
}
print "</table><br>\n";
/*
* Lignes produits
*/
$num_prod = count($object->lines);
$i = 0;
$total = 0;
print '<table class="noborder" width="100%">';
if ($num_prod) {
$i = 0;
开发者ID:ADDAdev,项目名称:Dolibarr,代码行数:31,代码来源:card.php
示例3: Entrepot
print '<td align="right">'.$langs->trans("AverageUnitPricePMPShort").'</td>';
print '<td align="right">'.$langs->trans("EstimatedStockValueShort").'</td>';
print '<td align="right">'.$langs->trans("SellPriceMin").'</td>';
print '<td align="right">'.$langs->trans("EstimatedStockValueSellShort").'</td>';
print '</tr>';
$sql = "SELECT e.rowid, e.label, ps.reel, ps.pmp";
$sql.= " FROM ".MAIN_DB_PREFIX."entrepot as e,";
$sql.= " ".MAIN_DB_PREFIX."product_stock as ps";
$sql.= " WHERE ps.reel != 0";
$sql.= " AND ps.fk_entrepot = e.rowid";
$sql.= " AND e.entity = ".$conf->entity;
$sql.= " AND ps.fk_product = ".$product->id;
$sql.= " ORDER BY e.label";
$entrepotstatic=new Entrepot($db);
$total=0;
$totalvalue=$totalvaluesell=0;
$resql=$db->query($sql);
if ($resql)
{
$num = $db->num_rows($resql);
$total=$totalwithpmp;
$i=0; $var=false;
while ($i < $num)
{
$obj = $db->fetch_object($resql);
$entrepotstatic->id=$obj->rowid;
$entrepotstatic->libelle=$obj->label;
print '<tr '.$bc[$var].'>';
开发者ID:nrjacker4,项目名称:crm-php,代码行数:31,代码来源:product.php
示例4: GETPOST
}
print '</td></tr>';
print '<tr><td>' . $langs->trans("Status") . '</td><td colspan="3">';
print '<select name="statut" class="flat">';
print '<option value="0">' . $langs->trans("WarehouseClosed") . '</option>';
print '<option value="1" selected="selected">' . $langs->trans("WarehouseOpened") . '</option>';
print '</select>';
print '</td></tr>';
print '</table>';
print '<center><br><input type="submit" class="button" value="' . $langs->trans("Create") . '"></center>';
print '</form>';
} else {
$id = GETPOST("id", 'int');
if ($id) {
dol_htmloutput_mesg($mesg);
$object = new Entrepot($db);
$result = $object->fetch($id);
if ($result < 0) {
dol_print_error($db);
}
/*
* Affichage fiche
*/
if ($action != 'edit' && $action != 're-edit') {
$head = stock_prepare_head($object);
dol_fiche_head($head, 'card', $langs->trans("Warehouse"), 0, 'stock');
// Confirm delete third party
if ($action == 'delete') {
print $form->formconfirm($_SERVER["PHP_SELF"] . "?id=" . $object->id, $langs->trans("DeleteAWarehouse"), $langs->trans("ConfirmDeleteWarehouse", $object->libelle), "confirm_delete", '', 0, 2);
}
print '<table class="border" width="100%">';
开发者ID:LionSystemsSolutions,项目名称:El-Canelo-ERP,代码行数:31,代码来源:fiche.php
示例5: header
$result = $product->fetch($product_id);
$result = $product->correct_stock($user, $id, $_POST["nbpiece"], $_POST["mouvement"], $_POST["label"], 0);
// We do not change value of stock for a correction
if ($result > 0) {
header("Location: " . $_SERVER["PHP_SELF"] . "?id=" . $id);
exit;
}
} else {
$action = '';
}
}
/*
* View
*/
$productstatic = new Product($db);
$warehousestatic = new Entrepot($db);
$movement = new MouvementStock($db);
$userstatic = new User($db);
$form = new Form($db);
$formother = new FormOther($db);
$formproduct = new FormProduct($db);
$sql = "SELECT p.rowid, p.ref as product_ref, p.label as produit, p.fk_product_type as type,";
$sql .= " e.label as stock, e.rowid as entrepot_id,";
$sql .= " m.rowid as mid, m.value, m.datem, m.fk_user_author, m.label, m.fk_origin, m.origintype,";
$sql .= " u.login";
// Checkpoint: obtener el checkbox
$sql .= ", m.checked";
$sql .= " FROM (" . MAIN_DB_PREFIX . "entrepot as e,";
$sql .= " " . MAIN_DB_PREFIX . "product as p,";
$sql .= " " . MAIN_DB_PREFIX . "stock_mouvement as m)";
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "user as u ON m.fk_user_author = u.rowid";
开发者ID:LionSystemsSolutions,项目名称:El-Canelo-ERP,代码行数:31,代码来源:mouvement.intentohector.php
示例6: Account
$bankcash->fetch($_SESSION["CASHDESK_ID_BANKACCOUNT_CASH"]);
$bankcash->label = $bankcash->ref;
$bankcashLink = $bankcash->getNomUrl(1);
}
if (!empty($_SESSION["CASHDESK_ID_BANKACCOUNT_CB"])) {
$bankcb = new Account($db);
$bankcb->fetch($_SESSION["CASHDESK_ID_BANKACCOUNT_CB"]);
$bankcbLink = $bankcb->getNomUrl(1);
}
if (!empty($_SESSION["CASHDESK_ID_BANKACCOUNT_CHEQUE"])) {
$bankcheque = new Account($db);
$bankcheque->fetch($_SESSION["CASHDESK_ID_BANKACCOUNT_CHEQUE"]);
$bankchequeLink = $bankcheque->getNomUrl(1);
}
if (!empty($_SESSION["CASHDESK_ID_WAREHOUSE"]) && !empty($conf->stock->enabled)) {
$warehouse = new Entrepot($db);
$warehouse->fetch($_SESSION["CASHDESK_ID_WAREHOUSE"]);
$warehouseLink = $warehouse->getNomUrl(1);
}
$langs->load("cashdesk");
$langs->load("main");
print '<div class="menu_bloc">';
print '<ul class="menu">';
// Link to new sell
print '<li class="menu_choix1"><a href="affIndex.php?menu=facturation&id=NOUV"><span>' . $langs->trans("NewSell") . '</span></a></li>';
// Open new tab on backoffice (this is not a disconnect from POS)
print '<li class="menu_choix2"><a href=".." target="backoffice"><span>' . $langs->trans("BackOffice") . '</span></a></li>';
// Disconnect
print '<li class="menu_choix0">' . $langs->trans("User") . ': ' . $_SESSION['firstname'] . ' ' . $_SESSION['lastname'];
print ' <a href="deconnexion.php">' . img_picto($langs->trans('Logout'), 'logout.png') . '</a><br>';
print $langs->trans("CashDeskThirdParty") . ': ' . $companyLink . '<br>';
开发者ID:LionSystemsSolutions,项目名称:El-Canelo-ERP,代码行数:31,代码来源:menu.tpl.php
示例7: require
require("../../main.inc.php");
require_once(DOL_DOCUMENT_ROOT."/product/stock/class/entrepot.class.php");
require_once(DOL_DOCUMENT_ROOT."/core/lib/functions2.lib.php");
require_once(DOL_DOCUMENT_ROOT."/core/lib/stock.lib.php");
$langs->load("stocks");
/*
* View
*/
$help_url='EN:Module_Stocks_En|FR:Module_Stock|ES:Módulo_Stocks';
llxHeader("",$langs->trans("Stocks"),$help_url);
$entrepot = new Entrepot($db);
$entrepot->fetch($_GET["id"]);
$entrepot->info($_GET["id"]);
$head = stock_prepare_head($entrepot);
dol_fiche_head($head, 'info', $langs->trans("Warehouse"), 0, 'stock');
print '<table width="100%"><tr><td>';
dol_print_object_info($entrepot);
print '</td></tr></table>';
print '</div>';
llxFooter();
开发者ID:nrjacker4,项目名称:crm-php,代码行数:30,代码来源:info.php
示例8: Entrepot
print '</select>';
print '</td></tr>';
print '</table>';
print '<center><br><input type="submit" class="button" value="'.$langs->trans("Create").'"></center>';
print '</form>';
}
else
{
if ($_GET["id"])
{
dol_htmloutput_mesg($mesg);
$object = new Entrepot($db);
$result = $object->fetch($_GET["id"]);
if ($result < 0)
{
dol_print_error($db);
}
/*
* Affichage fiche
*/
if ($action <> 'edit' && $action <> 're-edit')
{
$head = stock_prepare_head($object);
dol_fiche_head($head, 'card', $langs->trans("Warehouse"), 0, 'stock');
开发者ID:nrjacker4,项目名称:crm-php,代码行数:30,代码来源:fiche.php
示例9: testEntrepotDelete
/**
* testEntrepotDelete
*
* @param int $id Id of entrepot
* @return void
*
* @depends testEntrepotOther
* The depends says test is run only if previous is ok
*/
public function testEntrepotDelete($id)
{
global $conf, $user, $langs, $db;
$conf = $this->savconf;
$user = $this->savuser;
$langs = $this->savlangs;
$db = $this->savdb;
$localobject = new Entrepot($this->savdb);
$result = $localobject->fetch($id);
$result = $localobject->delete($id);
print __METHOD__ . " id=" . $id . " result=" . $result . "\n";
$this->assertLessThan($result, 0);
return $result;
}
开发者ID:Samara94,项目名称:dolibarr,代码行数:23,代码来源:EntrepotTest.php
示例10: img_picto
print '</td>';
}
print '<td class="liste_titre"> </td>';
print '<td class="liste_titre" align="center"><input class="flat" type="text" name="search_batch" size="6" value="' . $search_batch . '"></td>';
print '<td class="liste_titre" align="right"> </td>';
print '<td class="liste_titre"> </td>';
print '<td class="liste_titre"> </td>';
print '<td class="liste_titre"> </td>';
print '<td class="liste_titre"> </td>';
print '<td class="liste_titre" align="right">';
print '<input type="image" class="liste_titre" name="button_search" src="' . img_picto($langs->trans("Search"), 'search.png', '', '', 1) . '" alt="' . $langs->trans("Search") . '">';
print '<input type="image" class="liste_titre" name="button_removefilter" src="' . img_picto($langs->trans("Search"), 'searchclear.png', '', '', 1) . '" alt="' . $langs->trans("RemoveFilter") . '">';
print '</td>';
print '</tr>';
$product_static = new Product($db);
$warehousetmp = new Entrepot($db);
$var = True;
while ($i < min($num, $limit)) {
$objp = $db->fetch_object($resql);
// Multilangs
if (!empty($conf->global->MAIN_MULTILANGS)) {
$sql = "SELECT label";
$sql .= " FROM " . MAIN_DB_PREFIX . "product_lang";
$sql .= " WHERE fk_product=" . $objp->rowid;
$sql .= " AND lang='" . $langs->getDefaultLang() . "'";
$sql .= " LIMIT 1";
$result = $db->query($sql);
if ($result) {
$objtp = $db->fetch_object($result);
if (!empty($objtp->label)) {
$objp->label = $objtp->label;
开发者ID:TAASA,项目名称:Dolibarr-ERP-3.8.1,代码行数:31,代码来源:reassortlot.php
示例11: updateProductOrService
//.........这里部分代码省略.........
$newobject->price = $product['price_net'];
$newobject->price_ttc = $product['price'];
$newobject->tva_tx = $product['vat_rate'];
$newobject->price_base_type = $product['price_base_type'];
$newobject->date_creation = $now;
if ($product['barcode']) {
$newobject->barcode = $product['barcode'];
$newobject->barcode_type = $product['barcode_type'];
}
$newobject->stock_reel = $product['stock_real'];
$newobject->pmp = $product['pmp'];
$newobject->seuil_stock_alert = $product['stock_alert'];
$newobject->country_id = $product['country_id'];
if ($product['country_code']) {
$newobject->country_id = getCountry($product['country_code'], 3);
}
$newobject->customcode = $product['customcode'];
$newobject->canvas = $product['canvas'];
/*foreach($product['lines'] as $line)
{
$newline=new FactureLigne($db);
$newline->type=$line['type'];
$newline->desc=$line['desc'];
$newline->fk_product=$line['fk_product'];
$newline->total_ht=$line['total_net'];
$newline->total_vat=$line['total_vat'];
$newline->total_ttc=$line['total'];
$newline->vat=$line['vat_rate'];
$newline->qty=$line['qty'];
$newline->fk_product=$line['product_id'];
}*/
//var_dump($product['ref_ext']);
//var_dump($product['lines'][0]['type']);
$extrafields = new ExtraFields($db);
$extralabels = $extrafields->fetch_name_optionals_label('product', true);
foreach ($extrafields->attribute_label as $key => $label) {
$key = 'options_' . $key;
$newobject->array_options[$key] = $product[$key];
}
$db->begin();
$result = $newobject->update($newobject->id, $fuser);
if ($result <= 0) {
$error++;
} else {
// Update stock if stock count is provided and differs from database after creation or update
if (isset($product['stock_real']) && $product['stock_real'] != '' && !empty($conf->global->stock->enabled)) {
require_once DOL_DOCUMENT_ROOT . '/product/stock/class/entrepot.class.php';
$savstockreal = $newobject->stock_reel;
$newobject->load_stock();
// This overwrite ->stock_reel
$getstockreal = $newobject->stock_reel;
if ($savstockreal != $getstockreal) {
$warehouse = new Entrepot($this->db);
$warehouse->fetch(0, $product['warehouse_ref']);
if ($warehouse->id > 0) {
if ($savstockreal - $getstockreal > 0) {
$result = $newobject->correct_stock($fuser, $warehouse->id, $savstockreal - $getstockreal, 0, 'Correction from external call (Web Service)', 0, 'WS' . dol_print_date($now, 'dayhourlog'));
}
if ($savstockreal - $getstockreal > 0) {
$result = $newobject->correct_stock($fuser, $warehouse->id, $savstockreal - $getstockreal, 1, 'Correction from external call (Web Service)', 0, 'WS' . dol_print_date($now, 'dayhourlog'));
}
if ($result <= 0) {
$error++;
$newobject->error = 'You set a different value for stock, but correction of stock count (before=' . $getstockreal . ', after=' . $savstockreal . ') fails with error ' . $newobject->error;
}
} else {
$error++;
$newobject->error = 'You set a different value for stock but we failed to find warehouse ' . $product['warehouse_ref'] . ' to make correction.';
}
}
}
}
if (!$error) {
if ($newobject->price_base_type == 'HT') {
$result = $newobject->updatePrice($newobject->price, $newobject->price_base_type, $fuser);
if ($result <= 0) {
$error++;
}
} elseif ($newobject->price_base_type == 'TTC') {
$result = $newobject->updatePrice($newobject->price_ttc, $newobject->price_base_type);
if ($result <= 0) {
$error++;
}
}
}
if (!$error) {
$db->commit();
$objectresp = array('result' => array('result_code' => 'OK', 'result_label' => ''), 'id' => $newobject->id, 'ref' => $newobject->ref);
} else {
$db->rollback();
$error++;
$errorcode = 'KO';
$errorlabel = $newobject->error;
}
}
if ($error) {
$objectresp = array('result' => array('result_code' => $errorcode, 'result_label' => $errorlabel));
}
return $objectresp;
}
开发者ID:TAASA,项目名称:Dolibarr-ERP-3.8.1,代码行数:101,代码来源:server_productorservice.php
示例12: array
</div>
<div onclick="_TPV.searchByStock(-6,_TPV.warehouseId);" class="botonStats" align="center" title=" " style="width: 48%">
<span ><?php
echo $langs->trans('WorstSell');
?>
</span>
<span id="stockWorst" style="font-size:22px">0</span>
</div>
<?php
$list = array();
$list = POS::getWarehouse();
$num = count($list);
$i = 0;
$warehouse = new Entrepot($db);
while ($i < $num) {
$warehouse->fetch($list[$i]['id']);
$ret = $warehouse->nb_products();
?>
<div onclick="_TPV.searchByStock(1,<?php
echo $list[$i]['id'];
?>
);" class="botonStats" align="center" title=" " style="width: 48%">
<span><?php
echo $warehouse->libelle;
?>
</span>
<span style="font-size:22px"><?php
echo $ret['nb'];
?>
开发者ID:LionSystemsSolutions,项目名称:El-Canelo-ERP,代码行数:31,代码来源:tpv.ori.php
示例13: formSelectWarehouses
/**
* Display form to select warehouse
*
* @param string $page Page
* @param int $selected Id of warehouse
* @param string $htmlname Name of select html field
* @param int $addempty 1=Add an empty value in list, 2=Add an empty value in list only if there is more than 2 entries.
* @return void
*/
function formSelectWarehouses($page, $selected = '', $htmlname = 'warehouse_id', $addempty = 0)
{
global $langs;
if ($htmlname != "none") {
print '<form method="POST" action="' . $page . '">';
print '<input type="hidden" name="action" value="setwarehouse">';
print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
print '<table class="nobordernopadding" cellpadding="0" cellspacing="0">';
print '<tr><td>';
print $this->selectWarehouses($selected, $htmlname, '', $addempty);
print '</td>';
print '<td align="left"><input type="submit" class="button" value="' . $langs->trans("Modify") . '"></td>';
print '</tr></table></form>';
} else {
if ($selected) {
require_once DOL_DOCUMENT_ROOT . '/product/stock/class/entrepot.class.php';
$warehousestatic = new Entrepot($this->db);
$warehousestatic->fetch($selected);
print $warehousestatic->getNomUrl();
} else {
print " ";
}
}
}
开发者ID:Samara94,项目名称:dolibarr,代码行数:33,代码来源:html.formproduct.class.php
示例14: _list_already_dispatched
function _list_already_dispatched(&$commande)
{
global $db, $langs;
// List of lines already dispatched
$sql = "SELECT p.ref, p.label,";
$sql .= " e.rowid as warehouse_id, e.label as entrepot,";
$sql .= " cfd.rowid as dispatchlineid, cfd.fk_product, cfd.qty";
if ((double) DOL_VERSION > 3.7) {
$sql .= ", cfd.eatby, cfd.sellby, cfd.batch, cfd.comment, cfd.status";
}
$sql .= " FROM " . MAIN_DB_PREFIX . "product as p,";
$sql .= " " . MAIN_DB_PREFIX . "commande_fournisseur_dispatch as cfd";
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "entrepot as e ON cfd.fk_entrepot = e.rowid";
$sql .= " WHERE cfd.fk_commande = " . $commande->id;
$sql .= " AND cfd.fk_product = p.rowid";
$sql .= " ORDER BY cfd.rowid ASC";
$resql = $db->query($sql);
if ($resql) {
$num = $db->num_rows($resql);
$i = 0;
if ($num > 0) {
print "<br/>\n";
print load_fiche_titre($langs->trans("ReceivingForSameOrder"));
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print '<td>' . $langs->trans("Description") . '</td>';
if (!empty($conf->productbatch->enabled) && (double) DOL_VERSION > 3.7) {
print '<td>' . $langs->trans("batch_number") . '</td>';
print '<td>' . $langs->trans("l_eatby") . '</td>';
print '<td>' . $langs->trans("l_sellby") . '</td>';
}
print '<td align="right">' . $langs->trans("QtyDispatched") . '</td>';
print '<td></td>';
print '<td>' . $langs->trans("Warehouse") . '</td>';
print '<td>' . $langs->trans("Comment") . '</td>';
if (!empty($conf->global->SUPPLIER_ORDER_USE_DISPATCH_STATUS) && (double) DOL_VERSION > 3.7) {
print '<td align="center" colspan="2">' . $langs->trans("Status") . '</td>';
}
print "</tr>\n";
$var = false;
while ($i < $num) {
$objp = $db->fetch_object($resql);
print "<tr " . $bc[$var] . ">";
print '<td>';
print '<a href="' . DOL_URL_ROOT . '/product/fournisseurs.php?id=' . $objp->fk_product . '">' . img_object($langs->trans("ShowProduct"), 'product') . ' ' . $objp->ref . '</a>';
print ' - ' . $objp->label;
print "</td>\n";
if (!empty($conf->productbatch->enabled) && (double) DOL_VERSION > 3.7) {
print '<td>' . $objp->batch . '</td>';
print '<td>' . dol_print_date($db->jdate($objp->eatby), 'day') . '</td>';
print '<td>' . dol_print_date($db->jdate($objp->sellby), 'day') . '</td>';
}
// Qty
print '<td align="right">' . $objp->qty . '</td>';
print '<td> </td>';
// Warehouse
print '<td>';
$warehouse_static = new Entrepot($db);
$warehouse_static->id = $objp->warehouse_id;
$warehouse_static->libelle = $objp->entrepot;
print $warehouse_static->getNomUrl(1);
print '</td>';
// Comment
print '<td>' . dol_trunc($objp->comment) . '</td>';
// Status
if (!empty($conf->global->SUPPLIER_ORDER_USE_DISPATCH_STATUS) && (double) DOL_VERSION > 3.7) {
print '<td align="right">';
$supplierorderdispatch->status = empty($objp->status) ? 0 : $objp->status;
//print $supplierorderdispatch->status;
print $supplierorderdispatch->getLibStatut(5);
print '</td>';
// Add button to check/uncheck disaptching
print '<td align="center">';
if (empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->fournisseur->commande->receptionner) || !empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->fournisseur->commande_advance->check)) {
if (empty($objp->status)) {
print '<a class="button buttonRefused" href="#">' . $langs->trans("Approve") . '</a>';
print '<a class="button buttonRefused" href="#">' . $langs->trans("Deny") . '</a>';
} else {
print '<a class="button buttonRefused" href="#">' . $langs->trans("Disapprove") . '</a>';
print '<a class="button buttonRefused" href="#">' . $langs->trans("Deny") . '</a>';
}
} else {
$disabled = '';
if ($commande->statut == 5) {
$disabled = 1;
}
if (empty($objp->status)) {
print '<a class="button' . ($disabled ? ' buttonRefused' : '') . '" href="' . $_SERVER["PHP_SELF"] . "?id=" . $id . "&action=checkdispatchline&lineid=" . $objp->dispatchlineid . '">' . $langs->trans("Approve") . '</a>';
print '<a class="button' . ($disabled ? ' buttonRefused' : '') . '" href="' . $_SERVER["PHP_SELF"] . "?id=" . $id . "&action=denydispatchline&lineid=" . $objp->dispatchlineid . '">' . $langs->trans("Deny") . '</a>';
}
if ($objp->status == 1) {
print '<a class="button' . ($disabled ? ' buttonRefused' : '') . '" href="' . $_SERVER["PHP_SELF"] . "?id=" . $id . "&action=uncheckdispatchline&lineid=" . $objp->dispatchlineid . '">' . $langs->trans("Reinit") . '</a>';
print '<a class="button' . ($disabled ? ' buttonRefused' : '') . '" href="' . $_SERVER["PHP_SELF"] . "?id=" . $id . "&action=denydispatchline&lineid=" . $objp->dispatchlineid . '">' . $langs->trans("Deny") . '</a>';
}
if ($objp->status == 2) {
print '<a class="button' . ($disabled ? ' buttonRefused' : '') . '" href="' . $_SERVER["PHP_SELF"] . "?id=" . $id . "&action=uncheckdispatchline&lineid=" . $objp->dispatchlineid . '">' . $langs->trans("Reinit") . '</a>';
print '<a class="button' . ($disabled ? ' buttonRefused' : '') . '" href="' . $_SERVER["PHP_SELF"] . "?id=" . $id . "&action=checkdispatchline&lineid=" . $objp->dispatchlineid . '">' . $langs->trans("Approve") . '</a>';
}
}
print '</td>';
//.........这里部分代码省略.........
开发者ID:ATM-Consulting,项目名称:dolibarr_module_dispatch,代码行数:101,代码来源:reception.php
示例15: IN
print '<tr class="liste_titre"><td width="10%"></td>';
print '<td align="right" width="10%">' . $langs->trans("batch_number") . '</td>';
print '<td align="center" width="10%">' . $langs->trans("l_eatby") . '</td>';
print '<td align="center" width="10%">' . $langs->trans("l_sellby") . '</td>';
print '<td align="right" colspan="5"></td>';
print '</tr>';
}
$sql = "SELECT e.rowid, e.label, e.lieu, ps.reel, ps.pmp, ps.rowid as product_stock_id";
$sql .= " FROM " . MAIN_DB_PREFIX . "entrepot as e,";
$sql .= " " . MAIN_DB_PREFIX . "product_stock as ps";
$sql .= " WHERE ps.reel != 0";
$sql .= " AND ps.fk_entrepot = e.rowid";
$sql .= " AND e.entity IN (" . getEntity('stock', 1) . ")";
$sql .= " AND ps.fk_product = " . $product->id;
$sql .= " ORDER BY e.label";
$entrepotstatic = new Entrepot($db);
$total = 0;
$totalvalue = $totalvaluesell = 0;
$resql = $db->query($sql);
if ($resql) {
$num = $db->num_rows($resql);
$total = $totalwithpmp;
$i = 0;
$var = false;
while ($i < $num) {
$obj = $db->fetch_object($resql);
$entrepotstatic->id = $obj->rowid;
$entrepotstatic->libelle = $obj->label;
$entrepotstatic->lieu = $obj->lieu;
print '<tr ' . $bc[$var] . '>';
print '<td colspan="4">' . $entrepotstatic->getNomUrl(1) . '</td>';
开发者ID:TAASA,项目名称:Dolibarr-ERP-3.8.1,代码行数:31,代码来源:product.php
示例16: setEventMessage
// Redirect to avoid pb when using back
exit;
} else {
$db->rollback();
setEventMessage($langs->trans("Error"), 'errors');
}
}
/*
* View
*/
$now = dol_now();
$form = new Form($db);
$formproduct = new FormProduct($db);
$productstatic = new Product($db);
$warehousestatics = new Entrepot($db);
$warehousestatict = new Entrepot($db);
$title = $langs->trans('MassMovement');
llxHeader('', $title, $helpurl, '');
print_fiche_titre($langs->trans("MassStockMovement")) . '<br><br>';
$titletoadd = $langs->trans("Select");
$titletoaddnoent = $langs->transnoentitiesnoconv("Select");
$buttonrecord = $langs->trans("RecordMovement");
$buttonrecordnoent = $langs->trans("RecordMovement");
print $langs->trans("SelectProductInAndOutWareHouse", $titletoaddnoent, $buttonrecordnoent) . '<br>';
print '<br>' . "\n";
$var = true;
// Form to add a line
print '<form action="' . $_SERVER["PHP_SELF"] . '" method="POST" name="formulaire">';
print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
print '<input type="hidden" name="action" value="addline">';
print '<table class="liste" width="100%">';
开发者ID:LionSystemsSolutions,项目名称:El-Canelo-ERP,代码行数:31,代码来源:massstockmove.10-12.php
示例17: measuring_units_string
print '</td>';
// Volume
print '<td align="center">';
if ($lines[$i]->fk_product_type == 0) {
print $lines[$i]->volume * $lines[$i]->qty_shipped . ' ' . measuring_units_string($lines[$i]->volume_units, "volume");
} else {
print ' ';
}
print '</td>';
// Size
//print '<td align="center">'.$lines[$i]->volume*$lines[$i]->qty_shipped.' '.measuring_units_string($lines[$i]->volume_units,"volume").'</td>';
// Entrepot source
if ($conf->stock->enabled) {
print '<td align="left">';
if ($lines[$i]->entrepot_id > 0) {
$entrepot = new Entrepot($db);
$entrepot->fetch($lines[$i]->entrepot_id);
print $entrepot->getNomUrl(1);
}
print '</td>';
}
print "</tr>";
$var = !$var;
}
}
print "</table>\n";
print "\n</div>\n";
/*
* Boutons actions
*/
if ($user->societe_id == 0) {
开发者ID:netors,项目名称:dolibarr,代码行数:31,代码来源:fiche.php
示例18: llxHeader
/*
* View
*/
$help_url='EN:Module_Stocks_En|FR:Module_Stock|ES:Módulo_Stocks';
llxHeader("",$langs->trans("WarehouseCard"),$help_url);
$form=new Form($db);
if ($_GET["id"])
{
if ($mesg) print $mesg;
$entrepot = new Entrepot($db);
$result = $entrepot->fetch($_GET["id"]);
if ($result < 0)
{
dol_print_error($db);
}
/*
* Affichage fiche
*/
if ($_GET["action"] <> 'edit' && $_GET["action"] <> 're-edit')
{
$head = stock_prepare_head($entrepot);
dol_fiche_head($head, 'user', $langs->trans("Warehouse"), 0, 'stock');
开发者ID:remyyounes,项目名称:dolibarr,代码行数:30,代码来源:user.php
示例19: Entrepot
print '</td>';
// Size
//print '<td align="center">'.$lines[$i]->volume*$lines[$i]->qty_shipped.' '.measuring_units_string($lines[$i]->volume_units,"volume").'</td>';
// Entrepot source
if (!empty($conf->stock->enabled)) {
print '<td align="left">';
if ($lines[$i]->entrepot_id > 0) {
$entrepot = new Entrepot($db);
$entrepot->fetch($lines[$i]->entrepot_id);
print $entrepot->getNomUrl(1);
} else {
if (count($lines[$i]->details_entrepot) > 1) {
$detail = '';
foreach ($lines[$i]->details_entrepot as $detail_entrepot) {
if ($detail_entrepot->entrepot_id > 0) {
$entrepot = new Entrepot($db);
$entrepot->fetch($detail_entrepot->entrepot_id);
$detail .= $langs->trans("DetailWarehouseFormat", $entrepot->libelle, $detail_entrepot->qty_shipped) . '<br/>';
}
}
print $form->textwithtooltip($langs->trans("DetailWarehouseNumber"), $detail);
}
}
print '</td>';
}
// Batch number managment
if (!empty($conf->productbatch->enabled)) {
if (isset($lines[$i]->detail_batch)) {
print '<td>';
if ($lines[$i]->product_tobatch) {
$detail = '';
开发者ID:NoisyBoy86,项目名称:Dolibarr_test,代码行数:31,代码来源:card.php
示例20: testMouvementCreate
/**
* testMouvementCreate
*
* @return int
*/
public function testMouvementCreate()
{
global $conf, $user, $langs, $db;
$conf = $this->savconf;
$user = $this->savuser;
$langs = $this->savlangs;
$db = $this->savdb;
// We create a product for tests
$product1 = new Product($db);
$product1->initAsSpecimen();
$product1->ref .= ' 1';
$product1->label .= ' 1';
$product1id = $product1->create($user);
$product2 = new Product($db);
$product2->initAsSpecimen();
$product2->ref .= ' 2';
$product2->label .= ' 2';
$product2id = $product2->create($user);
// We create a product for tests
$warehouse1 = new Entrepot($db);
$warehouse1->initAsSpecimen();
$warehouse1->libelle .= ' 1';
$warehouse1->description .= ' 1';
$warehouse1id = $warehouse1->create($user);
$warehouse2 = ne
|
请发表评论