New: Some change to allow to use different warehouse in pos module
This commit is contained in:
parent
d1df15878c
commit
f505c21a67
@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2008-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
/* Copyright (C) 2008-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
*
|
*
|
||||||
* 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
|
||||||
@ -17,7 +17,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \file htdocs/admin/cachdesk.php
|
* \file htdocs/cashdesk/admin/cashdesk.php
|
||||||
* \ingroup cashdesk
|
* \ingroup cashdesk
|
||||||
* \brief Setup page for cashdesk module
|
* \brief Setup page for cashdesk module
|
||||||
* \version $Id$
|
* \version $Id$
|
||||||
|
|||||||
@ -49,6 +49,10 @@ if ( $_SESSION['uid'] > 0 )
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
require_once(DOL_DOCUMENT_ROOT."/product/class/html.formproduct.class.php");
|
||||||
|
|
||||||
|
$formproduct=new FormProduct($db);
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||||
@ -94,7 +98,20 @@ if ( $_SESSION['uid'] > 0 )
|
|||||||
<td class="label1"><?php echo $langs->trans("Password"); ?></td>
|
<td class="label1"><?php echo $langs->trans("Password"); ?></td>
|
||||||
<td><input name="pwdPassword" class="texte_login" type="password" value="" /></td>
|
<td><input name="pwdPassword" class="texte_login" type="password" value="" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<?php if ($conf->stock->enabled)
|
||||||
|
{
|
||||||
|
$langs->load("stocks");
|
||||||
|
print "<tr>";
|
||||||
|
print '<td class="label1">'.$langs->trans("Warehouse").'</td>';
|
||||||
|
print '<td>';
|
||||||
|
$disabled=0;
|
||||||
|
if (! empty($conf->global->CASHDESK_ID_WAREHOUSE)) $disabled=1; // If a particular stock is defined, we disable choice
|
||||||
|
print $formproduct->selectWarehouses($conf->global->CASHDESK_ID_WAREHOUSE,'idwarehouse','',!$disabled,$disabled);
|
||||||
|
//print '<input name="warehouse_id" class="texte_login" type="warehouse_id" value="" />';
|
||||||
|
print '</td>';
|
||||||
|
print "</tr>";
|
||||||
|
}
|
||||||
|
?>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<span class="bouton_login"><input name="sbmtConnexion" type="submit" value="Connexion" /></span>
|
<span class="bouton_login"><input name="sbmtConnexion" type="submit" value="Connexion" /></span>
|
||||||
|
|||||||
1
htdocs/includes/modules/facture/.cvsignore
Normal file
1
htdocs/includes/modules/facture/.cvsignore
Normal file
@ -0,0 +1 @@
|
|||||||
|
doc_generic_odt.modules.php
|
||||||
@ -90,13 +90,14 @@ class FormProduct
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Retourne la liste des modes de paiements possibles
|
* \brief Return list of possible payments modes
|
||||||
* \param selected Id du mode de paiement pre-selectionne
|
* \param selected Id du mode de paiement pre-selectionne
|
||||||
* \param htmlname Nom de la zone select
|
* \param htmlname Name of html select html
|
||||||
* \param filtertype Pour filtre
|
* \param filtertype For filtre
|
||||||
* \param empty 1=peut etre vide, 0 sinon
|
* \param empty 1=Can be empty, 0 if not
|
||||||
|
* \param disabled 1=Select is disabled
|
||||||
*/
|
*/
|
||||||
function selectWarehouses($selected='',$htmlname='idwarehouse',$filtertype='',$empty=0)
|
function selectWarehouses($selected='',$htmlname='idwarehouse',$filtertype='',$empty=0,$disabled=0)
|
||||||
{
|
{
|
||||||
global $langs,$user;
|
global $langs,$user;
|
||||||
|
|
||||||
@ -104,7 +105,7 @@ class FormProduct
|
|||||||
|
|
||||||
$this->loadWarehouses();
|
$this->loadWarehouses();
|
||||||
|
|
||||||
print '<select class="flat" name="'.$htmlname.'">';
|
print '<select class="flat"'.($disabled?' disabled="true"':'').' name="'.($htmlname.($disabled?'_disabled':'')).'">';
|
||||||
if ($empty) print '<option value=""> </option>';
|
if ($empty) print '<option value=""> </option>';
|
||||||
foreach($this->cache_warehouses as $id => $arraytypes)
|
foreach($this->cache_warehouses as $id => $arraytypes)
|
||||||
{
|
{
|
||||||
@ -116,6 +117,7 @@ class FormProduct
|
|||||||
print '</option>';
|
print '</option>';
|
||||||
}
|
}
|
||||||
print '</select>';
|
print '</select>';
|
||||||
|
if ($disabled) print '<input type="hidden" name="'.$htmlname.'" value="'.$selected.'">';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user