Look and feel v8

This commit is contained in:
Laurent Destailleur 2018-05-24 12:32:04 +02:00
parent e51aa68284
commit 23e2bb20d9
3 changed files with 108 additions and 195 deletions

View File

@ -115,14 +115,14 @@ class pdf_stdmouvement extends ModelePDFMouvement
// Recupere emetteur
$this->emetteur=$mysoc;
if (! $this->emetteur->country_code) $this->emetteur->country_code=substr($langs->defaultlang,-2); // By default if not defined
// Define position of columns
$this->wref = 15;
$this->posxidref = $this->marge_gauche;
$this->posxdatemouv = $this->marge_gauche+8;;
$this->posxdesc=37;
$this->posxlabel=50;
$this->posxtva=80;
$this->posxtva=80;
$this->posxqty=105;
$this->posxup=119;
$this->posxunit=136;
@ -175,7 +175,7 @@ class pdf_stdmouvement extends ModelePDFMouvement
$outputlangs->load("stocks");
$outputlangs->load("orders");
$outputlangs->load("deliveries");
/**
* TODO: get from object
*/
@ -308,7 +308,7 @@ class pdf_stdmouvement extends ModelePDFMouvement
if ($conf->stock->dir_output)
{
if ($resql)
{
$product = new Product($db);
@ -340,11 +340,11 @@ class pdf_stdmouvement extends ModelePDFMouvement
if ($id) $texte.=' ('.$langs->trans("ForThisWarehouse").')';
}
}
// Definition of $dir and $file
if ($object->specimen)
{
$dir = $conf->stock->dir_output . "/mouvement";
$dir = $conf->stock->dir_output . "/movement";
$file = $dir . "/SPECIMEN.pdf";
}
else
@ -352,14 +352,14 @@ class pdf_stdmouvement extends ModelePDFMouvement
$objectref = dol_sanitizeFileName($object->ref);
if(!empty($search_inventorycode)) $objectref.="_".$id."_".$search_inventorycode;
if($search_type_mouvement) $objectref.="_".$search_type_mouvement;
$dir = $conf->stock->dir_output . "/mouvement/" . $objectref;
$dir = $conf->stock->dir_output . "/movement/" . $objectref;
$file = $dir . "/" . $objectref . ".pdf";
}
$stockFournisseur = new ProductFournisseur($this->db);
$supplierprices = $stockFournisseur->list_product_fournisseur_price($object->id);
$object->supplierprices = $supplierprices;
$productstatic=new Product($db);
if (! file_exists($dir))
@ -439,14 +439,14 @@ class pdf_stdmouvement extends ModelePDFMouvement
/* Affichage de la liste des produits du MouvementStock */
/* */
/* ************************************************************************** */
$nexY+=5;
$nexY+=5;
$nexY = $pdf->GetY();
$nexY+=10;
$totalunit=0;
$totalvalue=$totalvaluesell=0;
//dol_syslog('List products', LOG_DEBUG);
$resql = $db->query($sql);
if ($resql)
@ -474,7 +474,7 @@ class pdf_stdmouvement extends ModelePDFMouvement
if ($objtp->label != '') $objp->produit = $objtp->label;
}
}
$curY = $nexY;
$pdf->SetFont('','', $default_font_size - 1); // Into loop to work with multipage
$pdf->SetTextColor(0,0,0);
@ -482,7 +482,7 @@ class pdf_stdmouvement extends ModelePDFMouvement
$pdf->setTopMargin($tab_top_newpage);
$pdf->setPageOrientation('', 1, $heightforfooter+$heightforfreetext+$heightforinfotot); // The only function to edit the bottom margin of current page to set it.
$pageposbefore=$pdf->getPage();
// Description of product line
$curX = $this->posxdesc-1;
@ -535,7 +535,7 @@ class pdf_stdmouvement extends ModelePDFMouvement
}
$pdf->SetFont('','', $default_font_size - 1); // On repositionne la police par defaut
// $objp = $db->fetch_object($resql);
$userstatic->id=$objp->fk_user_author;
@ -565,8 +565,8 @@ class pdf_stdmouvement extends ModelePDFMouvement
$origin = $movement->get_origin($objp->fk_origin, $objp->origintype);
} else {
$origin = '';
}
}
// Id movement.
$pdf->SetXY($this->posxidref, $curY);
$pdf->MultiCell($this->posxdesc-$this->posxidref-0.8, 3, $objp->mid, 0, 'L');
@ -585,8 +585,8 @@ class pdf_stdmouvement extends ModelePDFMouvement
// Lot/serie
$pdf->SetXY($this->posxqty, $curY);
$pdf->MultiCell($this->posxup-$this->posxqty-0.8, 3, $productlot->batch, 0, 'R');
$pdf->MultiCell($this->posxup-$this->posxqty-0.8, 3, $productlot->batch, 0, 'R');
// Inv. code
$pdf->SetXY($this->posxup, $curY);
$pdf->MultiCell($this->posxunit-$this->posxup-0.8, 3, $objp->inventorycode, 0, 'R');
@ -595,7 +595,7 @@ class pdf_stdmouvement extends ModelePDFMouvement
$pdf->SetXY($this->posxunit, $curY);
$pdf->MultiCell($this->posxdiscount-$this->posxunit-0.8, 3, $objp->label, 0, 'R');
$totalvalue+=price2num($objp->ppmp*$objp->value,'MT');
// Origin
$pricemin=$objp->price;
$pdf->SetXY($this->posxdiscount, $curY);
@ -608,9 +608,9 @@ class pdf_stdmouvement extends ModelePDFMouvement
$pdf->SetXY($this->postotalht, $curY);
$pdf->MultiCell($this->page_largeur-$this->marge_droite-$this->postotalht, 3, $objp->qty, 0, 'R', 0);
$totalvaluesell+=price2num($pricemin*$objp->value,'MT');
$nexY+=3.5; // Passe espace entre les lignes
// Add line
if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblignes - 1))
@ -623,7 +623,7 @@ class pdf_stdmouvement extends ModelePDFMouvement
}
$nexY+=2; // Passe espace entre les lignes
// Detect if some page were added automatically and output _tableau for past pages
while ($pagenb < $pageposafter)
{
@ -668,9 +668,9 @@ class pdf_stdmouvement extends ModelePDFMouvement
*/
$nexY = $pdf->GetY();
$nexY+=5;
$curY = $nexY;
$curY = $nexY;
$pdf->SetLineStyle(array('dash'=>'0','color'=>array(220,26,26)));
$pdf->SetLineStyle(array('dash'=>'0','color'=>array(220,26,26)));
$pdf->line($this->marge_gauche, $curY-1, $this->page_largeur-$this->marge_droite, $curY-1);
$pdf->SetLineStyle(array('dash'=>0));
@ -680,11 +680,11 @@ class pdf_stdmouvement extends ModelePDFMouvement
// Total
$pdf->SetXY($this->posxidref, $curY);
$pdf->MultiCell($this->posxdesc-$this->posxidref, 3, $langs->trans("Total"), 0, 'L');
// Total Qty
$pdf->SetXY($this->postotalht, $curY);
$pdf->MultiCell($this->page_largeur-$this->marge_droite-$this->postotalht, 3, $totalunit, 0, 'R', 0);
}
else
{
@ -720,8 +720,8 @@ class pdf_stdmouvement extends ModelePDFMouvement
$curY = $tab_top + 7;
$nexY = $tab_top + 7;
$tab_top = $tab_top_newpage+21;
$tab_top = $tab_top_newpage+21;
// Show square
if ($pagenb == 1)
{
@ -733,7 +733,7 @@ class pdf_stdmouvement extends ModelePDFMouvement
$this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforinfotot - $heightforfreetext - $heightforfooter, 0, $outputlangs, 1, 0, $object->multicurrency_code);
$bottomlasttab=$this->page_hauteur - $heightforinfotot - $heightforfreetext - $heightforfooter + 1;
}
$bottomlasttab=$this->page_hauteur - $heightforinfotot - $heightforfreetext - $heightforfooter + 1;
// Affiche zone infos
@ -820,14 +820,14 @@ class pdf_stdmouvement extends ModelePDFMouvement
// Output Rect
//$this->printRect($pdf,$this->marge_gauche, $tab_top, $this->page_largeur-$this->marge_gauche-$this->marge_droite, $tab_height, $hidetop, $hidebottom); // Rect prend une longueur en 3eme param et 4eme param
$pdf->SetLineStyle(array('dash'=>'0','color'=>array(220,26,26)));
$pdf->SetDrawColor(220,26,26);
$pdf->SetDrawColor(220,26,26);
$pdf->line($this->marge_gauche, $tab_top, $this->page_largeur-$this->marge_droite, $tab_top);
$pdf->SetLineStyle(array('dash'=>0));
$pdf->SetDrawColor(128,128,128);
$pdf->SetTextColor(0,0,120);
//Ref mouv
if (empty($hidetop))
{
@ -835,7 +835,7 @@ class pdf_stdmouvement extends ModelePDFMouvement
$pdf->SetXY($this->posxidref, $tab_top+1);
$pdf->MultiCell($this->posxdatemouv-$this->posxdatemouv-0.8,3, $outputlangs->transnoentities("Ref"),'','L');
}
//Date mouv
//$pdf->line($this->posxlabel-1, $tab_top, $this->posxlabel-1, $tab_top + $tab_height);
if (empty($hidetop))
@ -847,7 +847,7 @@ class pdf_stdmouvement extends ModelePDFMouvement
//Ref Product
//$pdf->line($this->posxqty-1, $tab_top, $this->posxqty-1, $tab_top + $tab_height);
if (empty($hidetop))
{
{
$pdf->SetXY($this->posxdesc-1, $tab_top+1);
$pdf->MultiCell($this->posxlabel-$this->posxdesc,2, $outputlangs->transnoentities("Ref. Product"),'','C');
}
@ -862,7 +862,7 @@ class pdf_stdmouvement extends ModelePDFMouvement
//Lot/serie Product
//$pdf->line($this->posxqty - 1, $tab_top, $this->posxqty - 1, $tab_top + $tab_height);
if (empty($hidetop))
if (empty($hidetop))
{
$pdf->SetXY($this->posxqty, $tab_top + 1);
$pdf->MultiCell($this->posxup - $this->posxqty, 2, $outputlangs->transnoentities("Lot/Série"), '','C');
@ -877,34 +877,34 @@ class pdf_stdmouvement extends ModelePDFMouvement
}
//Label mouvement
//$pdf->line($this->posxunit, $tab_top, $this->posxunit, $tab_top + $tab_height);
//$pdf->line($this->posxunit, $tab_top, $this->posxunit, $tab_top + $tab_height);
if (empty($hidetop))
{
$pdf->SetXY($this->posxunit, $tab_top+1);
$pdf->MultiCell($this->posxdiscount-$this->posxunit,2, $outputlangs->transnoentities("Label Mouvement"),'','C');
}
//Origin
//$pdf->line($this->postotalht, $tab_top, $this->postotalht, $tab_top + $tab_height);
//$pdf->line($this->postotalht, $tab_top, $this->postotalht, $tab_top + $tab_height);
if (empty($hidetop))
{
$pdf->SetXY($this->posxdiscount+2, $tab_top+1);
$pdf->MultiCell($this->postotalht-$this->posxdiscount-0.8,2, $outputlangs->transnoentities("Origin"),'','C');
}
//Qty
//$pdf->line($this->postotalht, $tab_top, $this->postotalht, $tab_top + $tab_height);
//$pdf->line($this->postotalht, $tab_top, $this->postotalht, $tab_top + $tab_height);
if (empty($hidetop))
{
$pdf->SetXY($this->postotalht+2, $tab_top+1);
$pdf->MultiCell($this->page_largeur-$this->marge_droite-$this->postotalht,2, $outputlangs->transnoentities("Qty"),'','C');
}
$pdf->SetDrawColor(220,26,26);
$pdf->SetDrawColor(220,26,26);
$pdf->SetLineStyle(array('dash'=>'0','color'=>array(220,26,26)));
$pdf->line($this->marge_gauche, $tab_top+11, $this->page_largeur-$this->marge_droite, $tab_top+11);
$pdf->line($this->marge_gauche, $tab_top+11, $this->page_largeur-$this->marge_droite, $tab_top+11);
$pdf->SetLineStyle(array('dash'=>0));
}
/**
@ -990,22 +990,22 @@ class pdf_stdmouvement extends ModelePDFMouvement
$pdf->SetXY($posx,$posy);
$pdf->SetTextColor(0,0,60);
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("LocationSummary").' :', '', 'R');
$posy+=4;
$pdf->SetXY($posx-50,$posy);
$pdf->MultiCell(150, 3, $object->lieu, '', 'R');
// Parent MouvementStock
$posy+=4;
$pdf->SetXY($posx,$posy);
$pdf->SetTextColor(0,0,60);
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("ParentWarehouse").' :', '', 'R');
$posy+=4;
$pdf->SetXY($posx-50,$posy);
$e = new MouvementStock($db);
if(!empty($object->fk_parent) && $e->fetch($object->fk_parent) > 0)
if(!empty($object->fk_parent) && $e->fetch($object->fk_parent) > 0)
{
$pdf->MultiCell(150, 3, $e->libelle, '', 'R');
}
@ -1013,14 +1013,14 @@ class pdf_stdmouvement extends ModelePDFMouvement
{
$pdf->MultiCell(150, 3, $outputlangs->transnoentities("None"), '', 'R');
}
// Description
$nexY = $pdf->GetY();
$nexY+=5;
$pdf->SetXY($posx,$posy);
$pdf->writeHTMLCell(190, 2, $this->marge_gauche, $nexY, '<b>'.$outputlangs->transnoentities("Description").' : </b>'.nl2br($object->description), 0, 1);
$nexY = $pdf->GetY();
$calcproductsunique=$object->nb_different_products();
$calcproducts=$object->nb_products();
@ -1032,12 +1032,12 @@ class pdf_stdmouvement extends ModelePDFMouvement
$valtoshow=price2num($calcproducts['nb'], 'MS');
$pdf->writeHTMLCell(190, 2, $this->marge_gauche, $nexY, '<b>'.$outputlangs->transnoentities("NumberOfProducts").' : </b>'.(empty($valtoshow)?'0':$valtoshow), 0, 1);
$nexY = $pdf->GetY();
// Value
$pdf->writeHTMLCell(190, 2, $this->marge_gauche, $nexY, '<b>'.$outputlangs->transnoentities("EstimatedStockValueShort").' : </b>'. price((empty($calcproducts['value'])?'0':price2num($calcproducts['value'],'MT')), 0, $langs, 0, -1, -1, $conf->currency), 0, 1);
$nexY = $pdf->GetY();
// Last movement
$sql = "SELECT max(m.datem) as datem";
$sql .= " FROM ".MAIN_DB_PREFIX."stock_mouvement as m";
@ -1065,7 +1065,7 @@ class pdf_stdmouvement extends ModelePDFMouvement
$pdf->writeHTMLCell(190, 2, $this->marge_gauche, $nexY, '<b>'.$outputlangs->transnoentities("LastMovement").' : </b>'.$toWrite, 0, 1);
$nexY = $pdf->GetY();
/*if ($object->ref_client)
{
$posy+=5;

View File

@ -61,6 +61,7 @@ $hookmanager->initHooks(array('warehousecard','globalcard'));
$object = new Entrepot($db);
/*
* Actions
*/
@ -176,58 +177,6 @@ $permissioncreate = $user->rights->stock->creer;
include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php';
/*
* Build document
*/
/*
if ($action == 'builddoc') // En get ou en post
{
if ($id > 0 || $ref)
{
$object = new Entrepot($db);
$result = $object->fetch($id, $ref);
if ($result <= 0)
{
print 'No record found';
exit;
}
}
// Save last template used to generate document
if (GETPOST('model')) $object->setDocModel($user, GETPOST('model','alpha'));
// Define output language
$outputlangs = $langs;
$newlang='';
if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id','aZ09')) $newlang=GETPOST('lang_id','aZ09');
if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang=$object->thirdparty->default_lang;
if (! empty($newlang))
{
$outputlangs = new Translate("",$conf);
$outputlangs->setDefaultLang($newlang);
}
$ret=$object->fetch($id); // Reload to get new records
$result= $object->generateDocument($object->modelpdf, $outputlangs);
if ($result < 0)
{
setEventMessages($object->error, $object->errors, 'errors');
$action='';
}
}
// Delete file in doc form
elseif ($action == 'remove_file')
{
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
$upload_dir = $conf->stock->dir_output ;
$file = $upload_dir . '/' . GETPOST('file');
$ret=dol_delete_file($file,0,0,0,$object);
if ($ret) setEventMessages($langs->trans("FileWasRemoved", GETPOST('urlfile')), null, 'mesgs');
else setEventMessages($langs->trans("ErrorFailToDeleteFile", GETPOST('urlfile')), null, 'errors');
}
*/
/*
* View
*/
@ -721,40 +670,43 @@ else
* Documents generes
*/
$modulepart='stock';
if ($action != 'create' && $action != 'edit' && $action != 'delete')
if ($conf->global->MAIN_FEATURES_LEVEL >= 2)
{
print '<br/>';
print '<div class="fichecenter"><div class="fichehalfleft">';
print '<a name="builddoc"></a>'; // ancre
$modulepart='stock';
// Documents
$objectref = dol_sanitizeFileName($object->ref);
$relativepath = $comref . '/' . $objectref . '.pdf';
$filedir = $conf->stock->dir_output . '/' . $objectref;
$urlsource=$_SERVER["PHP_SELF"]."?id=".$object->id;
$genallowed=$usercanread;
$delallowed=$usercancreate;
$modulepart = 'stock';
if ($action != 'create' && $action != 'edit' && $action != 'delete')
{
print '<br/>';
print '<div class="fichecenter"><div class="fichehalfleft">';
print '<a name="builddoc"></a>'; // ancre
print $formfile->showdocuments($modulepart,$object->ref,$filedir,$urlsource,$genallowed,$delallowed,'',0,0,0,28,0,'',0,'',$object->default_lang, '', $object);
$somethingshown=$formfile->numoffiles;
// Documents
$objectref = dol_sanitizeFileName($object->ref);
$relativepath = $comref . '/' . $objectref . '.pdf';
$filedir = $conf->stock->dir_output . '/' . $objectref;
$urlsource=$_SERVER["PHP_SELF"]."?id=".$object->id;
$genallowed=$usercanread;
$delallowed=$usercancreate;
$modulepart = 'stock';
print '</div><div class="fichehalfright"><div class="ficheaddleft">';
print $formfile->showdocuments($modulepart,$object->ref,$filedir,$urlsource,$genallowed,$delallowed,'',0,0,0,28,0,'',0,'',$object->default_lang, '', $object);
$somethingshown=$formfile->numoffiles;
$MAXEVENT = 10;
print '</div><div class="fichehalfright"><div class="ficheaddleft">';
$morehtmlright = '<a href="'.DOL_URL_ROOT.'/product/agenda.php?id='.$object->id.'">';
$morehtmlright.= $langs->trans("SeeAll");
$morehtmlright.= '</a>';
$MAXEVENT = 10;
// List of actions on element
include_once DOL_DOCUMENT_ROOT . '/core/class/html.formactions.class.php';
$formactions = new FormActions($db);
$somethingshown = $formactions->showactions($object, 'stock', 0, 1, '', $MAXEVENT, '', $morehtmlright); // Show all action for product
$morehtmlright = '<a href="'.DOL_URL_ROOT.'/product/agenda.php?id='.$object->id.'">';
$morehtmlright.= $langs->trans("SeeAll");
$morehtmlright.= '</a>';
print '</div></div></div>';
// List of actions on element
include_once DOL_DOCUMENT_ROOT . '/core/class/html.formactions.class.php';
$formactions = new FormActions($db);
$somethingshown = $formactions->showactions($object, 'stock', 0, 1, '', $MAXEVENT, '', $morehtmlright); // Show all action for product
print '</div></div></div>';
}
}

View File

@ -95,7 +95,7 @@ $search_array_options=$extrafields->getOptionalsFromPost($extralabels,'','search
$arrayfields=array(
'm.rowid'=>array('label'=>$langs->trans("Ref"), 'checked'=>1),
'm.datem'=>array('label'=>$langs->trans("Date"), 'checked'=>1),
'p.ref'=>array('label'=>$langs->trans("ProductRef"), 'checked'=>1),
'p.ref'=>array('label'=>$langs->trans("ProductRef"), 'checked'=>1, 'css'=>'maxwidth100'),
'p.label'=>array('label'=>$langs->trans("ProductLabel"), 'checked'=>1),
'm.batch'=>array('label'=>$langs->trans("BatchNumberShort"), 'checked'=>1, 'enabled'=>(! empty($conf->productbatch->enabled))),
'pl.eatby'=>array('label'=>$langs->trans("EatByDate"), 'checked'=>0, 'enabled'=>(! empty($conf->productbatch->enabled))),
@ -403,52 +403,12 @@ if ($action == "transfert_stock" && ! $cancel)
/*
* Build document
*/
if ($action == 'builddoc') // En get ou en post
{
if ($id > 0 || $ref)
{
$object = new MouvementStock($db);
$result = $object->fetch($id, $ref);
if ($result <= 0)
{
print 'No record found';
exit;
}
}
// Save last template used to generate document
if (GETPOST('model')) $object->setDocModel($user, GETPOST('model','alpha'));
// Define output language
$outputlangs = $langs;
$newlang='';
if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id','aZ09')) $newlang=GETPOST('lang_id','aZ09');
if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang=$object->thirdparty->default_lang;
if (! empty($newlang))
{
$outputlangs = new Translate("",$conf);
$outputlangs->setDefaultLang($newlang);
}
$ret=$object->fetch($id); // Reload to get new records
$result= $object->generateDocument($object->modelpdf, $outputlangs);
if ($result < 0)
{
setEventMessages($object->error, $object->errors, 'errors');
$action='';
}
}
// Delete file in doc form
elseif ($action == 'remove_file')
{
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
$upload_dir = $conf->stock->dir_output."/mouvement" ;
$file = $upload_dir . '/' . GETPOST('file');
$ret=dol_delete_file($file,0,0,0,$object);
if ($ret) setEventMessages($langs->trans("FileWasRemoved", GETPOST('urlfile')), null, 'mesgs');
else setEventMessages($langs->trans("ErrorFailToDeleteFile", GETPOST('urlfile')), null, 'errors');
}
/* The builddoc action for object of a movement must be on the movement card
// Actions to build doc
$upload_dir = $conf->stock->dir_output;
$permissioncreate = $user->rights->stock->creer;
include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php';
*/
if (empty($reshook) && $action != 'remove_file')
{
@ -809,12 +769,12 @@ if ($resql)
}
if (! empty($arrayfields['m.datem']['checked']))
{
print '<td class="liste_titre" valign="right">';
print '<td class="liste_titre nowraponall">';
print '<input class="flat" type="text" size="2" maxlength="2" placeholder="'.dol_escape_htmltag($langs->trans("Month")).'" name="month" value="'.$month.'">';
if (empty($conf->productbatch->enabled)) print '&nbsp;';
//else print '<br>';
$syear = $year?$year:-1;
print '<input class="flat" type="text" size="3" maxlength="4" placeholder="'.dol_escape_htmltag($langs->trans("Year")).'" name="year" value="'.($syear > 0 ? $syear : '').'">';
print '<input class="flat maxwidth50" type="text" maxlength="4" placeholder="'.dol_escape_htmltag($langs->trans("Year")).'" name="year" value="'.($syear > 0 ? $syear : '').'">';
//print $formother->selectyear($syear,'year',1, 20, 5);
print '</td>';
}
@ -822,7 +782,7 @@ if ($resql)
{
// Product Ref
print '<td class="liste_titre" align="left">';
print '<input class="flat maxwidth100" type="text" name="search_product_ref" value="'.dol_escape_htmltag($idproduct?$product->ref:$search_product_ref).'">';
print '<input class="flat maxwidth75" type="text" name="search_product_ref" value="'.dol_escape_htmltag($idproduct?$product->ref:$search_product_ref).'">';
print '</td>';
}
if (! empty($arrayfields['p.label']['checked']))
@ -835,7 +795,7 @@ if ($resql)
// Batch
if (! empty($arrayfields['m.batch']['checked']))
{
print '<td class="liste_titre" align="center"><input class="flat maxwidth100" type="text" name="search_batch" value="'.dol_escape_htmltag($search_batch).'"></td>';
print '<td class="liste_titre" align="center"><input class="flat maxwidth75" type="text" name="search_batch" value="'.dol_escape_htmltag($search_batch).'"></td>';
}
if (! empty($arrayfields['pl.eatby']['checked']))
{
@ -914,10 +874,10 @@ if ($resql)
print '</td>';
}
// Extra fields
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_input.tpl.php';
// Fields from hook
$parameters=array('arrayfields'=>$arrayfields);
$reshook=$hookmanager->executeHooks('printFieldListOption',$parameters); // Note that $action and $object may have been modified by hook
@ -957,7 +917,7 @@ if ($resql)
if (! empty($arrayfields['origin']['checked'])) print_liste_field_titre($arrayfields['origin']['label'],$_SERVER["PHP_SELF"], "","",$param,"",$sortfield,$sortorder);
if (! empty($arrayfields['m.value']['checked'])) print_liste_field_titre($arrayfields['m.value']['label'],$_SERVER["PHP_SELF"], "m.value","",$param,'align="right"',$sortfield,$sortorder);
if (! empty($arrayfields['m.price']['checked'])) print_liste_field_titre($arrayfields['m.price']['label'],$_SERVER["PHP_SELF"], "m.price","",$param,'align="right"',$sortfield,$sortorder);
// Extra fields
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php';
@ -1096,7 +1056,7 @@ if ($resql)
{
// Price
print '<td align="right">';
print price($objp->price);
if ($objp->price != 0) print price($objp->price);
print '</td>';
}
// Action column
@ -1156,10 +1116,12 @@ else
dol_print_error($db);
}
/*
* Documents generes
*/
/* Area for doc and last events of warehouse are stored on the main card of warehouse
$modulepart='mouvement';
if ($action != 'create' && $action != 'edit' && $action != 'delete' && $id>0)
@ -1174,16 +1136,14 @@ if ($action != 'create' && $action != 'edit' && $action != 'delete' && $id>0)
if(!empty($search_inventorycode)) $objectref.="_".$id."_".$search_inventorycode;
if($search_type_mouvement) $objectref.="_".$search_type_mouvement;
$relativepath = $comref . '/' . $objectref . '.pdf';
$filedir = $conf->stock->dir_output . '/mouvement/' . $objectref;
$filedir = $conf->stock->dir_output . '/movement/' . $objectref;
$urlsource=$_SERVER["PHP_SELF"]."?id=".$object->id."&search_inventorycode=".$search_inventorycode."&search_type_mouvement=$search_type_mouvement";
$genallowed=$usercanread;
$delallowed=$usercancreate;
$genallowed=$user->rights->stock->mouvement->lire;
$delallowed=$user->rights->stock->mouvement->creer;
$var=true;
print $formfile->showdocuments($modulepart,$objectref,$filedir,$urlsource,$genallowed,$delallowed,'',0,0,0,28,0,'',0,'',$object->default_lang, '', $object);
$somethingshown=$formfile->numoffiles;
@ -1203,6 +1163,7 @@ if ($action != 'create' && $action != 'edit' && $action != 'delete' && $id>0)
print '</div></div></div>';
}
*/
llxFooter();