diff --git a/htdocs/cashdesk/admin/cashdesk.php b/htdocs/cashdesk/admin/cashdesk.php index 8430a8bd0ba..d8a5d2b8895 100644 --- a/htdocs/cashdesk/admin/cashdesk.php +++ b/htdocs/cashdesk/admin/cashdesk.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2008-2010 Laurent Destailleur * * 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 @@ -17,7 +17,7 @@ */ /** - * \file htdocs/admin/cachdesk.php + * \file htdocs/cashdesk/admin/cashdesk.php * \ingroup cashdesk * \brief Setup page for cashdesk module * \version $Id$ diff --git a/htdocs/cashdesk/index.php b/htdocs/cashdesk/index.php index 60804b9d32a..9c9cb5cc712 100644 --- a/htdocs/cashdesk/index.php +++ b/htdocs/cashdesk/index.php @@ -49,6 +49,10 @@ if ( $_SESSION['uid'] > 0 ) } +require_once(DOL_DOCUMENT_ROOT."/product/class/html.formproduct.class.php"); + +$formproduct=new FormProduct($db); + ?> @@ -94,7 +98,20 @@ if ( $_SESSION['uid'] > 0 ) trans("Password"); ?> - +stock->enabled) +{ + $langs->load("stocks"); + print ""; + print ''.$langs->trans("Warehouse").''; + print ''; + $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 ''; + print ''; + print ""; +} +?> diff --git a/htdocs/includes/modules/facture/.cvsignore b/htdocs/includes/modules/facture/.cvsignore new file mode 100644 index 00000000000..ac4c10da76b --- /dev/null +++ b/htdocs/includes/modules/facture/.cvsignore @@ -0,0 +1 @@ +doc_generic_odt.modules.php diff --git a/htdocs/product/class/html.formproduct.class.php b/htdocs/product/class/html.formproduct.class.php index e6258ec2163..477c0d3bd39 100644 --- a/htdocs/product/class/html.formproduct.class.php +++ b/htdocs/product/class/html.formproduct.class.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 htmlname Nom de la zone select - * \param filtertype Pour filtre - * \param empty 1=peut etre vide, 0 sinon + * \param htmlname Name of html select html + * \param filtertype For filtre + * \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; @@ -104,7 +105,7 @@ class FormProduct $this->loadWarehouses(); - print ''; if ($empty) print ''; foreach($this->cache_warehouses as $id => $arraytypes) { @@ -116,6 +117,7 @@ class FormProduct print ''; } print ''; + if ($disabled) print ''; } /**