Several fixes. Fix #2927

This commit is contained in:
Laurent Destailleur 2015-07-13 11:22:18 +02:00
parent 0542e43b71
commit a9289de616
11 changed files with 109 additions and 55 deletions

View File

@ -1950,7 +1950,7 @@ if ($action == 'create' && $user->rights->commande->creer)
print '<table class="nobordernopadding" width="100%"><tr><td>'; print '<table class="nobordernopadding" width="100%"><tr><td>';
print $langs->trans('AvailabilityPeriod'); print $langs->trans('AvailabilityPeriod');
print '</td>'; print '</td>';
if ($action != 'editavailability' && $object->brouillon) if ($action != 'editavailability')
print '<td align="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=editavailability&amp;id=' . $object->id . '">' . img_edit($langs->trans('SetAvailability'), 1) . '</a></td>'; print '<td align="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=editavailability&amp;id=' . $object->id . '">' . img_edit($langs->trans('SetAvailability'), 1) . '</a></td>';
print '</tr></table>'; print '</tr></table>';
print '</td><td colspan="3">'; print '</td><td colspan="3">';
@ -1966,7 +1966,7 @@ if ($action == 'create' && $user->rights->commande->creer)
print '<table class="nobordernopadding" width="100%"><tr><td>'; print '<table class="nobordernopadding" width="100%"><tr><td>';
print $langs->trans('Source'); print $langs->trans('Source');
print '</td>'; print '</td>';
if ($action != 'editdemandreason' && ! empty($object->brouillon)) if ($action != 'editdemandreason')
print '<td align="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=editdemandreason&amp;id=' . $object->id . '">' . img_edit($langs->trans('SetDemandReason'), 1) . '</a></td>'; print '<td align="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=editdemandreason&amp;id=' . $object->id . '">' . img_edit($langs->trans('SetDemandReason'), 1) . '</a></td>';
print '</tr></table>'; print '</tr></table>';
print '</td><td colspan="3">'; print '</td><td colspan="3">';
@ -1975,14 +1975,15 @@ if ($action == 'create' && $user->rights->commande->creer)
} else { } else {
$form->formInputReason($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->demand_reason_id, 'none'); $form->formInputReason($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->demand_reason_id, 'none');
} }
// Removed because using dictionary is an admin feature, not a user feature. Ther is already the "star" to show info to admin users. // Removed because using dictionary is an admin feature, not a user feature. There is already the "star" to show info to admin users.
// This is to avoid too heavy screens and have an uniform look and feel for all screens. // This is to avoid too heavy screens and have an uniform look and feel for all screens.
// print '</td><td>'; // print '</td><td>';
// print '<a href="'.DOL_URL_ROOT.'/admin/dict.php?id=22&origin=order&originid='.$object->id.'">'.$langs->trans("DictionarySource").'</a>'; // print '<a href="'.DOL_URL_ROOT.'/admin/dict.php?id=22&origin=order&originid='.$object->id.'">'.$langs->trans("DictionarySource").'</a>';
print '</td></tr>'; print '</td></tr>';
// Project // Project
if (! empty($conf->projet->enabled)) { if (! empty($conf->projet->enabled))
{
$langs->load('projects'); $langs->load('projects');
print '<tr><td height="10">'; print '<tr><td height="10">';
print '<table class="nobordernopadding" width="100%"><tr><td>'; print '<table class="nobordernopadding" width="100%"><tr><td>';
@ -2001,7 +2002,8 @@ if ($action == 'create' && $user->rights->commande->creer)
print '</td></tr>'; print '</td></tr>';
} }
if ($soc->outstanding_limit) { if ($soc->outstanding_limit)
{
// Outstanding Bill // Outstanding Bill
print '<tr><td>'; print '<tr><td>';
print $langs->trans('OutstandingBill'); print $langs->trans('OutstandingBill');

View File

@ -353,9 +353,9 @@ function pdf_build_address($outputlangs,$sourcecompany,$targetcompany='',$target
if (empty($conf->global->MAIN_PDF_DISABLESOURCEDETAILS)) if (empty($conf->global->MAIN_PDF_DISABLESOURCEDETAILS))
{ {
// Phone // Phone
if ($sourcecompany->phone) $stringaddress .= ($stringaddress ? "\n" : '' ).$outputlangs->transnoentities("Phone").": ".$outputlangs->convToOutputCharset($sourcecompany->phone); if ($sourcecompany->phone) $stringaddress .= ($stringaddress ? "\n" : '' ).$outputlangs->transnoentities("PhoneShort").": ".$outputlangs->convToOutputCharset($sourcecompany->phone);
// Fax // Fax
if ($sourcecompany->fax) $stringaddress .= ($stringaddress ? "\n" : '' ).$outputlangs->transnoentities("Fax").": ".$outputlangs->convToOutputCharset($sourcecompany->fax); if ($sourcecompany->fax) $stringaddress .= ($stringaddress ? ($sourcecompany->phone ? " - " : "\n") : '' ).$outputlangs->transnoentities("Fax").": ".$outputlangs->convToOutputCharset($sourcecompany->fax);
// EMail // EMail
if ($sourcecompany->email) $stringaddress .= ($stringaddress ? "\n" : '' ).$outputlangs->transnoentities("Email").": ".$outputlangs->convToOutputCharset($sourcecompany->email); if ($sourcecompany->email) $stringaddress .= ($stringaddress ? "\n" : '' ).$outputlangs->transnoentities("Email").": ".$outputlangs->convToOutputCharset($sourcecompany->email);
// Web // Web

View File

@ -1,9 +1,9 @@
<?php <?php
/* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org> /* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2005-2012 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2005-2015 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2011 Regis Houssin <regis.houssin@capnetworks.com> * Copyright (C) 2005-2011 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro> * Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com> * Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -507,6 +507,8 @@ if ($action == 'create')
print '<input type="hidden" name="entrepot_id" value="'.GETPOST('entrepot_id','int').'">'; print '<input type="hidden" name="entrepot_id" value="'.GETPOST('entrepot_id','int').'">';
} }
dol_fiche_head('');
print '<table class="border" width="100%">'; print '<table class="border" width="100%">';
// Ref // Ref
@ -618,6 +620,8 @@ if ($action == 'create')
print "</table>"; print "</table>";
dol_fiche_end();
/* /*
* Lignes de commandes * Lignes de commandes
*/ */
@ -838,7 +842,7 @@ if ($action == 'create')
} }
else else
{ {
print '<td></td><td></td></tr>'; print '<td></td><td></td></tr>'; // end line and start a new one for lot/serial
$subj=0; $subj=0;
print '<input name="idl'.$indiceAsked.'" type="hidden" value="'.$line->id.'">'; print '<input name="idl'.$indiceAsked.'" type="hidden" value="'.$line->id.'">';
foreach ($product->stock_warehouse[$warehouse_id]->detail_batch as $dbatch) foreach ($product->stock_warehouse[$warehouse_id]->detail_batch as $dbatch)
@ -855,6 +859,7 @@ if ($action == 'create')
$staticwarehouse->fetch($warehouse_id); $staticwarehouse->fetch($warehouse_id);
print $staticwarehouse->getNomUrl(0).' / '; print $staticwarehouse->getNomUrl(0).' / ';
print '<!-- Show details of lot -->';
print '<input name="batchl'.$indiceAsked.'_'.$subj.'" type="hidden" value="'.$dbatch->id.'">'; print '<input name="batchl'.$indiceAsked.'_'.$subj.'" type="hidden" value="'.$dbatch->id.'">';
print $langs->trans("DetailBatchFormat", $dbatch->batch, dol_print_date($dbatch->eatby,"day"), dol_print_date($dbatch->sellby,"day"), $dbatch->qty); print $langs->trans("DetailBatchFormat", $dbatch->batch, dol_print_date($dbatch->eatby,"day"), dol_print_date($dbatch->sellby,"day"), $dbatch->qty);
if ($defaultqty<=0) { if ($defaultqty<=0) {
@ -1073,8 +1078,8 @@ else if ($id || $ref)
// Weight // Weight
print '<tr><td>'.$form->editfieldkey("Weight",'trueWeight',$object->trueWeight,$object,$user->rights->expedition->creer).'</td><td colspan="3">'; print '<tr><td>'.$form->editfieldkey("Weight",'trueWeight',$object->trueWeight,$object,$user->rights->expedition->creer).'</td><td colspan="3">';
if($action=='edittrueWeight') { if ($action=='edittrueWeight')
{
print '<form name="settrueweight" action="'.$_SERVER["PHP_SELF"].'" method="post">'; print '<form name="settrueweight" action="'.$_SERVER["PHP_SELF"].'" method="post">';
print '<input name="action" value="settrueWeight" type="hidden">'; print '<input name="action" value="settrueWeight" type="hidden">';
print '<input name="id" value="'.$object->id.'" type="hidden">'; print '<input name="id" value="'.$object->id.'" type="hidden">';
@ -1086,7 +1091,8 @@ else if ($id || $ref)
print '</form>'; print '</form>';
} }
else { else
{
print $object->trueWeight; print $object->trueWeight;
print ($object->trueWeight && $object->weight_units!='')?' '.measuring_units_string($object->weight_units,"weight"):''; print ($object->trueWeight && $object->weight_units!='')?' '.measuring_units_string($object->weight_units,"weight"):'';
} }
@ -1107,8 +1113,8 @@ else if ($id || $ref)
// Height // Height
print '<tr><td>'.$form->editfieldkey("Height",'trueHeight',$object->trueHeight,$object,$user->rights->expedition->creer).'</td><td colspan="3">'; print '<tr><td>'.$form->editfieldkey("Height",'trueHeight',$object->trueHeight,$object,$user->rights->expedition->creer).'</td><td colspan="3">';
if($action=='edittrueHeight') { if($action=='edittrueHeight')
{
print '<form name="settrueHeight" action="'.$_SERVER["PHP_SELF"].'" method="post">'; print '<form name="settrueHeight" action="'.$_SERVER["PHP_SELF"].'" method="post">';
print '<input name="action" value="settrueHeight" type="hidden">'; print '<input name="action" value="settrueHeight" type="hidden">';
print '<input name="id" value="'.$object->id.'" type="hidden">'; print '<input name="id" value="'.$object->id.'" type="hidden">';
@ -1120,7 +1126,8 @@ else if ($id || $ref)
print '</form>'; print '</form>';
} }
else { else
{
print $object->trueHeight; print $object->trueHeight;
print ($object->trueHeight && $object->height_units!='')?' '.measuring_units_string($object->height_units,"size"):''; print ($object->trueHeight && $object->height_units!='')?' '.measuring_units_string($object->height_units,"size"):'';
@ -1370,8 +1377,10 @@ else if ($id || $ref)
else if (count($lines[$i]->details_entrepot) > 1) else if (count($lines[$i]->details_entrepot) > 1)
{ {
$detail = ''; $detail = '';
foreach ($lines[$i]->details_entrepot as $detail_entrepot) { foreach ($lines[$i]->details_entrepot as $detail_entrepot)
if ($detail_entrepot->entrepot_id > 0) { {
if ($detail_entrepot->entrepot_id > 0)
{
$entrepot = new Entrepot($db); $entrepot = new Entrepot($db);
$entrepot->fetch($detail_entrepot->entrepot_id); $entrepot->fetch($detail_entrepot->entrepot_id);
$detail.= $langs->trans("DetailWarehouseFormat",$entrepot->libelle,$detail_entrepot->qty_shipped).'<br/>'; $detail.= $langs->trans("DetailWarehouseFormat",$entrepot->libelle,$detail_entrepot->qty_shipped).'<br/>';
@ -1389,7 +1398,8 @@ else if ($id || $ref)
{ {
print '<td>'; print '<td>';
$detail = ''; $detail = '';
foreach ($lines[$i]->detail_batch as $dbatch) { foreach ($lines[$i]->detail_batch as $dbatch)
{
$detail.= $langs->trans("DetailBatchFormat",$dbatch->batch,dol_print_date($dbatch->eatby,"day"),dol_print_date($dbatch->sellby,"day"),$dbatch->dluo_qty).'<br/>'; $detail.= $langs->trans("DetailBatchFormat",$dbatch->batch,dol_print_date($dbatch->eatby,"day"),dol_print_date($dbatch->sellby,"day"),$dbatch->dluo_qty).'<br/>';
} }
print $form->textwithtooltip($langs->trans("DetailBatchNumber"),$detail); print $form->textwithtooltip($langs->trans("DetailBatchNumber"),$detail);
@ -1413,7 +1423,7 @@ else if ($id || $ref)
/* /*
* Boutons actions * Boutons actions
*/ */
if (($user->societe_id == 0) && ($action!='presend')) if (($user->societe_id == 0) && ($action!='presend'))
{ {
@ -1487,7 +1497,7 @@ else if ($id || $ref)
/* /*
* Documents generated * Documents generated
*/ */
if ($action != 'presend') if ($action != 'presend')
{ {
print '<table width="100%"><tr><td width="50%" valign="top">'; print '<table width="100%"><tr><td width="50%" valign="top">';
@ -1521,7 +1531,7 @@ else if ($id || $ref)
/* /*
* Action presend * Action presend
*/ */
//Select mail models is same action as presend //Select mail models is same action as presend
if (GETPOST('modelselected')) { if (GETPOST('modelselected')) {
$action = 'presend'; $action = 'presend';

View File

@ -1234,23 +1234,34 @@ class Expedition extends CommonObject
$this->total_localtax1+= $tabprice[9]; $this->total_localtax1+= $tabprice[9];
$this->total_localtax2+= $tabprice[10]; $this->total_localtax2+= $tabprice[10];
$line->detail_batch = array();
// Eat-by date // Eat-by date
if (! empty($conf->productbatch->enabled)) { if (! empty($conf->productbatch->enabled) && $obj->line_id > 0)
/* test on conf at begining of file sometimes doesn't include expeditionbatch {
* May be conf is not well initialized for dark reason
*/
require_once DOL_DOCUMENT_ROOT.'/expedition/class/expeditionbatch.class.php'; require_once DOL_DOCUMENT_ROOT.'/expedition/class/expeditionbatch.class.php';
if ($originline != $obj->fk_origin_line)
$newdetailbatch = ExpeditionLineBatch::fetchAll($this->db,$obj->line_id);
if (is_array($newdetailbatch))
{ {
$line->detail_batch = ExpeditionLineBatch::fetchAll($this->db,$obj->line_id); if ($originline != $obj->fk_origin_line)
} else { {
$line->detail_batch = array_merge($line->detail_batch,ExpeditionLineBatch::fetchAll($this->db,$obj->line_id)); $line->detail_batch = $newdetailbatch;
}
else
{
$line->detail_batch = array_merge($line->detail_batch, $newdetailbatch);
}
} }
} }
if ($originline != $obj->fk_origin_line) {
if ($originline != $obj->fk_origin_line)
{
$this->lines[$lineindex] = $line; $this->lines[$lineindex] = $line;
$lineindex++; $lineindex++;
} else { }
else
{
$line->total_ht += $tabprice[0]; $line->total_ht += $tabprice[0];
$line->total_localtax1 += $tabprice[9]; $line->total_localtax1 += $tabprice[9];
$line->total_localtax2 += $tabprice[10]; $line->total_localtax2 += $tabprice[10];

View File

@ -238,7 +238,6 @@ if ($id > 0 || ! empty($ref))
// Date // Date
print '<tr><td>'.$langs->trans('Date').'</td>'; print '<tr><td>'.$langs->trans('Date').'</td>';
print '<td colspan="2">'.dol_print_date($commande->date,'daytext').'</td>'; print '<td colspan="2">'.dol_print_date($commande->date,'daytext').'</td>';
print '<td width="50%">'.$langs->trans('Source').' : '.$commande->getLabelSource().'</td>';
print '</tr>'; print '</tr>';
// Delivery date planned // Delivery date planned
@ -265,9 +264,9 @@ if ($id > 0 || ! empty($ref))
} }
print '</td>'; print '</td>';
// Note on several rows // Note on several rows
print '<td rowspan="'.$nbrow.'" valign="top">'.$langs->trans('NotePublic').' :<br>'; //print '<td rowspan="'.$nbrow.'" valign="top">'.$langs->trans('NotePublic').' :<br>';
print nl2br($commande->note_public); //print nl2br($commande->note_public);
print '</td>'; //print '</td>';
print '</tr>'; print '</tr>';
// Shipping Method // Shipping Method
@ -307,7 +306,7 @@ if ($id > 0 || ! empty($ref))
print '</td></tr>'; print '</td></tr>';
// Mode of payment // Mode of payment
print '<tr><td height="10">'; print '<tr><td>';
print '<table class="nobordernopadding" width="100%"><tr><td>'; print '<table class="nobordernopadding" width="100%"><tr><td>';
print $langs->trans('PaymentMode'); print $langs->trans('PaymentMode');
print '</td>'; print '</td>';
@ -324,11 +323,42 @@ if ($id > 0 || ! empty($ref))
} }
print '</td></tr>'; print '</td></tr>';
// Availability
print '<tr><td height="10">';
print '<table class="nobordernopadding" width="100%"><tr><td>';
print $langs->trans('AvailabilityPeriod');
print '</td>';
if ($action != 'editavailability')
print '<td align="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=editavailability&amp;id=' . $object->id . '">' . img_edit($langs->trans('SetAvailability'), 1) . '</a></td>';
print '</tr></table>';
print '</td><td colspan="3">';
if ($action == 'editavailability') {
$form->form_availability($_SERVER['PHP_SELF'] . '?id=' . $commande->id, $commande->availability_id, 'availability_id', 1);
} else {
$form->form_availability($_SERVER['PHP_SELF'] . '?id=' . $commande->id, $commande->availability_id, 'none', 1);
}
print '</td></tr>';
// Source
print '<tr><td height="10">';
print '<table class="nobordernopadding" width="100%"><tr><td>';
print $langs->trans('Source');
print '</td>';
if ($action != 'editdemandreason')
print '<td align="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=editdemandreason&amp;id=' . $object->id . '">' . img_edit($langs->trans('SetDemandReason'), 1) . '</a></td>';
print '</tr></table>';
print '</td><td colspan="3">';
if ($action == 'editdemandreason') {
$form->formInputReason($_SERVER['PHP_SELF'] . '?id=' . $commande->id, $commande->demand_reason_id, 'demand_reason_id', 1);
} else {
$form->formInputReason($_SERVER['PHP_SELF'] . '?id=' . $commande->id, $commande->demand_reason_id, 'none');
}
// Project // Project
if (! empty($conf->projet->enabled)) if (! empty($conf->projet->enabled))
{ {
$langs->load('projects'); $langs->load('projects');
print '<tr><td height="10">'; print '<tr><td>';
print '<table class="nobordernopadding" width="100%"><tr><td>'; print '<table class="nobordernopadding" width="100%"><tr><td>';
print $langs->trans('Project'); print $langs->trans('Project');
print '</td>'; print '</td>';
@ -373,15 +403,14 @@ if ($id > 0 || ! empty($ref))
* Lignes de commandes avec quantite livrees et reste a livrer * Lignes de commandes avec quantite livrees et reste a livrer
* Les quantites livrees sont stockees dans $commande->expeditions[fk_product] * Les quantites livrees sont stockees dans $commande->expeditions[fk_product]
*/ */
print '<table class="liste" width="100%">'; print '<table class="noborder noshadow" width="100%">';
$sql = "SELECT cd.rowid, cd.fk_product, cd.product_type, cd.label, cd.description,"; $sql = "SELECT cd.rowid, cd.fk_product, cd.product_type as type, cd.label, cd.description,";
$sql.= " cd.price, cd.tva_tx, cd.subprice,"; $sql.= " cd.price, cd.tva_tx, cd.subprice,";
$sql.= " cd.qty,"; $sql.= " cd.qty,";
$sql.= ' cd.date_start,'; $sql.= ' cd.date_start,';
$sql.= ' cd.date_end,'; $sql.= ' cd.date_end,';
$sql.= ' p.label as product_label, p.entity, p.ref, p.fk_product_type, p.rowid as prodid,'; $sql.= ' p.rowid as prodid, p.label as product_label, p.entity, p.ref, p.fk_product_type as product_type, p.description as product_desc';
$sql.= ' p.description as product_desc, p.fk_product_type as product_type';
$sql.= " FROM ".MAIN_DB_PREFIX."commandedet as cd"; $sql.= " FROM ".MAIN_DB_PREFIX."commandedet as cd";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."product as p ON cd.fk_product = p.rowid"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."product as p ON cd.fk_product = p.rowid";
$sql.= " WHERE cd.fk_commande = ".$commande->id; $sql.= " WHERE cd.fk_commande = ".$commande->id;
@ -419,7 +448,8 @@ if ($id > 0 || ! empty($ref))
$var=!$var; $var=!$var;
// Show product and description // Show product and description
$type=$objp->product_type?$objp->product_type:$objp->fk_product_type; $type=isset($objp->type)?$objp->type:$objp->product_type;
// Try to enhance type detection using date_start and date_end for free lines where type // Try to enhance type detection using date_start and date_end for free lines where type
// was not saved. // was not saved.
if (! empty($objp->date_start)) $type=1; if (! empty($objp->date_start)) $type=1;
@ -459,7 +489,7 @@ if ($id > 0 || ! empty($ref))
print '<a name="'.$objp->rowid.'"></a>'; // ancre pour retourner sur la ligne print '<a name="'.$objp->rowid.'"></a>'; // ancre pour retourner sur la ligne
// Show product and description // Show product and description
$product_static->type=$objp->fk_product_type; $product_static->type=$type;
$product_static->id=$objp->fk_product; $product_static->id=$objp->fk_product;
$product_static->ref=$objp->ref; $product_static->ref=$objp->ref;
$product_static->entity = $objp->entity; $product_static->entity = $objp->entity;

View File

@ -54,6 +54,7 @@ delete from llx_adherent_extrafields where fk_object not in (select rowid from l
delete from llx_product_extrafields where fk_object not in (select rowid from llx_product); delete from llx_product_extrafields where fk_object not in (select rowid from llx_product);
--delete from llx_societe_commerciaux where fk_soc not in (select rowid from llx_societe); --delete from llx_societe_commerciaux where fk_soc not in (select rowid from llx_societe);
update llx_product_batch set batch = '' where batch = 'Non d&eacute;fini';
-- Fix: delete category child with no category parent. -- Fix: delete category child with no category parent.
drop table tmp_categorie; drop table tmp_categorie;

View File

@ -68,6 +68,7 @@ Country=Country
CountryCode=Country code CountryCode=Country code
CountryId=Country id CountryId=Country id
Phone=Phone Phone=Phone
PhoneShort=Phone
Skype=Skype Skype=Skype
Call=Call Call=Call
Chat=Chat Chat=Chat

View File

@ -134,7 +134,7 @@ IsInPackage=Contained into package
ShowWarehouse=Show warehouse ShowWarehouse=Show warehouse
MovementCorrectStock=Stock correction for product %s MovementCorrectStock=Stock correction for product %s
MovementTransferStock=Stock transfer of product %s into another warehouse MovementTransferStock=Stock transfer of product %s into another warehouse
WarehouseMustBeSelectedAtFirstStepWhenProductBatchModuleOn=Source warehouse must be defined here when "Product lot" module is on. It will be used to list wich lot/serial is available for product that required lot/serial data for movement. If you want to send products from different warehouses, just make the shipment into several steps. WarehouseMustBeSelectedAtFirstStepWhenProductBatchModuleOn=Source warehouse must be defined here when "Product lot" module is on. It will be used to list which lot/serial are available for products requiring lot/serial data for movement. If you want to send products from different warehouses, just make the shipment into several steps.
InventoryCodeShort=Inv./Mov. code InventoryCodeShort=Inv./Mov. code
NoPendingReceptionOnSupplierOrder=No pending reception due to open supplier order NoPendingReceptionOnSupplierOrder=No pending reception due to open supplier order
ThisSerialAlreadyExistWithDifferentDate=This lot/serial number (<strong>%s</strong>) already exists but with different eatby or sellby date (found <strong>%s</strong> but you enter <strong>%s</strong>). ThisSerialAlreadyExistWithDifferentDate=This lot/serial number (<strong>%s</strong>) already exists but with different eatby or sellby date (found <strong>%s</strong> but you enter <strong>%s</strong>).

View File

@ -462,16 +462,17 @@ class Productbatch extends CommonObject
/** /**
* Return all batch detail records for given product and warehouse * Return all batch detail records for given product and warehouse
* *
* @param DoliDB $db database object * @param DoliDB $db database object
* @param int $fk_product_stock id product_stock for objet * @param int $fk_product_stock id product_stock for objet
* @param int $with_qty doesn't return line with 0 quantity * @param int $with_qty doesn't return line with 0 quantity
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
public static function findAll($db,$fk_product_stock,$with_qty=0) public static function findAll($db,$fk_product_stock,$with_qty=0)
{ {
global $langs; global $langs;
$ret = array(); $ret = array();
$sql = "SELECT";
$sql = "SELECT";
$sql.= " t.rowid,"; $sql.= " t.rowid,";
$sql.= " t.tms,"; $sql.= " t.tms,";
$sql.= " t.fk_product_stock,"; $sql.= " t.fk_product_stock,";
@ -480,12 +481,10 @@ class Productbatch extends CommonObject
$sql.= " t.batch,"; $sql.= " t.batch,";
$sql.= " t.qty,"; $sql.= " t.qty,";
$sql.= " t.import_key"; $sql.= " t.import_key";
$sql.= " FROM ".MAIN_DB_PREFIX."product_batch as t";
$sql.= " FROM ".MAIN_DB_PREFIX.self::$_table_element." as t";
$sql.= " WHERE fk_product_stock=".$fk_product_stock; $sql.= " WHERE fk_product_stock=".$fk_product_stock;
if ($with_qty) $sql.= " AND qty<>0"; if ($with_qty) $sql.= " AND qty<>0";
dol_syslog("productbatch::findAll", LOG_DEBUG); dol_syslog("productbatch::findAll", LOG_DEBUG);
$resql=$db->query($sql); $resql=$db->query($sql);
if ($resql) if ($resql)

View File

@ -411,7 +411,7 @@ if ($action == 'create' && $user->rights->projet->creer)
print '<input type="hidden" name="action" value="add">'; print '<input type="hidden" name="action" value="add">';
print '<input type="hidden" name="backtopage" value="'.$backtopage.'">'; print '<input type="hidden" name="backtopage" value="'.$backtopage.'">';
print dol_fiche_head(); dol_fiche_head();
print '<table class="border" width="100%">'; print '<table class="border" width="100%">';