Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
da6f3a692b
@ -162,7 +162,8 @@ Dolibarr better:
|
||||
creation of a pdf or odt, hook "afterPDFCreation" or "afterODTCreation" must be used instead.
|
||||
- A lot of pages called fiche.php were renamed into card.php
|
||||
- A lot of pages called liste.php were renamed into list.php
|
||||
|
||||
- If you used warehouse/stock module, recheck setup of stock increase/decrease rules of the
|
||||
warehouse module and your Point Of Sale module if you use one.
|
||||
|
||||
|
||||
***** ChangeLog for 3.6.2 compared to 3.6.1 *****
|
||||
|
||||
@ -1,21 +0,0 @@
|
||||
#!/bin/sh
|
||||
# Helps find duplicate translation keys in language files
|
||||
#
|
||||
# Copyright (C) 2014 Raphaël Doursenaud - rdoursenaud@gpcsolutions.fr
|
||||
|
||||
for file in `find . -type f`
|
||||
do
|
||||
dupes=$(
|
||||
sed "s/^\s*//" "$file" | # Remove any leading whitespace
|
||||
sed "s/\s*\=/=/" | # Remove any whitespace before =
|
||||
grep -Po "(^.*?)=" | # Non greedeely match everything before =
|
||||
sed "s/\=//" | # Remove trailing = so we get the key
|
||||
sort | uniq -d # Find duplicates
|
||||
)
|
||||
|
||||
if [ -n "$dupes" ]
|
||||
then
|
||||
echo "Duplicates found in $file"
|
||||
echo "$dupes"
|
||||
fi
|
||||
done
|
||||
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
#------------------------------------------------------
|
||||
# Script to find files that are not Unix encoded
|
||||
# Detect files that does not contains any tab inside
|
||||
#
|
||||
# Laurent Destailleur - eldy@users.sourceforge.net
|
||||
#------------------------------------------------------
|
||||
38
dev/fixduplicatelangkey.sh
Executable file
38
dev/fixduplicatelangkey.sh
Executable file
@ -0,0 +1,38 @@
|
||||
#!/bin/sh
|
||||
# Helps find duplicate translation keys in language files
|
||||
#
|
||||
# Copyright (C) 2014 Raphaël Doursenaud - rdoursenaud@gpcsolutions.fr
|
||||
|
||||
|
||||
# Syntax
|
||||
if [ "x$1" != "xlist" -a "x$1" != "xfix" ]
|
||||
then
|
||||
echo "Usage: detectduplicatelangkey.sh (list|fix)"
|
||||
fi
|
||||
|
||||
|
||||
if [ "x$1" = "xlist" ]
|
||||
then
|
||||
for file in `find htdocs/langs/en_US -name *.lang -type f`
|
||||
do
|
||||
dupes=$(
|
||||
sed "s/^\s*//" "$file" | # Remove any leading whitespace
|
||||
sed "s/\s*\=/=/" | # Remove any whitespace before =
|
||||
grep -Po "(^.*?)=" | # Non greedeely match everything before =
|
||||
sed "s/\=//" | # Remove trailing = so we get the key
|
||||
sort | uniq -d # Find duplicates
|
||||
)
|
||||
|
||||
if [ -n "$dupes" ]
|
||||
then
|
||||
echo "Duplicates found in $file"
|
||||
echo "$dupes"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
# To convert
|
||||
if [ "x$1" = "xfix" ]
|
||||
then
|
||||
echo Feature not implemented. Please fix files manually.
|
||||
fi
|
||||
@ -10,6 +10,7 @@ INPLACE='0'
|
||||
max_input_size=0
|
||||
max_output_size=0
|
||||
|
||||
|
||||
usage()
|
||||
{
|
||||
cat <<EO
|
||||
@ -37,7 +38,8 @@ optimize_image()
|
||||
max_input_size=$(expr $max_input_size + $input_file_size)
|
||||
|
||||
if [ "${1##*.}" = "png" ]; then
|
||||
optipng -o1 -clobber -quiet $1 -out $2.firstpass
|
||||
#optipng -o1 -clobber -quiet $1 -out $2.firstpass
|
||||
optipng -o1 -quiet $1 -out $2.firstpass
|
||||
pngcrush -q -rem alla -reduce $2.firstpass $2 >/dev/null
|
||||
rm -fr $2.firstpass
|
||||
fi
|
||||
@ -67,6 +69,25 @@ get_max_file_length()
|
||||
|
||||
main()
|
||||
{
|
||||
test=`type pngcrush >/dev/null 2>&1`
|
||||
result=$?
|
||||
if [ "x$result" == "x1" ]; then
|
||||
echo "Tool pngcrush not found" && exit
|
||||
fi
|
||||
|
||||
test=`type optipng >/dev/null 2>&1`
|
||||
result=$?
|
||||
if [ "x$result" == "x1" ]; then
|
||||
echo "Tool optipng not found" && exit
|
||||
fi
|
||||
|
||||
test=`type jpegtran >/dev/null 2>&1`
|
||||
result=$?
|
||||
if [ "x$result" == "x1" ]; then
|
||||
echo "Tool jpegtran not found" && exit
|
||||
fi
|
||||
|
||||
|
||||
# If $INPUT is empty, then we use current directory
|
||||
if [[ "$INPUT" == "" ]]; then
|
||||
INPUT=$(pwd)
|
||||
@ -81,6 +102,8 @@ main()
|
||||
OUTPUT='/tmp/optimize'
|
||||
fi
|
||||
|
||||
echo "Mode is $INPLACE (1=Images are replaced, 0=New images are stored into $OUTPUT)"
|
||||
|
||||
# We create the output directory
|
||||
mkdir -p $OUTPUT
|
||||
|
||||
@ -96,6 +119,7 @@ main()
|
||||
|
||||
# Search of all jpg/jpeg/png in $INPUT
|
||||
# We remove images from $OUTPUT if $OUTPUT is a subdirectory of $INPUT
|
||||
echo "Scan $INPUT to find images"
|
||||
IMAGES=$(find $INPUT -regextype posix-extended -regex '.*\.(jpg|jpeg|png)' | grep -v $OUTPUT)
|
||||
|
||||
if [ "$QUIET" == "0" ]; then
|
||||
@ -103,6 +127,7 @@ main()
|
||||
echo
|
||||
fi
|
||||
for CURRENT_IMAGE in $IMAGES; do
|
||||
echo "Process $CURRENT_IMAGE"
|
||||
filename=$(basename $CURRENT_IMAGE)
|
||||
if [ "$QUIET" == "0" ]; then
|
||||
printf '%s ' "$filename"
|
||||
@ -155,6 +180,13 @@ SHORTOPTS="h,i:,o:,q,s,p"
|
||||
LONGOPTS="help,input:,output:,quiet,no-stats,inplace"
|
||||
ARGS=$(getopt -s bash --options $SHORTOPTS --longoptions $LONGOPTS --name $PROGNAME -- "$@")
|
||||
|
||||
# Syntax
|
||||
if [ "x$1" != "xlist" -a "x$1" != "xfix" ]
|
||||
then
|
||||
echo "Usage: optimize_images.sh (list|fix) -i dirtoscan"
|
||||
exit
|
||||
fi
|
||||
|
||||
eval set -- "$ARGS"
|
||||
while true; do
|
||||
case $1 in
|
||||
@ -191,5 +223,11 @@ while true; do
|
||||
shift
|
||||
done
|
||||
|
||||
# To convert
|
||||
if [ "x$1" = "xlist" ]
|
||||
then
|
||||
INPLACE=0
|
||||
fi
|
||||
|
||||
main
|
||||
|
||||
|
||||
@ -534,7 +534,7 @@ dol_fiche_end();
|
||||
|
||||
|
||||
// Show warning about external users
|
||||
if ($mode != 'marketplace') print '<div class="info">'.showModulesExludedForExternal($modules).'</div><br>'."\n";
|
||||
if ($mode != 'marketplace') print info_admin(showModulesExludedForExternal($modules))."\n";
|
||||
|
||||
|
||||
llxFooter();
|
||||
|
||||
@ -116,7 +116,7 @@ foreach ($modulesdir as $dir)
|
||||
$db->commit();
|
||||
|
||||
// Show warning about external users
|
||||
print showModulesExludedForExternal($modules).'<br>'."\n";
|
||||
print info_admin(showModulesExludedForExternal($modules)).'<br>'."\n";
|
||||
print "<br>\n";
|
||||
|
||||
|
||||
|
||||
@ -193,6 +193,11 @@ if (! empty($conf->expedition->enabled))
|
||||
print "</form>\n</td>\n</tr>\n";
|
||||
}
|
||||
print '</table>';
|
||||
|
||||
//if (! empty($conf->global->STOCK_CALCULATE_ON_VALIDATE_ORDER) || ! empty($conf->global->STOCK_CALCULATE_ON_SHIPMENT))
|
||||
//{
|
||||
print info_admin($langs->trans("IfYouUsePointOfSaleCheckModule"));
|
||||
//}
|
||||
print '<br>';
|
||||
|
||||
// Title rule for stock increase
|
||||
|
||||
@ -50,14 +50,13 @@ if (GETPOST('action','alpha') == 'set')
|
||||
$db->begin();
|
||||
|
||||
if (GETPOST('socid','int') < 0) $_POST["socid"]='';
|
||||
/*if (GETPOST("CASHDESK_ID_BANKACCOUNT") < 0) $_POST["CASHDESK_ID_BANKACCOUNT"]='';
|
||||
if (GETPOST("CASHDESK_ID_WAREHOUSE") < 0) $_POST["CASHDESK_ID_WAREHOUSE"]='';*/
|
||||
|
||||
$res = dolibarr_set_const($db,"CASHDESK_ID_THIRDPARTY",GETPOST('socid','int'),'chaine',0,'',$conf->entity);
|
||||
$res = dolibarr_set_const($db,"CASHDESK_ID_BANKACCOUNT_CASH",GETPOST('CASHDESK_ID_BANKACCOUNT_CASH','alpha'),'chaine',0,'',$conf->entity);
|
||||
$res = dolibarr_set_const($db,"CASHDESK_ID_BANKACCOUNT_CHEQUE",GETPOST('CASHDESK_ID_BANKACCOUNT_CHEQUE','alpha'),'chaine',0,'',$conf->entity);
|
||||
$res = dolibarr_set_const($db,"CASHDESK_ID_BANKACCOUNT_CB",GETPOST('CASHDESK_ID_BANKACCOUNT_CB','alpha'),'chaine',0,'',$conf->entity);
|
||||
$res = dolibarr_set_const($db,"CASHDESK_ID_WAREHOUSE",GETPOST('CASHDESK_ID_WAREHOUSE','alpha'),'chaine',0,'',$conf->entity);
|
||||
$res = dolibarr_set_const($db,"CASHDESK_ID_THIRDPARTY",(GETPOST('socid','int') > 0 ? GETPOST('socid','int') : ''),'chaine',0,'',$conf->entity);
|
||||
$res = dolibarr_set_const($db,"CASHDESK_ID_BANKACCOUNT_CASH",(GETPOST('CASHDESK_ID_BANKACCOUNT_CASH','alpha') > 0 ? GETPOST('CASHDESK_ID_BANKACCOUNT_CASH','alpha') : ''),'chaine',0,'',$conf->entity);
|
||||
$res = dolibarr_set_const($db,"CASHDESK_ID_BANKACCOUNT_CHEQUE",(GETPOST('CASHDESK_ID_BANKACCOUNT_CHEQUE','alpha') > 0 ? GETPOST('CASHDESK_ID_BANKACCOUNT_CHEQUE','alpha') : ''),'chaine',0,'',$conf->entity);
|
||||
$res = dolibarr_set_const($db,"CASHDESK_ID_BANKACCOUNT_CB",(GETPOST('CASHDESK_ID_BANKACCOUNT_CB','alpha') > 0 ? GETPOST('CASHDESK_ID_BANKACCOUNT_CB','alpha') : ''),'chaine',0,'',$conf->entity);
|
||||
$res = dolibarr_set_const($db,"CASHDESK_ID_WAREHOUSE",(GETPOST('CASHDESK_ID_WAREHOUSE','alpha') > 0 ? GETPOST('CASHDESK_ID_WAREHOUSE','alpha') : ''),'chaine',0,'',$conf->entity);
|
||||
$res = dolibarr_set_const($db,"CASHDESK_NO_DECREASE_STOCK",GETPOST('CASHDESK_NO_DECREASE_STOCK','alpha'),'chaine',0,'',$conf->entity);
|
||||
$res = dolibarr_set_const($db,"CASHDESK_SERVICES", GETPOST('CASHDESK_SERVICES','alpha'),'chaine',0,'',$conf->entity);
|
||||
|
||||
dol_syslog("admin/cashdesk: level ".GETPOST('level','alpha'));
|
||||
@ -129,9 +128,25 @@ if (! empty($conf->banque->enabled))
|
||||
if (! empty($conf->stock->enabled))
|
||||
{
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td>'.$langs->trans("CashDeskIdWareHouse").'</td>';
|
||||
print '<tr '.$bc[$var].'><td>'.$langs->trans("CashDeskDoNotDecreaseStock").'</td>'; // Force warehouse (this is not a default value)
|
||||
print '<td colspan="2">';
|
||||
print $formproduct->selectWarehouses($conf->global->CASHDESK_ID_WAREHOUSE,'CASHDESK_ID_WAREHOUSE','',1);
|
||||
print $form->selectyesno('CASHDESK_NO_DECREASE_STOCK',$conf->global->CASHDESK_NO_DECREASE_STOCK,1);
|
||||
print '</td></tr>';
|
||||
|
||||
$disabled=$conf->global->CASHDESK_NO_DECREASE_STOCK;
|
||||
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td>'.$langs->trans("CashDeskIdWareHouse").'</td>'; // Force warehouse (this is not a default value)
|
||||
print '<td colspan="2">';
|
||||
if (! $disabled)
|
||||
{
|
||||
print $formproduct->selectWarehouses($conf->global->CASHDESK_ID_WAREHOUSE,'CASHDESK_ID_WAREHOUSE','',1,$disabled);
|
||||
print ' <a href="'.DOL_URL_ROOT.'/product/stock/card.php?action=create&backtopage='.urlencode($_SERVER["PHP_SELF"]).'">('.$langs->trans("Create").')</a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print $langs->trans("StockDecreaseForPointOfSaleDisabled");
|
||||
}
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
|
||||
@ -45,7 +45,17 @@ else
|
||||
|
||||
|
||||
|
||||
// Left area with selected articles (shopping cart)
|
||||
$obj_facturation->calculTotaux(); // Redefine prix_total_ttc, prix_total_ht et montant_tva from $_SESSION['poscart']
|
||||
|
||||
$total_ttc = $obj_facturation->prixTotalTtc();
|
||||
|
||||
/*var_dump($obj_facturation);
|
||||
var_dump($_SESSION['poscart']);
|
||||
var_dump($total_ttc);
|
||||
exit;*/
|
||||
|
||||
|
||||
// Left area with selected articles (area for article, amount and payments)
|
||||
print '<div class="principal">';
|
||||
|
||||
$page=GETPOST('menu','alpha');
|
||||
@ -72,13 +82,10 @@ print '</div>';
|
||||
|
||||
|
||||
|
||||
|
||||
// Right area with selected articles (shopping cart)
|
||||
print '<div class="liste_articles">';
|
||||
|
||||
require ('tpl/liste_articles.tpl.php');
|
||||
$obj_facturation->prixTotalHt($lst_total_ht);
|
||||
$obj_facturation->prixTotalTtc($lst_total_ttc);
|
||||
|
||||
print '</div>';
|
||||
|
||||
|
||||
@ -222,6 +222,7 @@ p.titre {
|
||||
margin: 0 15px;
|
||||
padding: 0;
|
||||
max-width: 500px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.titre1 {
|
||||
@ -308,7 +309,7 @@ p.titre {
|
||||
}
|
||||
|
||||
.texte_ref {
|
||||
width: 80px;
|
||||
min-width: 150px;
|
||||
}
|
||||
|
||||
.texte1,.texte1_off {
|
||||
@ -321,8 +322,8 @@ p.titre {
|
||||
|
||||
/* ------------------- */
|
||||
.textarea_note {
|
||||
width: 300px;
|
||||
height: 150px;
|
||||
width: 100%;
|
||||
height: 50px;
|
||||
padding: 2px 2px;
|
||||
}
|
||||
|
||||
@ -362,7 +363,7 @@ p.titre {
|
||||
}
|
||||
|
||||
.resume_label,.note_label {
|
||||
width: 200px;
|
||||
min-width: 200px;
|
||||
font-weight: bold;
|
||||
font-size: 1.1em;
|
||||
}
|
||||
|
||||
@ -137,16 +137,17 @@ switch ( $_GET['action'] )
|
||||
|
||||
case 'ajout_article': // We have clicked on button "Add product"
|
||||
|
||||
//var_dump($obj_facturation);
|
||||
//var_dump('ajout_article');
|
||||
//exit;
|
||||
|
||||
if (! empty($obj_facturation->id)) // A product has been selected and stored in session
|
||||
if (! empty($obj_facturation->id)) // A product was previously selected and stored in session, so we can add it
|
||||
{
|
||||
$obj_facturation->qte($_POST['txtQte']);
|
||||
$obj_facturation->tva($_POST['selTva']);
|
||||
$obj_facturation->remisePercent($_POST['txtRemise']);
|
||||
$obj_facturation->ajoutArticle();
|
||||
|
||||
$obj_facturation->ajoutArticle(); // This add an entry into $_SESSION['poscart']
|
||||
// We update prixTotalTtc
|
||||
|
||||
}
|
||||
|
||||
$redirection = DOL_URL_ROOT.'/cashdesk/affIndex.php?menu=facturation';
|
||||
@ -160,7 +161,7 @@ switch ( $_GET['action'] )
|
||||
|
||||
}
|
||||
|
||||
|
||||
// We saved object obj_facturation
|
||||
$_SESSION['serObjFacturation'] = serialize($obj_facturation);
|
||||
|
||||
header('Location: '.$redirection);
|
||||
|
||||
@ -32,6 +32,7 @@ $conf_db_base = $dolibarr_main_db_name;
|
||||
$conf_fksoc = (! empty($_SESSION["CASHDESK_ID_THIRDPARTY"]))?$_SESSION["CASHDESK_ID_THIRDPARTY"]:($conf->global->CASHDESK_ID_THIRDPARTY>0?$conf->global->CASHDESK_ID_THIRDPARTY:0);
|
||||
// Identifiant unique correspondant a l'entrepot a utiliser
|
||||
$conf_fkentrepot = (! empty($_SESSION["CASHDESK_ID_WAREHOUSE"]))?$_SESSION["CASHDESK_ID_WAREHOUSE"]:($conf->global->CASHDESK_ID_WAREHOUSE>0?$conf->global->CASHDESK_ID_WAREHOUSE:0);
|
||||
if (! empty($conf->global->CASHDESK_NO_DECREASE_STOCK)) $conf_fkentrepot = 0; // If option to disable stock decrease is on, we set warehouse id to 0.
|
||||
|
||||
// Identifiant unique correspondant au compte caisse / liquide
|
||||
$conf_fkaccount_cash = (! empty($_SESSION["CASHDESK_ID_BANKACCOUNT_CASH"]))?$_SESSION["CASHDESK_ID_BANKACCOUNT_CASH"]:($conf->global->CASHDESK_ID_BANKACCOUNT_CASH>0?$conf->global->CASHDESK_ID_BANKACCOUNT_CASH:0);
|
||||
|
||||
@ -99,16 +99,15 @@ print $form->select_company(GETPOST('socid','int')?GETPOST('socid','int'):$conf-
|
||||
print '</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
if (! empty($conf->stock->enabled))
|
||||
if (! empty($conf->stock->enabled) && empty($conf->global->CASHDESK_NO_DECREASE_STOCK))
|
||||
{
|
||||
$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((GETPOST('warehouseid')?GETPOST('warehouseid'):(empty($conf->global->CASHDESK_ID_WAREHOUSE)?'ifone':$conf->global->CASHDESK_ID_WAREHOUSE)),'warehouseid','',!$disabled,$disabled);
|
||||
//print '<input name="warehouse_id" class="texte_login" type="warehouse_id" value="" />';
|
||||
if ($conf->global->CASHDESK_ID_WAREHOUSE > 0) $disabled=1; // If a particular stock is defined, we disable choice
|
||||
print $formproduct->selectWarehouses((GETPOST('warehouseid')?GETPOST('warehouseid','int'):(empty($conf->global->CASHDESK_ID_WAREHOUSE)?'ifone':$conf->global->CASHDESK_ID_WAREHOUSE)),'warehouseid','',!$disabled,$disabled);
|
||||
print '</td>';
|
||||
print "</tr>\n";
|
||||
}
|
||||
|
||||
@ -36,11 +36,11 @@ $langs->load("cashdesk");
|
||||
|
||||
$username = GETPOST("txtUsername");
|
||||
$password = GETPOST("pwdPassword");
|
||||
$thirdpartyid = (GETPOST('socid','int')!='')?GETPOST('socid','int'):$conf->global->CASHDESK_ID_THIRDPARTY;
|
||||
$warehouseid = (GETPOST("warehouseid")!='')?GETPOST("warehouseid"):$conf->global->CASHDESK_ID_WAREHOUSE;
|
||||
$bankid_cash = (GETPOST("CASHDESK_ID_BANKACCOUNT_CASH")!='')?GETPOST("CASHDESK_ID_BANKACCOUNT_CASH"):$conf->global->CASHDESK_ID_BANKACCOUNT_CASH;
|
||||
$bankid_cheque = (GETPOST("CASHDESK_ID_BANKACCOUNT_CHEQUE")!='')?GETPOST("CASHDESK_ID_BANKACCOUNT_CHEQUE"):$conf->global->CASHDESK_ID_BANKACCOUNT_CHEQUE;
|
||||
$bankid_cb = (GETPOST("CASHDESK_ID_BANKACCOUNT_CB")!='')?GETPOST("CASHDESK_ID_BANKACCOUNT_CB"):$conf->global->CASHDESK_ID_BANKACCOUNT_CB;
|
||||
$thirdpartyid = (GETPOST('socid','int') > 0)?GETPOST('socid','int'):$conf->global->CASHDESK_ID_THIRDPARTY;
|
||||
$warehouseid = (GETPOST("warehouseid") > 0)?GETPOST("warehouseid",'int'):$conf->global->CASHDESK_ID_WAREHOUSE;
|
||||
$bankid_cash = (GETPOST("CASHDESK_ID_BANKACCOUNT_CASH") > 0)?GETPOST("CASHDESK_ID_BANKACCOUNT_CASH",'int'):$conf->global->CASHDESK_ID_BANKACCOUNT_CASH;
|
||||
$bankid_cheque = (GETPOST("CASHDESK_ID_BANKACCOUNT_CHEQUE") > 0)?GETPOST("CASHDESK_ID_BANKACCOUNT_CHEQUE",'int'):$conf->global->CASHDESK_ID_BANKACCOUNT_CHEQUE;
|
||||
$bankid_cb = (GETPOST("CASHDESK_ID_BANKACCOUNT_CB") > 0)?GETPOST("CASHDESK_ID_BANKACCOUNT_CB",'int'):$conf->global->CASHDESK_ID_BANKACCOUNT_CB;
|
||||
|
||||
// Check username
|
||||
if (empty($username))
|
||||
@ -58,15 +58,15 @@ if (! ($thirdpartyid > 0))
|
||||
}
|
||||
|
||||
// If we setup stock module to ask movement on invoices, we must not allow access if required setup not finished.
|
||||
if (! empty($conf->stock->enabled) && $conf->global->STOCK_CALCULATE_ON_BILL && ! ($warehouseid > 0))
|
||||
if (! empty($conf->stock->enabled) && empty($conf->global->CASHDESK_NO_DECREASE_STOCK) && ! ($warehouseid > 0))
|
||||
{
|
||||
$retour=$langs->trans("CashDeskSetupStock");
|
||||
$retour=$langs->trans("CashDeskYouDidNotDisableStockDecease");
|
||||
header('Location: '.DOL_URL_ROOT.'/cashdesk/index.php?err='.urlencode($retour).'&user='.$username.'&socid='.$thirdpartyid.'&warehouseid='.$warehouseid.'&bankid_cash='.$bankid_cash.'&bankid_cheque='.$bankid_cheque.'&bankid_cb='.$bankid_cb);
|
||||
exit;
|
||||
}
|
||||
|
||||
// If stock decrease on bill validation, check user has stock edit permissions
|
||||
if (! empty($conf->stock->enabled) && $conf->global->STOCK_CALCULATE_ON_BILL && ! empty($username))
|
||||
if (! empty($conf->stock->enabled) && empty($conf->global->CASHDESK_NO_DECREASE_STOCK) && ! empty($username))
|
||||
{
|
||||
$testuser=new User($db);
|
||||
$testuser->fetch(0,$username);
|
||||
@ -117,8 +117,9 @@ if ( $retour >= 0 )
|
||||
$_SESSION['uname'] = $username;
|
||||
$_SESSION['lastname'] = $tab['lastname'];
|
||||
$_SESSION['firstname'] = $tab['firstname'];
|
||||
$_SESSION['CASHDESK_ID_THIRDPARTY'] = $thirdpartyid;
|
||||
$_SESSION['CASHDESK_ID_WAREHOUSE'] = $warehouseid;
|
||||
$_SESSION['CASHDESK_ID_THIRDPARTY'] = ($thirdpartyid > 0 ? $thirdpartyid : '');
|
||||
$_SESSION['CASHDESK_ID_WAREHOUSE'] = ($warehouseid > 0 ? $warehouseid : '');
|
||||
|
||||
$_SESSION['CASHDESK_ID_BANKACCOUNT_CASH'] = ($bankid_cash > 0 ? $bankid_cash : '');
|
||||
$_SESSION['CASHDESK_ID_BANKACCOUNT_CHEQUE'] = ($bankid_cheque > 0 ? $bankid_cheque : '');
|
||||
$_SESSION['CASHDESK_ID_BANKACCOUNT_CB'] = ($bankid_cb > 0 ? $bankid_cb : '');
|
||||
@ -131,7 +132,6 @@ if ( $retour >= 0 )
|
||||
{
|
||||
dol_print_error($db);
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -43,6 +43,7 @@ $langs->load("cashdesk");
|
||||
<!-- Affichage de la reference et de la designation -->
|
||||
<td><input class="texte_ref" type="text" id ="txtRef" name="txtRef" value="<?php echo $obj_facturation->ref() ?>"
|
||||
onchange="javascript: setSource('REF');"
|
||||
onkeyup="javascript: verifResultat('resultats_dhtml', this.value);"
|
||||
onfocus="javascript: this.select(); verifResultat('resultats_dhtml', this.value);"
|
||||
onBlur="javascript: document.getElementById('resultats_dhtml').innerHTML = '';"/>
|
||||
</td>
|
||||
@ -147,7 +148,7 @@ $langs->load("cashdesk");
|
||||
</form>
|
||||
</fieldset>
|
||||
|
||||
<!-- ========================= Cadre "Difference" ============================= -->
|
||||
<!-- ========================= Cadre "Amount" ============================= -->
|
||||
<form id="frmDifference" class="formulaire1" method="post" onsubmit="javascript: return verifReglement()" action="validation_verif.php?action=valide_achat">
|
||||
<input type="hidden" name="hdnChoix" value="" />
|
||||
<input type="hidden" name="token" value="<?php echo $_SESSION['newtoken']; ?>" />
|
||||
|
||||
@ -67,8 +67,6 @@ else
|
||||
}
|
||||
}
|
||||
|
||||
$obj_facturation->calculTotaux();
|
||||
$total_ttc = $obj_facturation->prixTotalTtc();
|
||||
echo ('<p class="cadre_prix_total">'.$langs->trans("Total").' : '.price(price2num($total_ttc, 'MT'),0,$langs,0,0,-1,$conf->currency).'<br></p>'."\n");
|
||||
|
||||
?></div>
|
||||
|
||||
@ -72,7 +72,7 @@ print $langs->trans("CashDeskThirdParty").': '.$companyLink.'<br>';
|
||||
/*print $langs->trans("CashDeskBankCash").': '.$bankcashLink.'<br>';
|
||||
print $langs->trans("CashDeskBankCB").': '.$bankcbLink.'<br>';
|
||||
print $langs->trans("CashDeskBankCheque").': '.$bankchequeLink.'<br>';*/
|
||||
if (!empty($_SESSION["CASHDESK_ID_WAREHOUSE"]) && ! empty($conf->stock->enabled))
|
||||
if (!empty($_SESSION["CASHDESK_ID_WAREHOUSE"]) && ! empty($conf->stock->enabled) && empty($conf->global->CASHDESK_NO_DECREASE_STOCK))
|
||||
{
|
||||
print $langs->trans("CashDeskWarehouse").': '.$warehouseLink;
|
||||
}
|
||||
|
||||
@ -17,6 +17,7 @@
|
||||
*/
|
||||
|
||||
$langs->load("main");
|
||||
$langs->load("bills");
|
||||
|
||||
// Object $form must de defined
|
||||
|
||||
@ -111,8 +112,9 @@ $langs->load("main");
|
||||
</p>
|
||||
<p class="note_label"><?php echo $langs->trans("Notes"); ?><br><textarea class="textarea_note" name="txtaNotes"></textarea></p>
|
||||
|
||||
<span><input class="bouton_validation" type="submit" name="btnValider" value="<?php echo $langs->trans("ValidateInvoice"); ?>" /></span>
|
||||
<p><a class="lien1" href="affIndex.php?menu=facturation"><?php echo $langs->trans("RestartSelling"); ?></a></p>
|
||||
<div class="center"><input class="button" type="submit" name="btnValider" value="<?php echo $langs->trans("ValidateInvoice"); ?>" /><br>
|
||||
<br><a class="lien1" href="affIndex.php?menu=facturation"><?php echo $langs->trans("RestartSelling"); ?></a>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
|
||||
@ -18,10 +18,11 @@
|
||||
*/
|
||||
|
||||
$langs->load("main");
|
||||
$langs->load("bills");
|
||||
|
||||
?>
|
||||
|
||||
<h3 class="titre1"><?php echo $langs->trans("SellFinished"); ?></h3>
|
||||
<h3 class="titre1"><?php echo $langs->trans("SellFinished"); ?></h3><br>
|
||||
|
||||
<div class="cadre_facturation">
|
||||
|
||||
|
||||
@ -218,7 +218,33 @@ switch ($action)
|
||||
$resultcreate=$invoice->create($user,0,dol_stringtotime($obj_facturation->paiementLe()));
|
||||
if ($resultcreate > 0)
|
||||
{
|
||||
$resultvalid=$invoice->validate($user, $obj_facturation->numInvoice(), (isset($_SESSION["CASHDESK_ID_WAREHOUSE"])?$_SESSION["CASHDESK_ID_WAREHOUSE"]:0));
|
||||
$warehouseidtodecrease=(isset($_SESSION["CASHDESK_ID_WAREHOUSE"])?$_SESSION["CASHDESK_ID_WAREHOUSE"]:0);
|
||||
if (! empty($conf->global->CASHDESK_NO_DECREASE_STOCK)) $warehouseidtodecrease=0; // If a particular stock is defined, we disable choice
|
||||
|
||||
$resultvalid=$invoice->validate($user, $obj_facturation->numInvoice(), 0);
|
||||
|
||||
if ($warehouseidtodecrease > 0)
|
||||
{
|
||||
// Decrease
|
||||
require_once DOL_DOCUMENT_ROOT.'/product/stock/class/mouvementstock.class.php';
|
||||
$langs->load("agenda");
|
||||
// Loop on each line
|
||||
$cpt=count($invoice->lines);
|
||||
for ($i = 0; $i < $cpt; $i++)
|
||||
{
|
||||
if ($invoice->lines[$i]->fk_product > 0)
|
||||
{
|
||||
$mouvP = new MouvementStock($db);
|
||||
$mouvP->origin = &$invoice;
|
||||
// We decrease stock for product
|
||||
if ($invoice->type == $invoice::TYPE_CREDIT_NOTE) $result=$mouvP->reception($user, $invoice->lines[$i]->fk_product, $warehouseidtodecrease, $invoice->lines[$i]->qty, $invoice->lines[$i]->subprice, $langs->trans("InvoiceValidatedInDolibarrFromPos",$invoice->newref));
|
||||
else $result=$mouvP->livraison($user, $invoice->lines[$i]->fk_product, $warehouseidtodecrease, $invoice->lines[$i]->qty, $invoice->lines[$i]->subprice, $langs->trans("InvoiceValidatedInDolibarrFromPos",$invoice->newref));
|
||||
if ($result < 0) {
|
||||
$error++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -232,7 +258,33 @@ switch ($action)
|
||||
$resultcreate=$invoice->create($user,0,0);
|
||||
if ($resultcreate > 0)
|
||||
{
|
||||
$resultvalid=$invoice->validate($user, $obj_facturation->numInvoice(), (isset($_SESSION["CASHDESK_ID_WAREHOUSE"])?$_SESSION["CASHDESK_ID_WAREHOUSE"]:0));
|
||||
$warehouseidtodecrease=(isset($_SESSION["CASHDESK_ID_WAREHOUSE"])?$_SESSION["CASHDESK_ID_WAREHOUSE"]:0);
|
||||
if (! empty($conf->global->CASHDESK_NO_DECREASE_STOCK)) $warehouseidtodecrease=0; // If a particular stock is defined, we disable choice
|
||||
|
||||
$resultvalid=$invoice->validate($user, $obj_facturation->numInvoice(), 0);
|
||||
|
||||
if ($warehouseidtodecrease > 0)
|
||||
{
|
||||
// Decrease
|
||||
require_once DOL_DOCUMENT_ROOT.'/product/stock/class/mouvementstock.class.php';
|
||||
$langs->load("agenda");
|
||||
// Loop on each line
|
||||
$cpt=count($invoice->lines);
|
||||
for ($i = 0; $i < $cpt; $i++)
|
||||
{
|
||||
if ($invoice->lines[$i]->fk_product > 0)
|
||||
{
|
||||
$mouvP = new MouvementStock($db);
|
||||
$mouvP->origin = &$invoice;
|
||||
// We decrease stock for product
|
||||
if ($invoice->type == $invoice::TYPE_CREDIT_NOTE) $result=$mouvP->reception($user, $invoice->lines[$i]->fk_product, $warehouseidtodecrease, $invoice->lines[$i]->qty, $invoice->lines[$i]->subprice, $langs->trans("InvoiceValidatedInDolibarrFromPos",$invoice->newref));
|
||||
else $result=$mouvP->livraison($user, $invoice->lines[$i]->fk_product, $warehouseidtodecrease, $invoice->lines[$i]->qty, $invoice->lines[$i]->subprice, $langs->trans("InvoiceValidatedInDolibarrFromPos",$invoice->newref));
|
||||
if ($result < 0) {
|
||||
$error++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$id = $invoice->id;
|
||||
|
||||
|
||||
@ -94,6 +94,13 @@ $object->substitutionarrayfortest=array(
|
||||
//,'__PERSONALIZED__' => 'TESTPersonalized' // Not used yet
|
||||
);
|
||||
|
||||
// List of sending methods
|
||||
$listofmethods=array();
|
||||
$listofmethods['mail']='PHP mail function';
|
||||
//$listofmethods['simplemail']='Simplemail class';
|
||||
$listofmethods['smtps']='SMTP/SMTPS socket library';
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
@ -741,10 +748,21 @@ else
|
||||
{
|
||||
// Define message to recommand from command line
|
||||
|
||||
// Pour des raisons de securite, on ne permet pas cette fonction via l'IHM,
|
||||
// on affiche donc juste un message
|
||||
$sendingmode=$conf->global->MAIN_MAIL_SENDMODE;
|
||||
if (empty($sendingmode)) $sendingmode='mail'; // If not defined, we use php mail function
|
||||
|
||||
if (empty($conf->global->MAILING_LIMIT_SENDBYWEB))
|
||||
if (! empty($conf->global->MAILING_NO_USING_PHPMAIL) && $sendingmode == 'mail')
|
||||
{
|
||||
// EMailing feature may be a spam problem, so when you host several users/instance, having this option may force each user to use their own SMTP agent.
|
||||
// You ensure that every user is using its own SMTP server.
|
||||
$linktoadminemailbefore='<a href="'.DOL_URL_ROOT.'/admin/mails.php">';
|
||||
$linktoadminemailend='</a>';
|
||||
setEventMessage($langs->trans("MailSendSetupIs", $listofmethods[$sendingmode]), 'warnings');
|
||||
setEventMessage($langs->trans("MailSendSetupIs2", $linktoadminemailbefore, $linktoadminemailend, $langs->transnoentitiesnoconv("MAIN_MAIL_SENDMODE"), $listofmethods['smtps']), 'warnings');
|
||||
if (! empty($conf->global->MAILING_SMTP_SETUP_EMAILS_FOR_QUESTIONS)) setEventMessage($langs->trans("MailSendSetupIs3", $conf->global->MAILING_SMTP_SETUP_EMAILS_FOR_QUESTIONS), 'warnings');
|
||||
$_GET["action"]='';
|
||||
}
|
||||
else if (empty($conf->global->MAILING_LIMIT_SENDBYWEB))
|
||||
{
|
||||
// Pour des raisons de securite, on ne permet pas cette fonction via l'IHM,
|
||||
// on affiche donc juste un message
|
||||
@ -764,7 +782,7 @@ else
|
||||
}
|
||||
$text.=$langs->trans('ConfirmSendingEmailing').'<br>';
|
||||
$text.=$langs->trans('LimitSendingEmailing',$conf->global->MAILING_LIMIT_SENDBYWEB);
|
||||
print $form->formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id,$langs->trans('SendMailing'),$text,'sendallconfirmed',$formquestion,'',1,260);
|
||||
print $form->formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id,$langs->trans('SendMailing'),$text,'sendallconfirmed',$formquestion,'',1,270);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -276,7 +276,8 @@ if ($object->fetch($id) >= 0)
|
||||
|
||||
$obj = new $classname($db);
|
||||
|
||||
$qualified=1;
|
||||
// Check dependencies
|
||||
$qualified=(isset($obj->enabled)?$obj->enabled:1);
|
||||
foreach ($obj->require_module as $key)
|
||||
{
|
||||
if (! $conf->$key->enabled || (! $user->admin && $obj->require_admin))
|
||||
|
||||
@ -1998,7 +1998,7 @@ if ($action == 'create' && $user->rights->commande->creer) {
|
||||
$rowspan ++;
|
||||
|
||||
// Bank Account
|
||||
if (! empty($conf->global->BANK_ASK_PAYMENT_BANK_DURING_ORDER) && ! empty($conf->banque->enabled))
|
||||
if (! empty($conf->global->BANK_ASK_PAYMENT_BANK_DURING_ORDER) && ! empty($conf->banque->enabled))
|
||||
{
|
||||
print '<tr><td class="nowrap">';
|
||||
print '<table width="100%" class="nobordernopadding"><tr><td class="nowrap">';
|
||||
|
||||
@ -1600,7 +1600,7 @@ class Facture extends CommonInvoice
|
||||
*
|
||||
* @param User $user Object user that validate
|
||||
* @param string $force_number Reference to force on invoice
|
||||
* @param int $idwarehouse Id of warehouse to use for stock decrease
|
||||
* @param int $idwarehouse Id of warehouse to use for stock decrease if option to decreasenon stock is on (0=no decrease)
|
||||
* @param int $notrigger 1=Does not execute triggers, 0= execuete triggers
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
@ -1728,7 +1728,7 @@ class Facture extends CommonInvoice
|
||||
$result=$this->client->set_as_client();
|
||||
|
||||
// Si active on decremente le produit principal et ses composants a la validation de facture
|
||||
if ($this->type != self::TYPE_DEPOSIT && $result >= 0 && ! empty($conf->stock->enabled) && ! empty($conf->global->STOCK_CALCULATE_ON_BILL))
|
||||
if ($this->type != self::TYPE_DEPOSIT && $result >= 0 && ! empty($conf->stock->enabled) && ! empty($conf->global->STOCK_CALCULATE_ON_BILL) && $idwarehouse > 0)
|
||||
{
|
||||
require_once DOL_DOCUMENT_ROOT.'/product/stock/class/mouvementstock.class.php';
|
||||
$langs->load("agenda");
|
||||
|
||||
@ -3016,30 +3016,33 @@ abstract class CommonObject
|
||||
|
||||
$marginInfo = $this->getMarginInfos($force_price);
|
||||
|
||||
print $langs->trans('ShowMarginInfos').' : ';
|
||||
$hidemargininfos = $_COOKIE['DOLUSER_MARGININFO_HIDE_SHOW'];
|
||||
print '<span id="showMarginInfos" class="linkobject '.(!empty($hidemargininfos)?'':'hideobject').'">'.img_picto($langs->trans("Disabled"),'switch_off').'</span>';
|
||||
print '<span id="hideMarginInfos" class="linkobject '.(!empty($hidemargininfos)?'hideobject':'').'">'.img_picto($langs->trans("Enabled"),'switch_on').'</span>';
|
||||
if (! empty($conf->global->MARGIN_ADD_SHOWHIDE_BUTTON)) // FIXME Warning this feature rely on an external js file that may be removed. Using native js function document.cookie should be better
|
||||
{
|
||||
print $langs->trans('ShowMarginInfos').' : ';
|
||||
$hidemargininfos = $_COOKIE['DOLUSER_MARGININFO_HIDE_SHOW'];
|
||||
print '<span id="showMarginInfos" class="linkobject '.(!empty($hidemargininfos)?'':'hideobject').'">'.img_picto($langs->trans("Disabled"),'switch_off').'</span>';
|
||||
print '<span id="hideMarginInfos" class="linkobject '.(!empty($hidemargininfos)?'hideobject':'').'">'.img_picto($langs->trans("Enabled"),'switch_on').'</span>';
|
||||
|
||||
print '<script>$(document).ready(function() {
|
||||
$("span#showMarginInfos").click(function() { $.getScript( "'.dol_buildpath('/includes/jquery/plugins/jquerytreeview/lib/jquery.cookie.js', 1).'", function( data, textStatus, jqxhr ) { $.cookie("DOLUSER_MARGININFO_HIDE_SHOW", 0); $(".margininfos").show(); $("span#showMarginInfos").addClass("hideobject"); $("span#hideMarginInfos").removeClass("hideobject");})});
|
||||
$("span#hideMarginInfos").click(function() { $.getScript( "'.dol_buildpath('/includes/jquery/plugins/jquerytreeview/lib/jquery.cookie.js', 1).'", function( data, textStatus, jqxhr ) { $.cookie("DOLUSER_MARGININFO_HIDE_SHOW", 1); $(".margininfos").hide(); $("span#hideMarginInfos").addClass("hideobject"); $("span#showMarginInfos").removeClass("hideobject");})});
|
||||
});</script>';
|
||||
if (!empty($hidemargininfos)) print '<script>$(document).ready(function() {$(".margininfos").hide();});</script>';
|
||||
|
||||
print '<table class="nobordernopadding margintable" width="100%">';
|
||||
print '<script>$(document).ready(function() {
|
||||
$("span#showMarginInfos").click(function() { $.getScript( "'.dol_buildpath('/includes/jquery/plugins/jquerytreeview/lib/jquery.cookie.js', 1).'", function( data, textStatus, jqxhr ) { $.cookie("DOLUSER_MARGININFO_HIDE_SHOW", 0); $(".margininfos").show(); $("span#showMarginInfos").addClass("hideobject"); $("span#hideMarginInfos").removeClass("hideobject");})});
|
||||
$("span#hideMarginInfos").click(function() { $.getScript( "'.dol_buildpath('/includes/jquery/plugins/jquerytreeview/lib/jquery.cookie.js', 1).'", function( data, textStatus, jqxhr ) { $.cookie("DOLUSER_MARGININFO_HIDE_SHOW", 1); $(".margininfos").hide(); $("span#hideMarginInfos").addClass("hideobject"); $("span#showMarginInfos").removeClass("hideobject");})});
|
||||
});</script>';
|
||||
if (!empty($hidemargininfos)) print '<script>$(document).ready(function() {$(".margininfos").hide();});</script>';
|
||||
}
|
||||
|
||||
print '<table class="noborder margintable" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td width="15%">'.$langs->trans('Margins').'</td>';
|
||||
print '<td width="15%" align="right">'.$langs->trans('SellingPrice').'</td>';
|
||||
print '<td class="liste_titre">'.$langs->trans('Margins').'</td>';
|
||||
print '<td class="liste_titre" align="right">'.$langs->trans('SellingPrice').'</td>';
|
||||
if ($conf->global->MARGIN_TYPE == "1")
|
||||
print '<td width="15%" align="right">'.$langs->trans('BuyingPrice').'</td>';
|
||||
print '<td class="liste_titre" align="right">'.$langs->trans('BuyingPrice').'</td>';
|
||||
else
|
||||
print '<td width="15%" align="right">'.$langs->trans('CostPrice').'</td>';
|
||||
print '<td width="15%" align="right">'.$langs->trans('Margin').'</td>';
|
||||
print '<td class="liste_titre" align="right">'.$langs->trans('CostPrice').'</td>';
|
||||
print '<td class="liste_titre" align="right">'.$langs->trans('Margin').'</td>';
|
||||
if (! empty($conf->global->DISPLAY_MARGIN_RATES))
|
||||
print '<td align="right">'.$langs->trans('MarginRate').'</td>';
|
||||
print '<td class="liste_titre" align="right">'.$langs->trans('MarginRate').'</td>';
|
||||
if (! empty($conf->global->DISPLAY_MARK_RATES))
|
||||
print '<td align="right">'.$langs->trans('MarkRate').'</td>';
|
||||
print '<td class="liste_titre" align="right">'.$langs->trans('MarkRate').'</td>';
|
||||
print '</tr>';
|
||||
|
||||
if (! empty($conf->product->enabled))
|
||||
|
||||
@ -53,9 +53,10 @@ class FormAdmin
|
||||
* @param array $filter Array of keys to exclude in list
|
||||
* @param int $showempty Add empty value
|
||||
* @param int $showwarning Show a warning if language is not complete
|
||||
* @param int $disabled Disable edit of select
|
||||
* @return string Return HTML select string with list of languages
|
||||
*/
|
||||
function select_language($selected='',$htmlname='lang_id',$showauto=0,$filter=0,$showempty=0,$showwarning=0)
|
||||
function select_language($selected='',$htmlname='lang_id',$showauto=0,$filter=0,$showempty=0,$showwarning=0,$disabled=0)
|
||||
{
|
||||
global $langs;
|
||||
|
||||
@ -63,7 +64,7 @@ class FormAdmin
|
||||
|
||||
$out='';
|
||||
|
||||
$out.= '<select class="flat" id="'.$htmlname.'" name="'.$htmlname.'">';
|
||||
$out.= '<select class="flat" id="'.$htmlname.'" name="'.$htmlname.'"'.($disabled?' disabled="disabled"':'').'>';
|
||||
if ($showempty)
|
||||
{
|
||||
$out.= '<option value=""';
|
||||
|
||||
@ -1193,7 +1193,7 @@ function showModulesExludedForExternal($modules)
|
||||
$text .= $langs->trans('Module'.$module->numero.'Name');
|
||||
}
|
||||
}
|
||||
return img_picto($langs->trans('InfoAdmin'), 'star').' '.$text;
|
||||
return $text;
|
||||
}
|
||||
|
||||
|
||||
|
||||
0
htdocs/core/modules/modSyncSupplierWebServices.class.php
Executable file → Normal file
0
htdocs/core/modules/modSyncSupplierWebServices.class.php
Executable file → Normal file
@ -1544,7 +1544,7 @@ elseif (! empty($object->id))
|
||||
print '</td></tr>';
|
||||
|
||||
// Bank Account
|
||||
if (! empty($conf->global->BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_ORDER) && ! empty($conf->banque->enabled))
|
||||
if (! empty($conf->global->BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_ORDER) && ! empty($conf->banque->enabled))
|
||||
{
|
||||
print '<tr><td class="nowrap">';
|
||||
print '<table width="100%" class="nobordernopadding"><tr><td class="nowrap">';
|
||||
|
||||
0
htdocs/install/upgrade.php
Executable file → Normal file
0
htdocs/install/upgrade.php
Executable file → Normal file
0
htdocs/install/upgrade2.php
Executable file → Normal file
0
htdocs/install/upgrade2.php
Executable file → Normal file
@ -437,8 +437,8 @@ Module52Name=Stocks
|
||||
Module52Desc=Stock management (products)
|
||||
Module53Name=Services
|
||||
Module53Desc=Service management
|
||||
Module54Name=Contracts
|
||||
Module54Desc=Contract and service management
|
||||
Module54Name=Contracts/Subscriptions
|
||||
Module54Desc=Management of contracts (services or reccuring subscriptions)
|
||||
Module55Name=Barcodes
|
||||
Module55Desc=Barcode management
|
||||
Module56Name=Telephony
|
||||
@ -475,8 +475,8 @@ Module320Name=RSS Feed
|
||||
Module320Desc=Add RSS feed inside Dolibarr screen pages
|
||||
Module330Name=Bookmarks
|
||||
Module330Desc=Bookmark management
|
||||
Module400Name=Projects
|
||||
Module400Desc=Project management inside other modules
|
||||
Module400Name=Projects/Opportunity
|
||||
Module400Desc=Management of projects or opportunity. You can then assign all other elements (invoice, order, proposal, intervention, ...) to this projects
|
||||
Module410Name=Webcalendar
|
||||
Module410Desc=Webcalendar integration
|
||||
Module500Name=Special expenses (tax, social contributions, dividends)
|
||||
@ -606,11 +606,11 @@ Permission151=Read standing orders
|
||||
Permission152=Create/modify a standing orders request
|
||||
Permission153=Transmission standing orders receipts
|
||||
Permission154=Credit/refuse standing orders receipts
|
||||
Permission161=Read contracts
|
||||
Permission162=Create/modify contracts
|
||||
Permission163=Activate a service of a contract
|
||||
Permission164=Disable a service of a contract
|
||||
Permission165=Delete contracts
|
||||
Permission161=Read contracts/subscriptions
|
||||
Permission162=Create/modify contracts/subscriptions
|
||||
Permission163=Activate a service/subscription of a contract
|
||||
Permission164=Disable a service/subscription of a contract
|
||||
Permission165=Delete contracts/subscriptions
|
||||
Permission171=Read trips and expenses (own and his subordinates)
|
||||
Permission172=Create/modify trips and expenses
|
||||
Permission173=Delete trips and expenses
|
||||
@ -672,7 +672,7 @@ Permission300=Read bar codes
|
||||
Permission301=Create/modify bar codes
|
||||
Permission302=Delete bar codes
|
||||
Permission311=Read services
|
||||
Permission312=Assign service to contract
|
||||
Permission312=Assign service/subscription to contract
|
||||
Permission331=Read bookmarks
|
||||
Permission332=Create/modify bookmarks
|
||||
Permission333=Delete bookmarks
|
||||
@ -702,8 +702,8 @@ Permission701=Read donations
|
||||
Permission702=Create/modify donations
|
||||
Permission703=Delete donations
|
||||
Permission1001=Read stocks
|
||||
Permission1002=Create/modify stocks
|
||||
Permission1003=Delete stocks
|
||||
Permission1002=Create/modify warehouses
|
||||
Permission1003=Delete warehouses
|
||||
Permission1004=Read stock movements
|
||||
Permission1005=Create/modify stock movements
|
||||
Permission1101=Read delivery orders
|
||||
@ -1039,7 +1039,6 @@ YesInSummer=Yes in summer
|
||||
OnlyFollowingModulesAreOpenedToExternalUsers=Note, only following modules are opened to external users (whatever are permission of such users):
|
||||
SuhosinSessionEncrypt=Session storage encrypted by Suhosin
|
||||
ConditionIsCurrently=Condition is currently %s
|
||||
TestNotPossibleWithCurrentBrowsers=Automatic detection not possible
|
||||
YouUseBestDriver=You use driver %s that is best driver available currently.
|
||||
YouDoNotUseBestDriver=You use drive %s but driver %s is recommended.
|
||||
NbOfProductIsLowerThanNoPb=You have only %s products/services into database. This does not required any particular optimization.
|
||||
@ -1161,7 +1160,7 @@ FicheinterNumberingModules=Intervention numbering models
|
||||
TemplatePDFInterventions=Intervention card documents models
|
||||
WatermarkOnDraftInterventionCards=Watermark on intervention card documents (none if empty)
|
||||
##### Contracts #####
|
||||
ContractsSetup=Contracts module setup
|
||||
ContractsSetup=Contracts/Subscriptions module setup
|
||||
ContractsNumberingModules=Contracts numbering modules
|
||||
TemplatePDFContracts=Contracts documents models
|
||||
FreeLegalTextOnContracts=Free text on contracts
|
||||
@ -1416,8 +1415,9 @@ OSCommerceTestOk=Connection to server '%s' on database '%s' with user '%s' succe
|
||||
OSCommerceTestKo1=Connection to server '%s' succeed but database '%s' could not be reached.
|
||||
OSCommerceTestKo2=Connection to server '%s' with user '%s' failed.
|
||||
##### Stock #####
|
||||
StockSetup=Configuration module stock
|
||||
UserWarehouse=Use user personal stocks
|
||||
StockSetup=Warehouse module setup
|
||||
UserWarehouse=Use user personal warehouses
|
||||
IfYouUsePointOfSaleCheckModule=If you use a Point of Sale module (POS module provided by default or another external module), this setup may be ignored by your Point Of Sale module. Most point of sales modules are designed to create immediatly an invoice and decrease stock by default whatever are options here. So, if you need or not to have a stock decrease when registering a sell from your Point Of Sale, check also your POS module set up.
|
||||
##### Menu #####
|
||||
MenuDeleted=Menu deleted
|
||||
TreeMenu=Tree menus
|
||||
@ -1482,11 +1482,14 @@ ClickToDialDesc=This module allows to add an icon after phone numbers. A click o
|
||||
##### Point Of Sales (CashDesk) #####
|
||||
CashDesk=Point of sales
|
||||
CashDeskSetup=Point of sales module setup
|
||||
CashDeskThirdPartyForSell=Generic third party to use for sells
|
||||
CashDeskThirdPartyForSell=Default generic third party to use for sells
|
||||
CashDeskBankAccountForSell=Default account to use to receive cash payments
|
||||
CashDeskBankAccountForCheque= Default account to use to receive payments by cheque
|
||||
CashDeskBankAccountForCB= Default account to use to receive payments by credit cards
|
||||
CashDeskIdWareHouse=Warehouse to use for sells
|
||||
CashDeskDoNotDecreaseStock=Disable stock decrease when a sell is done from Point of Sale
|
||||
CashDeskIdWareHouse=Force and restrict warehouse to use for stock decrease
|
||||
StockDecreaseForPointOfSaleDisabled=Stock decrease from Point Of Sale disabled
|
||||
CashDeskYouDidNotDisableStockDecease=You did not disable stock decrease when making a sell from Point Of Sale. So a warehouse is required.
|
||||
##### Bookmark #####
|
||||
BookmarkSetup=Bookmark module setup
|
||||
BookmarkDesc=This module allows you to manage bookmarks. You can also add shortcuts to any Dolibarr pages or externale web sites on your left menu.
|
||||
@ -1544,7 +1547,6 @@ MAIN_APPLICATION_TITLE=Force visible name of application (warning: setting your
|
||||
NbMajMin=Minimum number of uppercase characters
|
||||
NbNumMin=Minimum number of numeric characters
|
||||
NbSpeMin=Minimum number of special characters
|
||||
NbSpeMin=Minimum number of special characters
|
||||
NbIteConsecutive=Maximum number of repeating same characters
|
||||
NoAmbiCaracAutoGeneration=Do not use ambiguous characters ("1","l","i","|","0","O") for automatic generation
|
||||
SalariesSetup=Setup of module salaries
|
||||
|
||||
@ -41,9 +41,10 @@ AutoActions= Automatic filling
|
||||
AgendaAutoActionDesc= Define here events for which you want Dolibarr to create automatically an event in agenda. If nothing is checked (by default), only manual actions will be included in agenda.
|
||||
AgendaSetupOtherDesc= This page provides options to allow export of your Dolibarr events into an external calendar (thunderbird, google calendar, ...)
|
||||
AgendaExtSitesDesc=This page allows to declare external sources of calendars to see their events into Dolibarr agenda.
|
||||
ActionsEvents= Events for which Dolibarr will create an action in agenda automatically
|
||||
PropalValidatedInDolibarr= Proposal %s validated
|
||||
InvoiceValidatedInDolibarr= Invoice %s validated
|
||||
ActionsEvents=Events for which Dolibarr will create an action in agenda automatically
|
||||
PropalValidatedInDolibarr=Proposal %s validated
|
||||
InvoiceValidatedInDolibarr=Invoice %s validated
|
||||
InvoiceValidatedInDolibarrFromPos=Invoice %s validated from POS
|
||||
InvoiceBackToDraftInDolibarr=Invoice %s go back to draft status
|
||||
InvoiceDeleteDolibarr=Invoice %s deleted
|
||||
OrderValidatedInDolibarr= Order %s validated
|
||||
|
||||
@ -137,8 +137,6 @@ BillFrom=From
|
||||
BillTo=To
|
||||
ActionsOnBill=Actions on invoice
|
||||
NewBill=New invoice
|
||||
Prélèvements=Standing order
|
||||
Prélèvements=Standing orders
|
||||
LastBills=Last %s invoices
|
||||
LastCustomersBills=Last %s customers invoices
|
||||
LastSuppliersBills=Last %s suppliers invoices
|
||||
@ -219,7 +217,6 @@ NoInvoice=No invoice
|
||||
ClassifyBill=Classify invoice
|
||||
SupplierBillsToPay=Suppliers invoices to pay
|
||||
CustomerBillsUnpaid=Unpaid customers invoices
|
||||
DispenseMontantLettres=The bill drafted by mechanographical are exempt from the order in letters
|
||||
DispenseMontantLettres=The written invoices through mecanographic procedures are dispensed by the order in letters
|
||||
NonPercuRecuperable=Non-recoverable
|
||||
SetConditions=Set payment terms
|
||||
|
||||
@ -101,9 +101,6 @@ CatSupLinks=Links between suppliers and categories
|
||||
CatCusLinks=Links between customers/prospects and categories
|
||||
CatProdLinks=Links between products/services and categories
|
||||
CatMemberLinks=Links between members and categories
|
||||
CatProdLinks=Products
|
||||
CatCusLinks=Customer/Prospects
|
||||
CatSupLinks=Suppliers
|
||||
DeleteFromCat=Remove from category
|
||||
DeletePicture=Picture delete
|
||||
ConfirmDeletePicture=Confirm picture deletion?
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
# Dolibarr language file - Source file is en_US - contracts
|
||||
ContractsArea=Contracts area
|
||||
ListOfContracts=List of contracts
|
||||
LastContracts=Last %s modified contracts
|
||||
LastModifiedContracts=Last %s modified contracts
|
||||
AllContracts=All contracts
|
||||
ContractCard=Contract card
|
||||
ContractStatus=Contract status
|
||||
|
||||
@ -18,9 +18,8 @@ CronExplainHowToRunUnix=On Unix environment you should use crontab to run Comman
|
||||
CronExplainHowToRunWin=On Microsoft(tm) Windows environement you can use Scheduled task tools to run Command line each minutes
|
||||
# Menu
|
||||
CronJobs=Scheduled jobs
|
||||
CronListActive= List of active jobs
|
||||
CronListInactive= List of disabled jobs
|
||||
CronListActive= List of scheduled jobs
|
||||
CronListActive=List of active/scheduled jobs
|
||||
CronListInactive=List of disabled jobs
|
||||
# Page list
|
||||
CronDateLastRun=Last run
|
||||
CronLastOutput=Last run output
|
||||
|
||||
@ -115,7 +115,7 @@ SentBy=Sent by
|
||||
MailingNeedCommand=For security reason, sending an emailing is better when performed from command line. If you have one, ask your server administrator to launch the following command to send the emailing to all recipients:
|
||||
MailingNeedCommand2=You can however send them online by adding parameter MAILING_LIMIT_SENDBYWEB with value of max number of emails you want to send by session. For this, go on Home - Setup - Other.
|
||||
ConfirmSendingEmailing=If you can't or prefer sending them with your www browser, please confirm you are sure you want to send emailing now from your browser ?
|
||||
LimitSendingEmailing=Note: On line sending of emailings are limited for security and timeout reasons to <b>%s</b> recipients by sending session.
|
||||
LimitSendingEmailing=Note: Sending of emailings from web interface is done in several times for security and timeout reasons, <b>%s</b> recipients at a time for each sending session.
|
||||
TargetsReset=Clear list
|
||||
ToClearAllRecipientsClickHere=Click here to clear the recipient list for this emailing
|
||||
ToAddRecipientsChooseHere=Add recipients by choosing from the lists
|
||||
@ -136,3 +136,6 @@ SomeNotificationsWillBeSent=%s notifications will be sent by email
|
||||
AddNewNotification=Activate a new email notification target
|
||||
ListOfActiveNotifications=List all active email notification targets
|
||||
ListOfNotificationsDone=List all email notifications sent
|
||||
MailSendSetupIs=Configuration of email sending has been setup to '%s'. This mode can't be used to send mass emailing.
|
||||
MailSendSetupIs2=You must first go, with an admin account, into menu %sHome - Setup - EMails%s to change parameter <strong>'%s'</strong> to use mode '%s'. With this mode, you can enter setup of the SMTP server provided by your Internet Service Provider and use Mass emailing feature.
|
||||
MailSendSetupIs3=If you have any questions on how to setup your SMTP server, you can ask to %s.
|
||||
|
||||
@ -53,7 +53,7 @@ ShippingExist=A shipment exists
|
||||
DraftOrWaitingApproved=Draft or approved not yet ordered
|
||||
DraftOrWaitingShipped=Draft or validated not yet shipped
|
||||
MenuOrdersToBill=Orders delivered
|
||||
MenuOrdersToBill2=Orders to bill
|
||||
MenuOrdersToBill2=Billable orders
|
||||
SearchOrder=Search order
|
||||
SearchACustomerOrder=Search a customer order
|
||||
ShipProduct=Ship product
|
||||
@ -154,7 +154,6 @@ OrderByPhone=Phone
|
||||
CreateInvoiceForThisCustomer=Bill orders
|
||||
NoOrdersToInvoice=No orders billable
|
||||
CloseProcessedOrdersAutomatically=Classify "Processed" all selected orders.
|
||||
MenuOrdersToBill2=Billables orders
|
||||
OrderCreation=Order creation
|
||||
Ordered=Ordered
|
||||
OrderCreated=Your orders have been created
|
||||
|
||||
@ -16,11 +16,8 @@ ResourceType=Resource type
|
||||
ResourceFormLabel_description=Resource description
|
||||
|
||||
ResourcesLinkedToElement=Resources linked to element
|
||||
RessourceLineSuccessfullyUpdated=Resource successfully updated
|
||||
RessourceLineSuccessfullyDeleted=Resource successfully deleted
|
||||
|
||||
ShowResourcePlanning=Show resource planning
|
||||
NoResourceInDatabase=No resource in database
|
||||
GotoDate=Go to date
|
||||
|
||||
ResourceElementPage=Element resources
|
||||
|
||||
@ -63,7 +63,6 @@ ShowGroup=Show group
|
||||
ShowUser=Show user
|
||||
NonAffectedUsers=Non assigned users
|
||||
UserModified=User modified successfully
|
||||
GroupModified=Group modified successfully
|
||||
PhotoFile=Photo file
|
||||
UserWithDolibarrAccess=User with Dolibarr access
|
||||
ListOfUsersInGroup=List of users in this group
|
||||
|
||||
@ -41,14 +41,13 @@ TransMetod=Transmission method
|
||||
Send=Send
|
||||
Lines=Lines
|
||||
StandingOrderReject=Issue a rejection
|
||||
InvoiceRefused=Invoice refused
|
||||
WithdrawalRefused=Withdrawal refused
|
||||
WithdrawalRefusedConfirm=Are you sure you want to enter a withdrawal rejection for society
|
||||
RefusedData=Date of rejection
|
||||
RefusedReason=Reason for rejection
|
||||
RefusedInvoicing=Billing the rejection
|
||||
NoInvoiceRefused=Do not charge the rejection
|
||||
InvoiceRefused=Charge the rejection to customer
|
||||
InvoiceRefused=Invoice refused (Charge the rejection to customer)
|
||||
Status=Status
|
||||
StatusUnknown=Unknown
|
||||
StatusWaiting=Waiting
|
||||
|
||||
@ -1300,7 +1300,7 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs
|
||||
function top_menu($head, $title='', $target='', $disablejs=0, $disablehead=0, $arrayofjs='', $arrayofcss='', $morequerystring='')
|
||||
{
|
||||
global $user, $conf, $langs, $db;
|
||||
global $dolibarr_main_authentication;
|
||||
global $dolibarr_main_authentication, $dolibarr_main_demo;
|
||||
global $hookmanager,$menumanager;
|
||||
|
||||
// Instantiate hooks of thirdparty module
|
||||
@ -1410,7 +1410,6 @@ function top_menu($head, $title='', $target='', $disablejs=0, $disablehead=0, $a
|
||||
$logintext.='>'.$user->login.'</a>';
|
||||
if ($user->societe_id) $logintext.=$companylink;
|
||||
$logintext.='</div>';
|
||||
|
||||
$loginhtmltext.='<u>'.$langs->trans("User").'</u>';
|
||||
$loginhtmltext.='<br><b>'.$langs->trans("Name").'</b>: '.$user->getFullName($langs);
|
||||
$loginhtmltext.='<br><b>'.$langs->trans("Login").'</b>: '.$user->login;
|
||||
@ -1422,9 +1421,9 @@ function top_menu($head, $title='', $target='', $disablejs=0, $disablehead=0, $a
|
||||
$loginhtmltext.='<br>';
|
||||
$loginhtmltext.='<br><u>'.$langs->trans("Connection").'</u>';
|
||||
if (! empty($conf->global->MAIN_MODULE_MULTICOMPANY)) $loginhtmltext.='<br><b>'.$langs->trans("ConnectedOnMultiCompany").'</b>: '.$conf->entity.' (user entity '.$user->entity.')';
|
||||
$loginhtmltext.='<br><b>'.$langs->trans("AuthenticationMode").'</b>: '.$_SESSION["dol_authmode"].(empty($dolibarr_main_demo)?'':' (demo)');
|
||||
$loginhtmltext.='<br><b>'.$langs->trans("ConnectedSince").'</b>: '.dol_print_date($user->datelastlogin,"dayhour");
|
||||
$loginhtmltext.='<br><b>'.$langs->trans("PreviousConnexion").'</b>: '.dol_print_date($user->datepreviouslogin,"dayhour");
|
||||
$loginhtmltext.='<br><b>'.$langs->trans("AuthenticationMode").'</b>: '.$_SESSION["dol_authmode"];
|
||||
$loginhtmltext.='<br><b>'.$langs->trans("CurrentTheme").'</b>: '.$conf->theme;
|
||||
$loginhtmltext.='<br><b>'.$langs->trans("CurrentMenuManager").'</b>: '.$menumanager->name;
|
||||
$s=picto_from_langcode($langs->getDefaultLang());
|
||||
|
||||
@ -45,6 +45,8 @@ $id = GETPOST("id",'int');
|
||||
if (! $sortfield) $sortfield="p.ref";
|
||||
if (! $sortorder) $sortorder="DESC";
|
||||
|
||||
$backtopage=GETPOST("backtopage");
|
||||
|
||||
// Security check
|
||||
$result=restrictedArea($user,'stock');
|
||||
|
||||
@ -71,16 +73,29 @@ if ($action == 'add' && $user->rights->stock->creer)
|
||||
$object->town = GETPOST("town");
|
||||
$object->country_id = GETPOST("country_id");
|
||||
|
||||
if (! empty($object->libelle)) {
|
||||
if (! empty($object->libelle))
|
||||
{
|
||||
$id = $object->create($user);
|
||||
if ($id > 0)
|
||||
{
|
||||
header("Location: card.php?id=".$id);
|
||||
exit;
|
||||
setEventMessage($langs->trans("RecordSaved"));
|
||||
|
||||
if (! empty($backtopage))
|
||||
{
|
||||
header("Location: ".$backtopage);
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
header("Location: card.php?id=".$id);
|
||||
exit;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$action = 'create';
|
||||
setEventMessage($object->error, 'errors');
|
||||
}
|
||||
|
||||
$action = 'create';
|
||||
setEventMessage($object->error, 'errors');
|
||||
}
|
||||
else {
|
||||
setEventMessage($langs->trans("ErrorWarehouseRefRequired"), 'errors');
|
||||
@ -164,7 +179,10 @@ if ($action == 'create')
|
||||
print "<form action=\"card.php\" method=\"post\">\n";
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="action" value="add">';
|
||||
|
||||
print '<input type="hidden" name="backtopage" value="'.$backtopage.'">';
|
||||
|
||||
dol_fiche_head();
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
// Ref
|
||||
@ -206,9 +224,9 @@ if ($action == 'create')
|
||||
|
||||
print '</table>';
|
||||
|
||||
print '<br><div class="center">';
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Create").'">';
|
||||
print '</div>';
|
||||
dol_fiche_end();
|
||||
|
||||
print '<div class="center"><input type="submit" class="button" value="'.$langs->trans("Create").'"></div>';
|
||||
|
||||
print '</form>';
|
||||
}
|
||||
|
||||
@ -633,12 +633,14 @@ if ($resql)
|
||||
print '<td align="right">'.$obj->reel.($obj->reel<0?' '.img_warning():'').'</td>';
|
||||
// PMP
|
||||
print '<td align="right">'.(price2num($obj->pmp)?price2num($obj->pmp,'MU'):'').'</td>'; // Ditto : Show PMP from movement or from product
|
||||
// Value purchase
|
||||
print '<td align="right">'.(price2num($obj->pmp)?price(price2num($obj->pmp*$obj->reel,'MT')):'').'</td>'; // Ditto : Show PMP from movement or from product
|
||||
// Sell price
|
||||
print '<td align="right">';
|
||||
if (empty($conf->global->PRODUIT_MULTI_PRICES)) print price(price2num($product->price,'MU'),1);
|
||||
else print $langs->trans("Variable");
|
||||
print '</td>'; // Ditto : Show PMP from movement or from product
|
||||
// Value sell
|
||||
print '<td align="right">';
|
||||
if (empty($conf->global->PRODUIT_MULTI_PRICES)) print price(price2num($product->price*$obj->reel,'MT'),1).'</td>'; // Ditto : Show PMP from movement or from product
|
||||
else print $langs->trans("Variable");
|
||||
@ -669,6 +671,7 @@ print '<td class="liste_total" align="right">'.$total.'</td>';
|
||||
print '<td class="liste_total" align="right">';
|
||||
print ($totalwithpmp?price($totalvalue/$totalwithpmp):' ');
|
||||
print '</td>';
|
||||
// Value purchase
|
||||
print '<td class="liste_total" align="right">';
|
||||
print price(price2num($totalvalue,'MT'),1);
|
||||
print '</td>';
|
||||
@ -676,6 +679,7 @@ print '<td class="liste_total" align="right">';
|
||||
if (empty($conf->global->PRODUIT_MULTI_PRICES)) print ($total?price($totalvaluesell/$total,1):' ');
|
||||
else print $langs->trans("Variable");
|
||||
print '</td>';
|
||||
// Value to sell
|
||||
print '<td class="liste_total" align="right">';
|
||||
if (empty($conf->global->PRODUIT_MULTI_PRICES)) print price(price2num($totalvaluesell,'MT'),1);
|
||||
else print $langs->trans("Variable");
|
||||
|
||||
@ -1958,6 +1958,10 @@ input.liste_titre {
|
||||
background: none;
|
||||
}
|
||||
|
||||
.margintable td {
|
||||
border: 0px !important;
|
||||
}
|
||||
|
||||
/* Disable shadows */
|
||||
.noshadow {
|
||||
-moz-box-shadow: 0px 0px 0px #DDD !important;
|
||||
|
||||
@ -179,10 +179,10 @@ if ($action == 'edit')
|
||||
print ($conf->global->MAIN_LANG_DEFAULT=='auto'?$langs->trans("AutoDetectLang"):$langs->trans("Language_".$conf->global->MAIN_LANG_DEFAULT));
|
||||
print '</td>';
|
||||
print '<td align="left" class="nowrap" width="20%"><input '.$bc[$var].' name="check_MAIN_LANG_DEFAULT" id="check_MAIN_LANG_DEFAULT" type="checkbox" '.(! empty($fuser->conf->MAIN_LANG_DEFAULT)?" checked":"");
|
||||
print ! empty($dolibarr_main_demo)?' disabled="disabled"':''; // Disabled for demo
|
||||
print empty($dolibarr_main_demo)?'':' disabled="disabled"'; // Disabled for demo
|
||||
print '> '.$langs->trans("UsePersonalValue").'</td>';
|
||||
print '<td>';
|
||||
print $formadmin->select_language((! empty($fuser->conf->MAIN_LANG_DEFAULT)?$fuser->conf->MAIN_LANG_DEFAULT:''),'main_lang_default',1);
|
||||
print $formadmin->select_language((! empty($fuser->conf->MAIN_LANG_DEFAULT)?$fuser->conf->MAIN_LANG_DEFAULT:''),'main_lang_default',1,null,0,0,(! empty($dolibarr_main_demo)));
|
||||
print '</td></tr>';
|
||||
|
||||
// Taille max des listes
|
||||
@ -190,7 +190,7 @@ if ($action == 'edit')
|
||||
print '<tr '.$bc[$var].'><td>'.$langs->trans("MaxSizeList").'</td>';
|
||||
print '<td>'.$conf->global->MAIN_SIZE_LISTE_LIMIT.'</td>';
|
||||
print '<td align="left" class="nowrap" width="20%"><input '.$bc[$var].' name="check_SIZE_LISTE_LIMIT" id="check_SIZE_LISTE_LIMIT" type="checkbox" '.(! empty($fuser->conf->MAIN_SIZE_LISTE_LIMIT)?" checked":"");
|
||||
print ! empty($dolibarr_main_demo)?' disabled="disabled"':''; // Disabled for demo
|
||||
print empty($dolibarr_main_demo)?'':' disabled="disabled"'; // Disabled for demo
|
||||
print '> '.$langs->trans("UsePersonalValue").'</td>';
|
||||
print '<td><input class="flat" name="main_size_liste_limit" id="main_size_liste_limit" size="4" value="' . (! empty($fuser->conf->MAIN_SIZE_LISTE_LIMIT)?$fuser->conf->MAIN_SIZE_LISTE_LIMIT:'') . '"></td></tr>';
|
||||
|
||||
|
||||
@ -276,7 +276,7 @@ print '</table><br>';
|
||||
|
||||
if ($user->admin) print info_admin($langs->trans("WarningOnlyPermissionOfActivatedModules"), 0, 1).'<br>';
|
||||
// Show warning about external users
|
||||
if (empty($user->societe_id)) print showModulesExludedForExternal($modules).'<br><br>'."\n";
|
||||
if (empty($user->societe_id)) print info_admin(showModulesExludedForExternal($modules)).'<br><br>'."\n";
|
||||
|
||||
// For multicompany transversal mode
|
||||
// TODO Place a hook here
|
||||
|
||||
@ -824,32 +824,32 @@ class FunctionsLibTest extends PHPUnit_Framework_TestCase
|
||||
$this->assertEquals(dol_nl2br($string, 1, 1), "a<br />a");
|
||||
}
|
||||
|
||||
/**
|
||||
* testDolPrice2Num
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function testDolPrice2Num()
|
||||
/**
|
||||
* testDolPrice2Num
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function testDolPrice2Num()
|
||||
{
|
||||
$this->assertEquals(1000, price2num('1 000.0'));
|
||||
$this->assertEquals(1000, price2num('1 000','MT'));
|
||||
$this->assertEquals(1000, price2num('1 000','MU'));
|
||||
$this->assertEquals(1000, price2num('1 000.0'));
|
||||
$this->assertEquals(1000, price2num('1 000','MT'));
|
||||
$this->assertEquals(1000, price2num('1 000','MU'));
|
||||
|
||||
$this->assertEquals(1000.123456, price2num('1 000.123456'));
|
||||
|
||||
// Round down
|
||||
$this->assertEquals(1000.12, price2num('1 000.123452','MT'));
|
||||
$this->assertEquals(1000.12345, price2num('1 000.123452','MU'),"Test MU");
|
||||
$this->assertEquals(1000.12, price2num('1 000.123452','MT'));
|
||||
$this->assertEquals(1000.12345, price2num('1 000.123452','MU'),"Test MU");
|
||||
|
||||
// Round up
|
||||
$this->assertEquals(1000.13, price2num('1 000.125456','MT'));
|
||||
$this->assertEquals(1000.12546, price2num('1 000.125456','MU'),"Test MU");
|
||||
// Round up
|
||||
$this->assertEquals(1000.13, price2num('1 000.125456','MT'));
|
||||
$this->assertEquals(1000.12546, price2num('1 000.125456','MU'),"Test MU");
|
||||
|
||||
// Text can't be converted
|
||||
$this->assertEquals('12.4$',price2num('12.4$'));
|
||||
$this->assertEquals('12r.4$',price2num('12r.4$'));
|
||||
$this->assertEquals('12r.4$',price2num('12r.4$'));
|
||||
|
||||
return true;
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user