Merge remote-tracking branch 'refs/remotes/Dolibarr/5.0' into 5.0

This commit is contained in:
fappels 2017-02-27 18:05:52 +01:00
commit b88d66ec71
1549 changed files with 16138 additions and 8749 deletions

View File

@ -41,8 +41,59 @@ require_once(DOL_DOCUMENT_ROOT."/societe/class/societe.class.php");
* Parameters
*/
define(GEN_NUMBER_FACTURE, 5);
define(GEN_NUMBER_FACTURE, 1);
$year = 2016;
$dates = array (mktime(12,0,0,1,3,$year),
mktime(12,0,0,1,9,$year),
mktime(12,0,0,2,13,$year),
mktime(12,0,0,2,23,$year),
mktime(12,0,0,3,30,$year),
mktime(12,0,0,4,3,$year),
mktime(12,0,0,4,3,$year),
mktime(12,0,0,5,9,$year),
mktime(12,0,0,5,1,$year),
mktime(12,0,0,5,13,$year),
mktime(12,0,0,5,19,$year),
mktime(12,0,0,5,23,$year),
mktime(12,0,0,6,3,$year),
mktime(12,0,0,6,19,$year),
mktime(12,0,0,6,24,$year),
mktime(12,0,0,7,3,$year),
mktime(12,0,0,7,9,$year),
mktime(12,0,0,7,23,$year),
mktime(12,0,0,7,30,$year),
mktime(12,0,0,8,9,$year),
mktime(12,0,0,9,23,$year),
mktime(12,0,0,10,3,$year),
mktime(12,0,0,11,12,$year),
mktime(12,0,0,11,13,$year),
mktime(12,0,0,1,3,($year - 1)),
mktime(12,0,0,1,9,($year - 1)),
mktime(12,0,0,2,13,($year - 1)),
mktime(12,0,0,2,23,($year - 1)),
mktime(12,0,0,3,30,($year - 1)),
mktime(12,0,0,4,3,($year - 1)),
mktime(12,0,0,4,3,($year - 1)),
mktime(12,0,0,5,9,($year - 1)),
mktime(12,0,0,5,1,($year - 1)),
mktime(12,0,0,5,13,($year - 1)),
mktime(12,0,0,5,19,($year - 1)),
mktime(12,0,0,5,23,($year - 1)),
mktime(12,0,0,6,3,($year - 1)),
mktime(12,0,0,6,19,($year - 1)),
mktime(12,0,0,6,24,($year - 1)),
mktime(12,0,0,7,3,($year - 1)),
mktime(12,0,0,7,9,($year - 1)),
mktime(12,0,0,7,23,($year - 1)),
mktime(12,0,0,7,30,($year - 1)),
mktime(12,0,0,8,9,($year - 1)),
mktime(12,0,0,9,23,($year - 1)),
mktime(12,0,0,10,3,($year - 1)),
mktime(12,0,0,11,12,$year),
mktime(12,0,0,11,13,$year),
mktime(12,0,0,12,12,$year),
mktime(12,0,0,12,13,$year),
);
$ret=$user->fetch('','admin');
if (! $ret > 0)
@ -54,16 +105,15 @@ $user->getrights();
$socids = array();
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."societe WHERE client=1";
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."societe WHERE client in (1, 3)";
$resql = $db->query($sql);
if ($resql)
{
$num_socs = $db->num_rows($resql);
$num_thirdparties = $db->num_rows($resql);
$i = 0;
while ($i < $num_socs)
while ($i < $num_thirdparties)
{
$i++;
$row = $db->fetch_row($resql);
$socids[$i] = $row[0];
}
@ -79,7 +129,6 @@ if ($resql)
while ($i < $num_prods)
{
$i++;
$row = $db->fetch_row($resql);
$prodids[$i] = $row[0];
}
@ -90,46 +139,51 @@ $result=0;
while ($i < GEN_NUMBER_FACTURE && $result >= 0)
{
$i++;
$socid = mt_rand(1, $num_socs);
$socid = mt_rand(1, $num_thirdparties);
print "Invoice ".$i." for socid ".$socid;
$facture = new Facture($db);
$facture->date = time();
$facture->cond_reglement_id = 3;
$facture->mode_reglement_id = 3;
$object = new Facture($db);
$object->socid = $socids[$socid];
$object->date = $dates[mt_rand(1, count($dates)-1)];
$object->cond_reglement_id = 3;
$object->mode_reglement_id = 3;
$result=$facture->create($user);
$fuser = new User($db);
$fuser->fetch(mt_rand(1,2));
$fuser->getRights();
$result=$object->create($fuser);
if ($result >= 0)
{
$result=$facture->validate($user);
$nbp = mt_rand(2, 5);
$xnbp = 0;
while ($xnbp < $nbp)
{
$prodid = mt_rand(1, $num_prods);
$product=new Product($db);
$result=$product->fetch($prodids[$prodid]);
$result=$object->addline($product->description, $product->price, mt_rand(1,5), 0, 0, 0, $prodids[$prodid], 0, '', '', 0, 0, '', $product->price_base_type, $product->price_ttc, $product->type);
if ($result < 0)
{
dol_print_error($db,$propal->error);
}
$xnbp++;
}
$result=$object->validate($fuser);
if ($result)
{
$nbp = mt_rand(2, 5);
$xnbp = 0;
while ($xnbp < $nbp)
{
$prodid = mt_rand(1, $num_prods);
$product=new Product($db);
$result=$product->fetch($prodids[$prodid]);
$result=$facture->addline($product->description, $product->price, mt_rand(1,5), 0, 0, 0, $prodids[$prodid], 0, '', '', 0, 0, '', $product->price_base_type, $product->price_ttc, $product->type);
if ($result < 0)
{
dol_print_error($db,$propal->error);
}
$xnbp++;
}
print " OK with ref ".$facture->ref."\n";;
print " OK with ref ".$object->ref."\n";;
}
else
{
dol_print_error($db,$facture->error);
dol_print_error($db,$object->error);
}
}
else
{
dol_print_error($db,$facture->error);
dol_print_error($db,$object->error);
}
}

View File

@ -40,6 +40,7 @@ include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
include_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
include_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php';
include_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php';
require_once(DOL_DOCUMENT_ROOT."/commande/class/commande.class.php");
/*
@ -47,7 +48,58 @@ include_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php';
*/
define(GEN_NUMBER_COMMANDE, 10);
$year = 2016;
$dates = array (mktime(12,0,0,1,3,$year),
mktime(12,0,0,1,9,$year),
mktime(12,0,0,2,13,$year),
mktime(12,0,0,2,23,$year),
mktime(12,0,0,3,30,$year),
mktime(12,0,0,4,3,$year),
mktime(12,0,0,4,3,$year),
mktime(12,0,0,5,9,$year),
mktime(12,0,0,5,1,$year),
mktime(12,0,0,5,13,$year),
mktime(12,0,0,5,19,$year),
mktime(12,0,0,5,23,$year),
mktime(12,0,0,6,3,$year),
mktime(12,0,0,6,19,$year),
mktime(12,0,0,6,24,$year),
mktime(12,0,0,7,3,$year),
mktime(12,0,0,7,9,$year),
mktime(12,0,0,7,23,$year),
mktime(12,0,0,7,30,$year),
mktime(12,0,0,8,9,$year),
mktime(12,0,0,9,23,$year),
mktime(12,0,0,10,3,$year),
mktime(12,0,0,11,12,$year),
mktime(12,0,0,11,13,$year),
mktime(12,0,0,1,3,($year - 1)),
mktime(12,0,0,1,9,($year - 1)),
mktime(12,0,0,2,13,($year - 1)),
mktime(12,0,0,2,23,($year - 1)),
mktime(12,0,0,3,30,($year - 1)),
mktime(12,0,0,4,3,($year - 1)),
mktime(12,0,0,4,3,($year - 1)),
mktime(12,0,0,5,9,($year - 1)),
mktime(12,0,0,5,1,($year - 1)),
mktime(12,0,0,5,13,($year - 1)),
mktime(12,0,0,5,19,($year - 1)),
mktime(12,0,0,5,23,($year - 1)),
mktime(12,0,0,6,3,($year - 1)),
mktime(12,0,0,6,19,($year - 1)),
mktime(12,0,0,6,24,($year - 1)),
mktime(12,0,0,7,3,($year - 1)),
mktime(12,0,0,7,9,($year - 1)),
mktime(12,0,0,7,23,($year - 1)),
mktime(12,0,0,7,30,($year - 1)),
mktime(12,0,0,8,9,($year - 1)),
mktime(12,0,0,9,23,($year - 1)),
mktime(12,0,0,10,3,($year - 1)),
mktime(12,0,0,11,12,$year),
mktime(12,0,0,11,13,$year),
mktime(12,0,0,12,12,$year),
mktime(12,0,0,12,13,$year),
);
$ret=$user->fetch('','admin');
if ($ret <= 0)
@ -57,34 +109,34 @@ if ($ret <= 0)
}
$user->getrights();
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."societe"; $societesid = array();
$societesid = array();
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."societe where client in (1, 3)";
$resql=$db->query($sql);
if ($resql) {
$num = $db->num_rows($resql);
$num_thirdparties = $db->num_rows($resql);
$i = 0;
while ($i < $num) {
$row = $db->fetch_row($resql);
while ($i < $num_thirdparties) {
$i++;
$row = $db->fetch_row($resql);
$societesid[$i] = $row[0];
$i++;
}
}
else { print "err"; }
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."commande"; $commandesid = array();
$commandesid = array();
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."commande";
$resql=$db->query($sql);
if ($resql) {
$num = $db->num_rows($resql);
$i = 0;
while ($i < $num) {
$row = $db->fetch_row($resql);
$commandesid[$i] = $row[0];
$i++;
$row = $db->fetch_row($resql);
$commandesid[$i] = $row[0];
}
}
else { print "err"; }
$prodids = array();
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."product WHERE tosell=1";
$resql = $db->query($sql);
@ -102,59 +154,6 @@ if ($resql)
}
$dates = array (mktime(12,0,0,1,3,2003),
mktime(12,0,0,1,9,2003),
mktime(12,0,0,2,13,2003),
mktime(12,0,0,2,23,2003),
mktime(12,0,0,3,30,2003),
mktime(12,0,0,4,3,2003),
mktime(12,0,0,4,3,2003),
mktime(12,0,0,5,9,2003),
mktime(12,0,0,5,1,2003),
mktime(12,0,0,5,13,2003),
mktime(12,0,0,5,19,2003),
mktime(12,0,0,5,23,2003),
mktime(12,0,0,6,3,2003),
mktime(12,0,0,6,19,2003),
mktime(12,0,0,6,24,2003),
mktime(12,0,0,7,3,2003),
mktime(12,0,0,7,9,2003),
mktime(12,0,0,7,23,2003),
mktime(12,0,0,7,30,2003),
mktime(12,0,0,8,9,2003),
mktime(12,0,0,9,23,2003),
mktime(12,0,0,10,3,2003),
mktime(12,0,0,11,12,2003),
mktime(12,0,0,11,13,2003),
mktime(12,0,0,1,3,2002),
mktime(12,0,0,1,9,2002),
mktime(12,0,0,2,13,2002),
mktime(12,0,0,2,23,2002),
mktime(12,0,0,3,30,2002),
mktime(12,0,0,4,3,2002),
mktime(12,0,0,4,3,2002),
mktime(12,0,0,5,9,2002),
mktime(12,0,0,5,1,2002),
mktime(12,0,0,5,13,2002),
mktime(12,0,0,5,19,2002),
mktime(12,0,0,5,23,2002),
mktime(12,0,0,6,3,2002),
mktime(12,0,0,6,19,2002),
mktime(12,0,0,6,24,2002),
mktime(12,0,0,7,3,2002),
mktime(12,0,0,7,9,2002),
mktime(12,0,0,7,23,2002),
mktime(12,0,0,7,30,2002),
mktime(12,0,0,8,9,2002),
mktime(12,0,0,9,23,2002),
mktime(12,0,0,10,3,2002),
mktime(12,0,0,11,12,2003),
mktime(12,0,0,11,13,2003),
mktime(12,0,0,12,12,2003),
mktime(12,0,0,12,13,2003),
);
require(DOL_DOCUMENT_ROOT."/commande/class/commande.class.php");
print "Build ".GEN_NUMBER_COMMANDE." orders\n";
@ -162,53 +161,63 @@ for ($s = 0 ; $s < GEN_NUMBER_COMMANDE ; $s++)
{
print "Process order ".$s."\n";
$com = new Commande($db);
$com->socid = 4;
$com->date_commande = $dates[mt_rand(1, count($dates)-1)];
$com->note = 'A comment';
$com->source = 1;
$com->fk_project = 0;
$com->remise_percent = 0;
$object = new Commande($db);
$object->socid = $societesid[mt_rand(1, $num_thirdparties)];
$object->date_commande = $dates[mt_rand(1, count($dates)-1)];
$object->note = 'My small comment about this order. Hum. Nothing.';
$object->source = 1;
$object->fk_project = 0;
$object->remise_percent = 0;
$object->shipping_method_id = mt_rand(1, 2);
$object->cond_reglement_id = mt_rand(0, 2);
$object->more_reglement_id = mt_rand(0, 7);
$object->availability_id = mt_rand(0, 1);
$listofuserid=array(12,13,16);
$fuser = new User($db);
$fuser->fetch($listofuserid[mt_rand(0,2)]);
$fuser->getRights();
$db->begin();
$result=$com->create($user);
$result=$object->create($fuser);
if ($result >= 0)
{
$result=$com->valid($user);
$nbp = mt_rand(2, 5);
$xnbp = 0;
while ($xnbp < $nbp)
{
$prodid = mt_rand(1, $num_prods);
$product=new Product($db);
$result=$product->fetch($prodids[$prodid]);
$result=$object->addline($product->description, $product->price, mt_rand(1,5), 0, 0, 0, $prodids[$prodid], 0, 0, 0, $product->price_base_type, $product->price_ttc, '', '', $product->type);
if ($result <= 0)
{
dol_print_error($db,$object->error);
}
$xnbp++;
}
$result=$object->valid($fuser);
if ($result > 0)
{
$nbp = mt_rand(2, 5);
$xnbp = 0;
while ($xnbp < $nbp)
{
$prodid = mt_rand(1, $num_prods);
$product=new Product($db);
$result=$product->fetch($prodids[$prodid]);
$result=$com->addline($product->description, $product->price, mt_rand(1,5), 0, 0, 0, $prodids[$prodid], 0, 0, 0, $product->price_base_type, $product->price_ttc, '', '', $product->type);
if ($result < 0)
{
dol_print_error($db,$propal->error);
}
$xnbp++;
}
$db->commit();
print " OK with ref ".$com->ref."\n";
print " OK with ref ".$object->ref."\n";
}
else
{
print " KO\n";
$db->rollback();
dol_print_error($db,$com->error);
dol_print_error($db,$object->error);
}
}
else
{
print " KO\n";
$db->rollback();
dol_print_error($db,$com->error);
dol_print_error($db,$object->error);
}
}

View File

@ -43,8 +43,59 @@ require_once(DOL_DOCUMENT_ROOT."/societe/class/societe.class.php");
* Parameters
*/
define(GEN_NUMBER_PROPAL, 5);
define(GEN_NUMBER_PROPAL, 10);
$year = 2016;
$dates = array (mktime(12,0,0,1,3,$year),
mktime(12,0,0,1,9,$year),
mktime(12,0,0,2,13,$year),
mktime(12,0,0,2,23,$year),
mktime(12,0,0,3,30,$year),
mktime(12,0,0,4,3,$year),
mktime(12,0,0,4,3,$year),
mktime(12,0,0,5,9,$year),
mktime(12,0,0,5,1,$year),
mktime(12,0,0,5,13,$year),
mktime(12,0,0,5,19,$year),
mktime(12,0,0,5,23,$year),
mktime(12,0,0,6,3,$year),
mktime(12,0,0,6,19,$year),
mktime(12,0,0,6,24,$year),
mktime(12,0,0,7,3,$year),
mktime(12,0,0,7,9,$year),
mktime(12,0,0,7,23,$year),
mktime(12,0,0,7,30,$year),
mktime(12,0,0,8,9,$year),
mktime(12,0,0,9,23,$year),
mktime(12,0,0,10,3,$year),
mktime(12,0,0,11,12,$year),
mktime(12,0,0,11,13,$year),
mktime(12,0,0,1,3,($year - 1)),
mktime(12,0,0,1,9,($year - 1)),
mktime(12,0,0,2,13,($year - 1)),
mktime(12,0,0,2,23,($year - 1)),
mktime(12,0,0,3,30,($year - 1)),
mktime(12,0,0,4,3,($year - 1)),
mktime(12,0,0,4,3,($year - 1)),
mktime(12,0,0,5,9,($year - 1)),
mktime(12,0,0,5,1,($year - 1)),
mktime(12,0,0,5,13,($year - 1)),
mktime(12,0,0,5,19,($year - 1)),
mktime(12,0,0,5,23,($year - 1)),
mktime(12,0,0,6,3,($year - 1)),
mktime(12,0,0,6,19,($year - 1)),
mktime(12,0,0,6,24,($year - 1)),
mktime(12,0,0,7,3,($year - 1)),
mktime(12,0,0,7,9,($year - 1)),
mktime(12,0,0,7,23,($year - 1)),
mktime(12,0,0,7,30,($year - 1)),
mktime(12,0,0,8,9,($year - 1)),
mktime(12,0,0,9,23,($year - 1)),
mktime(12,0,0,10,3,($year - 1)),
mktime(12,0,0,11,12,$year),
mktime(12,0,0,11,13,$year),
mktime(12,0,0,12,12,$year),
mktime(12,0,0,12,13,$year),
);
$ret=$user->fetch('','admin');
if (! $ret > 0)
@ -56,16 +107,15 @@ $user->getrights();
$socids = array();
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."societe WHERE client=1";
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."societe WHERE client in (1,3)";
$resql = $db->query($sql);
if ($resql)
{
$num_socs = $db->num_rows($resql);
$num_thirdparties = $db->num_rows($resql);
$i = 0;
while ($i < $num_socs)
while ($i < $num_thirdparties)
{
$i++;
$row = $db->fetch_row($resql);
$socids[$i] = $row[0];
}
@ -81,7 +131,6 @@ if ($resql)
while ($i < $num_conts)
{
$i++;
$row = $db->fetch_row($resql);
$contids[$row[1]][0] = $row[0]; // A ameliorer
}
@ -97,7 +146,6 @@ if ($resql)
while ($i < $num_prods)
{
$i++;
$row = $db->fetch_row($resql);
$prodids[$i] = $row[0];
}
@ -117,27 +165,25 @@ $result=0;
while ($i < GEN_NUMBER_PROPAL && $result >= 0)
{
$i++;
$socid = mt_rand(1, $num_socs);
$socid = mt_rand(1, $num_thirdparties);
print "Proposal ".$i." for socid ".$socid;
$soc = new Societe($db);
$propal = new Propal($db);
$object = new Propal($db);
$obj = $conf->global->PROPALE_ADDON;
$modPropale = new $obj;
$numpr = $modPropale->getNextValue($soc,$propal);
$fuser = new User($db);
$fuser->fetch(mt_rand(1,2));
$fuser->getRights();
$object->contactid = $contids[$socids[$socid]][0];
$object->socid = $socids[$socid];
$object->datep = $dates[mt_rand(1, count($dates)-1)];
$object->cond_reglement_id = 3;
$object->mode_reglement_id = 3;
$propal->ref = $numpr;
$propal->contactid = $contids[$socids[$socid]][0];
$propal->socid = $socids[$socid];
$propal->datep = time();
$propal->cond_reglement_id = 3;
$propal->mode_reglement_id = 3;
$propal->author = $user->id;
$result=$propal->create($user);
$result=$object->create($fuser);
if ($result >= 0)
{
$nbp = mt_rand(2, 5);
@ -147,18 +193,30 @@ while ($i < GEN_NUMBER_PROPAL && $result >= 0)
$prodid = mt_rand(1, $num_prods);
$product=new Product($db);
$result=$product->fetch($prodids[$prodid]);
$result=$propal->addline($product->description, $product->price, mt_rand(1,5), 0, 0, 0, $prodids[$prodid], 0);
$result=$object->addline($product->description, $product->price, mt_rand(1,5), 0, 0, 0, $prodids[$prodid], 0);
if ($result < 0)
{
dol_print_error($db,$propal->error);
dol_print_error($db,$object->error);
}
$xnbp++;
}
print " OK with ref ".$propal->ref."\n";
$result=$object->valid($fuser);
if ($result > 0)
{
$db->commit();
print " OK with ref ".$object->ref."\n";
}
else
{
print " KO\n";
$db->rollback();
dol_print_error($db,$object->error);
}
}
else
{
dol_print_error($db,$propal->error);
dol_print_error($db,$object->error);
}
}

View File

@ -1,17 +1,23 @@
README
------
*** Demo
Scripts in this directory can be used to reload or save a demo database.
Install of package "dialog" is required.
Scripts in this directory can be used to reinit a demo database.
WARNING: This will erase current database with data into initdemo.sql.
*** Init demo
The script initdemo.sh will erase current database with data into mysqldump_dolibarr_x.y.z.sql and copy files into documents_demo into officiel document directory.
Do a chmod 700 initdemo.sh
then run ./initdemo.sh to launch Graphic User Interface.
Install of package "dialog" is required.
*** Save demo
The script savedemo.sh will save current database into a database dump file.
*** Other
*** Update demo
Other scripts into initdata can be used to load data test.
The goal of script updatedemo.php is to update dates into the demo data so samples are up to date.

File diff suppressed because one or more lines are too long

View File

@ -26,15 +26,21 @@ fi
if [ "x$1" = "xall" ]
then
for dir in `find htdocs/langs/* -type d`
do
fic=`basename $dir`
if [ $fic != "en_US" ]
then
echo "tx pull -l $fic $2 $3"
tx pull -l $fic $2 $3
fi
done
if [ "x$2" = "x" ]
then
echo "tx pull"
tx pull
else
for dir in `find htdocs/langs/* -type d`
do
fic=`basename $dir`
if [ $fic != "en_US" ]
then
echo "tx pull -l $fic $2 $3"
tx pull -l $fic $2 $3
fi
done
fi
cd -
else
echo "tx pull -l $1 $2 $3 $4 $5"

View File

@ -20,9 +20,8 @@
* \ingroup Advanced accountancy
* \brief Page to assign mass categories to accounts
*/
require '../../main.inc.php';
// Class
require '../../main.inc.php';
require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php';
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/accountancycategory.class.php';
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formaccounting.class.php';
@ -48,8 +47,10 @@ $rowid = GETPOST('rowid', 'int');
$cancel = GETPOST('cancel');
// Security check
if (! $user->admin)
if (! empty($user->rights->accountancy->chartofaccount))
{
accessforbidden();
}
$AccCat = new AccountancyCategory($db);
@ -89,7 +90,7 @@ llxheader('', $langs->trans('AccountAccounting'));
$formaccounting = new FormAccounting($db);
$form = new Form($db);
print load_fiche_titre($langs->trans('Categories'));
print load_fiche_titre($langs->trans('AccountingCategory'));
print '<form name="add" action="' . $_SERVER["PHP_SELF"] . '" method="POST">' . "\n";
print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
@ -101,8 +102,8 @@ print '<table class="border" width="100%">';
// Category
print '<tr><td>' . $langs->trans("AccountingCategory") . '</td>';
print '<td>';
$formaccounting->select_accounting_category($cat_id, 'account_category', 1);
print '<input class="button" type="submit" value="' . $langs->trans("Display") . '">';
$formaccounting->select_accounting_category($cat_id, 'account_category', 1, 0, 0, 1);
print '<input class="button" type="submit" value="' . $langs->trans("Select") . '">';
print '</td></tr>';
if (! empty($cat_id)) {
@ -113,11 +114,11 @@ if (! empty($cat_id)) {
print '<tr><td>' . $langs->trans("AddCompteFromBK") . '</td>';
print '<td>';
if (is_array($AccCat->lines_cptbk) && count($AccCat->lines_cptbk) > 0) {
print '<select size="' . count($obj) . '" name="cpt_bk[]" multiple>';
print '<select class="flat minwidth200" size="' . count($obj) . '" name="cpt_bk[]" multiple>';
foreach ( $AccCat->lines_cptbk as $cpt ) {
print '<option value="' . length_accountg($cpt->numero_compte) . '">' . length_accountg($cpt->numero_compte) . ' (' . $cpt->label_compte . ' ' . $cpt->doc_ref . ')</option>';
}
print '</select> - <input class="button" type="submit" id="" class="action-delete" value="' . $langs->trans("add") . '"> ';
print '</select><br><input class="button" type="submit" id="" class="action-delete" value="' . $langs->trans("Add") . '"> ';
}
print '</td></tr>';
}
@ -133,7 +134,7 @@ if ($action == 'display' || $action == 'delete') {
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre"><th class="liste_titre">' . $langs->trans("Numerocompte") . '</th><th class="liste_titre">' . $langs->trans("Description") . '</th><th class="liste_titre" width="60" align="center">Action</th></tr>';
print '<tr class="liste_titre"><th class="liste_titre">' . $langs->trans("AccountAccounting") . '</th><th class="liste_titre">' . $langs->trans("Description") . '</th><th class="liste_titre" width="60" align="center">Action</th></tr>';
if (! empty($cat_id)) {
$return = $AccCat->display($cat_id);
@ -144,7 +145,7 @@ if ($action == 'display' || $action == 'delete') {
if (is_array($AccCat->lines_display) && count($AccCat->lines_display) > 0) {
foreach ( $AccCat->lines_display as $cpt ) {
$var = ! $var;
print '<tr' . $bc[$var] . '>';
print '<tr ' . $bc[$var] . '>';
print '<td>' . length_accountg($cpt->account_number) . '</td>';
print '<td>' . $cpt->label . '</td>';
print $form->formconfirm($_SERVER["PHP_SELF"] . "?account_category=$cat_id&cptid=" . $cpt->rowid, $langs->trans("DeleteCptCategory"), $langs->trans("ConfirmDeleteCptCategory"), "delete", '', 0, "action-delete" . $j);

File diff suppressed because it is too large Load Diff

View File

@ -184,7 +184,7 @@ else {
print '<table class="liste ' . ($moreforfilter ? "listwithfilterbefore" : "") . '">';
print '<tr class="liste_titre">';
print_liste_field_titre($langs->trans("AccountAccounting"), $_SERVER['PHP_SELF'], "t.numero_compte", "", $options, "", $sortfield, $sortorder);
print_liste_field_titre($langs->trans("Labelcompte"), $_SERVER['PHP_SELF'], "t.label_compte", "", $options, "", $sortfield, $sortorder);
print_liste_field_titre($langs->trans("Label"), $_SERVER['PHP_SELF'], "t.label_compte", "", $options, "", $sortfield, $sortorder);
print_liste_field_titre($langs->trans("Debit"), $_SERVER['PHP_SELF'], "t.debit", "", $options, 'align="right"', $sortfield, $sortorder);
print_liste_field_titre($langs->trans("Credit"), $_SERVER['PHP_SELF'], "t.credit", "", $options, 'align="right"', $sortfield, $sortorder);
print_liste_field_titre($langs->trans("Solde"), $_SERVER["PHP_SELF"], "", $options, "", 'align="right"', $sortfield, $sortorder);
@ -192,7 +192,7 @@ else {
print "</tr>\n";
print '<tr class="liste_titre">';
print '<td class="liste_titre center" colspan="2">';
print '<td class="liste_titre" colspan="2">';
print $langs->trans('From');
print $formventilation->select_account($search_accountancy_code_start, 'search_accountancy_code_start', 1, array(), 1, 1, '');
print '<br>';
@ -229,7 +229,7 @@ else {
if (empty($description)) {
$link = '<a href="../admin/card.php?action=create&compte=' . length_accountg($line->numero_compte) . '">' . img_edit_add() . '</a>';
}
print '<tr' . $bc[$var] . '>';
print '<tr ' . $bc[$var] . '>';
// Permet d'afficher le compte comptable
if ($root_account_description != $displayed_account) {
@ -255,9 +255,9 @@ else {
print '<td>' . length_accountg($line->numero_compte) . '</td>';
print '<td>' . $description . '</td>';
print '<td align="right">' . number_format($line->debit, 2, ',', ' ') . '</td>';
print '<td align="right">' . number_format($line->credit, 2, ',', ' ') . '</td>';
print '<td align="right">' . number_format($line->credit - $line->debit, 2, ',', ' ') . '</td>';
print '<td align="right">' . price($line->debit) . '</td>';
print '<td align="right">' . price($line->credit) . '</td>';
print '<td align="right">' . price($line->credit - $line->debit) . '</td>';
print '<td align="center">' . $link;
print '</td>';
print "</tr>\n";

View File

@ -202,9 +202,11 @@ else if ($action == "confirm_create") {
}
}
/*
* View
*/
llxHeader();
$html = new Form($db);
@ -274,12 +276,12 @@ if ($action == 'create') {
print '<tr>';
print '<td>' . $langs->trans("Docref") . '</td>';
print '<td><input type="text" size="20" name="doc_ref" value=""/></td>';
print '<td><input type="text" class="minwidth200" name="doc_ref" value=""/></td>';
print '</tr>';
print '<tr>';
print '<td>' . $langs->trans("Doctype") . '</td>';
print '<td><input type="text" size="20" name="doc_type" value=""/></td>';
print '<td><input type="text" class="minwidth200" name="doc_type" value=""/></td>';
print '</tr>';
print '</table>';
@ -345,6 +347,8 @@ if ($action == 'create') {
print '<input type="hidden" name="fk_doc" value="' . $book->fk_doc . '">' . "\n";
print '<input type="hidden" name="fk_docdet" value="' . $book->fk_docdet . '">' . "\n";
$var=False;
print "<table class=\"noborder\" width=\"100%\">";
if (count($book->linesmvt) > 0) {
@ -356,17 +360,17 @@ if ($action == 'create') {
print_liste_field_titre($langs->trans("AccountAccountingShort"));
print_liste_field_titre($langs->trans("Code_tiers"));
print_liste_field_titre($langs->trans("Labelcompte"));
print_liste_field_titre($langs->trans("Debit"), "", "", "", "", 'align="center"');
print_liste_field_titre($langs->trans("Credit"), "", "", "", "", 'align="center"');
print_liste_field_titre($langs->trans("Amount"), "", "", "", "", 'align="center"');
print_liste_field_titre($langs->trans("Debit"), "", "", "", "", 'align="right"');
print_liste_field_titre($langs->trans("Credit"), "", "", "", "", 'align="right"');
print_liste_field_titre($langs->trans("Amount"), "", "", "", "", 'align="right"');
print_liste_field_titre($langs->trans("Sens"), "", "", "", "", 'align="center"');
print_liste_field_titre($langs->trans("Action"), "", "", "", "", 'width="60" align="center"');
print "</tr>\n";
foreach ( $book->linesmvt as $line ) {
foreach ($book->linesmvt as $line) {
$var = ! $var;
print '<tr' . $bc[$var] . '>';
print '<tr ' . $bc[$var] . '>';
$total_debit += $line->debit;
$total_credit += $line->credit;
@ -417,7 +421,7 @@ if ($action == 'create') {
if ($action == "" || $action == 'add') {
$var = ! $var;
print '<tr' . $bc[$var] . '>';
print '<tr ' . $bc[$var] . '>';
print '<td>';
print $formventilation->select_account($account_number, 'account_number', 0, array (), 1, 1, '');
print '</td>';

View File

@ -105,7 +105,6 @@ if ($action != 'export_csv' && ! isset($_POST['begin']) && ! isset($_GET['begin'
/*
* Action
*/
@ -132,74 +131,7 @@ if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") || GETP
$search_date_end = '';
}
if ($action == 'delbookkeeping') {
$import_key = GETPOST('importkey', 'alpha');
if (! empty($import_key)) {
$result = $object->deleteByImportkey($import_key);
if ($result < 0) {
setEventMessages($object->error, $object->errors, 'errors');
}
Header("Location: list.php");
exit();
}
}
if ($action == 'delbookkeepingyearconfirm') {
$delyear = GETPOST('delyear', 'int');
if ($delyear==-1) {
$delyear=0;
}
$deljournal = GETPOST('deljournal','alpha');
if ($deljournal==-1) {
$deljournal=0;
}
if (! empty($delyear) || ! empty($deljournal))
{
$result = $object->deleteByYearAndJournal($delyear,$deljournal);
if ($result < 0) {
setEventMessages($object->error, $object->errors, 'errors');
}
else
{
setEventMessages("RecordDeleted", null, 'mesgs');
}
Header("Location: list.php");
exit;
}
else
{
setEventMessages("NoRecordDeleted", null, 'warnings');
Header("Location: list.php");
exit;
}
}
if ($action == 'delmouvconfirm') {
$mvt_num = GETPOST('mvt_num', 'int');
if (! empty($mvt_num)) {
$result = $object->deleteMvtNum($mvt_num);
if ($result < 0) {
setEventMessages($object->error, $object->errors, 'errors');
}
else
{
setEventMessages($langs->trans("RecordDeleted"), null, 'mesgs');
}
Header("Location: list.php");
exit;
}
}
/*
* View
*/
// Must be after the remove filter action, before the export.
$param = '';
$filter = array ();
if (! empty($search_date_start)) {
@ -266,6 +198,68 @@ if (! empty($search_mvt_num)) {
$param .= '&search_mvt_num=' . $search_mvt_num;
}
if ($action == 'delbookkeeping') {
$import_key = GETPOST('importkey', 'alpha');
if (! empty($import_key)) {
$result = $object->deleteByImportkey($import_key);
if ($result < 0) {
setEventMessages($object->error, $object->errors, 'errors');
}
Header("Location: list.php");
exit();
}
}
if ($action == 'delbookkeepingyearconfirm') {
$delyear = GETPOST('delyear', 'int');
if ($delyear==-1) {
$delyear=0;
}
$deljournal = GETPOST('deljournal','alpha');
if ($deljournal==-1) {
$deljournal=0;
}
if (! empty($delyear) || ! empty($deljournal))
{
$result = $object->deleteByYearAndJournal($delyear,$deljournal);
if ($result < 0) {
setEventMessages($object->error, $object->errors, 'errors');
}
else
{
setEventMessages("RecordDeleted", null, 'mesgs');
}
Header("Location: list.php");
exit;
}
else
{
setEventMessages("NoRecordDeleted", null, 'warnings');
Header("Location: list.php");
exit;
}
}
if ($action == 'delmouvconfirm') {
$mvt_num = GETPOST('mvt_num', 'int');
if (! empty($mvt_num)) {
$result = $object->deleteMvtNum($mvt_num);
if ($result < 0) {
setEventMessages($object->error, $object->errors, 'errors');
}
else
{
setEventMessages($langs->trans("RecordDeleted"), null, 'mesgs');
}
Header("Location: list.php");
exit;
}
}
if ($action == 'export_csv') {
include DOL_DOCUMENT_ROOT . '/accountancy/class/accountancyexport.class.php';
@ -287,6 +281,11 @@ if ($action == 'export_csv') {
}
}
/*
* View
*/
$title_page = $langs->trans("Bookkeeping");
llxHeader('', $title_page);
@ -378,15 +377,15 @@ print_liste_field_titre($langs->trans("Docdate"), $_SERVER['PHP_SELF'], "t.doc_d
print_liste_field_titre($langs->trans("Docref"), $_SERVER['PHP_SELF'], "t.doc_ref", "", $param, "", $sortfield, $sortorder);
print_liste_field_titre($langs->trans("AccountAccountingShort"), $_SERVER['PHP_SELF'], "t.numero_compte", "", $param, "", $sortfield, $sortorder);
print_liste_field_titre($langs->trans("Code_tiers"), $_SERVER['PHP_SELF'], "t.code_tiers", "", $param, "", $sortfield, $sortorder);
print_liste_field_titre($langs->trans("Labelcompte"), $_SERVER['PHP_SELF'], "t.label_compte", "", $param, "", $sortfield, $sortorder);
print_liste_field_titre($langs->trans("Label"), $_SERVER['PHP_SELF'], "t.label_compte", "", $param, "", $sortfield, $sortorder);
print_liste_field_titre($langs->trans("Debit"), $_SERVER['PHP_SELF'], "t.debit", "", $param, 'align="right"', $sortfield, $sortorder);
print_liste_field_titre($langs->trans("Credit"), $_SERVER['PHP_SELF'], "t.credit", "", $param, 'align="right"', $sortfield, $sortorder);
print_liste_field_titre($langs->trans("Codejournal"), $_SERVER['PHP_SELF'], "t.code_journal", "", $param, 'align="right"', $sortfield, $sortorder);
print_liste_field_titre($langs->trans("Codejournal"), $_SERVER['PHP_SELF'], "t.code_journal", "", $param, 'align="center"', $sortfield, $sortorder);
print_liste_field_titre('', $_SERVER["PHP_SELF"], "", $param, "", 'width="60" align="center"', $sortfield, $sortorder);
print "</tr>\n";
print '<tr class="liste_titre">';
print '<td class="liste_titre center"><input type="text" name="search_mvt_num" size="6" value="' . $search_mvt_num . '"></td>';
print '<td class="liste_titre"><input type="text" name="search_mvt_num" size="6" value="' . dol_escape_htmltag($search_mvt_num) . '"></td>';
print '<td class="liste_titre center">';
print $langs->trans('From') . ': ';
print $form->select_date($search_date_start, 'date_start', 0, 0, 1);
@ -394,15 +393,15 @@ print '<br>';
print $langs->trans('to') . ': ';
print $form->select_date($search_date_end, 'date_end', 0, 0, 1);
print '</td>';
print '<td class="liste_titre center"><input type="text" name="search_doc_ref" size="8" value="' . $search_doc_ref . '"></td>';
print '<td class="liste_titre center">';
print '<td class="liste_titre"><input type="text" name="search_doc_ref" size="8" value="' . dol_escape_htmltag($search_doc_ref) . '"></td>';
print '<td class="liste_titre">';
print $langs->trans('From');
print $formventilation->select_account($search_accountancy_code_start, 'search_accountancy_code_start', 1, array (), 1, 1, '');
print '<br>';
print $langs->trans('to');
print $formventilation->select_account($search_accountancy_code_end, 'search_accountancy_code_end', 1, array (), 1, 1, '');
print '</td>';
print '<td class="liste_titre center">';
print '<td class="liste_titre">';
print $langs->trans('From');
print $formventilation->select_auxaccount($search_accountancy_aux_code_start, 'search_accountancy_aux_code_start', 1);
print '<br>';
@ -414,8 +413,8 @@ print '<input type="text" size="7" class="flat" name="search_mvt_label" value="'
print '</td>';
print '<td class="liste_titre center">&nbsp;</td>';
print '<td class="liste_titre center">&nbsp;</td>';
print '<td class="liste_titre center" align="right"><input type="text" name="search_ledger_code" size="3" value="' . $search_ledger_code . '"></td>';
print '<td class="liste_titre center" align="right">';
print '<td class="liste_titre center"><input type="text" name="search_ledger_code" size="3" value="' . $search_ledger_code . '"></td>';
print '<td class="liste_titre center">';
$searchpitco=$form->showFilterAndCheckAddButtons(0);
print $searchpitco;
print '</td>';

View File

@ -150,23 +150,27 @@ class AccountancyCategory
$sql .= " AND asy.rowid = " . $conf->global->CHARTOFACCOUNTS;
$sql .= " AND aa.active = 1";
$this->db->begin();
dol_syslog(__METHOD__, LOG_DEBUG);
$resql = $this->db->query($sql);
if (! $resql) {
$error ++;
$this->errors[] = "Error " . $this->db->lasterror();
$this->db->rollback();
return -1;
}
$this->db->begin();
while ( $obj = $this->db->fetch_object($resql)) {
if (array_key_exists(length_accountg($obj->account_number), $cpts)) {
while ( $obj = $this->db->fetch_object($resql))
{
if (array_key_exists(length_accountg($obj->account_number), $cpts))
{
$sql = "UPDATE " . MAIN_DB_PREFIX . "accounting_account";
$sql .= " SET fk_accounting_category=" . $id_cat;
$sql .= " WHERE rowid=".$obj->rowid;
dol_syslog(__METHOD__, LOG_DEBUG);
$resql = $this->db->query($sql);
if (! $resql) {
$resqlupdate = $this->db->query($sql);
if (! $resqlupdate) {
$error ++;
$this->errors[] = "Error " . $this->db->lasterror();
}

View File

@ -170,31 +170,31 @@ if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
$sql .= " AND f.type IN (" . Facture::TYPE_STANDARD . "," . Facture::TYPE_STANDARD . "," . Facture::TYPE_CREDIT_NOTE . "," . Facture::TYPE_DEPOSIT . "," . Facture::TYPE_SITUATION . ")";
}
if (strlen(trim($search_invoice))) {
$sql .= " AND f.facnumber like '%" . $search_invoice . "%'";
$sql .= natural_search("f.facnumber", $search_invoice);
}
if (strlen(trim($search_ref))) {
$sql .= " AND p.ref like '%" . $search_ref . "%'";
$sql .= natural_search("p.ref", $search_ref);
}
if (strlen(trim($search_label))) {
$sql .= " AND p.label like '%" . $search_label . "%'";
$sql .= natural_search("p.label", $search_label);
}
if (strlen(trim($search_desc))) {
$sql .= " AND fd.description like '%" . $search_desc . "%'";
$sql .= natural_search("fd.description", $search_desc);
}
if (strlen(trim($search_amount))) {
$sql .= " AND fd.total_ht like '%" . $search_amount . "%'";
$sql .= natural_search("fd.total_ht", $search_amount, 1);
}
if (strlen(trim($search_account))) {
$sql .= " AND aa.account_number like '%" . $search_account . "%'";
$sql .= natural_search("aa.account_number", $search_account);
}
if (strlen(trim($search_vat))) {
$sql .= " AND (fd.tva_tx like '" . $search_vat . "%')";
$sql .= natural_search("fd.tva_tx", $search_vat);
}
if (strlen(trim($search_country))) {
$sql .= " AND (co.label like'" . $search_country . "%')";
$sql .= natural_search("co.label", $search_country);
}
if (strlen(trim($search_tvaintra))) {
$sql .= " AND (s.tva_intra like'" . $search_tvaintra . "%')";
$sql .= natural_search("s.tva_intra", $search_tva_intra);
}
$sql .= " AND f.entity IN (" . getEntity("facture", 0) . ")"; // We don't share object for accountancy
$sql .= $db->order($sortfield, $sortorder);
@ -283,7 +283,7 @@ if ($result) {
print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_account" value="' . dol_escape_htmltag($search_account) . '"></td>';
print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_country" value="' . dol_escape_htmltag($search_country) . '"></td>';
print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_tavintra" value="' . dol_escape_htmltag($search_tavintra) . '"></td>';
print '<td class="liste_titre" align="right">';
print '<td class="liste_titre" align="center">';
$searchpitco=$form->showFilterAndCheckAddButtons(1);
print $searchpitco;
print "</td></tr>\n";

View File

@ -114,14 +114,14 @@ if (! empty($conf->expensereport->enabled)) // TODO Move this in the default ac
print "<br>\n";
print "<br>\n";
}
if (! empty($conf->loan->enabled)) // TODO Move this in the default account page because this is only one accounting account per purpose, not several.
/*
if (! empty($conf->loan->enabled))
{
$step++;
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescLoan", $step, '<strong>'.$langs->transnoentitiesnoconv("MenuFinancial").'-'.$langs->transnoentitiesnoconv("MenuSpecialExpenses").'-'.$langs->transnoentitiesnoconv("Loans").'</strong> '.$langs->transnoentitiesnoconv("or").' <strong>'.$langs->transnoentitiesnoconv("MenuFinancial").'-'.$langs->transnoentitiesnoconv("MenuAccountancy").'-'.$langs->transnoentitiesnoconv("Setup")."-".$langs->transnoentitiesnoconv("MenuDefaultAccounts").'</strong>');
print "<br>\n";
print "<br>\n";
}
/*
if (! empty($conf->don->enabled))
{
$step++;

View File

@ -43,6 +43,7 @@ $langs->load("bills");
$langs->load("other");
$langs->load("main");
$langs->load("accountancy");
$langs->load("trips");
$date_startmonth = GETPOST('date_startmonth');
$date_startday = GETPOST('date_startday');

View File

@ -157,25 +157,25 @@ $sql.= " LEFT JOIN " . MAIN_DB_PREFIX . "product as p ON p.rowid = l.fk_product"
$sql.= " WHERE f.rowid = l.fk_facture_fourn and f.fk_statut >= 1 AND l.fk_code_ventilation <> 0 ";
$sql.= " AND aa.rowid = l.fk_code_ventilation";
if (strlen(trim($search_invoice))) {
$sql .= " AND f.ref like '%" . $search_invoice . "%'";
$sql .= natural_search("f.ref", $search_invoice);
}
if (strlen(trim($search_ref))) {
$sql .= " AND p.ref like '%" . $search_ref . "%'";
$sql .= natural_search("p.ref", $search_ref);
}
if (strlen(trim($search_label))) {
$sql .= " AND p.label like '%" . $search_label . "%'";
$sql .= natural_search("p.label", $search_label);
}
if (strlen(trim($search_desc))) {
$sql .= " AND l.description like '%" . $search_desc . "%'";
$sql .= natural_search("l.description", $search_desc);
}
if (strlen(trim($search_amount))) {
$sql .= " AND l.total_ht like '%" . $search_amount . "%'";
$sql .= natural_search("l.total_ht", $search_amount, 1);
}
if (strlen(trim($search_account))) {
$sql .= " AND aa.account_number like '%" . $search_account . "%'";
$sql .= natural_search("aa.account_number", $search_account, 1);
}
if (strlen(trim($search_vat))) {
$sql .= " AND (l.tva_tx like '" . $search_vat . "%')";
$sql .= natural_search("l.tva_tx", $search_vat, 1);
}
$sql .= " AND f.entity IN (" . getEntity("facture_fourn", 0) . ")"; // We don't share object for accountancy
@ -255,7 +255,7 @@ if ($result) {
print '<tr class="liste_titre">';
print '<td class="liste_titre"></td>';
print '<td><input type="text" class="flat maxwidth50" name="search_invoice" value="' . dol_escape_htmltag($search_invoice) . '"></td>';
print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_invoice" value="' . dol_escape_htmltag($search_invoice) . '"></td>';
print '<td class="liste_titre"></td>';
print '<td class="liste_titre"></td>';
print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_ref" value="' . dol_escape_htmltag($search_ref) . '"></td>';
@ -264,7 +264,7 @@ if ($result) {
print '<td class="liste_titre" align="right"><input type="text" class="flat maxwidth50" name="search_amount" value="' . dol_escape_htmltag($search_amount) . '"></td>';
print '<td class="liste_titre" align="center"><input type="text" class="flat maxwidth50" name="search_vat" size="1" value="' . dol_escape_htmltag($search_vat) . '"></td>';
print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_account" value="' . dol_escape_htmltag($search_account) . '"></td>';
print '<td class="liste_titre" align="right">';
print '<td class="liste_titre" align="center">';
$searchpitco=$form->showFilterAndCheckAddButtons(1);
print $searchpitco;
print '</td>';

View File

@ -44,11 +44,12 @@ $search_email = GETPOST('search_email','alpha');
$type = GETPOST('type','alpha');
$status = GETPOST('status','alpha');
$sortfield = GETPOST('sortfield','alpha');
$sortorder = GETPOST('sortorder','alpha');
$page = GETPOST('page','int');
if ($page == -1) { $page = 0 ; }
$offset = $conf->liste_limit * $page ;
$limit = GETPOST("limit")?GETPOST("limit","int"):$conf->liste_limit;
$sortfield = GETPOST("sortfield",'alpha');
$sortorder = GETPOST("sortorder",'alpha');
$page = GETPOST("page",'int');
if ($page == -1) { $page = 0; }
$offset = $limit * $page ;
$pageprev = $page - 1;
$pagenext = $page + 1;
if (! $sortorder) { $sortorder="DESC"; }
@ -166,9 +167,6 @@ $form=new Form($db);
// List of members type
if (! $rowid && $action != 'create' && $action != 'edit')
{
print load_fiche_titre($langs->trans("MembersTypes"));
//dol_fiche_head('');
$sql = "SELECT d.rowid, d.libelle, d.subscription, d.vote";
@ -179,8 +177,22 @@ if (! $rowid && $action != 'create' && $action != 'edit')
if ($result)
{
$num = $db->num_rows($result);
$nbtotalofrecords = $num;
$i = 0;
$param = '';
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
print '<input type="hidden" name="action" value="list">';
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
print_barre_liste($langs->trans("MembersTypes"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_generic.png', 0, '', '', $limit);
$moreforfilter = '';
print '<div class="div-table-responsive">';
@ -213,6 +225,8 @@ if (! $rowid && $action != 'create' && $action != 'edit')
}
print "</table>";
print '</div>';
print '</form>';
}
else
{

View File

@ -86,7 +86,7 @@ $hookmanager->initHooks(array('admin'));
// Put here declaration of dictionaries properties
// Sort order to show dictionary (0 is space). All other dictionaries (added by modules) will be at end of this.
$taborder=array(9,0,4,3,2,0,1,8,19,16,27,0,5,11,0,33,34,0,6,0,29,0,7,17,24,28,0,10,23,12,13,0,14,0,22,20,18,21,0,15,30,0,25,0,26,0,32,0);
$taborder=array(9,0,4,3,2,0,1,8,19,16,27,0,5,11,0,33,34,0,6,0,29,0,7,17,24,28,0,10,23,12,13,0,14,0,22,20,18,21,0,15,30,0,25,0,26,0);
// Name of SQL tables of dictionaries
$tabname=array();
@ -121,7 +121,7 @@ $tabname[28]= MAIN_DB_PREFIX."c_holiday_types";
$tabname[29]= MAIN_DB_PREFIX."c_lead_status";
$tabname[30]= MAIN_DB_PREFIX."c_format_cards";
//$tabname[31]= MAIN_DB_PREFIX."accounting_system";
$tabname[32]= MAIN_DB_PREFIX."c_accounting_category";
//$tabname[32]= MAIN_DB_PREFIX."c_accounting_category";
$tabname[33]= MAIN_DB_PREFIX."c_hrm_department";
$tabname[34]= MAIN_DB_PREFIX."c_hrm_function";
@ -158,7 +158,7 @@ $tablib[28]= "DictionaryHolidayTypes";
$tablib[29]= "DictionaryOpportunityStatus";
$tablib[30]= "DictionaryFormatCards";
//$tablib[31]= "DictionaryAccountancysystem";
$tablib[32]= "DictionaryAccountancyCategory";
//$tablib[32]= "DictionaryAccountancyCategory";
$tablib[33]= "DictionaryDepartment";
$tablib[34]= "DictionaryFunction";
@ -195,7 +195,7 @@ $tabsql[28]= "SELECT h.rowid as rowid, h.code, h.label, h.affect, h.delay, h.new
$tabsql[29]= "SELECT rowid as rowid, code, label, percent, position, active FROM ".MAIN_DB_PREFIX."c_lead_status";
$tabsql[30]= "SELECT rowid, code, name, paper_size, orientation, metric, leftmargin, topmargin, nx, ny, spacex, spacey, width, height, font_size, custom_x, custom_y, active FROM ".MAIN_DB_PREFIX."c_format_cards";
//$tabsql[31]= "SELECT s.rowid as rowid, pcg_version, s.label, s.active FROM ".MAIN_DB_PREFIX."accounting_system as s";
$tabsql[32]= "SELECT a.rowid as rowid, a.code as code, a.label, a.range_account, a.sens, a.category_type, a.formula, a.position as position, a.fk_country as country_id, c.code as country_code, c.label as country, a.active FROM ".MAIN_DB_PREFIX."c_accounting_category as a, ".MAIN_DB_PREFIX."c_country as c WHERE a.fk_country=c.rowid and c.active=1";
//$tabsql[32]= "SELECT a.rowid as rowid, a.code as code, a.label, a.range_account, a.sens, a.category_type, a.formula, a.position as position, a.fk_country as country_id, c.code as country_code, c.label as country, a.active FROM ".MAIN_DB_PREFIX."c_accounting_category as a, ".MAIN_DB_PREFIX."c_country as c WHERE a.fk_country=c.rowid and c.active=1";
$tabsql[33]= "SELECT rowid, pos, code, label, active FROM ".MAIN_DB_PREFIX."c_hrm_department";
$tabsql[34]= "SELECT rowid, pos, code, label, c_level, active FROM ".MAIN_DB_PREFIX."c_hrm_function";
@ -232,7 +232,7 @@ $tabsqlsort[28]="country ASC, code ASC";
$tabsqlsort[29]="position ASC";
$tabsqlsort[30]="code ASC";
//$tabsqlsort[31]="pcg_version ASC";
$tabsqlsort[32]="position ASC";
//$tabsqlsort[32]="position ASC";
$tabsqlsort[33]="code ASC";
$tabsqlsort[34]="code ASC";
@ -269,7 +269,7 @@ $tabfield[28]= "code,label,affect,delay,newbymonth,country_id,country";
$tabfield[29]= "code,label,percent,position";
$tabfield[30]= "code,name,paper_size,orientation,metric,leftmargin,topmargin,nx,ny,spacex,spacey,width,height,font_size,custom_x,custom_y";
//$tabfield[31]= "pcg_version,label";
$tabfield[32]= "code,label,range_account,sens,category_type,formula,position,country_id,country";
//$tabfield[32]= "code,label,range_account,sens,category_type,formula,position,country_id,country";
$tabfield[33]= "code,label";
$tabfield[34]= "code,label";
@ -306,7 +306,7 @@ $tabfieldvalue[28]= "code,label,affect,delay,newbymonth,country";
$tabfieldvalue[29]= "code,label,percent,position";
$tabfieldvalue[30]= "code,name,paper_size,orientation,metric,leftmargin,topmargin,nx,ny,spacex,spacey,width,height,font_size,custom_x,custom_y";
//$tabfieldvalue[31]= "pcg_version,label";
$tabfieldvalue[32]= "code,label,range_account,sens,category_type,formula,position,country";
//$tabfieldvalue[32]= "code,label,range_account,sens,category_type,formula,position,country";
$tabfieldvalue[33]= "code,label";
$tabfieldvalue[34]= "code,label";
@ -343,7 +343,7 @@ $tabfieldinsert[28]= "code,label,affect,delay,newbymonth,fk_country";
$tabfieldinsert[29]= "code,label,percent,position";
$tabfieldinsert[30]= "code,name,paper_size,orientation,metric,leftmargin,topmargin,nx,ny,spacex,spacey,width,height,font_size,custom_x,custom_y";
//$tabfieldinsert[31]= "pcg_version,label";
$tabfieldinsert[32]= "code,label,range_account,sens,category_type,formula,position,fk_country";
//$tabfieldinsert[32]= "code,label,range_account,sens,category_type,formula,position,fk_country";
$tabfieldinsert[33]= "code,label";
$tabfieldinsert[34]= "code,label";
@ -382,7 +382,7 @@ $tabrowid[28]= "";
$tabrowid[29]= "";
$tabrowid[30]= "";
//$tabrowid[31]= "";
$tabrowid[32]= "";
//$tabrowid[32]= "";
$tabrowid[33]= "rowid";
$tabrowid[34]= "rowid";
@ -419,7 +419,7 @@ $tabcond[28]= ! empty($conf->holiday->enabled);
$tabcond[29]= ! empty($conf->projet->enabled);
$tabcond[30]= ! empty($conf->label->enabled);
//$tabcond[31]= ! empty($conf->accounting->enabled);
$tabcond[32]= ! empty($conf->accounting->enabled);
//$tabcond[32]= ! empty($conf->accounting->enabled);
$tabcond[33]= ! empty($conf->hrm->enabled);
$tabcond[34]= ! empty($conf->hrm->enabled);
@ -456,7 +456,7 @@ $tabhelp[28] = array('affect'=>$langs->trans("FollowedByACounter"),'delay'=>$lan
$tabhelp[29] = array('code'=>$langs->trans("EnterAnyCode"), 'percent'=>$langs->trans("OpportunityPercent"), 'position'=>$langs->trans("PositionIntoComboList"));
$tabhelp[30] = array('code'=>$langs->trans("EnterAnyCode"), 'name'=>$langs->trans("LabelName"), 'paper_size'=>$langs->trans("LabelPaperSize"));
//$tabhelp[31] = array('pcg_version'=>$langs->trans("EnterAnyCode"));
$tabhelp[32] = array('code'=>$langs->trans("EnterAnyCode"));
//$tabhelp[32] = array('code'=>$langs->trans("EnterAnyCode"));
$tabhelp[33] = array('code'=>$langs->trans("EnterAnyCode"));
$tabhelp[34] = array('code'=>$langs->trans("EnterAnyCode"));
@ -493,7 +493,7 @@ $tabfieldcheck[28] = array();
$tabfieldcheck[29] = array();
$tabfieldcheck[30] = array();
//$tabfieldcheck[31] = array();
$tabfieldcheck[32] = array();
//$tabfieldcheck[32] = array();
$tabfieldcheck[33] = array();
$tabfieldcheck[34] = array();

View File

@ -131,7 +131,7 @@ elseif ($action == 'synchronize')
}
else
{
setEventMessages($langs->trans('multicurrency_syncronize_error', $reponse->error->info), null, 'errors');
setEventMessages($langs->trans('multicurrency_syncronize_error', $response->error->info), null, 'errors');
}
}
@ -377,4 +377,4 @@ print '
llxFooter();
$db->close();
$db->close();

View File

@ -265,6 +265,7 @@ $configfileparameters=array(
'?dolibarr_main_db_prefix' => $langs->trans("Prefix"),
'separator2' => '',
'dolibarr_main_authentication' => $langs->trans("AuthenticationMode"),
'?multicompany_transverse_mode'=> $langs->trans("MultiCompanyMode"),
'separator'=> '',
'?dolibarr_main_auth_ldap_login_attribute' => 'dolibarr_main_auth_ldap_login_attribute',
'?dolibarr_main_auth_ldap_host' => 'dolibarr_main_auth_ldap_host',
@ -318,7 +319,11 @@ foreach($configfileparameters as $key => $value)
{
$newkey = preg_replace('/^\?/','',$key);
if (preg_match('/^\?/',$key) && empty(${$newkey})) continue; // We discard parametes starting with ?
if (preg_match('/^\?/',$key) && empty(${$newkey}))
{
if ($newkey != 'multicompany_transverse_mode' || empty($conf->multicompany->enabled))
continue; // We discard parameters starting with ?
}
if (strpos($newkey, 'separator') !== false && $lastkeyshown == 'separator') continue;
$var=!$var;

View File

@ -69,12 +69,18 @@ if ($action=='install')
}
else
{
if (! preg_match('/\.zip/i',$original_file))
if (! preg_match('/\.zip$/i',$original_file))
{
$langs->load("errors");
setEventMessages($langs->trans("ErrorFileMustBeADolibarrPackage",$original_file), null, 'errors');
$error++;
}
if (! preg_match('/module_.*\-[\d]+\.[\d]+.*$/i',$original_file))
{
$langs->load("errors");
setEventMessages($langs->trans("ErrorFilenameDosNotMatchDolibarrPackageRules",$original_file, 'module_*-x.y*.zip'), null, 'errors');
$error++;
}
}
if (! $error)
@ -117,7 +123,7 @@ if ($action=='install')
//var_dump($modulenamedir);
if (! dol_is_dir($modulenamedir))
{
setEventMessages($langs->trans("ErrorModuleFileSeemsToHaveAWrongFormat"), null, 'errors');
setEventMessages($langs->trans("ErrorModuleFileSeemsToHaveAWrongFormat").'<br>Dir not found: '.$conf->admin->dir_temp.'/'.$tmpdir.'/'.$modulename.'<br>'.$conf->admin->dir_temp.'/'.$tmpdir.'/htdocs/'.$modulename, null, 'errors');
$error++;
}
}
@ -143,7 +149,7 @@ if ($action=='install')
if (! $error)
{
setEventMessages($langs->trans("SetupIsReadyForUse"), null, 'mesgs');
setEventMessages($langs->trans("SetupIsReadyForUse", DOL_URL_ROOT.'/admin/modules.php?mainmenu=home', $langs->transnoentitiesnoconv("Home").' - '.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("Modules")), null, 'warnings');
}
}
@ -170,6 +176,8 @@ print $langs->trans("CurrentVersion").' : <b>'.DOL_VERSION.'</b><br>';
if (function_exists('curl_init'))
{
$conf->global->MAIN_USE_RESPONSE_TIMEOUT = 10;
$result = getURLContent('http://sourceforge.net/projects/dolibarr/rss');
//var_dump($result['content']);
$sfurl = simplexml_load_string($result['content']);
@ -281,26 +289,32 @@ if ($allowfromweb < 1)
if ($allowfromweb >= 0)
{
if ($allowfromweb == 1) print $langs->trans("ThisIsProcessToFollow").'<br>';
else print $langs->trans("ThisIsAlternativeProcessToFollow").'<br>';
print '<b>'.$langs->trans("StepNb",1).'</b>: ';
print $langs->trans("FindPackageFromWebSite",$fullurl).'<br>';
print '<b>'.$langs->trans("StepNb",2).'</b>: ';
print $langs->trans("DownloadPackageFromWebSite",$fullurl).'<br>';
print '<b>'.$langs->trans("StepNb",3).'</b>: ';
if ($allowfromweb == 1)
{
//print $langs->trans("ThisIsProcessToFollow").'<br>';
}
else
{
print $langs->trans("ThisIsAlternativeProcessToFollow").'<br>';
print '<b>'.$langs->trans("StepNb",1).'</b>: ';
print $langs->trans("FindPackageFromWebSite",$fullurl).'<br>';
print '<b>'.$langs->trans("StepNb",2).'</b>: ';
print $langs->trans("DownloadPackageFromWebSite",$fullurl).'<br>';
print '<b>'.$langs->trans("StepNb",3).'</b>: ';
}
if ($allowfromweb == 1)
{
print $langs->trans("UnpackPackageInDolibarrRoot",$dirins).'<br>';
print $langs->trans("UnpackPackageInModulesRoot",$dirins).'<br>';
print '<form enctype="multipart/form-data" method="POST" class="noborder" action="'.$_SERVER["PHP_SELF"].'" name="forminstall">';
print '<input type="hidden" name="action" value="install">';
print $langs->trans("YouCanSubmitFile").' <input type="file" name="fileinstall"> ';
print '<input type="submit" name="'.dol_escape_htmltag($langs->trans("Send")).'" class="button">';
print '<input type="submit" name="send" value="'.dol_escape_htmltag($langs->trans("Send")).'" class="button">';
print '</form>';
}
else
{
print $langs->trans("UnpackPackageInDolibarrRoot",$dirins).'<br>';
print $langs->trans("UnpackPackageInModulesRoot",$dirins).'<br>';
print '<b>'.$langs->trans("StepNb",4).'</b>: ';
print $langs->trans("SetupIsReadyForUse").'<br>';
}

View File

@ -526,7 +526,17 @@ class Categorie extends CommonObject
}
if (! $error)
{
$sql = "DELETE FROM ".MAIN_DB_PREFIX."categorie_project";
$sql = "DELETE FROM ".MAIN_DB_PREFIX."categorie_contact";
$sql .= " WHERE fk_categorie = ".$this->id;
if (!$this->db->query($sql))
{
$this->error=$this->db->lasterror();
$error++;
}
}
if (! $error)
{
$sql = "DELETE FROM ".MAIN_DB_PREFIX."categorie_account";
$sql .= " WHERE fk_categorie = ".$this->id;
if (!$this->db->query($sql))
{
@ -535,7 +545,18 @@ class Categorie extends CommonObject
$error++;
}
}
if (! $error)
{
$sql = "DELETE FROM ".MAIN_DB_PREFIX."bank_class";
$sql .= " WHERE fk_categ = ".$this->id;
if (!$this->db->query($sql))
{
$this->error=$this->db->lasterror();
dol_syslog("Error sql=".$sql." ".$this->error, LOG_ERR);
$error++;
}
}
if (! $error)
{
$sql = "DELETE FROM ".MAIN_DB_PREFIX."categorie_lang";

View File

@ -852,8 +852,10 @@ if ($id > 0)
$result4=$object->fetch_userassigned();
$result5=$object->fetch_optionals($id,$extralabels);
if ($listUserAssignedUpdated || $donotclearsession) {
if ($listUserAssignedUpdated || $donotclearsession)
{
$percentage=in_array(GETPOST('status'),array(-1,100))?GETPOST('status'):(in_array(GETPOST('complete'),array(-1,100))?GETPOST('complete'):GETPOST("percentage")); // If status is -1 or 100, percentage is not defined and we must use status
$datep=dol_mktime($fulldayevent?'00':$aphour, $fulldayevent?'00':$apmin, 0, $_POST["apmonth"], $_POST["apday"], $_POST["apyear"]);
$datef=dol_mktime($fulldayevent?'23':$p2hour, $fulldayevent?'59':$p2min, $fulldayevent?'59':'0', $_POST["p2month"], $_POST["p2day"], $_POST["p2year"]);
@ -1028,7 +1030,7 @@ if ($id > 0)
// Status
print '<tr><td class="nowrap">'.$langs->trans("Status").' / '.$langs->trans("Percentage").'</td><td colspan="3">';
$percent=GETPOST("percentage")?GETPOST("percentage"):$object->percentage;
$percent = GETPOST("percentage") ? GETPOST("percentage"): $object->percentage;
$formactions->form_select_status_action('formaction',$percent,1);
print '</td></tr>';

View File

@ -1328,7 +1328,16 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa
$cssclass.= " unmovable";
}
}
else $cssclass.= " movable";
else{
if ($user->rights->agenda->allactions->create ||
(($event->authorid == $user->id || $event->userownerid == $user->id) && $user->rights->agenda->myactions->create))
{
$cssclass.= " movable";
}else{
$cssclass.= " unmovable";
}
}
$h=''; $nowrapontd=1;
if ($action == 'show_day') { $h='height: 100%; '; $nowrapontd=0; }

View File

@ -704,7 +704,7 @@ if ($action == 'create')
dol_fiche_head();
print '<table class="border" width="100%">';
print '<tr><td class="fieldrequired titlefieldcreate">'.$langs->trans("MailTitle").'</td><td><input class="flat minwidth200" name="titre" value="'.dol_escape_htmltag(GETPOST('titre')).'"></td></tr>';
print '<tr><td class="fieldrequired titlefieldcreate">'.$langs->trans("MailTitle").'</td><td><input class="flat minwidth300" name="titre" value="'.dol_escape_htmltag(GETPOST('titre')).'"></td></tr>';
print '<tr><td class="fieldrequired">'.$langs->trans("MailFrom").'</td><td><input class="flat minwidth200" name="from" value="'.$conf->global->MAILING_EMAIL_FROM.'"></td></tr>';
print '<tr><td>'.$langs->trans("MailErrorsTo").'</td><td><input class="flat minwidth200" name="errorsto" value="'.(!empty($conf->global->MAILING_EMAIL_ERRORSTO)?$conf->global->MAILING_EMAIL_ERRORSTO:$conf->global->MAIN_MAIL_ERRORS_TO).'"></td></tr>';
@ -720,7 +720,7 @@ if ($action == 'create')
print '</br><br>';
print '<table class="border" width="100%">';
print '<tr><td class="fieldrequired titlefieldcreate">'.$langs->trans("MailTopic").'</td><td><input class="flat minwidth200" name="sujet" value="'.dol_escape_htmltag(GETPOST('sujet')).'"></td></tr>';
print '<tr><td class="fieldrequired titlefieldcreate">'.$langs->trans("MailTopic").'</td><td><input class="flat minwidth200 quatrevingtpercent" name="sujet" value="'.dol_escape_htmltag(GETPOST('sujet')).'"></td></tr>';
print '<tr><td>'.$langs->trans("BackgroundColorByDefault").'</td><td colspan="3">';
print $htmlother->selectColor($_POST['bgcolor'],'bgcolor','new_mailing',0);
print '</td></tr>';

View File

@ -1166,14 +1166,9 @@ class Propal extends CommonObject
}
$clonedObj->id=0;
$clonedObj->ref='';
$clonedObj->statut=self::STATUS_DRAFT;
if (empty($conf->global->PROPALE_ADDON) || ! is_readable(DOL_DOCUMENT_ROOT ."/core/modules/propale/".$conf->global->PROPALE_ADDON.".php"))
{
$this->error='ErrorSetupNotComplete';
return -1;
}
// Clear fields
$clonedObj->user_author = $user->id;
$clonedObj->user_valid = '';
@ -1182,12 +1177,6 @@ class Propal extends CommonObject
$clonedObj->fin_validite = $clonedObj->date + ($clonedObj->duree_validite * 24 * 3600);
if (empty($conf->global->MAIN_KEEP_REF_CUSTOMER_ON_CLONING)) $clonedObj->ref_client = '';
// Set ref
require_once DOL_DOCUMENT_ROOT ."/core/modules/propale/".$conf->global->PROPALE_ADDON.'.php';
$obj = $conf->global->PROPALE_ADDON;
$modPropale = new $obj;
$clonedObj->ref = $modPropale->getNextValue($objsoc,$clonedObj);
// Create clone
$result=$clonedObj->create($user);

View File

@ -178,7 +178,7 @@ if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'e
include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php';
// Do we click on purge search criteria ?
if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers
if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") || GETPOST("button_removefilter")) // All tests are required to be compatible with all browsers
{
$search_categ='';
$search_user='';
@ -363,7 +363,7 @@ if ($resql)
$arrayofselected=is_array($toselect)?$toselect:array();
$param='&socid='.$socid.'&viewstatut='.$viewstatut;
$param='&viewstatut='.$viewstatut;
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
if ($sall) $param.='&sall='.$sall;
@ -377,6 +377,7 @@ if ($resql)
if ($search_montant_ht) $param.='&search_montant_ht='.$search_montant_ht;
if ($search_login) $param.='&search_login='.$search_login;
if ($search_town) $param.='&search_town='.$search_town;
if ($socid > 0) $param.='&socid='.$socid;
if ($optioncss != '') $param.='&optioncss='.$optioncss;
// Add $param from extra fields
foreach ($search_array_options as $key => $val)
@ -436,8 +437,8 @@ if ($resql)
dol_fiche_head(null, '', '');
$topicmail="SendProposalRef";
$modelmail="propal_send";
$topicmail="SendSupplierProposalRef";
$modelmail="supplier_proposal_send";
// Cree l'objet formulaire mail
include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php';

View File

@ -114,7 +114,7 @@ if ($action == 'confirm_split' && GETPOST("confirm") == 'yes')
$newdiscount2->amount_ttc=price2num($discount->amount_ttc-$newdiscount1->amount_ttc);
$newdiscount1->amount_ht=price2num($newdiscount1->amount_ttc/(1+$newdiscount1->tva_tx/100),'MT');
$newdiscount2->amount_ht=price2num($newdiscount2->amount_ttc/(1+$newdiscount2->tva_tx/100),'MT');
$newdiscount1->amount_tva=price2num($newdiscount1->amount_ttc-$newdiscount2->amount_ht);
$newdiscount1->amount_tva=price2num($newdiscount1->amount_ttc-$newdiscount1->amount_ht);
$newdiscount2->amount_tva=price2num($newdiscount2->amount_ttc-$newdiscount2->amount_ht);
$db->begin();

View File

@ -49,6 +49,7 @@ if (! empty($conf->projet->enabled)) {
require_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php';
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formprojet.class.php';
}
require_once DOL_DOCUMENT_ROOT . '/core/class/doleditor.class.php';
$langs->load('orders');
@ -61,6 +62,7 @@ $langs->load('sendings');
$langs->load('products');
if (!empty($conf->incoterm->enabled)) $langs->load('incoterm');
if (! empty($conf->margin->enabled)) $langs->load('margins');
if (! empty($conf->productbatch->enabled)) $langs->load("productbatch");
$id = (GETPOST('id', 'int') ? GETPOST('id', 'int') : GETPOST('orderid', 'int'));
$ref = GETPOST('ref', 'alpha');

View File

@ -62,6 +62,7 @@ $extrafields = new ExtraFields($db);
$extralabels=$extrafields->fetch_name_optionals_label($object->table_element);
/*
* Actions
*/
@ -152,6 +153,7 @@ if ($action == 'add')
else {
$error++;
setEventMessages($object->error, $object->errors, 'errors');
$action='create'; // Force chargement page en mode creation
}
}
@ -247,15 +249,24 @@ if ($action == 'update')
}
}
if ($_POST["action"] == 'confirm_delete' && $_POST["confirm"] == "yes" && $user->rights->banque->configurer)
if ($action == 'confirm_delete' && $_POST["confirm"] == "yes" && $user->rights->banque->configurer)
{
// Delete
$object = new Account($db);
$object->fetch(GETPOST("id","int"));
$object->delete();
$result = $object->delete($user);
header("Location: ".DOL_URL_ROOT."/compta/bank/index.php");
exit;
if ($result > 0)
{
setEventMessages($langs->trans("RecordDeleted"), null, 'mesgs');
header("Location: ".DOL_URL_ROOT."/compta/bank/index.php");
exit;
}
else
{
setEventMessages($account->error, $account->errors, 'errors');
$action='';
}
}

View File

@ -72,6 +72,7 @@ if ($categid) {
}
}
/*
* View
*/

View File

@ -385,7 +385,7 @@ class Account extends CommonObject
/**
* Add an entry into table ".MAIN_DB_PREFIX."bank
*
* @param int $date Date operation
* @param int $date Date operation
* @param string $oper 1,2,3,4... (deprecated) or TYP,VIR,PRE,LIQ,VAD,CB,CHQ...
* @param string $label Descripton
* @param float $amount Amount
@ -472,12 +472,10 @@ class Account extends CommonObject
if ($accline->insert() > 0) {
if ($categorie) {
$sql = "INSERT INTO ".MAIN_DB_PREFIX."bank_class (";
$sql .= "lineid";
$sql .= ", fk_categ";
$sql = "INSERT INTO ".MAIN_DB_PREFIX."categorie_account (";
$sql .= "fk_account, fk_categorie";
$sql .= ") VALUES (";
$sql .= "'".$accline->id."'";
$sql .= ", '".$categorie."'";
$sql .= " ".$accline->id.", ".$categorie;
$sql .= ")";
$result = $this->db->query($sql);
@ -604,6 +602,7 @@ class Account extends CommonObject
$accline->datec = $this->db->idate($now);
$accline->label = '('.$langs->trans("InitialBankBalance").')';
$accline->amount = price2num($this->solde);
$accline->fk_user_author = $user->id;
$accline->fk_account = $this->id;
$accline->datev = $this->db->idate($this->date_solde);
$accline->dateo = $this->db->idate($this->date_solde);
@ -611,6 +610,8 @@ class Account extends CommonObject
if ($accline->insert() < 0) {
$error++;
$this->error = $accline->error;
$this->errors = $accline->errors;
}
if (! $error)
@ -982,29 +983,59 @@ class Account extends CommonObject
{
global $conf;
$sql = "DELETE FROM ".MAIN_DB_PREFIX."bank_account";
$sql.= " WHERE rowid = ".$this->rowid;
$sql.= " AND entity = ".$conf->entity;
dol_syslog(get_class($this)."::delete", LOG_DEBUG);
$result = $this->db->query($sql);
if ($result) {
// Remove extrafields
if ((empty($conf->global->MAIN_EXTRAFIELDS_DISABLED))) // For avoid conflicts if trigger used
{
$result=$this->deleteExtraFields();
if ($result < 0)
{
dol_syslog(get_class($this)."::delete error -4 ".$this->error, LOG_ERR);
return -1;
}
}
$error=0;
$this->db->begin();
// Delete link between tag and bank account
if (! $error)
{
$sql = "DELETE FROM ".MAIN_DB_PREFIX."categorie_account";
$sql.= " WHERE fk_account = ".$this->id;
$resql = $this->db->query($sql);
if (!$resql)
{
$error++;
$this->error = "Error ".$this->db->lasterror();
}
}
if (! $error)
{
$sql = "DELETE FROM ".MAIN_DB_PREFIX."bank_account";
$sql.= " WHERE rowid = ".$this->rowid;
dol_syslog(get_class($this)."::delete", LOG_DEBUG);
$result = $this->db->query($sql);
if ($result)
{
// Remove extrafields
if ((empty($conf->global->MAIN_EXTRAFIELDS_DISABLED))) // For avoid conflicts if trigger used
{
$result=$this->deleteExtraFields();
if ($result < 0)
{
$error++;
dol_syslog(get_class($this)."::delete error -4 ".$this->error, LOG_ERR);
}
}
}
else
{
$error++;
$this->error = "Error ".$this->db->lasterror();
}
}
if (! $error)
{
$this->db->commit();
return 1;
}
else {
dol_print_error($this->db);
else
{
$this->db->rollback();
return -1;
}
}

View File

@ -188,29 +188,60 @@ class BankCateg // extends CommonObject
/**
* Delete object in database
*
* @param User $user User that delete
* @param int $notrigger 0=launch triggers after, 1=disable triggers
* @return int <0 if KO, >0 if OK
* @param User $user User that delete
* @param int $notrigger 0=launch triggers after, 1=disable triggers
* @return int <0 if KO, >0 if OK
*/
public function delete(User $user, $notrigger = 0)
{
global $conf;
$error = 0;
$sql = "DELETE FROM ".MAIN_DB_PREFIX."bank_categ";
$sql .= " WHERE rowid=".$this->id;
$sql .= " AND entity = ".$conf->entity;
$this->db->begin();
dol_syslog(get_class($this)."::delete", LOG_DEBUG);
$resql = $this->db->query($sql);
if (!$resql) {
$error++;
$this->errors[] = "Error ".$this->db->lasterror();
// Delete link between tag and bank account
if (! $error)
{
$sql = "DELETE FROM ".MAIN_DB_PREFIX."categorie_account";
$sql.= " WHERE fk_categorie = ".$this->id;
$resql = $this->db->query($sql);
if (!$resql)
{
$error++;
$this->errors[] = "Error ".$this->db->lasterror();
}
}
// Commit or rollback
// Delete link between tag and bank lines
if (! $error)
{
$sql = "DELETE FROM ".MAIN_DB_PREFIX."bank_class";
$sql.= " WHERE fk_categ = ".$this->id;
$resql = $this->db->query($sql);
if (!$resql)
{
$error++;
$this->errors[] = "Error ".$this->db->lasterror();
}
}
// Delete bank categ
if (! $error)
{
$sql = "DELETE FROM ".MAIN_DB_PREFIX."bank_categ";
$sql .= " WHERE rowid=".$this->id;
$resql = $this->db->query($sql);
if (!$resql)
{
$error++;
$this->errors[] = "Error ".$this->db->lasterror();
}
}
// Commit or rollback
if ($error) {
foreach ($this->errors as $errmsg) {
dol_syslog(get_class($this)."::delete ".$errmsg, LOG_ERR);

View File

@ -3939,7 +3939,7 @@ else if ($id > 0 || ! empty($ref))
}
// Send by mail
if (($object->statut == 1 || $object->statut == 2) || ! empty($conf->global->FACTURE_SENDBYEMAIL_FOR_ALL_STATUS)) {
if (($object->statut == Facture::STATUS_VALIDATED || $object->statut == Facture::STATUS_CLOSED) || ! empty($conf->global->FACTURE_SENDBYEMAIL_FOR_ALL_STATUS)) {
if ($objectidnext) {
print '<div class="inline-block divButAction"><span class="butActionRefused" title="' . $langs->trans("DisabledBecauseReplacedInvoice") . '">' . $langs->trans('SendByMail') . '</span></div>';
} else {
@ -3950,21 +3950,27 @@ else if ($id > 0 || ! empty($ref))
}
}
// deprecated. Useless because now we can use templates
if (! empty($conf->global->FACTURE_SHOW_SEND_REMINDER)) // For backward compatibility
// Request a direct debit order
if ($object->statut > Facture::STATUS_DRAFT && $object->paye == 0 && $num == 0)
{
if (($object->statut == 1 || $object->statut == 2) && $resteapayer > 0) {
if ($objectidnext) {
print '<div class="inline-block divButAction"><span class="butActionRefused" title="' . $langs->trans("DisabledBecauseReplacedInvoice") . '">' . $langs->trans('SendRemindByMail') . '</span></div>';
} else {
if (empty($conf->global->MAIN_USE_ADVANCED_PERMS) || $user->rights->facture->invoice_advance->send) {
print '<div class="inline-block divButAction"><a class="butAction" href="' . $_SERVER['PHP_SELF'] . '?facid=' . $object->id . '&amp;action=prerelance&amp;mode=init">' . $langs->trans('SendRemindByMail') . '</a></div>';
} else
print '<div class="inline-block divButAction"><a class="butActionRefused" href="#">' . $langs->trans('SendRemindByMail') . '</a></div>';
}
}
if ($resteapayer > 0)
{
if ($user->rights->prelevement->bons->creer)
{
$langs->load("withdrawals");
print '<a class="butAction" href="'.DOL_URL_ROOT.'/compta/facture/prelevement.php?facid='.$object->id.'" title="'.dol_escape_htmltag($langs->trans("MakeWithdrawRequest")).'">'.$langs->trans("MakeWithdrawRequest").'</a>';
}
else
{
//print '<a class="butActionRefused" href="#" title="'.dol_escape_htmltag($langs->trans("NotEnoughPermissions")).'">'.$langs->trans("MakeWithdrawRequest").'</a>';
}
}
else
{
//print '<a class="butActionRefused" href="#" title="'.dol_escape_htmltag($langs->trans("AmountMustBePositive")).'">'.$langs->trans("MakeWithdrawRequest").'</a>';
}
}
// Create payment
if ($object->type != Facture::TYPE_CREDIT_NOTE && $object->statut == 1 && $object->paye == 0 && $user->rights->facture->paiement) {
if ($objectidnext) {

View File

@ -317,7 +317,7 @@ if ($search_country) $sql .= " AND s.fk_pays IN (".$search_country.')';
if ($search_type_thirdparty) $sql .= " AND s.fk_typent IN (".$search_type_thirdparty.')';
if ($search_company) $sql .= natural_search('s.nom', $search_company);
if ($search_montant_ht != '') $sql.= natural_search('f.total', $search_montant_ht, 1);
if ($search_montant_vat != '') $sql.= natural_search('f.total_vat', $search_montant_vat, 1);
if ($search_montant_vat != '') $sql.= natural_search('f.tva', $search_montant_vat, 1);
if ($search_montant_ttc != '') $sql.= natural_search('f.total_ttc', $search_montant_ttc, 1);
if ($search_status != '' && $search_status >= 0)
{

View File

@ -509,10 +509,11 @@ if (! empty($conf->don->enabled) && $user->rights->societe->lire)
$i = 0;
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre"><td>'.$langs->trans("BoxTitleLastModifiedDonations",$max).'</td>';
print '<td class="liste_titre" align="right">'.$langs->trans("AmountTTC").'</td>';
print '<td class="liste_titre" align="right">'.$langs->trans("DateModificationShort").'</td>';
print '<td class="liste_titre" width="16">&nbsp;</td>';
print '<tr class="liste_titre">';
print '<td>'.$langs->trans("BoxTitleLastModifiedDonations",$max).'</td>';
print '<td align="right">'.$langs->trans("AmountTTC").'</td>';
print '<td align="right">'.$langs->trans("DateModificationShort").'</td>';
print '<td width="16">&nbsp;</td>';
print '</tr>';
if ($num)
{

View File

@ -369,7 +369,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
}
if ($(\'#fieldchqemetteur\').val() == \'\')
{
var emetteur = ('.$facture->type.' == 2) ? \''.dol_escape_htmltag($conf->global->MAIN_INFO_SOCIETE_NOM).'\' : jQuery(\'#thirdpartylabel\').val();
var emetteur = ('.$facture->type.' == 2) ? \''.dol_escape_js(dol_escape_htmltag($conf->global->MAIN_INFO_SOCIETE_NOM)).'\' : jQuery(\'#thirdpartylabel\').val();
$(\'#fieldchqemetteur\').val(emetteur);
}
}

View File

@ -203,7 +203,7 @@ if ($action == 'valide')
$linkback = '<a href="' . DOL_URL_ROOT . '/compta/paiement/list.php">' . $langs->trans("BackToList") . '</a>';
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
print '<table class="border centpercent">'."\n";
// Ref
print '<tr><td class="titlefield">'.$langs->trans('Ref').'</td><td colspan="3">';

View File

@ -45,16 +45,25 @@ if ($user->societe_id > 0) accessforbidden();
// Get supervariables
$action = GETPOST('action','alpha');
$id = GETPOST('id','int');
$socid = GETPOST('socid','int');
$page = GETPOST('page','int');
$sortorder = ((GETPOST('sortorder','alpha')=="")) ? "DESC" : GETPOST('sortorder','alpha');
$sortfield = ((GETPOST('sortfield','alpha')=="")) ? "pl.fk_soc" : GETPOST('sortfield','alpha');
$limit = GETPOST("limit")?GETPOST("limit","int"):$conf->liste_limit;
$sortfield = GETPOST("sortfield",'alpha');
$sortorder = GETPOST("sortorder",'alpha');
$page = GETPOST("page",'int');
if ($page == -1) { $page = 0; }
$offset = $limit * $page;
$pageprev = $page - 1;
$pagenext = $page + 1;
if (! $sortfield) $sortfield='pl.fk_soc';
if (! $sortorder) $sortorder='DESC';
/*
* Actions
*/
if ( $action == 'confirm_delete' )
{
$bon = new BonPrelevement($db,"");
@ -73,10 +82,12 @@ if ( $action == 'confirm_credite' && GETPOST('confirm','alpha') == 'yes')
$bon = new BonPrelevement($db,"");
$bon->fetch($id);
$bon->set_credite();
header("Location: card.php?id=".$id);
exit;
$res=$bon->set_credite();
if ($res >= 0)
{
header("Location: card.php?id=".$id);
exit;
}
}
if ($action == 'infotrans' && $user->rights->prelevement->bons->send)
@ -162,12 +173,12 @@ if ($id > 0)
print '<table class="border" width="100%">';
print '<tr><td width="20%">'.$langs->trans("Ref").'</td><td>'.$bon->getNomUrl(1).'</td></tr>';
print '<tr><td width="20%">'.$langs->trans("Date").'</td><td>'.dol_print_date($bon->datec,'day').'</td></tr>';
print '<tr><td width="20%">'.$langs->trans("Amount").'</td><td>'.price($bon->amount).'</td></tr>';
print '<tr><td class="titlefield">'.$langs->trans("Ref").'</td><td>'.$bon->getNomUrl(1).'</td></tr>';
print '<tr><td>'.$langs->trans("Date").'</td><td>'.dol_print_date($bon->datec,'day').'</td></tr>';
print '<tr><td>'.$langs->trans("Amount").'</td><td>'.price($bon->amount).'</td></tr>';
// Status
print '<tr><td width="20%">'.$langs->trans('Status').'</td>';
print '<tr><td>'.$langs->trans('Status').'</td>';
print '<td>'.$bon->getLibStatut(1).'</td>';
print '</tr>';
@ -176,16 +187,16 @@ if ($id > 0)
$muser = new User($db);
$muser->fetch($bon->user_trans);
print '<tr><td width="20%">'.$langs->trans("TransData").'</td><td>';
print '<tr><td>'.$langs->trans("TransData").'</td><td>';
print dol_print_date($bon->date_trans,'day');
print ' '.$langs->trans("By").' '.$muser->getFullName($langs).'</td></tr>';
print '<tr><td width="20%">'.$langs->trans("TransMetod").'</td><td>';
print '<tr><td>'.$langs->trans("TransMetod").'</td><td>';
print $bon->methodes_trans[$bon->method_trans];
print '</td></tr>';
}
if($bon->date_credit <> 0)
{
print '<tr><td width="20%">'.$langs->trans('CreditDate').'</td><td>';
print '<tr><td>'.$langs->trans('CreditDate').'</td><td>';
print dol_print_date($bon->date_credit,'day');
print '</td></tr>';
}
@ -194,7 +205,7 @@ if ($id > 0)
print '<br>';
print '<table class="border" width="100%"><tr><td width="20%">';
print '<table class="border" width="100%"><tr><td class="titlefield">';
print $langs->trans("WithdrawalFile").'</td><td>';
$relativepath = 'receipts/'.$bon->ref.'.xml';
print '<a data-ajax="false" href="'.DOL_URL_ROOT.'/document.php?type=text/plain&amp;modulepart=prelevement&amp;file='.urlencode($relativepath).'">'.$relativepath.'</a>';
@ -204,7 +215,6 @@ if ($id > 0)
if (empty($bon->date_trans) && $user->rights->prelevement->bons->send && $action=='settransmitted')
{
print '<form method="post" name="userfile" action="card.php?id='.$bon->id.'" enctype="multipart/form-data">';
@ -236,7 +246,7 @@ if ($id > 0)
print '<table class="border" width="100%">';
print '<tr class="liste_titre">';
print '<td colspan="3">'.$langs->trans("NotifyCredit").'</td></tr>';
print '<tr '.$bc[false].'><td width="20%">'.$langs->trans('CreditDate').'</td><td>';
print '<tr '.$bc[false].'><td>'.$langs->trans('CreditDate').'</td><td>';
print $form->select_date('','','','','',"infocredit",1,1);
print '</td></tr>';
print '</table>';
@ -269,17 +279,11 @@ if ($id > 0)
$ligne=new LignePrelevement($db,$user);
if ($page == -1) { $page = 0 ; }
$offset = $conf->liste_limit * $page ;
$pageprev = $page - 1;
$pagenext = $page + 1;
/*
* Lines into withdraw request
*/
$sql = "SELECT pl.rowid, pl.statut, pl.amount";
$sql.= ", s.rowid as socid, s.nom as name";
$sql = "SELECT pl.rowid, pl.statut, pl.amount,";
$sql.= " s.rowid as socid, s.nom as name";
$sql.= " FROM ".MAIN_DB_PREFIX."prelevement_lignes as pl";
$sql.= ", ".MAIN_DB_PREFIX."prelevement_bons as pb";
$sql.= ", ".MAIN_DB_PREFIX."societe as s";
@ -306,7 +310,7 @@ if ($id > 0)
print '<tr class="liste_titre">';
print_liste_field_titre($langs->trans("Lines"),$_SERVER["PHP_SELF"],"pl.rowid",'',$urladd);
print_liste_field_titre($langs->trans("ThirdParty"),$_SERVER["PHP_SELF"],"s.nom",'',$urladd);
print_liste_field_titre($langs->trans("Amount"),$_SERVER["PHP_SELF"],"pl.amount","",$urladd,'align="center"');
print_liste_field_titre($langs->trans("Amount"),$_SERVER["PHP_SELF"],"pl.amount","",$urladd,'align="right"');
print_liste_field_titre('');
print "</tr>\n";
@ -320,13 +324,12 @@ if ($id > 0)
print "<tr ".$bc[$var].">";
// Status of line
print "<td>";
print $ligne->LibStatut($obj->statut,2);
print "&nbsp;";
print '<a href="'.DOL_URL_ROOT.'/compta/prelevement/ligne.php?id='.$obj->rowid.'">';
print substr('000000'.$obj->rowid, -6);
print sprintf("%06s",$obj->rowid);
print '</a></td>';
$thirdparty=new Societe($db);
@ -335,7 +338,7 @@ if ($id > 0)
print $thirdparty->getNomUrl(1);
print "</td>\n";
print '<td align="center">'.price($obj->amount)."</td>\n";
print '<td align="right">'.price($obj->amount)."</td>\n";
print '<td>';
@ -350,23 +353,18 @@ if ($id > 0)
print '</td></tr>';
$total += $obj->total_ttc;
$total += $obj->amount;
$var=!$var;
$i++;
}
if($socid)
if ($num > 0)
{
print "<tr ".$bc[$var].">";
print '<tr class="liste_total">';
print '<td>'.$langs->trans("Total").'</td>';
print '<td align="center">'.price($total)."</td>\n";
print '<td>&nbsp;</td>';
print '<td align="right">'.price($total)."</td>\n";
print '<td>&nbsp;</td>';
print "</tr>\n";
}

View File

@ -323,7 +323,7 @@ class BonPrelevement extends CommonObject
/**
* Set credite and set status of linked invoices
*
* @return int <0 if KO, >0 if OK
* @return int <0 if KO, >=0 if OK
*/
function set_credite()
{

View File

@ -136,24 +136,22 @@ class LignePrelevement
{
return $langs->trans($this->statuts[$statut]);
}
if ($mode == 1)
{
if ($statut==0) return img_picto($langs->trans($this->statuts[$statut]),'statut1').' '.$langs->trans($this->statuts[$statut]);
if ($statut==2) return img_picto($langs->trans($this->statuts[$statut]),'statut4').' '.$langs->trans($this->statuts[$statut]);
if ($statut==3) return img_picto($langs->trans($this->statuts[$statut]),'statut8').' '.$langs->trans($this->statuts[$statut]);
if ($statut==0) return img_picto($langs->trans($this->statuts[$statut]),'statut1').' '.$langs->trans($this->statuts[$statut]); // Waiting
if ($statut==2) return img_picto($langs->trans($this->statuts[$statut]),'statut6').' '.$langs->trans($this->statuts[$statut]); // Credited
if ($statut==3) return img_picto($langs->trans($this->statuts[$statut]),'statut8').' '.$langs->trans($this->statuts[$statut]); // Refused
}
if ($mode == 2)
{
if ($statut==0) return img_picto($langs->trans($this->statuts[$statut]),'statut1');
if ($statut==2) return img_picto($langs->trans($this->statuts[$statut]),'statut4');
if ($statut==2) return img_picto($langs->trans($this->statuts[$statut]),'statut6');
if ($statut==3) return img_picto($langs->trans($this->statuts[$statut]),'statut8');
}
if ($mode == 3)
{
if ($statut==0) return $langs->trans($this->statuts[$statut]).' '.img_picto($langs->trans($this->statuts[$statut]),'statut1');
if ($statut==2) return $langs->trans($this->statuts[$statut]).' '.img_picto($langs->trans($this->statuts[$statut]),'statut4');
if ($statut==2) return $langs->trans($this->statuts[$statut]).' '.img_picto($langs->trans($this->statuts[$statut]),'statut6');
if ($statut==3) return $langs->trans($this->statuts[$statut]).' '.img_picto($langs->trans($this->statuts[$statut]),'statut8');
}
}

View File

@ -124,24 +124,16 @@ if ($nb < 0 || $nb1 < 0 || $nb11 < 0)
print '<table class="border" width="100%">';
print '<tr><td class="titlefield">'.$langs->trans("NbOfInvoiceToWithdraw").'</td>';
print '<td align="right">';
print '<td>';
print $nb;
print '</td></tr>';
print '<tr><td>'.$langs->trans("AmountToWithdraw").'</td>';
print '<td align="right">';
print '<td>';
print price($pricetowithdraw);
print '</td>';
print '</tr>';
//print '<tr><td>'.$langs->trans("NbOfInvoiceToWithdraw").' + '.$langs->trans("ThirdPartyBankCode").'='.$conf->global->PRELEVEMENT_CODE_BANQUE.'</td><td align="right">';
//print $nb1;
//print '</td></tr>';
//print '<tr><td>'.$langs->trans("NbOfInvoiceToWithdrawWithInfo").'</td><td align="right">';
//print $nb11;
//print '</td></tr>';
print '</table>';
print '</div>';
@ -158,8 +150,6 @@ else
{
print '<a class="butActionRefused" href="#" title="'.dol_escape_htmltag($langs->transnoentitiesnoconv("NoInvoiceToWithdraw")).'">'.$langs->trans("CreateAll")."</a>\n";
}
//if ($nb11) print '<a class="butAction" href="create.php?action=create&amp;banque=1">'.$langs->trans("CreateBanque")."</a>\n";
//if ($nb1) print '<a class="butAction" href="create.php?action=create&amp;banque=1&amp;guichet=1">'.$langs->trans("CreateGuichet")."</a>\n";
print "</div>\n";
print '<br>';
@ -247,8 +237,9 @@ else
/*
* List of last withdraws
* List of latest withdraws
*/
/*
$limit=5;
print load_fiche_titre($langs->trans("LastWithdrawalReceipts",$limit),'','');
@ -301,6 +292,7 @@ else
{
dol_print_error($db);
}
*/
llxFooter();
$db->close();

View File

@ -110,10 +110,10 @@ if ($resql)
print '<table class="liste" width="100%">';
print '<tr class="liste_titre">';
print_liste_field_titre($langs->trans("Bill"));
print_liste_field_titre($langs->trans("Company"));
print_liste_field_titre($langs->trans("Amount"));
print_liste_field_titre($langs->trans("DateRequest"));
print_liste_field_titre($langs->trans("Bill"), $_SERVER["PHP_SELF"]);
print_liste_field_titre($langs->trans("Company"), $_SERVER["PHP_SELF"]);
print_liste_field_titre($langs->trans("Amount"), $_SERVER["PHP_SELF"], "", "", $param, 'align="right"');
print_liste_field_titre($langs->trans("DateRequest"), $_SERVER["PHP_SELF"], "", "", $param, 'align="center"');
print_liste_field_titre('');
print '</tr>';
@ -154,7 +154,7 @@ if ($resql)
print '<td align="right">'.price($obj->total_ttc).'</td>';
print '<td align="right">'.dol_print_date($db->jdate($obj->date_demande),'day').'</td>';
print '<td align="center">'.dol_print_date($db->jdate($obj->date_demande),'day').'</td>';
print '<td align="right"></td>';

View File

@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2017 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2010-2012 Juanjo Menent <jmenent@2byte.es>
*
@ -43,9 +43,25 @@ if ($user->societe_id > 0) accessforbidden();
// Get supervariables
$prev_id = GETPOST('id','int');
$socid = GETPOST('socid','int');
$page = GETPOST('page','int');
$sortorder = ((GETPOST('sortorder','alpha')=="")) ? "DESC" : GETPOST('sortorder','alpha');
$sortfield = ((GETPOST('sortfield','alpha')=="")) ? "p.ref" : GETPOST('sortfield','alpha');
$limit = GETPOST("limit")?GETPOST("limit","int"):$conf->liste_limit;
$sortfield = GETPOST("sortfield",'alpha');
$sortorder = GETPOST("sortorder",'alpha');
$page = GETPOST("page",'int');
if ($page == -1) { $page = 0; }
$offset = $limit * $page;
$pageprev = $page - 1;
$pagenext = $page + 1;
if (! $sortfield) $sortfield='p.ref';
if (! $sortorder) $sortorder='DESC';
/*
* View
*/
$invoicetmp = new Facture($db);
$thirdpartytmp = new Societe($db);
llxHeader('',$langs->trans("WithdrawalsReceipts"));
@ -60,30 +76,27 @@ if ($prev_id)
print '<table class="border" width="100%">';
print '<tr><td width="20%">'.$langs->trans("Ref").'</td><td>'.$bon->getNomUrl(1).'</td></tr>';
print '<tr><td width="20%">'.$langs->trans("Date").'</td><td>'.dol_print_date($bon->datec,'day').'</td></tr>';
print '<tr><td width="20%">'.$langs->trans("Amount").'</td><td>'.price($bon->amount).'</td></tr>';
print '<tr><td class="titlefield">'.$langs->trans("Ref").'</td><td>'.$bon->getNomUrl(1).'</td></tr>';
print '<tr><td>'.$langs->trans("Date").'</td><td>'.dol_print_date($bon->datec,'day').'</td></tr>';
print '<tr><td>'.$langs->trans("Amount").'</td><td>'.price($bon->amount).'</td></tr>';
// Status
print '<tr><td width="20%">'.$langs->trans('Status').'</td>';
print '<td>'.$bon->getLibStatut(1).'</td>';
print '</tr>';
print '<tr><td>'.$langs->trans('Status').'</td><td>'.$bon->getLibStatut(1).'</td></tr>';
if($bon->date_trans <> 0)
{
$muser = new User($db);
$muser->fetch($bon->user_trans);
print '<tr><td width="20%">'.$langs->trans("TransData").'</td><td>';
print '<tr><td>'.$langs->trans("TransData").'</td><td>';
print dol_print_date($bon->date_trans,'day');
print ' '.$langs->trans("By").' '.$muser->getFullName($langs).'</td></tr>';
print '<tr><td width="20%">'.$langs->trans("TransMetod").'</td><td>';
print '<tr><td>'.$langs->trans("TransMetod").'</td><td>';
print $bon->methodes_trans[$bon->method_trans];
print '</td></tr>';
}
if($bon->date_credit <> 0)
{
print '<tr><td width="20%">'.$langs->trans('CreditDate').'</td><td>';
print '<tr><td>'.$langs->trans('CreditDate').'</td><td>';
print dol_print_date($bon->date_credit,'day');
print '</td></tr>';
}
@ -92,7 +105,7 @@ if ($prev_id)
print '<br>';
print '<table class="border" width="100%"><tr><td width="20%">';
print '<table class="border" width="100%"><tr><td class="titlefield">';
print $langs->trans("WithdrawalFile").'</td><td>';
$relativepath = 'receipts/'.$bon->ref.'.xml';
print '<a data-ajax="false" href="'.DOL_URL_ROOT.'/document.php?type=text/plain&amp;modulepart=prelevement&amp;file='.urlencode($relativepath).'">'.$relativepath.'</a>';
@ -107,11 +120,8 @@ if ($prev_id)
}
}
$offset = $conf->liste_limit * $page ;
/*
* Liste des factures
*/
// List of invoices
$sql = "SELECT pf.rowid";
$sql.= ",f.rowid as facid, f.facnumber as ref, f.total_ttc";
$sql.= ", s.rowid as socid, s.nom as name, pl.statut";
@ -127,27 +137,49 @@ $sql.= " AND pf.fk_facture = f.rowid";
$sql.= " AND f.entity = ".$conf->entity;
if ($prev_id) $sql.= " AND p.rowid=".$prev_id;
if ($socid) $sql.= " AND s.rowid = ".$socid;
$sql.= " ORDER BY $sortfield $sortorder ";
$sql.= $db->plimit($conf->liste_limit+1, $offset);
$sql.= $db->order($sortfield,$sortorder);
// Count total nb of records
$nbtotalofrecords = '';
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
{
$result = $db->query($sql);
$nbtotalofrecords = $db->num_rows($result);
}
$sql.= $db->plimit($limit + 1,$offset);
$result = $db->query($sql);
if ($result)
{
$num = $db->num_rows($result);
$i = 0;
$urladd = "&amp;id=".$prev_id;
$param = "&amp;id=".$prev_id;
print_barre_liste("", $page, "factures.php", $urladd, $sortfield, $sortorder, '', $num);
// Lines of title fields
print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">';
if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
print '<input type="hidden" name="action" value="list">';
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
print '<input type="hidden" name="viewstatut" value="'.$viewstatut.'">';
$massactionbutton='';
print_barre_liste('', $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, '', 0, '', '', $limit);
print"\n<!-- debut table -->\n";
print '<table class="liste" width="100%">';
print '<tr class="liste_titre">';
print_liste_field_titre($langs->trans("Bill"),$_SERVER["PHP_SELF"],"p.ref",'',$urladd,'class="liste_titre"',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("ThirdParty"),$_SERVER["PHP_SELF"],"s.nom",'',$urladd,'class="liste_titre"',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("Amount"),$_SERVER["PHP_SELF"],"f.total_ttc","",$urladd,'class="liste_titre" align="center"',$sortfield,$sortorder);
print_liste_field_titre('');
print_liste_field_titre($langs->trans("Bill"),$_SERVER["PHP_SELF"],"p.ref",'',$param,'',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("ThirdParty"),$_SERVER["PHP_SELF"],"s.nom",'',$param,'',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("Amount"),$_SERVER["PHP_SELF"],"f.total_ttc","",$param,'align="right"',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("StatusDebitCredit"),$_SERVER["PHP_SELF"],"","",$param,'align="center"',$sortfield,$sortorder);
print_liste_field_titre('');
print "</tr>\n";
@ -155,24 +187,31 @@ if ($result)
$total = 0;
while ($i < min($num,$conf->liste_limit))
while ($i < min($num, $limit))
{
$obj = $db->fetch_object($result);
print "<tr ".$bc[$var]."><td>";
print '<a href="'.DOL_URL_ROOT.'/compta/facture.php?facid='.$obj->facid.'">';
print img_object($langs->trans("ShowBill"),"bill");
print '</a>&nbsp;';
print '<a href="'.DOL_URL_ROOT.'/compta/facture.php?facid='.$obj->facid.'">'.$obj->ref."</a></td>\n";
print '<td><a href="'.DOL_URL_ROOT.'/comm/card.php?socid='.$obj->socid.'">';
print img_object($langs->trans("ShowCompany"),"company"). ' '.$obj->name."</a></td>\n";
print '<td align="center">'.price($obj->total_ttc)."</td>\n";
$invoicetmp->id = $obj->facid;
$invoicetmp->ref = $obj->ref;
$thirdpartytmp->id = $obj->socid;
$thirdpartytmp->name = $obj->name;
print "<tr ".$bc[$var].">";
print "<td>";
print $invoicetmp->getNomUrl(1);
print "</td>\n";
print '<td>';
print $thirdpartytmp->getNomUrl(1);
print "</td>\n";
// Amount
print '<td align="right">'.price($obj->total_ttc)."</td>\n";
// Status of requests
print '<td align="center">';
if ($obj->statut == 0)
{
@ -187,23 +226,25 @@ if ($result)
print '<b>'.$langs->trans("StatusRefused").'</b>';
}
print "</td></tr>\n";
print "</td>";
print "<td></td>";
print "</tr>\n";
$total += $obj->total_ttc;
$var=!$var;
$i++;
}
if($socid)
if ($num > 0)
{
print "<tr ".$bc[$var]."><td>";
print '<tr class="liste_total">';
print '<td>'.$langs->trans("Total").'</td>';
print '<td align="center">'.price($total)."</td>\n";
print '<td>&nbsp;</td>';
print '<td align="right">'.price($total)."</td>\n";
print '<td>&nbsp;</td>';
print '<td>&nbsp;</td>';
print "</tr>\n";
}

View File

@ -59,12 +59,12 @@ if ($prev_id)
print '<table class="border" width="100%">';
print '<tr><td width="20%">'.$langs->trans("Ref").'</td><td>'.$bon->getNomUrl(1).'</td></tr>';
print '<tr><td width="20%">'.$langs->trans("Date").'</td><td>'.dol_print_date($bon->datec,'day').'</td></tr>';
print '<tr><td width="20%">'.$langs->trans("Amount").'</td><td>'.price($bon->amount).'</td></tr>';
print '<tr><td class="titlefield">'.$langs->trans("Ref").'</td><td>'.$bon->getNomUrl(1).'</td></tr>';
print '<tr><td>'.$langs->trans("Date").'</td><td>'.dol_print_date($bon->datec,'day').'</td></tr>';
print '<tr><td>'.$langs->trans("Amount").'</td><td>'.price($bon->amount).'</td></tr>';
// Status
print '<tr><td width="20%">'.$langs->trans('Status').'</td>';
print '<tr><td>'.$langs->trans('Status').'</td>';
print '<td>'.$bon->getLibStatut(1).'</td>';
print '</tr>';
@ -73,16 +73,16 @@ if ($prev_id)
$muser = new User($db);
$muser->fetch($bon->user_trans);
print '<tr><td width="20%">'.$langs->trans("TransData").'</td><td>';
print '<tr><td>'.$langs->trans("TransData").'</td><td>';
print dol_print_date($bon->date_trans,'day');
print ' '.$langs->trans("By").' '.$muser->getFullName($langs).'</td></tr>';
print '<tr><td width="20%">'.$langs->trans("TransMetod").'</td><td>';
print '<tr><td>'.$langs->trans("TransMetod").'</td><td>';
print $bon->methodes_trans[$bon->method_trans];
print '</td></tr>';
}
if($bon->date_credit <> 0)
{
print '<tr><td width="20%">'.$langs->trans('CreditDate').'</td><td>';
print '<tr><td>'.$langs->trans('CreditDate').'</td><td>';
print dol_print_date($bon->date_credit,'day');
print '</td></tr>';
}
@ -91,7 +91,7 @@ if ($prev_id)
print '<br>';
print '<table class="border" width="100%"><tr><td width="20%">';
print '<table class="border" width="100%"><tr><td class="titlefield">';
print $langs->trans("WithdrawalFile").'</td><td>';
$relativepath = 'receipts/'.$bon->ref.'.xml';
print '<a data-ajax="false" href="'.DOL_URL_ROOT.'/document.php?type=text/plain&amp;modulepart=prelevement&amp;file='.urlencode($relativepath).'">'.$relativepath.'</a>';
@ -130,8 +130,7 @@ $sql.= " ORDER BY pl.amount DESC";
$resql = $db->query($sql);
if ($resql)
{
$num = $db->num_rows($resql);
$i = 0;
$num = $db->num_rows($resql);
print"\n<!-- debut table -->\n";
print '<table class="noborder" width="100%" cellspacing="0" cellpadding="4">';
@ -142,35 +141,47 @@ if ($resql)
$var=True;
$total = 0;
while ($i < $num)
{
$obj = $db->fetch_object($resql);
print "<tr ".$bc[$var]."><td>";
print '<a href="'.DOL_URL_ROOT.'/compta/prelevement/ligne.php?id='.$obj->rowid.'">';
print img_picto('', 'statut'.$obj->statut).' ';
print substr('000000'.$obj->rowid, -6);
print '</a></td>';
print '<td><a href="'.DOL_URL_ROOT.'/comm/card.php?socid='.$obj->socid.'">'.$obj->name."</a></td>\n";
print '<td align="right">'.price($obj->amount)."</td>\n";
print '<td>'.$rej->motifs[$obj->motif].'</td>';
print '<td align="center">'.yn($obj->afacturer).'</td>';
print '<td align="center">'.$obj->fk_facture.'</td>';
print "</tr>\n";
$total += $obj->amount;
$var=!$var;
$i++;
if ($num > 0)
{
$i = 0;
while ($i < $num)
{
$obj = $db->fetch_object($resql);
print "<tr ".$bc[$var]."><td>";
print '<a href="'.DOL_URL_ROOT.'/compta/prelevement/ligne.php?id='.$obj->rowid.'">';
print img_picto('', 'statut'.$obj->statut).' ';
print substr('000000'.$obj->rowid, -6);
print '</a></td>';
print '<td><a href="'.DOL_URL_ROOT.'/comm/card.php?socid='.$obj->socid.'">'.$obj->name."</a></td>\n";
print '<td align="right">'.price($obj->amount)."</td>\n";
print '<td>'.$rej->motifs[$obj->motif].'</td>';
print '<td align="center">'.yn($obj->afacturer).'</td>';
print '<td align="center">'.$obj->fk_facture.'</td>';
print "</tr>\n";
$total += $obj->amount;
$var=!$var;
$i++;
}
}
print '<tr class="liste_total"><td>&nbsp;</td>';
print '<td class="liste_total">'.$langs->trans("Total").'</td>';
print '<td align="right">'.price($total)."</td>\n";
print '<td colspan="3">&nbsp;</td>';
print "</tr>\n</table>\n";
else
{
print '<tr><td colspan="5" class="opacitymedium">'.$langs->trans("None").'</td></tr>';
}
if ($num > 0)
{
print '<tr class="liste_total"><td>&nbsp;</td>';
print '<td class="liste_total">'.$langs->trans("Total").'</td>';
print '<td align="right">'.price($total)."</td>\n";
print '<td colspan="3">&nbsp;</td>';
print "</tr>\n";
}
print "</table>\n";
$db->free($resql);
}
else

View File

@ -57,12 +57,12 @@ if ($prev_id)
print '<table class="border" width="100%">';
print '<tr><td width="20%">'.$langs->trans("Ref").'</td><td>'.$bon->getNomUrl(1).'</td></tr>';
print '<tr><td width="20%">'.$langs->trans("Date").'</td><td>'.dol_print_date($bon->datec,'day').'</td></tr>';
print '<tr><td width="20%">'.$langs->trans("Amount").'</td><td>'.price($bon->amount).'</td></tr>';
print '<tr><td class="titlefield">'.$langs->trans("Ref").'</td><td>'.$bon->getNomUrl(1).'</td></tr>';
print '<tr><td>'.$langs->trans("Date").'</td><td>'.dol_print_date($bon->datec,'day').'</td></tr>';
print '<tr><td>'.$langs->trans("Amount").'</td><td>'.price($bon->amount).'</td></tr>';
// Status
print '<tr><td width="20%">'.$langs->trans('Status').'</td>';
print '<tr><td>'.$langs->trans('Status').'</td>';
print '<td>'.$bon->getLibStatut(1).'</td>';
print '</tr>';
@ -71,16 +71,16 @@ if ($prev_id)
$muser = new User($db);
$muser->fetch($bon->user_trans);
print '<tr><td width="20%">'.$langs->trans("TransData").'</td><td>';
print '<tr><td>'.$langs->trans("TransData").'</td><td>';
print dol_print_date($bon->date_trans,'day');
print ' '.$langs->trans("By").' '.$muser->getFullName($langs).'</td></tr>';
print '<tr><td width="20%">'.$langs->trans("TransMetod").'</td><td>';
print '<tr><td>'.$langs->trans("TransMetod").'</td><td>';
print $bon->methodes_trans[$bon->method_trans];
print '</td></tr>';
}
if($bon->date_credit <> 0)
{
print '<tr><td width="20%">'.$langs->trans('CreditDate').'</td><td>';
print '<tr><td>'.$langs->trans('CreditDate').'</td><td>';
print dol_print_date($bon->date_credit,'day');
print '</td></tr>';
}
@ -89,7 +89,7 @@ if ($prev_id)
print '<br>';
print '<table class="border" width="100%"><tr><td width="20%">';
print '<table class="border" width="100%"><tr><td class="titlefield">';
print $langs->trans("WithdrawalFile").'</td><td>';
$relativepath = 'receipts/'.$bon->ref.'.xml';
print '<a data-ajax="false" href="'.DOL_URL_ROOT.'/document.php?type=text/plain&amp;modulepart=prelevement&amp;file='.urlencode($relativepath).'">'.$relativepath.'</a>';

View File

@ -125,9 +125,9 @@ class Contact extends CommonObject
$sql.= " FROM ".MAIN_DB_PREFIX."socpeople as sp";
if (!$user->rights->societe->client->voir && !$user->societe_id)
{
$sql.= " OUTER JOIN ".MAIN_DB_PREFIX."societe as s ON sp.fk_soc = s.rowid";
$sql.= " OUTER JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON s.rowid = sc.fk_soc";
$sql.= " WHERE sc.fk_user = " .$user->id;
$sql.= ", ".MAIN_DB_PREFIX."societe as s";
$sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
$sql.= " WHERE sp.fk_soc = s.rowid AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
$clause = "AND";
}
$sql.= ' '.$clause.' sp.entity IN ('.getEntity($this->element, 1).')';

View File

@ -70,15 +70,12 @@ class box_services_contracts extends ModeleBoxes
$sql.= " cd.rowid as cdid, cd.tms as datem, cd.statut, cd.label, cd.description, cd.product_type as type,";
$sql.= " p.rowid as product_id, p.ref as product_ref";
$sql.= " FROM (".MAIN_DB_PREFIX."societe as s";
$sql.= ", ".MAIN_DB_PREFIX."contrat as c";
$sql.= ", ".MAIN_DB_PREFIX."contratdet as cd";
$sql.= " INNER JOIN ".MAIN_DB_PREFIX."contrat as c ON s.rowid = c.fk_soc";
$sql.= " INNER JOIN ".MAIN_DB_PREFIX."contratdet as cd ON c.rowid = cd.fk_contrat";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."product as p ON cd.fk_product = p.rowid";
if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= "INNER JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
$sql.= ")";
$sql.= " WHERE c.entity = ".$conf->entity;
$sql.= " AND s.rowid = c.fk_soc";
$sql.= " AND c.rowid = cd.fk_contrat";
if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
if($user->societe_id) $sql.= " AND s.rowid = ".$user->societe_id;
$sql.= $db->order("c.tms","DESC");
$sql.= $db->plimit($max, 0);

View File

@ -1443,7 +1443,13 @@ class Form
if ($includeUsers) $sql.= " AND u.rowid IN (".$includeUsers.")";
if (! empty($conf->global->USER_HIDE_INACTIVE_IN_COMBOBOX) || $noactive) $sql.= " AND u.statut <> 0";
if (! empty($morefilter)) $sql.=" ".$morefilter;
$sql.= " ORDER BY u.lastname ASC";
if(empty($conf->global->MAIN_FIRSTNAME_NAME_POSITION)){
$sql.= " ORDER BY u.firstname ASC";
}else{
$sql.= " ORDER BY u.lastname ASC";
}
dol_syslog(get_class($this)."::select_dolusers", LOG_DEBUG);
$resql=$this->db->query($sql);
@ -1494,7 +1500,12 @@ class Form
$out.= '>';
}
$out.= $userstatic->getFullName($langs, 0, -1, $maxlength);
$fullNameMode = 0; //Lastname + firstname
if(empty($conf->global->MAIN_FIRSTNAME_NAME_POSITION)){
$fullNameMode = 1; //firstname + lastname
}
$out.= $userstatic->getFullName($langs, $fullNameMode, -1, $maxlength);
// Complete name with more info
$moreinfo=0;
if (! empty($conf->global->MAIN_SHOW_LOGIN))
@ -5311,7 +5322,7 @@ class Form
{
$nbofdifferenttypes = count($object->linkedObjects);
print '<br>';
print '<br><!-- showLinkedObjectBlock -->';
print load_fiche_titre($langs->trans('RelatedObjects'), $morehtmlright, '');
print '<table class="noborder allwidth">';
@ -5403,7 +5414,7 @@ class Form
if (! $nboftypesoutput)
{
print '<tr><td class="opacitymedium" colspan="7">'.$langs->trans("None").'</td></tr>';
print '<tr><td class="impair opacitymedium" colspan="7">'.$langs->trans("None").'</td></tr>';
}
print '</table>';

View File

@ -50,13 +50,14 @@ class FormAccounting
* @param int $useempty Set to 1 if we want an empty value
* @param int $maxlen Max length of text in combo box
* @param int $help Add or not the admin help picto
* @param int $allcountries All countries
* @return void
*/
function select_accounting_category($selected='',$htmlname='account_category', $useempty=0, $maxlen=64, $help=1)
function select_accounting_category($selected='',$htmlname='account_category', $useempty=0, $maxlen=0, $help=1, $allcountries=0)
{
global $db,$langs,$user,$mysoc;
if (empty($mysoc->country_id) && empty($mysoc->country_code))
if (empty($mysoc->country_id) && empty($mysoc->country_code) && empty($allcountries))
{
dol_print_error('','Call to select_accounting_account with mysoc country not yet defined');
exit;
@ -68,7 +69,7 @@ class FormAccounting
$sql.= " FROM ".MAIN_DB_PREFIX."c_accounting_category as c";
$sql.= " WHERE c.active = 1";
$sql.= " AND c.category_type = 0";
$sql.= " AND c.fk_country = ".$mysoc->country_id;
if (empty($allcountries)) $sql.= " AND c.fk_country = ".$mysoc->country_id;
$sql.= " ORDER BY c.label ASC";
}
else
@ -78,7 +79,7 @@ class FormAccounting
$sql.= " WHERE c.active = 1";
$sql.= " AND c.category_type = 0";
$sql.= " AND c.fk_country = co.rowid";
$sql.= " AND co.code = '".$mysoc->country_code."'";
if (empty($allcountries)) $sql.= " AND co.code = '".$mysoc->country_code."'";
$sql.= " ORDER BY c.label ASC";
}
@ -89,7 +90,7 @@ class FormAccounting
$num = $db->num_rows($resql);
if ($num)
{
print '<select class="flat" name="'.$htmlname.'">';
print '<select class="flat minwidth200" name="'.$htmlname.'">';
$i = 0;
if ($useempty) print '<option value="0">&nbsp;</option>';
@ -98,7 +99,7 @@ class FormAccounting
$obj = $db->fetch_object($resql);
print '<option value="'.$obj->rowid.'"';
if ($obj->rowid == $selected) print ' selected';
print '>'.dol_trunc($obj->type,$maxlen);
print '>'.($maxlen ? dol_trunc($obj->type,$maxlen) : $obj->type);
print ' ('.$obj->range_account.')';
$i++;
}

View File

@ -328,7 +328,7 @@ class FormMail extends Form
$out.= $langs->trans('SelectMailModel').': '.$this->selectarray('modelmailselected', $modelmail_array, 0, 1);
if ($user->admin) $out.= info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1);
$out.= ' &nbsp; ';
$out.= '<input class="button" type="submit" value="'.$langs->trans('Use').'" name="modelselected" id="modelselected">';
$out.= '<input class="button" type="submit" value="'.$langs->trans('Apply').'" name="modelselected" id="modelselected">';
$out.= ' &nbsp; ';
$out.= '</div>';
}
@ -342,7 +342,7 @@ class FormMail extends Form
$out.= $langs->trans('SelectMailModel').': <select name="modelmailselected" disabled="disabled"><option value="none">'.$langs->trans("NoTemplateDefined").'</option></select>'; // Do not put disabled on option, it is already on select and it makes chrome crazy.
if ($user->admin) $out.= info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1);
$out.= ' &nbsp; ';
$out.= '<input class="button" type="submit" value="'.$langs->trans('Use').'" name="modelselected" disabled="disabled" id="modelselected">';
$out.= '<input class="button" type="submit" value="'.$langs->trans('Apply').'" name="modelselected" disabled="disabled" id="modelselected">';
$out.= ' &nbsp; ';
$out.= '</div>';
}

View File

@ -146,9 +146,10 @@ class Utils
* @param string $type 'mysql', 'postgresql', ...
* @param int $usedefault 1=Use default backup profile (Set this to 1 when used as cron)
* @param string $file 'auto' or filename to build
* @param int $keeplastnfiles Keep only last n files (not used yet)
* @return int 0 if OK, < 0 if KO (this function is used also by cron so only 0 is OK)
*/
function dumpDatabase($compression='none', $type='auto', $usedefault=1, $file='auto')
function dumpDatabase($compression='none', $type='auto', $usedefault=1, $file='auto', $keeplastnfiles=0)
{
global $db, $conf, $langs, $dolibarr_main_data_root;
global $dolibarr_main_db_name, $dolibarr_main_db_host, $dolibarr_main_db_user, $dolibarr_main_db_port, $dolibarr_main_db_pass;

View File

@ -763,6 +763,11 @@ function activateModule($value,$withdeps=1)
return $ret;
}
$const_name = $objMod->const_name;
if(!empty($conf->global->$const_name)){
return $ret;
}
$result=$objMod->init();
if ($result <= 0)
{
@ -784,7 +789,13 @@ function activateModule($value,$withdeps=1)
if (file_exists($dir.$objMod->depends[$i].".class.php"))
{
$resarray = activateModule($objMod->depends[$i]);
if (empty($resarray['errors'])) $activate = true;
if (empty($resarray['errors'])){
$activate = true;
}else{
foreach ($resarray['errors'] as $errorMessage){
dol_syslog($errorMessage, LOG_ERR);
}
}
break;
}
}

View File

@ -436,13 +436,23 @@ function dolCopyDir($srcfile, $destfile, $newmask, $overwriteifexists)
$result=0;
dol_syslog("files.lib.php::dolCopyr srcfile=".$srcfile." destfile=".$destfile." newmask=".$newmask." overwriteifexists=".$overwriteifexists);
dol_syslog("files.lib.php::dolCopyDir srcfile=".$srcfile." destfile=".$destfile." newmask=".$newmask." overwriteifexists=".$overwriteifexists);
if (empty($srcfile) || empty($destfile)) return -1;
$destexists=dol_is_dir($destfile);
if (! $overwriteifexists && $destexists) return 0;
if (! $destexists)
{
// We must set mask just before creating dir, becaause it can be set differently by dol_copy
umask(0);
$dirmaskdec=octdec($newmask);
if (empty($newmask) && ! empty($conf->global->MAIN_UMASK)) $dirmaskdec=octdec($conf->global->MAIN_UMASK);
$dirmaskdec |= octdec('0200'); // Set w bit required to be able to create content for recursive subdirs files
dol_mkdir($destfile."/".$file, '', decoct($dirmaskdec));
}
$srcfile=dol_osencode($srcfile);
$destfile=dol_osencode($destfile);
@ -459,6 +469,7 @@ function dolCopyDir($srcfile, $destfile, $newmask, $overwriteifexists)
{
if (!is_dir($destfile."/".$file))
{
// We must set mask just before creating dir, becaause it can be set differently by dol_copy
umask(0);
$dirmaskdec=octdec($newmask);
if (empty($newmask) && ! empty($conf->global->MAIN_UMASK)) $dirmaskdec=octdec($conf->global->MAIN_UMASK);

View File

@ -1,18 +1,18 @@
<?php
/* Copyright (C) 2000-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2003 Jean-Louis Bergamo <jlb@j1b.org>
* Copyright (C) 2004-2013 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
* Copyright (C) 2004 Christophe Combelles <ccomb@free.fr>
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
* Copyright (C) 2010-2016 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
* Copyright (C) 2013 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
* Copyright (C) 2014 Cédric GROSS <c.gross@kreiz-it.fr>
* Copyright (C) 2014-2015 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
/* Copyright (C) 2000-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2003 Jean-Louis Bergamo <jlb@j1b.org>
* Copyright (C) 2004-2013 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
* Copyright (C) 2004 Christophe Combelles <ccomb@free.fr>
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
* Copyright (C) 2010-2016 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
* Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@zendsi.com>
* Copyright (C) 2014 Cédric GROSS <c.gross@kreiz-it.fr>
* Copyright (C) 2014-2015 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
*
* 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
@ -271,8 +271,13 @@ function GETPOST($paramname,$check='',$method=0,$filter=NULL,$options=NULL)
}
elseif ($reg[1] == 'YEAR')
{
$tmp=dol_getdate(dol_now(), true);
$out = $tmp['year'];
$tmp=dol_getdate(dol_now(), true);
$out = $tmp['year'];
}
elseif ($reg[1] == 'MYCOUNTRYID')
{
global $mysoc;
$out = $mysoc->country_id;
}
}
@ -980,11 +985,11 @@ function dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='r
$showbarcode=empty($conf->barcode->enabled)?0:($object->barcode?1:0);
if (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->barcode->lire_advance)) $showbarcode=0;
$modulepart='unknown';
if ($object->element == 'societe') $modulepart='societe';
if ($object->element == 'contact') $modulepart='contact';
if ($object->element == 'member') $modulepart='memberphoto';
if ($object->element == 'user') $modulepart='userphoto';
if ($object->element == 'product') $modulepart='product';
if ($object->element == 'societe') $modulepart='societe';
if ($object->element == 'contact') $modulepart='contact';
if ($object->element == 'member') $modulepart='memberphoto';
if ($object->element == 'user') $modulepart='userphoto';
if ($object->element == 'product') $modulepart='product';
if ($object->element == 'product')
{
@ -1003,7 +1008,6 @@ function dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='r
$nophoto='/public/theme/common/nophoto.png';
$morehtmlleft.='<div class="floatleft inline-block valignmiddle divphotoref"><img class="photo'.$modulepart.($cssclass?' '.$cssclass:'').'" alt="No photo" border="0"'.($width?' width="'.$width.'"':'').($height?' height="'.$height.'"':'').' src="'.DOL_URL_ROOT.$nophoto.'"></div>';
}
}
}
else
@ -1088,7 +1092,11 @@ function dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='r
$morehtmlstatus.=$tmptxt;
}
if (! empty($object->name_alias)) $morehtmlref.='<div class="refidno">'.$object->name_alias.'</div>'; // For thirdparty
if ($object->element == 'product' && ! empty($object->label)) $morehtmlref.='<div class="refidno">'.$object->label.'</div>';
if ($object->element == 'product' || $object->element == 'bank_account')
{
if(! empty($object->label)) $morehtmlref.='<div class="refidno">'.$object->label.'</div>';
}
if ($object->element != 'product' && $object->element != 'bookmark')
{

View File

@ -34,7 +34,8 @@ function propal_prepare_head($object)
global $db, $langs, $conf, $user;
$langs->load("propal");
$langs->load("compta");
$langs->load("companies");
$h = 0;
$head = array();

View File

@ -97,7 +97,7 @@ function tree_showpad(&$fulltree,$key,$silent=0)
// ------------------------------- Used by menu editor, category view, ... -----------------
/**
* Recursive function to output menu tree. <ul id="iddivjstree"><li>...</li></ul>
* Recursive function to output a tree. <ul id="iddivjstree"><li>...</li></ul>
* It is also used for the tree of categories.
* Note: To have this function working, check you have loaded the js and css for treeview.
* $arrayofjs=array('/includes/jquery/plugins/jquerytreeview/jquery.treeview.js',
@ -106,7 +106,7 @@ function tree_showpad(&$fulltree,$key,$silent=0)
* TODO Replace with jstree plugin instead of treeview plugin.
*
* @param array $tab Array of all elements
* @param int $pere Array with parent ids ('rowid'=>,'mainmenu'=>,'leftmenu'=>,'fk_mainmenu=>,'fk_leftmenu=>)
* @param array $pere Array with parent ids ('rowid'=>,'mainmenu'=>,'leftmenu'=>,'fk_mainmenu=>,'fk_leftmenu=>)
* @param int $rang Level of element
* @param string $iddivjstree Id to use for parent ul element
* @param int $donoresetalreadyloaded Do not reset global array $donoresetalreadyloaded used to avoid to go down on an aleady processed record
@ -139,7 +139,10 @@ function tree_recur($tab, $pere, $rang, $iddivjstree='iddivjstree', $donoresetal
print '<ul id="'.$iddivjstree.'">';
}
if ($rang > 50) return; // Protect against infinite loop. Max 50 depth
if ($rang > 50)
{
return; // Protect against infinite loop. Max 50 depth
}
//ballayage du tableau
$sizeoftab=count($tab);

View File

@ -60,7 +60,7 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="admintools"', __HANDLER__, 'left', 310__+MAX_llx_menu__, 'home', '', 300__+MAX_llx_menu__, '/support/index.php?leftmenu=admintools', 'HelpCenter', 1, 'help', '', '_blank', 2, 13, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="admintools"', __HANDLER__, 'left', 311__+MAX_llx_menu__, 'home', '', 300__+MAX_llx_menu__, '/admin/system/about.php?leftmenu=admintools', 'About', 1, 'admin', '', '', 2, 14, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="admintools"', __HANDLER__, 'left', 320__+MAX_llx_menu__, 'home', '', 300__+MAX_llx_menu__, '/product/admin/product_tools.php?mainmenu=home&amp;leftmenu=admintools', 'ProductVatMassChange', 1, 'products', '', '', 2, 0, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="admintools"', __HANDLER__, 'left', 320__+MAX_llx_menu__, 'home', '', 300__+MAX_llx_menu__, '/product/admin/product_tools.php?mainmenu=home&amp;leftmenu=admintools', 'ProductVatMassChange', 1, 'products', '', '', 2, 15, __ENTITY__);
-- Home - Menu users and groups
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '1', __HANDLER__, 'left', 400__+MAX_llx_menu__, 'home', 'users', 1__+MAX_llx_menu__, '/user/home.php?leftmenu=users', 'MenuUsersAndGroups', 0, 'users', '', '', 2, 4, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="users"', __HANDLER__, 'left', 401__+MAX_llx_menu__, 'home', '', 400__+MAX_llx_menu__, '/user/index.php?leftmenu=users', 'Users', 1, 'users', '$user->rights->user->user->lire || $user->admin', '', 2, 0, __ENTITY__);
@ -214,11 +214,12 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled', __HANDLER__, 'left', 2451__+MAX_llx_menu__, 'accountancy', 'accountancy_admin', 2400__+MAX_llx_menu__, '/accountancy/index.php?mainmenu=accountancy&leftmenu=accountancy_admin', 'Setup', 1, 'accountancy', '$user->rights->accounting->chartofaccount', '', 0, 1, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $leftmenu=="accountancy_admin"', __HANDLER__, 'left', 2455__+MAX_llx_menu__, 'accountancy', 'accountancy_admin_chartmodel', 2451__+MAX_llx_menu__, '/accountancy/admin/account.php?mainmenu=accountancy&leftmenu=accountancy_admin', 'Pcg_version', 2, 'accountancy', '$user->rights->accounting->chartofaccount', '', 0, 10, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $leftmenu=="accountancy_admin"', __HANDLER__, 'left', 2456__+MAX_llx_menu__, 'accountancy', 'accountancy_admin_chart', 2451__+MAX_llx_menu__, '/accountancy/admin/account.php?mainmenu=accountancy&leftmenu=accountancy_admin', 'Chartofaccounts', 2, 'accountancy', '$user->rights->accounting->chartofaccount', '', 0, 20, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $leftmenu=="accountancy_admin"', __HANDLER__, 'left', 2457__+MAX_llx_menu__, 'accountancy', 'accountancy_admin_default', 2451__+MAX_llx_menu__, '/accountancy/admin/index.php?mainmenu=accountancy&leftmenu=accountancy_admin', 'MenuDefaultAccounts', 2, 'accountancy', '$user->rights->accounting->chartofaccount', '', 0, 30, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $leftmenu=="accountancy_admin"', __HANDLER__, 'left', 2458__+MAX_llx_menu__, 'accountancy', 'accountancy_admin_vat', 2451__+MAX_llx_menu__, '/admin/dict.php?id=10&from=accountancy&search_country_id='.$mysoc->country_id.'&mainmenu=accountancy&leftmenu=accountancy_admin', 'MenuVatAccounts', 2, 'accountancy', '$user->rights->accounting->chartofaccount', '', 0, 40, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $leftmenu=="accountancy_admin"', __HANDLER__, 'left', 2459__+MAX_llx_menu__, 'accountancy', 'accountancy_admin_tax', 2451__+MAX_llx_menu__, '/admin/dict.php?id=7&from=accountancy&search_country_id='.$mysoc->country_id.'&mainmenu=accountancy&leftmenu=accountancy_admin', 'MenuTaxAccounts', 2, 'accountancy', '$user->rights->accounting->chartofaccount', '', 0, 50, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $leftmenu=="accountancy_admin"', __HANDLER__, 'left', 2460__+MAX_llx_menu__, 'accountancy', 'accountancy_admin_expensereport', 2451__+MAX_llx_menu__, '/admin/dict.php?id=17&from=accountancy&mainmenu=accountancy&leftmenu=accountancy_admin', 'MenuExpenseReportAccounts', 2, 'accountancy', '$user->rights->accounting->chartofaccount', '', 0, 60, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $leftmenu=="accountancy_admin"', __HANDLER__, 'left', 2461__+MAX_llx_menu__, 'accountancy', 'accountancy_admin_product', 2451__+MAX_llx_menu__, '/accountancy/admin/productaccount.php?mainmenu=accountancy&leftmenu=accountancy_admin', 'MenuProductsAccounts', 2, 'accountancy', '$user->rights->accounting->chartofaccount', '', 0, 70, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $leftmenu=="accountancy_admin"', __HANDLER__, 'left', 2457__+MAX_llx_menu__, 'accountancy', 'accountancy_admin_chart_group', 2451__+MAX_llx_menu__, '/accountancy/admin/categories_list.php?id=32&mainmenu=accountancy&leftmenu=accountancy_admin', 'AccountingCategory', 2, 'accountancy', '$user->rights->accounting->chartofaccount', '', 0, 22, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $leftmenu=="accountancy_admin"', __HANDLER__, 'left', 2458__+MAX_llx_menu__, 'accountancy', 'accountancy_admin_default', 2451__+MAX_llx_menu__, '/accountancy/admin/defaultaccounts.php?mainmenu=accountancy&leftmenu=accountancy_admin', 'MenuDefaultAccounts', 2, 'accountancy', '$user->rights->accounting->chartofaccount', '', 0, 30, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $leftmenu=="accountancy_admin"', __HANDLER__, 'left', 2459__+MAX_llx_menu__, 'accountancy', 'accountancy_admin_vat', 2451__+MAX_llx_menu__, '/admin/dict.php?id=10&from=accountancy&search_country_id=__MYCOUNTRYID__&mainmenu=accountancy&leftmenu=accountancy_admin', 'MenuVatAccounts', 2, 'accountancy', '$user->rights->accounting->chartofaccount', '', 0, 40, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $leftmenu=="accountancy_admin"', __HANDLER__, 'left', 2460__+MAX_llx_menu__, 'accountancy', 'accountancy_admin_tax', 2451__+MAX_llx_menu__, '/admin/dict.php?id=7&from=accountancy&search_country_id=__MYCOUNTRYID__&mainmenu=accountancy&leftmenu=accountancy_admin', 'MenuTaxAccounts', 2, 'accountancy', '$user->rights->accounting->chartofaccount', '', 0, 50, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $leftmenu=="accountancy_admin"', __HANDLER__, 'left', 2461__+MAX_llx_menu__, 'accountancy', 'accountancy_admin_expensereport', 2451__+MAX_llx_menu__, '/admin/dict.php?id=17&from=accountancy&mainmenu=accountancy&leftmenu=accountancy_admin', 'MenuExpenseReportAccounts', 2, 'accountancy', '$user->rights->accounting->chartofaccount', '', 0, 60, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $leftmenu=="accountancy_admin"', __HANDLER__, 'left', 2462__+MAX_llx_menu__, 'accountancy', 'accountancy_admin_product', 2451__+MAX_llx_menu__, '/accountancy/admin/productaccount.php?mainmenu=accountancy&leftmenu=accountancy_admin', 'MenuProductsAccounts', 2, 'accountancy', '$user->rights->accounting->chartofaccount', '', 0, 70, __ENTITY__);
-- Binding
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled', __HANDLER__, 'left', 2401__+MAX_llx_menu__, 'accountancy', 'dispatch_customer', 2400__+MAX_llx_menu__, '/accountancy/customer/index.php?leftmenu=dispatch_customer', 'CustomersVentilation', 1, 'accountancy', '$user->rights->accounting->bind->write', '', 0, 2, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $leftmenu=="dispatch_customer"', __HANDLER__, 'left', 2402__+MAX_llx_menu__, 'accountancy', '', 2401__+MAX_llx_menu__, '/accountancy/customer/list.php', 'ToDispatch', 2, 'accountancy', '$user->rights->accounting->bind->write', '', 0, 3, __ENTITY__);
@ -245,7 +246,7 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $leftmenu=="ca"', __HANDLER__, 'left', 2446__+MAX_llx_menu__, 'accountancy', '', 2440__+MAX_llx_menu__, '/compta/stats/cabyuser.php?leftmenu=ca', 'ByUsers', 3, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 23, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $leftmenu=="ca"', __HANDLER__, 'left', 2447__+MAX_llx_menu__, 'accountancy', '', 2440__+MAX_llx_menu__, '/compta/stats/cabyprodserv.php?leftmenu=ca', 'ByProductsAndServices', 3, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 24, __ENTITY__);
-- Accounting period
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled', __HANDLER__, 'left', 115__+MAX_llx_menu__, 'accountancy', 'accountancy_admin_period', 100__+MAX_llx_menu__, '/accountancy/admin/fiscalyear.php?mainmenu=setup', 'FiscalPeriod', 1, 'admin', '', '', 2, 4, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled', __HANDLER__, 'left', 2450__+MAX_llx_menu__, 'accountancy', 'accountancy_admin_period', 2400__+MAX_llx_menu__, '/accountancy/admin/fiscalyear.php?mainmenu=setup', 'FiscalPeriod', 1, 'admin', '', '', 2, 4, __ENTITY__);
-- Rapports compta simple
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->comptabilite->enabled', __HANDLER__, 'left', 2700__+MAX_llx_menu__, 'accountancy', 'ca', 6__+MAX_llx_menu__, '/compta/resultat/index.php?leftmenu=ca&amp;mainmenu=accountancy', 'Reportings', 0, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 11, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->comptabilite->enabled && $leftmenu=="ca"', __HANDLER__, 'left', 2701__+MAX_llx_menu__, 'accountancy', '', 2700__+MAX_llx_menu__, '/compta/resultat/index.php?leftmenu=ca', 'ReportInOut', 1, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 0, __ENTITY__);

View File

@ -323,7 +323,7 @@ function print_left_auguria_menu($db,$menu_array_before,$menu_array_after,&$tabM
if (! empty($conf->accounting->enabled) && !empty($user->rights->accounting->mouvements->lire) && $mainmenu == 'accountancy') // Entry in accountancy journal for each bank account
{
$newmenu->add('',$langs->trans("Journaux"),0,$user->rights->accounting->comptarapport->lire,'','accountancy','accounting');
$newmenu->add('',$langs->trans("Journalization"),0,$user->rights->accounting->comptarapport->lire,'','accountancy','accountancy');
$sql = "SELECT rowid, label, accountancy_journal";
$sql.= " FROM ".MAIN_DB_PREFIX."bank_account";
@ -341,7 +341,7 @@ function print_left_auguria_menu($db,$menu_array_before,$menu_array_after,&$tabM
while ($i < $numr)
{
$objp = $db->fetch_object($resql);
$newmenu->add('/accountancy/journal/bankjournal.php?id_account='.$objp->rowid,$langs->trans("Journal").' - '.$objp->label,1,$user->rights->accounting->comptarapport->lire,'','accountancy','accounting');
$newmenu->add('/accountancy/journal/bankjournal.php?id_account='.$objp->rowid, $langs->trans("Journal").' - '.$objp->label, 1, $user->rights->accounting->comptarapport->lire,'','accountancy','accountancy_journal');
$i++;
}
}
@ -349,9 +349,9 @@ function print_left_auguria_menu($db,$menu_array_before,$menu_array_after,&$tabM
$db->free($resql);
// Add other journal
$newmenu->add("/accountancy/journal/sellsjournal.php?leftmenu=journal",$langs->trans("SellsJournal"),1,$user->rights->accounting->comptarapport->lire);
$newmenu->add("/accountancy/journal/purchasesjournal.php?leftmenu=journal",$langs->trans("PurchasesJournal"),1,$user->rights->accounting->comptarapport->lire);
$newmenu->add("/accountancy/journal/expensereportsjournal.php?leftmenu=journal",$langs->trans("ExpenseReportsJournal"),1,$user->rights->accounting->comptarapport->lire);
$newmenu->add("/accountancy/journal/sellsjournal.php?leftmenu=journal",$langs->trans("SellsJournal"),1,$user->rights->accounting->comptarapport->lire,'','accountancy','accountancy_journal');
$newmenu->add("/accountancy/journal/purchasesjournal.php?leftmenu=journal",$langs->trans("PurchasesJournal"),1,$user->rights->accounting->comptarapport->lire,'','accountancy','accountancy_journal');
$newmenu->add("/accountancy/journal/expensereportsjournal.php?leftmenu=journal",$langs->trans("ExpenseReportsJournal"),1,$user->rights->accounting->comptarapport->lire,'','accountancy','accountancy_journal');
}
if ($conf->ftp->enabled && $mainmenu == 'ftp') // Entry for FTP

View File

@ -943,6 +943,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
if ($usemenuhider || empty($leftmenu) || preg_match('/accountancy/',$leftmenu)) $newmenu->add("/accountancy/index.php?leftmenu=accountancy_admin", $langs->trans("Setup"),1,$user->rights->accounting->chartofaccount, '', $mainmenu, 'accountancy_admin', 1);
if ($usemenuhider || empty($leftmenu) || preg_match('/accountancy_admin/',$leftmenu)) $newmenu->add("/accountancy/admin/accountmodel.php?id=31&mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("Pcg_version"),2, $user->rights->accounting->chartofaccount, '', $mainmenu, 'accountancy_admin_chartmodel', 10);
if ($usemenuhider || empty($leftmenu) || preg_match('/accountancy_admin/',$leftmenu)) $newmenu->add("/accountancy/admin/account.php?mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("Chartofaccounts"),2, $user->rights->accounting->chartofaccount, '', $mainmenu, 'accountancy_admin_chart', 20);
if ($usemenuhider || empty($leftmenu) || preg_match('/accountancy_admin/',$leftmenu)) $newmenu->add("/accountancy/admin/categories_list.php?id=32&search_country_id=".$mysoc->country_id."&mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("AccountingCategory"),2, $user->rights->accounting->chartofaccount, '', $mainmenu, 'accountancy_admin_chart', 22);
if ($usemenuhider || empty($leftmenu) || preg_match('/accountancy_admin/',$leftmenu)) $newmenu->add("/accountancy/admin/defaultaccounts.php?mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("MenuDefaultAccounts"),2, $user->rights->accounting->chartofaccount, '', $mainmenu, 'accountancy_admin_default', 40);
if (! empty($conf->facture->enabled) || ! empty($conf->fournisseur->enabled))
{
@ -956,11 +957,11 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
{
if (preg_match('/accountancy_admin/',$leftmenu)) $newmenu->add("/admin/dict.php?id=17&from=accountancy&mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("MenuExpenseReportAccounts"),2, $user->rights->accounting->chartofaccount, '', $mainmenu, 'accountancy_admin_default', 30);
}
/* not required yet, already supported by default account
if (! empty($conf->loan->enabled))
{
if ($usemenuhider || empty($leftmenu) || preg_match('/accountancy_admin/',$leftmenu)) $newmenu->add("/admin/loan.php?mainmenu=accountancy&amp;leftmenu=accountancy_admin", $langs->trans("MenuLoanAccounts"), 2, $user->rights->accounting->chartofaccount, '', $mainmenu, 'accountancy_admin_loan', 45);
}
/* not required yet, already supported by default account
if (! empty($conf->don->enabled))
{
if (preg_match('/accountancy_admin/',$leftmenu)) $newmenu->add("/don/admin/donation.php?from=accountancy&mainmenu=accountancy&amp;leftmenu=accountancy_admin", $langs->trans("MenuDonationAccounts"), 2, $user->rights->accounting->chartofaccount, '', $mainmenu, 'accountancy_admin_donation', 47);

View File

@ -113,7 +113,7 @@ class modBarcode extends DolibarrModules
'url'=>'/barcode/codeinit.php?mainmenu=home&leftmenu=admintools',
'langs'=>'products', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
'position'=>300,
'enabled'=>'$conf->barcode->enabled && $leftmenu=="admintools"', // Define condition to show or hide menu entry. Use '$conf->mymodule->enabled' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected.
'enabled'=>'$conf->barcode->enabled && ($leftmenu=="admintools" || $leftmenu=="admintools_info")', // Define condition to show or hide menu entry. Use '$conf->mymodule->enabled' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected.
'perms'=>'($conf->global->MAIN_USE_ADVANCED_PERMS && $user->rights->barcode->creer_advance) || (! $conf->global->MAIN_USE_ADVANCED_PERMS)', // Use 'perms'=>'$user->rights->mymodule->level1->level2' if you want your menu with a permission rules
'target'=>'',
'user'=>0); // 0=Menu for internal users, 1=external users, 2=both

View File

@ -102,7 +102,7 @@ class modCron extends DolibarrModules
// Cronjobs
$this->cronjobs = array(
0=>array('label'=>'PurgeDeleteTemporaryFilesShort', 'jobtype'=>'method', 'class'=>'core/class/utils.class.php', 'objectname'=>'Utils', 'method'=>'purgeFiles', 'parameters'=>'', 'comment'=>'PurgeDeleteTemporaryFiles', 'frequency'=>2, 'unitfrequency'=>3600 * 24 * 7, 'priority'=>10, 'status'=>1, 'test'=>true),
1=>array('label'=>'MakeLocalDatabaseDumpShort', 'jobtype'=>'method', 'class'=>'core/class/utils.class.php', 'objectname'=>'Utils', 'method'=>'dumpDatabase', 'parameters'=>'none', 'comment'=>'MakeLocalDatabaseDump', 'frequency'=>1, 'unitfrequency'=>3600 * 24 * 7, 'priority'=>20, 'status'=>0, 'test'=>in_array($db->type, array('mysql','mysqli'))),
1=>array('label'=>'MakeLocalDatabaseDumpShort', 'jobtype'=>'method', 'class'=>'core/class/utils.class.php', 'objectname'=>'Utils', 'method'=>'dumpDatabase', 'parameters'=>'none,auto,1,auto,10', 'comment'=>'MakeLocalDatabaseDump', 'frequency'=>1, 'unitfrequency'=>3600 * 24 * 7, 'priority'=>20, 'status'=>0, 'test'=>in_array($db->type, array('mysql','mysqli'))),
// 1=>array('label'=>'My label', 'jobtype'=>'command', 'command'=>'', 'parameters'=>'', 'comment'=>'Comment', 'frequency'=>1, 'unitfrequency'=>3600*24)
);
@ -138,7 +138,7 @@ class modCron extends DolibarrModules
'url'=>'/cron/list.php?status=-2&leftmenu=admintools',
'langs'=>'cron', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
'position'=>200,
'enabled'=>'$leftmenu==\'admintools\'', // Define condition to show or hide menu entry. Use '$conf->mymodule->enabled' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected.
'enabled'=>'($leftmenu==\'admintools\' || $leftmenu==\'admintools_info\')', // Define condition to show or hide menu entry. Use '$conf->mymodule->enabled' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected.
'perms'=>'$user->rights->cron->read', // Use 'perms'=>'$user->rights->mymodule->level1->level2' if you want your menu with a permission rules
'target'=>'',
'user'=>2); // 0=Menu for internal users, 1=external users, 2=both

View File

@ -205,11 +205,11 @@ class modFacture extends DolibarrModules
$this->export_label[$r]='CustomersInvoicesAndInvoiceLines'; // Translation key (used only if key ExportDataset_xxx_z not found)
$this->export_icon[$r]='bill';
$this->export_permission[$r]=array(array("facture","facture","export","other"));
$this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.zip'=>'Zip','s.town'=>'Town','c.code'=>'CountryCode','s.phone'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.code_compta'=>'CustomerAccountancyCode','s.code_compta_fournisseur'=>'SupplierAccountancyCode','s.tva_intra'=>'VATIntra','f.rowid'=>"InvoiceId",'f.facnumber'=>"InvoiceRef",'f.datec'=>"InvoiceDateCreation",'f.datef'=>"DateInvoice",'f.date_lim_reglement'=>"DateDue",'f.total'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus','f.note_private'=>"NotePrivate",'f.note_public'=>"NotePublic",'f.fk_user_author'=>'CreatedById','uc.login'=>'CreatedByLogin','f.fk_user_valid'=>'ValidatedById','uv.login'=>'ValidatedByLogin', 'pj.ref'=>'ProjectRef', 'fd.rowid'=>'LineId','fd.description'=>"LineDescription",'fd.subprice'=>"LineUnitPrice",'fd.tva_tx'=>"LineVATRate",'fd.qty'=>"LineQty",'fd.total_ht'=>"LineTotalHT",'fd.total_tva'=>"LineTotalVAT",'fd.total_ttc'=>"LineTotalTTC",'fd.date_start'=>"DateStart",'fd.date_end'=>"DateEnd",'fd.special_code'=>'SpecialCode','fd.product_type'=>"TypeOfLineServiceOrProduct",'fd.fk_product'=>'ProductId','p.ref'=>'ProductRef','p.label'=>'ProductLabel','p.accountancy_code_sell'=>'ProductAccountancySellCode');
$this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.zip'=>'Zip','s.town'=>'Town','c.code'=>'CountryCode','s.phone'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.code_compta'=>'CustomerAccountancyCode','s.code_compta_fournisseur'=>'SupplierAccountancyCode','s.tva_intra'=>'VATIntra','f.rowid'=>"InvoiceId",'f.facnumber'=>"InvoiceRef",'f.type'=>"Type",'f.datec'=>"InvoiceDateCreation",'f.datef'=>"DateInvoice",'f.date_lim_reglement'=>"DateDue",'f.total'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus','f.note_private'=>"NotePrivate",'f.note_public'=>"NotePublic",'f.fk_user_author'=>'CreatedById','uc.login'=>'CreatedByLogin','f.fk_user_valid'=>'ValidatedById','uv.login'=>'ValidatedByLogin', 'pj.ref'=>'ProjectRef', 'fd.rowid'=>'LineId','fd.description'=>"LineDescription",'fd.subprice'=>"LineUnitPrice",'fd.tva_tx'=>"LineVATRate",'fd.qty'=>"LineQty",'fd.total_ht'=>"LineTotalHT",'fd.total_tva'=>"LineTotalVAT",'fd.total_ttc'=>"LineTotalTTC",'fd.date_start'=>"DateStart",'fd.date_end'=>"DateEnd",'fd.special_code'=>'SpecialCode','fd.product_type'=>"TypeOfLineServiceOrProduct",'fd.fk_product'=>'ProductId','p.ref'=>'ProductRef','p.label'=>'ProductLabel','p.accountancy_code_sell'=>'ProductAccountancySellCode');
//Add 'fd.label'=>"Label" to export_fields_array if you use it. Not used by dolibarr currently.
//$this->export_TypeFields_array[$r]=array('s.rowid'=>"List:societe:nom",'s.nom'=>'Text','s.address'=>'Text','s.zip'=>'Text','s.town'=>'Text','c.code'=>'Text','s.phone'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.code_compta'=>'Text','s.code_compta_fournisseur'=>'Text','s.tva_intra'=>'Text','f.facnumber'=>"Text",'f.datec'=>"Date",'f.datef'=>"Date",'f.date_lim_reglement'=>"Date",'f.total'=>"Numeric",'f.total_ttc'=>"Numeric",'f.tva'=>"Numeric",'f.paye'=>"Boolean",'f.fk_statut'=>'Status','f.note_private'=>"Text",'f.note_public'=>"Text",'fd.description'=>"Text",'fd.price'=>"Numeric",'fd.tva_tx'=>"Numeric",'fd.qty'=>"Numeric",'fd.total_ht'=>"Numeric",'fd.total_tva'=>"Numeric",'fd.total_ttc'=>"Numeric",'fd.date_start'=>"Date",'fd.date_end'=>"Date",'fd.product_type'=>"Numeric",'fd.fk_product'=>'List:product:label','p.ref'=>'Text','p.label'=>'Text');
$this->export_TypeFields_array[$r]=array('s.rowid'=>'Numeric','s.nom'=>'Text','s.address'=>'Text','s.zip'=>'Text','s.town'=>'Text','c.code'=>'Text','s.phone'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.code_compta'=>'Text','s.code_compta_fournisseur'=>'Text','s.tva_intra'=>'Text','f.rowid'=>'Numeric','f.facnumber'=>"Text",'f.datec'=>"Date",'f.datef'=>"Date",'f.date_lim_reglement'=>"Date",'f.total'=>"Numeric",'f.total_ttc'=>"Numeric",'f.tva'=>"Numeric",'f.paye'=>"Boolean",'f.fk_statut'=>'Numeric','f.note_private'=>"Text",'f.note_public'=>"Text",'f.fk_user_author'=>'Numeric','uc.login'=>'Text','f.fk_user_valid'=>'Numeric','uv.login'=>'Text','pj.ref'=>'Text','fd.rowid'=>'Numeric','fd.label'=>'Text','fd.description'=>"Text",'fd.subprice'=>"Numeric",'fd.tva_tx'=>"Numeric",'fd.qty'=>"Numeric",'fd.total_ht'=>"Numeric",'fd.total_tva'=>"Numeric",'fd.total_ttc'=>"Numeric",'fd.date_start'=>"Date",'fd.date_end'=>"Date",'fd.special_code'=>'Numeric','fd.product_type'=>"Numeric",'fd.fk_product'=>'List:product:label','p.ref'=>'Text','p.label'=>'Text','p.accountancy_code_sell'=>'Text');
$this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.zip'=>'company','s.town'=>'company','c.code'=>'company','s.phone'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.code_compta'=>'company','s.code_compta_fournisseur'=>'company','s.tva_intra'=>'company','f.rowid'=>"invoice",'f.facnumber'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.date_lim_reglement'=>"invoice",'f.total'=>"invoice",'f.total_ttc'=>"invoice",'f.tva'=>"invoice",'f.paye'=>"invoice",'f.fk_statut'=>'invoice','f.note_private'=>"invoice",'f.note_public'=>"invoice", 'pj.ref'=>'project', 'fd.rowid'=>'invoice_line','fd.label'=>"invoice_line",'fd.description'=>"invoice_line",'fd.subprice'=>"invoice_line",'fd.total_ht'=>"invoice_line",'fd.total_tva'=>"invoice_line",'fd.total_ttc'=>"invoice_line",'fd.tva_tx'=>"invoice_line",'fd.qty'=>"invoice_line",'fd.date_start'=>"invoice_line",'fd.date_end'=>"invoice_line",'fd.special_code'=>'invoice_line','fd.product_type'=>'invoice_line','fd.fk_product'=>'product','p.ref'=>'product','p.label'=>'product','p.accountancy_code_sell'=>'product','f.fk_user_author'=>'user','uc.login'=>'user','f.fk_user_valid'=>'user','uv.login'=>'user');
$this->export_TypeFields_array[$r]=array('s.rowid'=>'Numeric','s.nom'=>'Text','s.address'=>'Text','s.zip'=>'Text','s.town'=>'Text','c.code'=>'Text','s.phone'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.code_compta'=>'Text','s.code_compta_fournisseur'=>'Text','s.tva_intra'=>'Text','f.rowid'=>'Numeric','f.facnumber'=>"Text",'f.type'=>"Numeric",'f.datec'=>"Date",'f.datef'=>"Date",'f.date_lim_reglement'=>"Date",'f.total'=>"Numeric",'f.total_ttc'=>"Numeric",'f.tva'=>"Numeric",'f.paye'=>"Boolean",'f.fk_statut'=>'Numeric','f.note_private'=>"Text",'f.note_public'=>"Text",'f.fk_user_author'=>'Numeric','uc.login'=>'Text','f.fk_user_valid'=>'Numeric','uv.login'=>'Text','pj.ref'=>'Text','fd.rowid'=>'Numeric','fd.label'=>'Text','fd.description'=>"Text",'fd.subprice'=>"Numeric",'fd.tva_tx'=>"Numeric",'fd.qty'=>"Numeric",'fd.total_ht'=>"Numeric",'fd.total_tva'=>"Numeric",'fd.total_ttc'=>"Numeric",'fd.date_start'=>"Date",'fd.date_end'=>"Date",'fd.special_code'=>'Numeric','fd.product_type'=>"Numeric",'fd.fk_product'=>'List:product:label','p.ref'=>'Text','p.label'=>'Text','p.accountancy_code_sell'=>'Text');
$this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.zip'=>'company','s.town'=>'company','c.code'=>'company','s.phone'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.code_compta'=>'company','s.code_compta_fournisseur'=>'company','s.tva_intra'=>'company','f.rowid'=>"invoice",'f.facnumber'=>"invoice",'f.type'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.date_lim_reglement'=>"invoice",'f.total'=>"invoice",'f.total_ttc'=>"invoice",'f.tva'=>"invoice",'f.paye'=>"invoice",'f.fk_statut'=>'invoice','f.note_private'=>"invoice",'f.note_public'=>"invoice", 'pj.ref'=>'project', 'fd.rowid'=>'invoice_line','fd.label'=>"invoice_line",'fd.description'=>"invoice_line",'fd.subprice'=>"invoice_line",'fd.total_ht'=>"invoice_line",'fd.total_tva'=>"invoice_line",'fd.total_ttc'=>"invoice_line",'fd.tva_tx'=>"invoice_line",'fd.qty'=>"invoice_line",'fd.date_start'=>"invoice_line",'fd.date_end'=>"invoice_line",'fd.special_code'=>'invoice_line','fd.product_type'=>'invoice_line','fd.fk_product'=>'product','p.ref'=>'product','p.label'=>'product','p.accountancy_code_sell'=>'product','f.fk_user_author'=>'user','uc.login'=>'user','f.fk_user_valid'=>'user','uv.login'=>'user');
$this->export_dependencies_array[$r]=array('invoice_line'=>'fd.rowid','product'=>'fd.rowid'); // To add unique key if we ask a field of a child to avoid the DISTINCT to discard them
$keyforselect='facture'; $keyforelement='invoice'; $keyforaliasextra='extra';
include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php';
@ -239,10 +239,10 @@ class modFacture extends DolibarrModules
$this->export_label[$r]='CustomersInvoicesAndPayments'; // Translation key (used only if key ExportDataset_xxx_z not found)
$this->export_icon[$r]='bill';
$this->export_permission[$r]=array(array("facture","facture","export"));
$this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.zip'=>'Zip','s.town'=>'Town','c.code'=>'CountryCode','s.phone'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.code_compta'=>'CustomerAccountancyCode','s.code_compta_fournisseur'=>'SupplierAccountancyCode','s.tva_intra'=>'VATIntra','f.rowid'=>"InvoiceId",'f.facnumber'=>"InvoiceRef",'f.datec'=>"InvoiceDateCreation",'f.datef'=>"DateInvoice",'f.date_lim_reglement'=>"DateDue",'f.total'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus','f.note_private'=>"NotePrivate",'f.note_public'=>"NotePublic",'f.fk_user_author'=>'CreatedById','uc.login'=>'CreatedByLogin','f.fk_user_valid'=>'ValidatedById','uv.login'=>'ValidatedByLogin','pj.ref'=>'ProjectRef','p.rowid'=>'PaymentId','p.ref'=>'PaymentRef','p.amount'=>'AmountPayment','pf.amount'=>'AmountPaymentDistributedOnInvoice','p.datep'=>'DatePayment','p.num_paiement'=>'PaymentNumber','pt.code'=>'IdPaymentMode','pt.libelle'=>'LabelPaymentMode','p.note'=>'PaymentNote','p.fk_bank'=>'IdTransaction','ba.ref'=>'AccountRef');
$this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.zip'=>'Zip','s.town'=>'Town','c.code'=>'CountryCode','s.phone'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.code_compta'=>'CustomerAccountancyCode','s.code_compta_fournisseur'=>'SupplierAccountancyCode','s.tva_intra'=>'VATIntra','f.rowid'=>"InvoiceId",'f.facnumber'=>"InvoiceRef",'f.type'=>"Type",'f.datec'=>"InvoiceDateCreation",'f.datef'=>"DateInvoice",'f.date_lim_reglement'=>"DateDue",'f.total'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus','f.note_private'=>"NotePrivate",'f.note_public'=>"NotePublic",'f.fk_user_author'=>'CreatedById','uc.login'=>'CreatedByLogin','f.fk_user_valid'=>'ValidatedById','uv.login'=>'ValidatedByLogin','pj.ref'=>'ProjectRef','p.rowid'=>'PaymentId','p.ref'=>'PaymentRef','p.amount'=>'AmountPayment','pf.amount'=>'AmountPaymentDistributedOnInvoice','p.datep'=>'DatePayment','p.num_paiement'=>'PaymentNumber','pt.code'=>'IdPaymentMode','pt.libelle'=>'LabelPaymentMode','p.note'=>'PaymentNote','p.fk_bank'=>'IdTransaction','ba.ref'=>'AccountRef');
//$this->export_TypeFields_array[$r]=array('s.rowid'=>"List:societe:nom",'s.nom'=>'Text','s.address'=>'Text','s.zip'=>'Text','s.town'=>'Text','c.code'=>'Text','s.phone'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.code_compta'=>'Text','s.code_compta_fournisseur'=>'Text','s.tva_intra'=>'Text','f.rowid'=>"List:facture:facnumber",'f.facnumber'=>"Text",'f.datec'=>"Date",'f.datef'=>"Date",'f.date_lim_reglement'=>"Date",'f.total'=>"Numeric",'f.total_ttc'=>"Numeric",'f.tva'=>"Numeric",'f.paye'=>"Boolean",'f.fk_statut'=>'Status','f.note_private'=>"Text",'f.note_public'=>"Text",'pf.amount'=>'Numeric','p.datep'=>'Date','p.num_paiement'=>'Numeric','p.fk_bank'=>'Numeric');
$this->export_TypeFields_array[$r]=array('s.nom'=>'Text','s.address'=>'Text','s.zip'=>'Text','s.town'=>'Text','c.code'=>'Text','s.phone'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.code_compta'=>'Text','s.code_compta_fournisseur'=>'Text','s.tva_intra'=>'Text','f.rowid'=>"Numeric",'f.facnumber'=>"Text",'f.datec'=>"Date",'f.datef'=>"Date",'f.date_lim_reglement'=>"Date",'f.total'=>"Numeric",'f.total_ttc'=>"Numeric",'f.tva'=>"Numeric",'f.paye'=>"Boolean",'f.fk_statut'=>'Status','f.note_private'=>"Text",'f.note_public'=>"Text",'pj.ref'=>'Text','p.amount'=>'Numeric','pf.amount'=>'Numeric','p.rowid'=>'Numeric','p.ref'=>'Text','p.datep'=>'Date','p.num_paiement'=>'Numeric','p.fk_bank'=>'Numeric','p.note'=>'Text','pt.code'=>'Text','pt.libelle'=>'text','ba.ref'=>'Text');
$this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.zip'=>'company','s.town'=>'company','c.code'=>'company','s.phone'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.code_compta'=>'company','s.code_compta_fournisseur'=>'company','s.tva_intra'=>'company','f.rowid'=>"invoice",'f.facnumber'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.date_lim_reglement'=>"invoice",'f.total'=>"invoice",'f.total_ttc'=>"invoice",'f.tva'=>"invoice",'f.paye'=>"invoice",'f.fk_statut'=>'invoice','f.note_private'=>"invoice",'f.note_public'=>"invoice",'pj.ref'=>'project','p.rowid'=>'payment','p.ref'=>'payment','p.amount'=>'payment','pf.amount'=>'payment','p.datep'=>'payment','p.num_paiement'=>'payment','pt.code'=>'payment','pt.libelle'=>'payment','p.note'=>'payment','f.fk_user_author'=>'user','uc.login'=>'user','f.fk_user_valid'=>'user','uv.login'=>'user','p.fk_bank'=>'account','ba.ref'=>'account');
$this->export_TypeFields_array[$r]=array('s.rowid'=>'Numeric','s.nom'=>'Text','s.address'=>'Text','s.zip'=>'Text','s.town'=>'Text','c.code'=>'Text','s.phone'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.code_compta'=>'Text','s.code_compta_fournisseur'=>'Text','s.tva_intra'=>'Text','f.rowid'=>"Numeric",'f.facnumber'=>"Text",'f.type'=>"Numeric",'f.datec'=>"Date",'f.datef'=>"Date",'f.date_lim_reglement'=>"Date",'f.total'=>"Numeric",'f.total_ttc'=>"Numeric",'f.tva'=>"Numeric",'f.paye'=>"Boolean",'f.fk_statut'=>'Status','f.note_private'=>"Text",'f.note_public'=>"Text",'pj.ref'=>'Text','p.amount'=>'Numeric','pf.amount'=>'Numeric','p.rowid'=>'Numeric','p.ref'=>'Text','p.datep'=>'Date','p.num_paiement'=>'Numeric','p.fk_bank'=>'Numeric','p.note'=>'Text','pt.code'=>'Text','pt.libelle'=>'text','ba.ref'=>'Text');
$this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.zip'=>'company','s.town'=>'company','c.code'=>'company','s.phone'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.code_compta'=>'company','s.code_compta_fournisseur'=>'company','s.tva_intra'=>'company','f.rowid'=>"invoice",'f.facnumber'=>"invoice",'f.type'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.date_lim_reglement'=>"invoice",'f.total'=>"invoice",'f.total_ttc'=>"invoice",'f.tva'=>"invoice",'f.paye'=>"invoice",'f.fk_statut'=>'invoice','f.note_private'=>"invoice",'f.note_public'=>"invoice",'pj.ref'=>'project','p.rowid'=>'payment','p.ref'=>'payment','p.amount'=>'payment','pf.amount'=>'payment','p.datep'=>'payment','p.num_paiement'=>'payment','pt.code'=>'payment','pt.libelle'=>'payment','p.note'=>'payment','f.fk_user_author'=>'user','uc.login'=>'user','f.fk_user_valid'=>'user','uv.login'=>'user','p.fk_bank'=>'account','ba.ref'=>'account');
$this->export_dependencies_array[$r]=array('payment'=>'p.rowid'); // To add unique key if we ask a field of a child to avoid the DISTINCT to discard them
$keyforselect='facture'; $keyforelement='invoice'; $keyforaliasextra='extra';
include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php';

View File

@ -111,7 +111,7 @@ class modPrinting extends DolibarrModules
'url'=>'/printing/index.php?mainmenu=home&leftmenu=admintools',
'langs'=>'printing', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
'position'=>300,
'enabled'=>'$conf->printing->enabled && $leftmenu==\'admintools\'',
'enabled'=>'$conf->printing->enabled && ($leftmenu==\'admintools\' || $leftmenu==\'admintools_info\')',
'perms'=>'$user->rights->printing->read', // Use 'perms'=>'1' if you want your menu with no permission rules
'target'=>'',
'user'=>0); // 0=Menu for internal users, 1=external users, 2=both

View File

@ -136,7 +136,7 @@ class modProduct extends DolibarrModules
'url'=>'/product/admin/product_tools.php?mainmenu=home&leftmenu=admintools',
'langs'=>'products', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
'position'=>300,
'enabled'=>'$conf->product->enabled && $leftmenu=="admintools"', // Define condition to show or hide menu entry. Use '$conf->mymodule->enabled' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected.
'enabled'=>'$conf->product->enabled && ($leftmenu=="admintools" || $leftmenu=="admintools_info")', // Define condition to show or hide menu entry. Use '$conf->mymodule->enabled' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected.
'perms'=>'1', // Use 'perms'=>'$user->rights->mymodule->level1->level2' if you want your menu with a permission rules
'target'=>'',
'user'=>0); // 0=Menu for internal users, 1=external users, 2=both

View File

@ -959,7 +959,7 @@ class Cronjob extends CommonObject
// Create Object for the call module
$object = new $this->objectname($this->db);
$params_arr = explode(", ",$this->params);
$params_arr = array_map('trim', explode(",",$this->params));
if (!is_array($params_arr))
{
$result = call_user_func(array($object, $this->methodename), $this->params);

View File

@ -243,8 +243,8 @@ if (empty($reshook))
while (isset($_POST[$batch]))
{
// save line of detail into sub_qty
$sub_qty[$j]['q']=GETPOST($qty,'int'); // the qty we want to move for this stock record
$sub_qty[$j]['id_batch']=GETPOST($batch,'int'); // the id into llx_product_batch of stock record to move
$sub_qty[$j]['q']=GETPOST($qty,'int'); // the qty we want to move for this stock record
$sub_qty[$j]['id_batch']=GETPOST($batch,'int'); // the id into llx_product_batch of stock record to move
$subtotalqty+=$sub_qty[$j]['q'];
//var_dump($qty);var_dump($batch);var_dump($sub_qty[$j]['q']);var_dump($sub_qty[$j]['id_batch']);
@ -262,9 +262,14 @@ if (empty($reshook))
}
else
{
// Case we dont use the list of available qty for each warehouse/lot
// GUI does not allow this yet
setEventMessage('StockRequiredToChooseWhichLotToUse', 'errors');
// No detail were provided for lots
if (! empty($_POST[$qty]))
{
// We try to set an amount
// Case we dont use the list of available qty for each warehouse/lot
// GUI does not allow this yet
setEventMessage('StockIsRequiredToChooseWhichLotToUse', 'errors');
}
}
}
else if (isset($_POST[$stockLocation]))
@ -810,7 +815,7 @@ if ($action == 'create')
print '<table class="noborder" width="100%">';
// Lecture des expeditions deja effectuees
// Load shipments already done for same order
$object->loadExpeditions();
if ($numAsked)
@ -919,6 +924,7 @@ if ($action == 'create')
print '<input name="qtydelivered'.$indiceAsked.'" id="qtydelivered'.$indiceAsked.'" type="hidden" value="'.$quantityDelivered.'">';
print '</td>';
// Qty to ship
$quantityAsked = $line->qty;
if ($line->product_type == 1 && empty($conf->global->STOCK_SUPPORTS_SERVICES))
{
@ -938,7 +944,7 @@ if ($action == 'create')
$stock = + $product->stock_warehouse[$warehouse_id]->real; // Convert to number
$deliverableQty=min($quantityToBeDelivered, $stock);
if ($deliverableQty < 0) $deliverableQty = 0;
if (empty($conf->productbatch->enabled) || ! ($product->hasbatch() && is_object($product->stock_warehouse[$warehouse_id])))
if (empty($conf->productbatch->enabled) || ! $product->hasbatch())
{
// Quantity to send
print '<td align="center">';
@ -1009,21 +1015,32 @@ if ($action == 'create')
}
else
{
// Product need lot
print '<td></td><td></td></tr>'; // end line and start a new one for lot/serial
$staticwarehouse=new Entrepot($db);
if ($warehouse_id > 0) $staticwarehouse->fetch($warehouse_id);
$subj=0;
// Define nb of lines suggested for this order line
$nbofsuggested=0;
if (is_object($product->stock_warehouse[$warehouse_id]) && count($product->stock_warehouse[$warehouse_id]->detail_batch))
{
foreach ($product->stock_warehouse[$warehouse_id]->detail_batch as $dbatch)
{
$nbofsuggested++;
}
}
print '<input name="idl'.$indiceAsked.'" type="hidden" value="'.$line->id.'">';
if (count($product->stock_warehouse[$warehouse_id]->detail_batch))
if (is_object($product->stock_warehouse[$warehouse_id]) && count($product->stock_warehouse[$warehouse_id]->detail_batch))
{
foreach ($product->stock_warehouse[$warehouse_id]->detail_batch as $dbatch)
{
//var_dump($dbatch);
$batchStock = + $dbatch->qty; // To get a numeric
$deliverableQty = min($quantityToBeDelivered,$batchStock);
print '<tr><td colspan="3" ></td><td align="center">';
print '<!-- subj='.$subj.'/'.$nbofsuggested.' --><tr '.((($subj + 1) == $nbofsuggested)?$bc[$var]:'').'>';
print '<td colspan="3" ></td><td align="center">';
print '<input name="qtyl'.$indiceAsked.'_'.$subj.'" id="qtyl'.$indiceAsked.'_'.$subj.'" type="text" size="4" value="'.$deliverableQty.'">';
print '</td>';
@ -1045,8 +1062,8 @@ if ($action == 'create')
}
else
{
print '<!-- Case -->';
print '<tr><td colspan="3"></td><td align="center">';
print '<!-- Case there is no details of lot at all -->';
print '<tr '.$bc[$var].'><td colspan="3"></td><td align="center">';
print '<input name="qtyl'.$indiceAsked.'_'.$subj.'" id="qtyl'.$indiceAsked.'_'.$subj.'" type="text" size="4" value="0" disabled="disabled"> ';
print '</td>';
@ -1066,6 +1083,15 @@ if ($action == 'create')
print '<input name="idl'.$indiceAsked.'" type="hidden" value="'.$line->id.'">';
$subj=0;
// Define nb of lines suggested for this order line
$nbofsuggested=0;
foreach ($product->stock_warehouse as $warehouse_id=>$stock_warehouse)
{
if ($stock_warehouse->real > 0)
{
$nbofsuggested++;
}
}
foreach ($product->stock_warehouse as $warehouse_id=>$stock_warehouse) // $stock_warehouse is product_stock
{
$warehouseObject=new Entrepot($db);
@ -1076,7 +1102,8 @@ if ($action == 'create')
$deliverableQty = min($quantityToBeDelivered,$stock);
$deliverableQty = max(0, $deliverableQty);
// Quantity to send
print '<tr><td colspan="3" ></td><td align="center"><!-- qty to ship (no lot management for product line indiceAsked='.$indiceAsked.') -->';
print '<!-- subj='.$subj.'/'.$nbofsuggested.' --><tr '.((($subj + 1) == $nbofsuggested)?$bc[$var]:'').'>';
print '<td colspan="3" ></td><td align="center"><!-- qty to ship (no lot management for product line indiceAsked='.$indiceAsked.') -->';
if ($line->product_type == 0 || ! empty($conf->global->STOCK_SUPPORTS_SERVICES))
{
print '<input name="qtyl'.$indiceAsked.'_'.$subj.'" id="qtyl'.$indiceAsked.'" type="text" size="4" value="'.$deliverableQty.'">';
@ -1146,16 +1173,27 @@ if ($action == 'create')
$warehouseObject=new Entrepot($db);
$productlotObject=new Productlot($db);
// Define nb of lines suggested for this order line
$nbofsuggested=0;
foreach ($product->stock_warehouse as $warehouse_id=>$stock_warehouse)
{
if (($stock_warehouse->real > 0) && (count($stock_warehouse->detail_batch))) {
foreach ($stock_warehouse->detail_batch as $dbatch)
{
$nbofsuggested++;
}
}
}
foreach ($product->stock_warehouse as $warehouse_id=>$stock_warehouse)
{
$warehouseObject->fetch($warehouse_id);
if (($stock_warehouse->real > 0) && (count($stock_warehouse->detail_batch))) {
foreach ($stock_warehouse->detail_batch as $dbatch)
foreach ($stock_warehouse->detail_batch as $dbatch)
{
//var_dump($dbatch);
$batchStock = + $dbatch->qty; // To get a numeric
$deliverableQty = min($quantityToBeDelivered,$batchStock);
print '<tr><td colspan="3"></td><td align="center">';
print '<!-- subj='.$subj.'/'.$nbofsuggested.' --><tr '.((($subj + 1) == $nbofsuggested)?$bc[$var]:'').'><td colspan="3"></td><td align="center">';
print '<input name="qtyl'.$indiceAsked.'_'.$subj.'" id="qtyl'.$indiceAsked.'_'.$subj.'" type="text" size="4" value="'.$deliverableQty.'">';
print '</td>';
@ -1185,10 +1223,14 @@ if ($action == 'create')
if ($subj == 0) // Line not shown yet, we show it
{
print '<!-- line not shown yet, we show it -->';
print '<tr><td colspan="3" ></td><td align="center">';
print '<tr '.$bc[$var].'><td colspan="3" ></td><td align="center">';
if ($line->product_type == 0 || ! empty($conf->global->STOCK_SUPPORTS_SERVICES))
{
//$disabled='disabled="disabled"';
$disabled='';
if (! empty($conf->productbatch->enabled) && $product->hasbatch())
{
$disabled='disabled="disabled"';
}
print '<input name="qtyl'.$indiceAsked.'_'.$subj.'" id="qtyl'.$indiceAsked.'_'.$subj.'" type="text" size="4" value="0"'.($disabled?' '.$disabled:'').'> ';
}
else

View File

@ -950,7 +950,6 @@ if (empty($reshook))
// if VAT is not used in Dolibarr, set VAT rate to 0 because VAT rate is necessary.
if (empty($vatrate)) $vatrate = "0.000";
$object_ligne->vatrate = price2num($vatrate);
$object_ligne->fk_projet = $fk_projet;
@ -1079,6 +1078,10 @@ if (empty($reshook))
$qty = GETPOST('qty');
$value_unit = GETPOST('value_unit');
$vatrate = GETPOST('vatrate');
// if VAT is not used in Dolibarr, set VAT rate to 0 because VAT rate is necessary.
if (empty($vatrate)) $vatrate = "0.000";
$vatrate = price2num($vatrate);
if (! GETPOST('fk_c_type_fees') > 0)
{
@ -1086,7 +1089,7 @@ if (empty($reshook))
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Type")), null, 'errors');
$action='';
}
if (GETPOST('vatrate') < 0 || GETPOST('vatrate') == '')
if ((int) $vatrate < 0 || $vatrate == '')
{
$error++;
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Vat")), null, 'errors');
@ -1808,7 +1811,7 @@ else
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'projet as pjt ON fde.fk_projet=pjt.rowid';
$sql.= ' WHERE fde.fk_expensereport = '.$object->id;
print '<div style="clear: both;">';
print '<div style="clear: both;"></div>';
$actiontouse='updateligne';
if (($object->fk_statut==0 || $object->fk_statut==99) && $action != 'editline') $actiontouse='addline';
@ -1818,7 +1821,10 @@ else
print '<input type="hidden" name="action" value="'.$actiontouse.'">';
print '<input type="hidden" name="id" value="'.$object->id.'">';
print '<input type="hidden" name="fk_expensereport" value="'.$object->id.'" />';
print '<table class="noborder" width="100%">';
print '<div class="div-table-responsive">';
print '<table id="tablelines" class="noborder" width="100%">';
$resql = $db->query($sql);
if ($resql)
@ -2047,11 +2053,9 @@ else
} // Fin si c'est payé/validé
print '</table>';
print '</div>';
print '</form>';
print '</div>';
}
else
{
@ -2091,7 +2095,7 @@ if ($action != 'create' && $action != 'edit')
*/
if ($user->rights->expensereport->creer && $object->fk_statut==0)
{
if (in_array($object->fk_user_author, $user->getAllChildIds(1)))
if (in_array($object->fk_user_author, $user->getAllChildIds(1)) || !empty($user->rights->expensereport->writeall_advance))
{
// Modify
print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=edit&id='.$object->id.'">'.$langs->trans('Modify').'</a></div>';

View File

@ -60,7 +60,7 @@ class ExpenseReport extends CommonObject
// Create
var $date_create;
var $fk_user_author; // the user the expense report is for (not really the author)
var $fk_user_author; // Note fk_user_author is not the 'author' but the guy the expense report is for.
// Update
var $date_modif;
@ -126,7 +126,7 @@ class ExpenseReport extends CommonObject
$now = dol_now();
$fuserid = $this->fk_user_author;
$fuserid = $this->fk_user_author; // Note fk_user_author is not the 'author' but the guy the expense report is for.
if (empty($fuserid)) $fuserid = $user->id;
$this->db->begin();
@ -254,7 +254,7 @@ class ExpenseReport extends CommonObject
$this->statut=0;
// Clear fields
$this->fk_user_author = $user->id;
$this->fk_user_author = $user->id; // Note fk_user_author is not the 'author' but the guy the expense report is for.
$this->fk_user_valid = '';
$this->date_create = '';
$this->date_creation = '';
@ -301,9 +301,10 @@ class ExpenseReport extends CommonObject
* update
*
* @param User $user User making change
* @param User $newuser New user we want to have the expense report on.
* @return int <0 if KO, >0 if OK
*/
function update($user)
function update($user, $userofexpensereport=null)
{
global $langs;
@ -313,10 +314,13 @@ class ExpenseReport extends CommonObject
$sql.= " , total_tva = ".$this->total_tva;
$sql.= " , date_debut = '".$this->db->idate($this->date_debut)."'";
$sql.= " , date_fin = '".$this->db->idate($this->date_fin)."'";
$sql.= " , fk_user_author = ".($user->id > 0 ? "'".$user->id."'":"null");
if ($userofexpensereport && is_object($userofexpensereport))
{
$sql.= " , fk_user_author = ".($userofexpensereport->id > 0 ? "'".$userofexpensereport->id."'":"null"); // Note fk_user_author is not the 'author' but the guy the expense report is for.
}
$sql.= " , fk_user_validator = ".($this->fk_user_validator > 0 ? $this->fk_user_validator:"null");
$sql.= " , fk_user_valid = ".($this->fk_user_valid > 0 ? $this->fk_user_valid:"null");
$sql.= " , fk_user_modif = ".($this->fk_user_modif > 0 ? $this->fk_user_modif:"null");
$sql.= " , fk_user_modif = ".$user->id;
$sql.= " , fk_statut = ".($this->fk_statut >= 0 ? $this->fk_statut:'0');
$sql.= " , fk_c_paiement = ".($this->fk_c_paiement > 0 ? $this->fk_c_paiement:"null");
$sql.= " , note_public = ".(!empty($this->note_public)?"'".$this->db->escape($this->note_public)."'":"''");
@ -388,7 +392,7 @@ class ExpenseReport extends CommonObject
$this->date_refuse = $this->db->jdate($obj->date_refuse);
$this->date_cancel = $this->db->jdate($obj->date_cancel);
$this->fk_user_author = $obj->fk_user_author;
$this->fk_user_author = $obj->fk_user_author; // Note fk_user_author is not the 'author' but the guy the expense report is for.
$this->fk_user_modif = $obj->fk_user_modif;
$this->fk_user_validator = $obj->fk_user_validator;
$this->fk_user_valid = $obj->fk_user_valid;
@ -958,7 +962,7 @@ class ExpenseReport extends CommonObject
{
$prefix="ER";
if (! empty($conf->global->EXPENSE_REPORT_PREFIX)) $prefix=$conf->global->EXPENSE_REPORT_PREFIX;
$this->ref = strtoupper($fuser->login).$expld_car.$prefix.$this->ref.$expld_car.dol_print_date($this->date_debut,'%y%m%d');
$this->ref = str_replace(' ','_', $this->user_author_infos).$expld_car.$prefix.$this->ref.$expld_car.dol_print_date($this->date_debut,'%y%m%d');
}
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
// We rename directory in order to avoid losing the attachments

View File

@ -543,7 +543,7 @@ if ($resql)
if (!empty($obj->note_private) || !empty($obj->note_public))
{
print ' <span class="note">';
print '<a href="'.DOL_URL_ROOT.'/commande/note.php?id='.$obj->rowid.'">'.img_picto($langs->trans("ViewPrivateNote"),'object_generic').'</a>';
print '<a href="'.DOL_URL_ROOT.'/expensereport/note.php?id='.$obj->rowid.'">'.img_picto($langs->trans("ViewPrivateNote"),'object_generic').'</a>';
print '</span>';
}
print '</td>';

View File

@ -28,6 +28,7 @@ require_once DOL_DOCUMENT_ROOT.'/expensereport/class/paymentexpensereport.class.
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
$langs->load("bills");
$langs->load("banks");
$chid=GETPOST("id");
$action=GETPOST('action');
@ -62,22 +63,22 @@ if ($action == 'add_payment')
$datepaid = dol_mktime(12, 0, 0, $_POST["remonth"], $_POST["reday"], $_POST["reyear"]);
if (! $_POST["fk_typepayment"] > 0)
if (! ($_POST["fk_typepayment"] > 0))
{
$mesg = $langs->trans("ErrorFieldRequired",$langs->transnoentities("PaymentMode"));
setEventMessages($langs->trans("ErrorFieldRequired",$langs->transnoentities("PaymentMode")), null, 'errors');
$error++;
}
if ($datepaid == '')
{
$mesg = $langs->trans("ErrorFieldRequired",$langs->transnoentities("Date"));
setEventMessages($langs->trans("ErrorFieldRequired",$langs->transnoentities("Date")), null, 'errors');
$error++;
}
if (! empty($conf->banque->enabled) && ! $accountid > 0)
if (! empty($conf->banque->enabled) && ! ($accountid > 0))
{
$mesg = $langs->trans("ErrorFieldRequired",$langs->transnoentities("AccountToCredit"));
setEventMessages($langs->trans("ErrorFieldRequired",$langs->transnoentities("AccountToDebit")), null, 'errors');
$error++;
}
if (! $error)
{
$paymentid = 0;
@ -163,7 +164,6 @@ $form=new Form($db);
// Form to create expense report payment
if (GETPOST("action") == 'create')
{
$expensereport = new ExpenseReport($db);
$expensereport->fetch($chid);
@ -171,11 +171,6 @@ if (GETPOST("action") == 'create')
print load_fiche_titre($langs->trans("DoPayment"));
if ($mesg)
{
print "<div class=\"error\">$mesg</div>";
}
print '<form name="add_payment" action="'.$_SERVER['PHP_SELF'].'" method="post">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="id" value="'.$chid.'">';
@ -222,12 +217,15 @@ if (GETPOST("action") == 'create')
print "</td>\n";
print '</tr>';
print '<tr>';
print '<td class="fieldrequired">'.$langs->trans('AccountToDebit').'</td>';
print '<td colspan="2">';
$form->select_comptes(isset($_POST["accountid"])?$_POST["accountid"]:$expensereport->accountid, "accountid", 0, '',1); // Show open bank account list
print '</td></tr>';
if (! empty($conf->banque->enabled))
{
print '<tr>';
print '<td class="fieldrequired">'.$langs->trans('AccountToDebit').'</td>';
print '<td colspan="2">';
$form->select_comptes(isset($_POST["accountid"])?$_POST["accountid"]:$expensereport->accountid, "accountid", 0, '',1); // Show open bank account list
print '</td></tr>';
}
// Number
print '<tr><td>'.$langs->trans('Numero');
print ' <em>('.$langs->trans("ChequeOrTransferNumber").')</em>';
@ -243,9 +241,7 @@ if (GETPOST("action") == 'create')
dol_fiche_end();
/*
* Autres charges impayees
*/
// List of expenses ereport not already paid completely
$num = 1;
$i = 0;

View File

@ -31,7 +31,7 @@
*/
if (! defined('DOL_APPLICATION_TITLE')) define('DOL_APPLICATION_TITLE','Dolibarr');
if (! defined('DOL_VERSION')) define('DOL_VERSION','5.0.0-rc2'); // a.b.c-alpha, a.b.c-beta, a.b.c-rcX or a.b.c
if (! defined('DOL_VERSION')) define('DOL_VERSION','5.0.0'); // a.b.c-alpha, a.b.c-beta, a.b.c-rcX or a.b.c
if (! defined('EURO')) define('EURO',chr(128));

View File

@ -187,7 +187,25 @@ if (empty($reshook))
if ($result < 0)
{
setEventMessages($object->error,$object->errors,'errors');
}
}else{
// Define output language
if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE))
{
$outputlangs = $langs;
$newlang = '';
if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id')) $newlang = GETPOST('lang_id','alpha');
if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang = $object->thirdparty->default_lang;
if (! empty($newlang)) {
$outputlangs = new Translate("", $conf);
$outputlangs->setDefaultLang($newlang);
}
$model=$object->modelpdf;
$ret = $object->fetch($id); // Reload to get new records
$result=$object->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref);
if ($result < 0) dol_print_error($db,$result);
}
}
}
}

View File

@ -254,7 +254,7 @@ INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (22
INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (224,'TV','TUV','Tuvalu',1,0);
INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (225,'UG','UGA','Ouganda',1,0);
INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (226,'UA','UKR','Ukraine',1,0);
INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (227,'AE','ARE','Émirats arabes unis',1,0);
INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (227,'AE','ARE','United Arab Emirates',1,0);
INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (228,'UM','UMI','Iles mineures éloignées des États-Unis',1,0);
INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (229,'UY','URY','Uruguay',1,0);
INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (230,'UZ','UZB','Ouzbékistan',1,0);

View File

@ -323,4 +323,7 @@ INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) va
INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 181, 18126, '', 0, 'Ucayali', 1);
-- Regions Panama (id country=178)
INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 178, 17801, '', 0, 'Panama', 1);
INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 178, 17801, '', 0, 'Panama', 1);
-- Regions Panama (id country=227)
INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 227, 22701, '', 0, 'United Arab Emirates', 1);

View File

@ -1491,4 +1491,16 @@ INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc
INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('PA-7', 17801, '', 0, '', 'Los Santos', 1);
INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('PA-8', 17801, '', 0, '', 'Panamá', 1);
INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('PA-9', 17801, '', 0, '', 'Veraguas', 1);
INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('PA-13', 17801, '', 0, '', 'Panamá Oeste', 1);
INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('PA-13', 17801, '', 0, '', 'Panamá Oeste', 1);
-- Provinces United Arab Emirates (id country=227)
INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('AE-1', 22701, '', 0, '', 'Abu Dhabi', 1);
INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('AE-2', 22701, '', 0, '', 'Dubai', 1);
INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('AE-3', 22701, '', 0, '', 'Ajman', 1);
INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('AE-4', 22701, '', 0, '', 'Fujairah', 1);
INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('AE-5', 22701, '', 0, '', 'Ras al-Khaimah', 1);
INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('AE-6', 22701, '', 0, '', 'Sharjah', 1);
INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('AE-7', 22701, '', 0, '', 'Umm al-Quwain', 1);

View File

@ -305,7 +305,6 @@ DELETE FROM llx_c_shipment_mode where code IN (select code from tmp_c_shipment_m
drop table tmp_c_shipment_mode;
-- VMYSQL4.1 SET sql_mode = 'ALLOW_INVALID_DATES';
-- VMYSQL4.1 update llx_expensereport set date_debut = date_create where DATE(STR_TO_DATE(date_debut, '%Y-%m-%d')) IS NULL;
-- VMYSQL4.1 SET sql_mode = 'NO_ZERO_DATE';
@ -321,3 +320,6 @@ drop table tmp_c_shipment_mode;
-- VMYSQL4.1 SET sql_mode = 'NO_ZERO_DATE';
-- VMYSQL4.1 update llx_expensereport set date_valid = date_fin where DATE(STR_TO_DATE(date_valid, '%Y-%m-%d')) IS NULL;
-- VMYSQL4.1 SET sql_mode = 'ALLOW_INVALID_DATES';
-- VMYSQL4.1 update llx_expensereport_det as ed set date = (select date_debut from llx_expensereport as e where ed.fk_expensereport = e.rowid) where DATE(STR_TO_DATE(date, '%Y-%m-%d')) < '1000-00-00';
-- VMYSQL4.1 SET sql_mode = 'NO_ZERO_DATE';

View File

@ -1,5 +1,5 @@
-- ===================================================================
-- Copyright (C) 2004-2007 Laurent Destailleur <eldy@users.sourceforge.net>
-- Copyright (C) 2004-2017 Laurent Destailleur <eldy@users.sourceforge.net>
--
-- 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
@ -14,6 +14,7 @@
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
--
-- Table to link bank tag/categories with bank lines
-- ===================================================================
create table llx_bank_class

View File

@ -15,6 +15,7 @@
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
--
-- Table to link bank tag/categories with bank accounts
-- ===========================================================================
CREATE TABLE llx_categorie_account

View File

@ -194,6 +194,8 @@ ChangeBinding=Change the binding
## Admin
ApplyMassCategories=Apply mass categories
AddAccountFromBookKeepingWithNoCategories=Add acccount already used with no categories
CategoryDeleted=Category for the accounting account has been removed
## Export
Exports=صادرات
@ -209,6 +211,7 @@ Modelcsv_ciel=Export towards Sage Ciel Compta or Compta Evolution
Modelcsv_quadratus=Export towards Quadratus QuadraCompta
Modelcsv_ebp=Export towards EBP
Modelcsv_cogilog=Export towards Cogilog
ChartofaccountsId=Chart of accounts Id
## Tools - Init accounting account on product / service
InitAccountancy=Init accountancy

View File

@ -9,17 +9,20 @@ VersionDevelopment=تطويرية
VersionUnknown=غير معروف
VersionRecommanded=موصى بها
FileCheck=Files integrity checker
FileCheckDesc=This tool allows you to check the integrity of files of your application, comparing each files with the official ones. You can use this tool to detect if some files were modified by a hacker for example.
FileCheckDesc=This tool allows you to check the integrity of files and setup of your application, comparing each files with the official ones. Value of some setup constants may also be checked. You can use this tool to detect if some files were modified by a hacker for example.
FileIntegrityIsStrictlyConformedWithReference=Files integrity is strictly conformed with the reference.
FileIntegritySomeFilesWereRemovedOrModified=Files integrity check has failed. Some files were modified of removed.
FileIntegrityIsOkButFilesWereAdded=Files integrity check has passed, however some new files were added.
FileIntegritySomeFilesWereRemovedOrModified=Files integrity check has failed. Some files were modified, removed or added.
GlobalChecksum=Global checksum
MakeIntegrityAnalysisFrom=Make integrity analysis of application files from
LocalSignature=Embedded local signature (less reliable)
RemoteSignature=Remote distant signature (more reliable)
FilesMissing=الملفات المفقودة
FilesUpdated=الملفات التي تم تحديثها
FilesModified=Modified Files
FilesAdded=Added Files
FileCheckDolibarr=Check integrity of application files
AvailableOnlyOnPackagedVersions=The local file for integrity checking is only available when application is installed from a certified package
AvailableOnlyOnPackagedVersions=The local file for integrity checking is only available when application is installed from an official package
XmlNotFound=Xml Integrity File of application not found
SessionId=Session ID
SessionSaveHandler=معالج لحفظ الجلسات
@ -188,7 +191,9 @@ BoxesDesc=Widgets are components showing some information that you can add to pe
OnlyActiveElementsAreShown=فقط العناصر من <a href="%s">النماذج المفعلة </a> سوف تظهر.
ModulesDesc=Dolibarr modules define which functionality is enabled in software. Some modules require permissions you must grant to users, after enabling module. Click on button on/off to enable a module/feature.
ModulesMarketPlaceDesc=You can find more modules to download on external websites on the Internet...
ModulesMarketPlaces=مزيد من وحدات...
ModulesDeployDesc=If permissions on your file system allows it, you can use this tool to deploy an external module. The module wil then be visible on the tab <strong>%s</strong>.
ModulesMarketPlaces=Find external modules...
GoModuleSetupArea=To deploy/install a new module, go onto the Module setup area at <a href="%s">%s</a>.
DoliStoreDesc=DoliStore ، في السوق الرسمي لتخطيط موارد المؤسسات وحدات Dolibarr / خارجي إدارة علاقات العملاء
DoliPartnersDesc=List of companies providing custom developed modules or features (Note: anyone experienced in PHP programming can provide custom development for an open source project)
WebSiteDesc=Reference websites to find more modules...
@ -280,20 +285,21 @@ MenuHandlers=قائمة مناولي
MenuAdmin=قائمة تحرير
DoNotUseInProduction=لا تستخدمها مع المنتج
ThisIsProcessToFollow=This is steps to process:
ThisIsAlternativeProcessToFollow=هذا هو الإعداد بديل للعملية:
ThisIsAlternativeProcessToFollow=This is an alternative setup to process manually:
StepNb=الخطوة %s
FindPackageFromWebSite=العثور على الحزمة التي توفر ميزة تريد (على سبيل المثال على موقع الويب %s).
DownloadPackageFromWebSite=تحميل الحزمة (على سبيل المثال من الموقع الرسمي على الإنترنت%s).
UnpackPackageInDolibarrRoot=ملف حزمة فك إلى Dolibarr دليل خادم مخصص لوحدات <b>الخارجية:%s</b>
SetupIsReadyForUse=الانتهاء من تركيب وDolibarr على استعداد لاستخدام هذا العنصر الجديد.
NotExistsDirect=لم يتم تعريف الدليل الجذر بديل. <br>
InfDirAlt=منذ الإصدار 3 من الممكن تعريف directory.This الجذر بديلة يسمح لك لتخزين ونفس المكان، والمكونات الإضافية والقوالب المخصصة. <br> مجرد إنشاء دليل على جذر Dolibarr (على سبيل المثال: مخصص). <br>
InfDirExample=<br> ثم نعلن ذلك في conf.php ملف <br> $ dolibarr_main_url_root_alt = 'HTTP: // MYSERVER / مخصص " <br> $ dolibarr_main_document_root_alt = '/ مسار / لعام / dolibarr / htdocs / مخصص " <br> * وعلق هذه الخطوط مع "#"، إلى غير تعليق فقط إزالة الطابع.
UnpackPackageInDolibarrRoot=Unpack the packaged files into server directory dedicated to Dolibarr: <b>%s</b>
UnpackPackageInModulesRoot=To deploy/install an external module, unpack the packaged files into the server directory dedicated to modules: <b>%s</b>
SetupIsReadyForUse=Module deployment is finished. You must however enable and setup the module in your application by going on the page to setup modules: <a href="%s">%s</a>.
NotExistsDirect=The alternative root directory is not defined to an existing directory.<br>
InfDirAlt=Since version 3, it is possible to define an alternative root directory. This allows you to store, into a dedicated directory, plug-ins and custom templates.<br>Just create a directory at the root of Dolibarr (eg: custom).<br>
InfDirExample=<br>Then declare it in the file <strong>conf.php</strong><br> $dolibarr_main_url_root_alt='http://myserver/custom'<br>$dolibarr_main_document_root_alt='/path/of/dolibarr/htdocs/custom'<br>If these lines are commented with "#", to enable them, just uncomment by removing the "#" character.
YouCanSubmitFile=لهذه الخطوة، يمكنك إرسال حزمة باستخدام هذه الأداة: اختر ملف الوحدة النمطية
CurrentVersion=Dolibarr النسخة الحالية
CallUpdatePage=Go to the page that updates the database structure and data: %s.
LastStableVersion=Latest stable version
LastActivationDate=Last activation date
LastActivationDate=Latest activation date
UpdateServerOffline=خادم التحديث متواجد حاليا
GenericMaskCodes=يمكنك إدخال أي قناع الترقيم. في هذا القناع ، وبعد ويمكن استخدام العلامات : <br> <b>(000000)</b> يطابق عدد الذي سيكون على كل يزداد ٪ s. كما تدخل العديد من أصفار على النحو المنشود طول المضادة. المضاد وسيتم الانتهاء من اصفار من اليسار من أجل الحصول على أكبر عدد اصفار كما القناع. <br> <b>000000 +000) (نفس</b> السابقة ولكن يقابل المقابلة لعدد للحق من علامة + يطبق اعتبارا من أول ٪ s. <br> <b>000000 @ (س)</b> نفس السابقة ولكن المضاد هو إعادة الصفر عندما يتم التوصل إلى الشهر خ خ ما بين 1 و 12). إذا كان هذا الخيار هو المستخدمة وس 2 أو أعلى ، ثم تسلسل (ذ ذ م م)) ((سنة أو ملم)) (مطلوب أيضا. <br> <b>(ب)</b> اليوم (01 الى 31). <br> <b>() ملم</b> في الشهر (01 الى 12). <br> <b>(كذا)</b> ، <b>(سنة))</b> أو <b>(ذ</b> السنة أكثر من 2 أو 4 أو 1 الأرقام. <br>
GenericMaskCodes2=<b>{cccc}</b> the client code on n characters<br><b>{cccc000}</b> the client code on n characters is followed by a counter dedicated for customer. This counter dedicated to customer is reset at same time than global counter.<br><b>{tttt}</b> The code of third party type on n characters (see dictionary-thirdparty types).<br>
@ -376,11 +382,11 @@ ExtrafieldCheckBox=Checkbox
ExtrafieldRadio=Radio button
ExtrafieldCheckBoxFromList= مربع من الجدول
ExtrafieldLink=رابط إلى كائن
ExtrafieldParamHelpselect=Parameters list have to be like key,value<br><br> for example : <br>1,value1<br>2,value2<br>3,value3<br>...<br><br>In order to have the list depending on another :<br>1,value1|parent_list_code:parent_key<br>2,value2|parent_list_code:parent_key
ExtrafieldParamHelpselect=Parameters list have to be like key,value<br><br> for example : <br>1,value1<br>2,value2<br>3,value3<br>...<br><br>In order to have the list depending on another complementary attribute list :<br>1,value1|options_<i>parent_list_code</i>:parent_key<br>2,value2|options_<i>parent_list_code</i>:parent_key <br><br>In order to have the list depending on another list :<br>1,value1|<i>parent_list_code</i>:parent_key<br>2,value2|<i>parent_list_code</i>:parent_key
ExtrafieldParamHelpcheckbox=Parameters list have to be like key,value<br><br> for example : <br>1,value1<br>2,value2<br>3,value3<br>...
ExtrafieldParamHelpradio=Parameters list have to be like key,value<br><br> for example : <br>1,value1<br>2,value2<br>3,value3<br>...
ExtrafieldParamHelpsellist=Parameters list comes from a table<br>Syntax : table_name:label_field:id_field::filter<br>Example : c_typent:libelle:id::filter<br><br>filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter witch is the current id of current object<br>To do a SELECT in filter use $SEL$<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another :<br>c_typent:libelle:id:parent_list_code|parent_column:filter
ExtrafieldParamHelpchkbxlst=Parameters list comes from a table<br>Syntax : table_name:label_field:id_field::filter<br>Example : c_typent:libelle:id::filter<br><br>filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter witch is the current id of current object<br>To do a SELECT in filter use $SEL$<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another :<br>c_typent:libelle:id:parent_list_code|parent_column:filter
ExtrafieldParamHelpsellist=Parameters list comes from a table<br>Syntax : table_name:label_field:id_field::filter<br>Example : c_typent:libelle:id::filter<br><br>filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter witch is the current id of current object<br>To do a SELECT in filter use $SEL$<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter
ExtrafieldParamHelpchkbxlst=Parameters list comes from a table<br>Syntax : table_name:label_field:id_field::filter<br>Example : c_typent:libelle:id::filter<br><br>filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter witch is the current id of current object<br>To do a SELECT in filter use $SEL$<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list :<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter
ExtrafieldParamHelplink=يجب أن يكون المعلمات ObjectName: CLASSPATH <br> بناء الجملة: ObjectName: CLASSPATH <br> مثال: سوسيتيه: سوسيتيه / فئة / societe.class.php
LibraryToBuildPDF=Library used for PDF generation
WarningUsingFPDF=Warning: Your <b>conf.php</b> contains directive <b>dolibarr_pdf_force_fpdf=1</b>. This means you use the FPDF library to generate PDF files. This library is old and does not support a lot of features (Unicode, image transparency, cyrillic, arab and asiatic languages, ...), so you may experience errors during PDF generation.<br>To solve this and have a full support of PDF generation, please download <a href="http://www.tcpdf.org/" target="_blank">TCPDF library</a>, then comment or remove the line <b>$dolibarr_pdf_force_fpdf=1</b>, and add instead <b>$dolibarr_lib_TCPDF_PATH='path_to_TCPDF_dir'</b>
@ -415,10 +421,10 @@ ModuleCompanyCodeDigitaria=قانون المحاسبة طرف ثالث يعتم
Use3StepsApproval=By default, Purchase Orders need to be created and approved by 2 different users (one step/user to create and one step/user to approve. Note that if user has both permission to create and approve, one step/user will be enough). You can ask with this option to introduce a third step/user approval, if amount is higher than a dedicated value (so 3 steps will be necessary: 1=validation, 2=first approval and 3=second approval if amount is enough).<br>Set this to empty if one approval (2 steps) is enough, set it to a very low value (0.1) if a second approval (3 steps) is always required.
UseDoubleApproval=Use a 3 steps approval when amount (without tax) is higher than...
WarningPHPMail=WARNING: Some email providers (like Yahoo) does not allow you to send an email from another server than the Yahoo server if the email address used as a sender is your Yahoo email (like myemail@yahoo.com, myemail@yahoo.fr, ...). Your current setup use the server of the application to send email, so some recipients (the one compatible with the restrictive DMARC protocol), will ask Yahoo if they can accept your email and Yahoo will respond "no" because the server is not a server owned by Yahoo, so few of your sent Emails may not be accepted.<br>If your Email provider (like Yahoo) has this restriction, you must change Email setup to choose the other method "SMTP server" and enter the SMTP server and credentials provided by your Email provider (ask your EMail provider to get SMTP credentials for your account).
ClickToShowDescription=Click to show description
# Modules
Module0Name=& مجموعات المستخدمين
Module0Desc=إدارة المستخدمين والمجموعات
Module0Desc=Users / Employees and Groups management
Module1Name=أطراف ثالثة
Module1Desc=شركات الاتصالات وإدارة
Module2Name=التجارية
@ -689,7 +695,7 @@ PermissionAdvanced253=إنشاء / تعديل المستخدمين خارجي /
Permission254=حذف أو تعطيل المستخدمين الآخرين
Permission255=إنشاء / تعديل بلده معلومات المستخدم
Permission256=تعديل بنفسه كلمة المرور
Permission262=Extend access to all third parties (not only third parties that user is a sale representative). Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc). Not effective for projects (only rules on project permissions, visibility and assignement matters).
Permission262=Extend access to all third parties (not only third parties that user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc).<br>Not effective for projects (only rules on project permissions, visibility and assignement matters).
Permission271=قراءة في كاليفورنيا
Permission272=قراءة الفواتير
Permission273=قضية الفواتير
@ -891,7 +897,7 @@ Offset=ويقابل
AlwaysActive=حركة دائمة
Upgrade=ترقية
MenuUpgrade=ترقية / توسيع
AddExtensionThemeModuleOrOther=إضافة التمديد) الموضوع ، وحدة ،...)
AddExtensionThemeModuleOrOther=Deploy/install external module
WebServer=خادم الويب
DocumentRootServer=خادم الويب 'sالدليل الرئيسي
DataRootServer=دليل ملفات البيانات
@ -1165,10 +1171,6 @@ FreeLegalTextOnOrders=بناء على أوامر النص الحر
WatermarkOnDraftOrders=العلامة المائية على مشاريع المراسيم (أي إذا فارغ)
ShippableOrderIconInList=إضافة رمز في قائمة الطلبيات التي تشير إلى أمر غير قابل للشحن إذا
BANK_ASK_PAYMENT_BANK_DURING_ORDER=اسأل عن وجهة حساب مصرفي من أجل
##### Clicktodial #####
ClickToDialSetup=انقر لإعداد وحدة الاتصال الهاتفي
ClickToDialUrlDesc=ودعا الموقع عندما تنقر على الهاتف picto ذلك. Dans l' رابط ، vous pouvez utiliser ليه balises <br> <b>٪ ٪ 1 $ ق</b> qui الأمصال remplacé قدم المساواة جنيه téléphone دي l' appelé <br> <b>٪ ٪</b> 2 $ <b>ق</b> qui الأمصال remplacé لو قدم المساواة téléphone دي l' appelant جنيه مصري vôtre) <br> <b>٪ ٪ ل 3</b> دولار qui الأمصال remplacé vôtre ادخل clicktodial الفقرة (défini سور vôtre فيشه utilisateur) <br> <b>٪ ٪</b> 4 <b>$</b> ق qui الأمصال remplacé الفقرة vôtre يذكره دي clicktodial عتيق (défini سور vôtre فيشه utilisateur).
##### Bookmark4u #####
##### Interventions #####
InterventionsSetup=وحدة التدخل الإعداد
FreeLegalTextOnInterventions=حرر النص على وثائق التدخل
@ -1395,7 +1397,7 @@ SendingsSetup=ارسال وحدة الإعداد
SendingsReceiptModel=ارسال استلام نموذج
SendingsNumberingModules=Sendings ترقيم الوحدات
SendingsAbility=أوراق دعم الشحن للشحنات العملاء
NoNeedForDeliveryReceipts=في معظم الحالات ، تستخدم الإرسال إيصالات سواء صحائف لتسليم العميل (قائمة المنتجات ارسال) ، وصحائف التي وقعت عليها recevied الزبون. حتى المنتج تسليم الإيصالات هي سمة مزدوجة ونادرا ما تفعيلها.
NoNeedForDeliveryReceipts=In most cases, shipping sheets are used both as sheets for customer deliveries (list of products to send) and sheets that is received and signed by customer. So product deliveries receipts is a duplicated feature and is rarely activated.
FreeLegalTextOnShippings=النص الحر على الشحنات
##### Deliveries #####
DeliveryOrderNumberingModules=تلقي شحنات المنتجات الترقيم وحدة
@ -1477,7 +1479,9 @@ AGENDA_DEFAULT_FILTER_STATUS=تلقائيا تعيين هذه الحالة مع
AGENDA_DEFAULT_VIEW=علامة التبويب التي تريد فتح افتراضيا عند اختيار القائمة جدول الأعمال
AGENDA_NOTIFICATION=Enable event notification on user browsers when event date is reached (each user is able to refuse this from the browser confirmation question)
AGENDA_NOTIFICATION_SOUND=Enable sound notification
##### ClickToDial #####
##### Clicktodial #####
ClickToDialSetup=انقر لإعداد وحدة الاتصال الهاتفي
ClickToDialUrlDesc=ودعا الموقع عندما تنقر على الهاتف picto ذلك. Dans l' رابط ، vous pouvez utiliser ليه balises <br> <b>٪ ٪ 1 $ ق</b> qui الأمصال remplacé قدم المساواة جنيه téléphone دي l' appelé <br> <b>٪ ٪</b> 2 $ <b>ق</b> qui الأمصال remplacé لو قدم المساواة téléphone دي l' appelant جنيه مصري vôtre) <br> <b>٪ ٪ ل 3</b> دولار qui الأمصال remplacé vôtre ادخل clicktodial الفقرة (défini سور vôtre فيشه utilisateur) <br> <b>٪ ٪</b> 4 <b>$</b> ق qui الأمصال remplacé الفقرة vôtre يذكره دي clicktodial عتيق (défini سور vôtre فيشه utilisateur).
ClickToDialDesc=هذه الوحدة تسمح لجعل أرقام هواتف يمكن النقر عليها. وهناك انقر على هذه الأيقونة دعوة تجعل هاتفك إلى الاتصال برقم الهاتف. وهذا يمكن أن تستخدم لاستدعاء نظام مركز الاتصال من Dolibarr يمكن أن نسميه ورقم الهاتف على نظام SIP على سبيل المثال.
ClickToDialUseTelLink=مجرد استخدام الرابط "الهاتف:" على أرقام الهواتف
ClickToDialUseTelLinkDesc=استخدام هذا الأسلوب إذا كان المستخدمون يكون الهاتف الرقمي أو واجهة البرامج المثبتة على الكمبيوتر نفسه من المتصفح، ويسمى عند النقر على رابط في المتصفح التي تبدأ ب "الهاتف". إذا كنت في حاجة الى حل خادم الكامل (لا حاجة لتثبيت البرامج المحلية)، يجب عليك تعيين هذا إلى "لا" وملء الحقل التالي.
@ -1505,10 +1509,11 @@ EndPointIs=SOAP clients must send their requests to the Dolibarr endpoint availa
##### API ####
ApiSetup=API وحدة الإعداد
ApiDesc=من خلال تمكين هذه الوحدة، Dolibarr يصبح الخادم REST لتوفير خدمات الإنترنت المتنوعة.
ApiProductionMode=تمكين وضع الإنتاج (وهذا سوف تفعيل استخدام مخابئ لإدارة الخدمات)
ApiProductionMode=Enable production mode (this will activate use of a cache for services management)
ApiExporerIs=You can explore the APIs at url
OnlyActiveElementsAreExposed=ويتعرض عناصر فقط من وحدات تمكين
ApiKey=مفتاح API
WarningAPIExplorerDisabled=The API explorer has been disabled. API explorer is not required to provide API services. It is a tool for developer to find/test REST APIs. If you need this tool, go into setup of module API REST to activate it.
##### Bank #####
BankSetupModule=إعداد وحدة مصرفية
FreeLegalTextOnChequeReceipts=نص حر على الشيكات والإيصالات
@ -1577,7 +1582,7 @@ BackupDumpWizard=المعالج لبناء قاعدة بيانات النسخ ا
SomethingMakeInstallFromWebNotPossible=تركيب وحدة خارجية غير ممكن من واجهة ويب للسبب التالي:
SomethingMakeInstallFromWebNotPossible2=لهذا السبب، عملية لترقية وصفت هنا هو دليل على بعد خطوات قليلة يمكن للمستخدم متميز القيام به.
InstallModuleFromWebHasBeenDisabledByFile=تثبيت وحدة خارجية من التطبيق قد تم تعطيلها من قبل المسؤول. يجب أن يطلب منه إزالة <strong>الملف٪ s</strong> للسماح هذه الميزة.
ConfFileMuseContainCustom=Installing an external module from application need to save the module files into directory <strong>%s</strong>. To have this directory processed by Dolibarr, you must setup your <strong>conf/conf.php</strong> to have option<br><strong>$dolibarr_main_url_root_alt='/custom';</strong><br><strong>$dolibarr_main_document_root_alt='%s/custom';</strong>
ConfFileMuseContainCustom=Installing an external module from application need to save the module files into directory <strong>%s</strong>. To have this directory processed by Dolibarr, you must setup your <strong>conf/conf.php</strong> to add the 2 directive lines:<br><strong>$dolibarr_main_url_root_alt='/custom';</strong><br><strong>$dolibarr_main_document_root_alt='%s/custom';</strong>
HighlightLinesOnMouseHover=تسليط الضوء على خطوط الجدول عندما يمر تحرك الماوس فوق
HighlightLinesColor=تسليط الضوء على لون الخط عند تمرير الماوس فوق (الحفاظ فارغة دون تمييز)
TextTitleColor=Color of page title
@ -1607,6 +1612,7 @@ FixTZ=الإصلاح والوقت
FillFixTZOnlyIfRequired=مثال: +2 (ملء فقط إذا كانت المشكلة من ذوي الخبرة)
ExpectedChecksum=اختباري المتوقع
CurrentChecksum=اختباري الحالي
ForcedConstants=Required constant values
MailToSendProposal=لإرسال اقتراح العملاء
MailToSendOrder=لإرسال طلب العميل
MailToSendInvoice=لإرسال فاتورة العملاء
@ -1615,9 +1621,10 @@ MailToSendIntervention=لإرسال التدخل
MailToSendSupplierRequestForQuotation=لإرسال طلب الاقتباس إلى المورد
MailToSendSupplierOrder=لإرسال المورد أجل
MailToSendSupplierInvoice=لإرسال فاتورة المورد
MailToSendContract=To send a contract
MailToThirdparty=To send email from third party page
ByDefaultInList=تظهر بشكل افتراضي على عرض القائمة
YouUseLastStableVersion=كنت تستخدم إصدار مستقر الماضي
YouUseLastStableVersion=You use the latest stable version
TitleExampleForMajorRelease=مثال على رسالة يمكنك استخدامها ليعلن هذا الإصدار الرئيسي (لا تتردد في استخدامها على مواقع الويب الخاص بك)
TitleExampleForMaintenanceRelease=مثال على الرسالة التي يمكن استخدامها ليعلن هذا البيان الصيانة (لا تتردد في استخدامها على مواقع الويب الخاص بك)
ExampleOfNewsMessageForMajorRelease=Dolibarr ERP & CRM %s is available. Version %s is a major release with a lot of new features for both users and developers. You can download it from the download area of https://www.dolibarr.org portal (subdirectory Stable versions). You can read <a href="https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog">ChangeLog</a> for complete list of changes.

View File

@ -74,13 +74,13 @@ Conciliate=التوفيق
Conciliation=توفيق
ReconciliationLate=Reconciliation late
IncludeClosedAccount=وتشمل حسابات مغلقة
OnlyOpenedAccount=حسابات مفتوحة فقط
OnlyOpenedAccount=إلا فتح حسابات
AccountToCredit=الحساب على الائتمان
AccountToDebit=لحساب الخصم
DisableConciliation=تعطيل ميزة التوفيق لهذا الحساب
ConciliationDisabled=توفيق سمة المعوقين
LinkedToAConciliatedTransaction=Linked to a conciliated entry
StatusAccountOpened=فتح
StatusAccountOpened=Opened
StatusAccountClosed=مغلقة
AccountIdShort=عدد
LineRecord=المعاملات

View File

@ -2,12 +2,12 @@
Bill=فاتورة
Bills=فواتير
BillsCustomers=فواتير العملاء
BillsCustomer=فاتورة العملاء
BillsCustomer=الزبون فاتورة
BillsSuppliers=فواتير الموردين
BillsCustomersUnpaid=فواتير العملاء الغير مدفوعة
BillsCustomersUnpaidForCompany=فواتير العميل الغير مدفوعة لـ%s
BillsSuppliersUnpaid=غير المدفوعة الموردين
BillsSuppliersUnpaidForCompany=مورد غير المسددة لفواتير %s
BillsCustomersUnpaid=فواتير العملاء غير المسددة
BillsCustomersUnpaidForCompany=Unpaid customer invoices for %s
BillsSuppliersUnpaid=فواتير الموردين غير المدفوعة
BillsSuppliersUnpaidForCompany=Unpaid supplier invoices for %s
BillsLate=في وقت متأخر المدفوعات
BillsStatistics=عملاء الفواتير إحصاءات
BillsStatisticsSuppliers=فواتير الموردين إحصاءات
@ -62,8 +62,8 @@ PaymentsBack=عودة المدفوعات
paymentInInvoiceCurrency=in invoices currency
PaidBack=تسديدها
DeletePayment=حذف الدفع
ConfirmDeletePayment=Are you sure you want to delete this payment?
ConfirmConvertToReduc=Do you want to convert this credit note or deposit into an absolute discount?<br>The amount will so be saved among all discounts and could be used as a discount for a current or a future invoice for this customer.
ConfirmDeletePayment=هل أنت متأكد من أنك تريد حذف هذا المبلغ؟
ConfirmConvertToReduc=Do you want to convert this %s into an absolute discount ?<br>The amount will so be saved among all discounts and could be used as a discount for a current or a future invoice for this customer.
SupplierPayments=الموردين والمدفوعات
ReceivedPayments=تلقت مدفوعات
ReceivedCustomersPayments=المدفوعات المقبوضة من الزبائن
@ -78,6 +78,7 @@ PaymentMode=نوع الدفع
PaymentTypeDC=Debit/Credit Card
PaymentTypePP=PayPal
IdPaymentMode=Payment type (id)
CodePaymentMode=Payment type (code)
LabelPaymentMode=Payment type (label)
PaymentModeShort=نوع الدفع
PaymentTerm=مصطلح الدفع
@ -102,9 +103,10 @@ SearchACustomerInvoice=البحث عن زبون فاتورة
SearchASupplierInvoice=البحث عن مورد فاتورة
CancelBill=شطب فاتورة
SendRemindByMail=إرسال تذكرة عن طريق البريد الإلكتروني
DoPayment=هل لدفع
DoPaymentBack=هل لدفع الظهر
DoPayment=Enter payment
DoPaymentBack=Enter refund
ConvertToReduc=تحويل الخصم في المستقبل
ConvertExcessReceivedToReduc=Convert excess received into future discount
EnterPaymentReceivedFromCustomer=دخول الدفع الواردة من العملاء
EnterPaymentDueToCustomer=من المقرر أن يسدد العميل
DisabledBecauseRemainderToPayIsZero=تعطيل بسبب المتبقية غير المدفوعة صفر
@ -151,14 +153,14 @@ NoQualifiedRecurringInvoiceTemplateFound=No recurring template invoice qualified
FoundXQualifiedRecurringInvoiceTemplate=Found %s recurring template invoice(s) qualified for generation.
NotARecurringInvoiceTemplate=Not a recurring template invoice
NewBill=فاتورة جديدة
LastBills=آخر الفواتير %s
LastCustomersBills=%s الماضي فواتير العملاء
LastSuppliersBills=%s الماضي فواتير الموردين
LastBills=Latest %s invoices
LastCustomersBills=Latest %s customer invoices
LastSuppliersBills=Latest %s supplier invoices
AllBills=جميع الفواتير
OtherBills=غيرها من الفواتير
DraftBills=مشروع الفواتير
CustomersDraftInvoices=مشروع فواتير العملاء
SuppliersDraftInvoices=مشروع فواتير الموردين
CustomersDraftInvoices=Customer draft invoices
SuppliersDraftInvoices=Supplier draft invoices
Unpaid=غير المدفوعة
ConfirmDeleteBill=Are you sure you want to delete this invoice?
ConfirmValidateBill=Are you sure you want to validate this invoice with reference <b>%s</b>?
@ -272,6 +274,7 @@ Deposit=إيداع
Deposits=الودائع
DiscountFromCreditNote=خصم من دائن %s
DiscountFromDeposit=المدفوعات من فاتورة %s
DiscountFromExcessReceived=Payments from excess received of invoice %s
AbsoluteDiscountUse=هذا النوع من الائتمان يمكن استخدامها على الفاتورة قبل المصادقة
CreditNoteDepositUse=Invoice must be validated to use this kind of credits
NewGlobalDiscount=تحديد خصم جديد
@ -279,8 +282,8 @@ NewRelativeDiscount=خصم جديد النسبية
NoteReason=ملاحظة / السبب
ReasonDiscount=السبب
DiscountOfferedBy=التي تمنحها
DiscountStillRemaining=خصم لا يزالون
DiscountAlreadyCounted=بالفعل خصم أحصى
DiscountStillRemaining=Discounts available
DiscountAlreadyCounted=Discounts already consumed
BillAddress=مشروع قانون معالجة
HelpEscompte=هذا الخصم هو الخصم الممنوح للعميل لأن الدفع قبل البعيد.
HelpAbandonBadCustomer=هذا المبلغ قد تم التخلي عنها (وذكر أن العملاء سيئة العملاء) ، ويعتبر أحد exceptionnal فضفاضة.
@ -333,6 +336,8 @@ InvoiceAutoValidate=Validate invoices automatically
GeneratedFromRecurringInvoice=Generated from template recurring invoice %s
DateIsNotEnough=Date not reached yet
InvoiceGeneratedFromTemplate=Invoice %s generated from recurring template invoice %s
WarningInvoiceDateInFuture=Warning, the invoice date is higher than current date
WarningInvoiceDateTooFarInFuture=Warning, the invoice date is too far from current date
# PaymentConditions
Statut=الحالة
PaymentConditionShortRECEP=Due Upon Receipt
@ -351,6 +356,14 @@ PaymentConditionShortPT_ORDER=الطلبية
PaymentConditionPT_ORDER=على الطلب
PaymentConditionShortPT_5050=50-50
PaymentConditionPT_5050=50 ٪٪ مقدما، 50 ٪٪ عند التسليم
PaymentConditionShort10D=10 days
PaymentCondition10D=10 days
PaymentConditionShort10DENDMONTH=10 days of month-end
PaymentCondition10DENDMONTH=Within 10 days following the end of the month
PaymentConditionShort14D=14 days
PaymentCondition14D=14 days
PaymentConditionShort14DENDMONTH=14 days of month-end
PaymentCondition14DENDMONTH=Within 14 days following the end of the month
FixAmount=كمية الإصلاح
VarAmount=مقدار متغير (٪٪ TOT).
# PaymentType
@ -420,7 +433,7 @@ ChequeDeposits=الشيكات الودائع
Cheques=الشيكات
DepositId=إيداع معرف
NbCheque=عدد الشيكات
CreditNoteConvertedIntoDiscount=هذه المذكرة الائتمان أو إيداع فاتورة تم تحويلها إلى %s
CreditNoteConvertedIntoDiscount=This %s has been converted into %s
UsBillingContactAsIncoiveRecipientIfExist=فواتير العملاء استخدام عنوان الاتصال بدلا من التصدي لطرف ثالث كما المتلقية للفواتير
ShowUnpaidAll=وتظهر جميع الفواتير غير المسددة
ShowUnpaidLateOnly=وتبين في وقت متأخر من الفواتير غير المدفوعة فقط

View File

@ -25,8 +25,8 @@ BoxTitleLastSuppliers=Latest %s recorded suppliers
BoxTitleLastModifiedSuppliers=Latest %s modified suppliers
BoxTitleLastModifiedCustomers=Latest %s modified customers
BoxTitleLastCustomersOrProspects=Latest %s customers or prospects
BoxTitleLastCustomerBills=Latest %s customer's invoices
BoxTitleLastSupplierBills=Latest %s supplier's invoices
BoxTitleLastCustomerBills=Latest %s customer invoices
BoxTitleLastSupplierBills=Latest %s supplier invoices
BoxTitleLastModifiedProspects=Latest %s modified prospects
BoxTitleLastModifiedMembers=Latest %s members
BoxTitleLastFicheInter=Latest %s modified interventions
@ -51,12 +51,12 @@ ClickToAdd=انقر هنا لإضافة.
NoRecordedCustomers=لا العملاء تسجيل
NoRecordedContacts=أي اتصالات تسجيل
NoActionsToDo=توجد إجراءات لتفعل
NoRecordedOrders=أوامر العملاء لا يسجل في
NoRecordedOrders=No recorded customer orders
NoRecordedProposals=أي مقترحات تسجيل
NoRecordedInvoices=فواتير لم تسجل العملاء ل
NoUnpaidCustomerBills=فواتير غير مدفوعة الأجر في أي العملاء
NoUnpaidSupplierBills=فواتير غير مدفوعة الأجر في أي المورد
NoModifiedSupplierBills=فواتير لم المورد المسجلة في
NoRecordedInvoices=No recorded customer invoices
NoUnpaidCustomerBills=No unpaid customer invoices
NoUnpaidSupplierBills=No unpaid supplier invoices
NoModifiedSupplierBills=No recorded supplier invoices
NoRecordedProducts=لم تسجل المنتجات / الخدمات
NoRecordedProspects=لا آفاق المسجلة
NoContractedProducts=لا توجد منتجات / خدمات التعاقد

View File

@ -81,6 +81,7 @@ PaymentBankAccount=Payment bank account
OverAllProposals=Total proposals
OverAllOrders=Total orders
OverAllInvoices=Total invoices
OverAllSupplierProposals=Total price requests
##### Local Taxes #####
LocalTax1IsUsed=استخدام الضرائب الثانية
LocalTax1IsUsedES= يتم استخدام الطاقة المتجددة
@ -389,7 +390,7 @@ ListCustomersShort=قائمة العملاء
ThirdPartiesArea=أطراف ثالثة، ومنطقة الاتصال
LastModifiedThirdParties=Latest %s modified third parties
UniqueThirdParties=مجموع الأطراف الثالثة فريدة من نوعها
InActivity=فتح
InActivity=Opened
ActivityCeased=مغلق
ThirdPartyIsClosed=Third party is closed
ProductsIntoElements=قائمة المنتجات / الخدمات إلى %s
@ -404,7 +405,7 @@ MergeThirdparties=دمج أطراف ثالثة
ConfirmMergeThirdparties=Are you sure you want to merge this third party into the current one? All linked objects (invoices, orders, ...) will be moved to current third party so you will be able to delete the duplicate one.
ThirdpartiesMergeSuccess=تم دمج Thirdparties
SaleRepresentativeLogin=Login of sales representative
SaleRepresentativeFirstname=Firstname of sales representative
SaleRepresentativeLastname=Lastname of sales representative
SaleRepresentativeFirstname=First name of sales representative
SaleRepresentativeLastname=Last name of sales representative
ErrorThirdpartiesMerge=كان هناك خطأ عند حذف thirdparties. يرجى التحقق من السجل. وقد عادت التغييرات.
NewCustomerSupplierCodeProposed=New customer or supplier code suggested on duplicate code

View File

@ -65,6 +65,7 @@ PaymentSocialContribution=اجتماعي / دفع الضرائب المالية
PaymentVat=دفع ضريبة القيمة المضافة
ListPayment=قائمة المدفوعات
ListOfCustomerPayments=قائمة مدفوعات العملاء
ListOfSupplierPayments=قائمة الموردين المدفوعات
DateStartPeriod=تاريخ بداية الفترة
DateEndPeriod=تاريخ انتهاء الفترة
newLT1Payment=جديد الضريبية 2 الدفع
@ -81,7 +82,7 @@ LT2PaymentES=IRPF الدفع
LT2PaymentsES=الدفعات IRPF
VATPayment=Sales tax payment
VATPayments=Sales tax payments
VATRefund=Sales tax refund Refund
VATRefund=Sales tax refund
Refund=رد
SocialContributionsPayments=الاجتماعية المدفوعات / الضرائب المالية
ShowVatPayment=وتظهر دفع ضريبة القيمة المضافة

View File

@ -17,14 +17,14 @@ CronMethodDoesNotExists=Class %s does not contains any method %s
# Menu
EnabledAndDisabled=Enabled and disabled
# Page list
CronLastOutput=نشاط انتاج المدى
CronLastResult=آخر رمز النتيجة
CronLastOutput=Latest run output
CronLastResult=Latest result code
CronCommand=أمر
CronList=المهام المجدولة
CronDelete=حذف المهام المجدولة
CronConfirmDelete=هل أنت متأكد أنك تريد حذف هذه المهام المجدولة؟
CronConfirmDelete=Are you sure you want to delete these scheduled jobs?
CronExecute=Launch scheduled job
CronConfirmExecute=هل أنت متأكد أنك تريد تنفيذ هذه المهام المجدولة الآن؟
CronConfirmExecute=Are you sure you want to execute these scheduled jobs now?
CronInfo=وحدة مهمة مجدولة تسمح لتنفيذ المهمة التي تم التخطيط لها
CronTask=وظيفة
CronNone=بلا
@ -39,7 +39,7 @@ CronMethod=الطريقة
CronModule=وحدة
CronNoJobs=أي وظيفة سجلت
CronPriority=الأولوية
CronLabel=Label
CronLabel=ملصق
CronNbRun=ملحوظة. إطلاق
CronMaxRun=Max nb. launch
CronEach=كل
@ -73,7 +73,7 @@ CronType_method=استدعاء الأسلوب من فئة Dolibarr
CronType_command=الأمر Shell
CronCannotLoadClass=لا يمكن تحميل الطبقة %s أو الكائن %s
UseMenuModuleToolsToAddCronJobs=Go into menu "Home - Admin tools - Scheduled jobs" to see and edit scheduled jobs.
JobDisabled=Job disabled
JobDisabled=تعطيل وظيفة
MakeLocalDatabaseDumpShort=Local database backup
MakeLocalDatabaseDump=Create a local database dump
WarningCronDelayed=Attention, for performance purpose, whatever is next date of execution of active jobs, your jobs may be delayed to a maximum of %s hours before being run.

View File

@ -11,6 +11,7 @@ ErrorLoginAlreadyExists=ادخل ٪ ق موجود بالفعل.
ErrorGroupAlreadyExists=المجموعة ٪ ق موجود بالفعل.
ErrorRecordNotFound=لم يتم العثور على السجل.
ErrorFailToCopyFile=فشل في نسخ الملف <b>'%s'</b> إلى <b>'%s</b> &quot;.
ErrorFailToCopyDir=Failed to copy directory '<b>%s</b>' into '<b>%s</b>'.
ErrorFailToRenameFile=فشل لإعادة تسمية الملف <b>'%s'</b> إلى <b>'%s</b> &quot;.
ErrorFailToDeleteFile=فشل إزالة الملف <b>'٪ ق.</b>
ErrorFailToCreateFile=فشل إنشاء الملف <b>'٪ ق.</b>
@ -115,7 +116,7 @@ ErrorNoActivatedBarcode=لا يوجد نوع الباركود تفعيلها
ErrUnzipFails=فشل بفك٪ الصورة مع ZipArchive
ErrNoZipEngine=لا المحرك لبفك الصورة ملف٪ في هذا PHP
ErrorFileMustBeADolibarrPackage=يجب أن يكون الملف٪ s حزمة البريدي Dolibarr
ErrorFileRequired=فإنه يأخذ ملف حزمة Dolibarr
ErrorModuleFileRequired=You must select a Dolibarr module package file
ErrorPhpCurlNotInstalled=وPHP الضفيرة لم يتم تثبيت، وهذا أمر ضروري لاجراء محادثات مع باي بال
ErrorFailedToAddToMailmanList=فشل لاضافة التسجيلة٪ s إلى قائمة ميلمان٪ الصورة أو قاعدة SPIP
ErrorFailedToRemoveToMailmanList=فشل لإزالة سجل٪ s إلى قائمة ميلمان٪ الصورة أو قاعدة SPIP
@ -181,6 +182,8 @@ ErrorBankStatementNameMustFollowRegex=Error, bank statement name must follow the
ErrorPhpMailDelivery=Check that you don't use a too high number of recipients and that your email content is not similar to a Spam. Ask also your administrator to check firewall and server logs files for a more complete information.
ErrorUserNotAssignedToTask=User must be assigned to task to be able to enter time consumed.
ErrorTaskAlreadyAssigned=Task already assigned to user
ErrorModuleFileSeemsToHaveAWrongFormat=The module package seems to have a wrong format.
ErrorFilenameDosNotMatchDolibarrPackageRules=The name of the module package (<strong>%s</strong>) does not match expected name syntax: <strong>%s</strong>
# Warnings
WarningPasswordSetWithNoAccount=تم تعيين كلمة مرور لهذا العضو. ومع ذلك، تم إنشاء أي حساب المستخدم. لذلك يتم تخزين كلمة المرور هذه ولكن لا يمكن استخدامها للدخول إلى Dolibarr. ويمكن استخدامه من قبل وحدة / واجهة خارجية ولكن إذا كنت لا تحتاج إلى تعريف أي تسجيل دخول أو كلمة المرور لأحد أفراد، يمكنك تعطيل خيار "إدارة تسجيل دخول لكل عضو" من إعداد وحدة الأعضاء. إذا كنت بحاجة إلى إدارة تسجيل الدخول ولكن لا تحتاج إلى أي كلمة المرور، يمكنك الحفاظ على هذا الحقل فارغا لتجنب هذا التحذير. ملاحظة: يمكن أيضا أن تستخدم البريد الإلكتروني لتسجيل الدخول إذا تم ربط عضو إلى المستخدم.

View File

@ -76,8 +76,8 @@ BoxTitleLastLeaveRequests=Latest %s modified leave requests
HolidaysMonthlyUpdate=تحديث شهري
ManualUpdate=التحديث اليدوي
HolidaysCancelation=ترك طلب الإلغاء
EmployeeLastname=Employee lastname
EmployeeFirstname=Employee firstname
EmployeeLastname=Employee last name
EmployeeFirstname=Employee first name
TypeWasDisabledOrRemoved=Leave type (id %s) was disabled or removed
## Configuration du Module ##

View File

@ -13,8 +13,8 @@ LDAPUsers=المستخدمين في قاعدة البيانات LDAP
LDAPFieldStatus=حالة
LDAPFieldFirstSubscriptionDate=أول موعد الاكتتاب
LDAPFieldFirstSubscriptionAmount=قبضة مبلغ الاشتراك
LDAPFieldLastSubscriptionDate=آخر موعد الاكتتاب
LDAPFieldLastSubscriptionAmount=الاكتتاب المبلغ الأخير
LDAPFieldLastSubscriptionDate=Latest subscription date
LDAPFieldLastSubscriptionAmount=Latest subscription amount
LDAPFieldSkype=Skype id
LDAPFieldSkypeExample=Example : skypeName
UserSynchronized=وتزامن المستخدم

View File

@ -74,14 +74,18 @@ ResultOfMailSending=نتيجة لإرسال البريد الإلكتروني ا
NbSelected=ملحوظة مختارة
NbIgnored=ملحوظة تجاهلها
NbSent=أرسلت ملحوظة
ContactsWithThirdpartyFilter=Contact with customer filters
ConfirmUnvalidateEmailing=Are you sure you want to change email <b>%s</b> to draft status?
MailingModuleDescContactsWithThirdpartyFilter=Contact with customer filters
MailingModuleDescContactsByCompanyCategory=Contacts by third party category
MailingModuleDescContactsByCategory=Contacts by categories
MailingModuleDescContactsByFunction=Contacts by position
# Libelle des modules de liste de destinataires mailing
LineInFile=خط المستندات في ملف ٪
RecipientSelectionModules=حددت لطلبات المستفيدين الاختيار
MailSelectedRecipients=اختيار المستفيدين
MailingArea=EMailings المنطقة
LastMailings=ق emailings الماضي ٪
LastMailings=Latest %s emailings
TargetsStatistics=أهداف الإحصاءات
NbOfCompaniesContacts=فريدة من شركات الاتصالات
MailNoChangePossible=صادق المتلقين للمراسلة لا يمكن تغيير
@ -146,3 +150,6 @@ AdvTgtCreateFilter=Create filter
AdvTgtOrCreateNewFilter=Name of new filter
NoContactWithCategoryFound=No contact/address with a category found
NoContactLinkedToThirdpartieWithCategoryFound=No contact/address with a category found
OutGoingEmailSetup=Outgoing email setup
InGoingEmailSetup=Incoming email setup

View File

@ -69,6 +69,7 @@ SetDate=التاريخ المحدد
SelectDate=تحديد تاريخ
SeeAlso=انظر أيضا الصورة٪
SeeHere=انظر هنا
Apply=تطبيق
BackgroundColorByDefault=لون الخلفية الافتراضية
FileRenamed=The file was successfully renamed
FileUploaded=تم تحميل الملف بنجاح
@ -87,7 +88,7 @@ Undefined=غير محدد
PasswordForgotten=Password forgotten?
SeeAbove=أنظر فوق
HomeArea=المنطقة الرئيسية
LastConnexion=آخر إتصال
LastConnexion=Latest connection
PreviousConnexion=الاتصال السابق
PreviousValue=Previous value
ConnectedOnMultiCompany=إتصال على البيئة
@ -237,7 +238,7 @@ DateCreation=تاريخ الإنشاء
DateCreationShort=يخلق. التاريخ
DateModification=تاريخ التعديل
DateModificationShort=Modif. التاريخ
DateLastModification=تاريخ آخر تعديل
DateLastModification=Latest modification date
DateValidation=تاريخ التحقق من الصحة
DateClosing=الموعد النهائي
DateDue=تاريخ الاستحقاق
@ -433,7 +434,7 @@ Reportings=التقارير
Draft=مسودة
Drafts=الداما
Validated=التحقق من صحة
Opened=فتح
Opened=Opened
New=جديد
Discount=تخفيض السعر
Unknown=غير معروف
@ -599,6 +600,8 @@ SessionName=اسم الدورة
Method=الطريقة
Receive=استقبال
CompleteOrNoMoreReceptionExpected=Complete or nothing more expected
ExpectedValue=Expected Value
CurrentValue=القيمة الحالية
PartialWoman=جزئي
TotalWoman=المجموع
NeverReceived=لم يتلق
@ -756,6 +759,7 @@ SomeTranslationAreUncomplete=Some languages may be partially translated or may c
DirectDownloadLink=Direct download link
Download=Download
ActualizeCurrency=Update currency rate
Fiscalyear=السنة المالية
# Week day
Monday=يوم الاثنين
Tuesday=الثلاثاء
@ -812,3 +816,5 @@ SearchIntoContracts=عقود
SearchIntoCustomerShipments=Customer shipments
SearchIntoExpenseReports=تقارير المصاريف
SearchIntoLeaves=أوراق
BulkActions=Bulk actions

View File

@ -136,8 +136,8 @@ DocForAllMembersCards=إنشاء بطاقات العمل لجميع أعضاء (
DocForOneMemberCards=إنشاء بطاقات العمل لعضو معين (تنسيق الإعداد للإخراج في الواقع : <b>%s)</b>
DocForLabels=أوراق عنوان انتج (تنسيق الإعداد للإخراج فعلا : <b>%s)</b>
SubscriptionPayment=دفع الاشتراك
LastSubscriptionDate=آخر موعد الاكتتاب
LastSubscriptionAmount=آخر مبلغ الاشتراك
LastSubscriptionDate=Latest subscription date
LastSubscriptionAmount=Latest subscription amount
MembersStatisticsByCountries=أعضاء إحصاءات حسب البلد
MembersStatisticsByState=أعضاء إحصاءات الولاية / المقاطعة
MembersStatisticsByTown=أعضاء إحصاءات بلدة
@ -149,7 +149,7 @@ MembersByStateDesc=هذه الشاشة تظهر لك إحصاءات عن أفر
MembersByTownDesc=هذه الشاشة تظهر لك إحصاءات عن أفراد من البلدة.
MembersStatisticsDesc=اختيار الإحصاءات التي ترغب في قراءتها ...
MenuMembersStats=إحصائيات
LastMemberDate=آخر عضو تاريخ
LastMemberDate=Latest member date
Nature=طبيعة
Public=معلومات علنية
NewMemberbyWeb=وأضاف عضو جديد. تنتظر الموافقة

View File

@ -39,7 +39,7 @@ StatusOrderRefusedShort=رفض
StatusOrderBilledShort=المنقار
StatusOrderToProcessShort=لعملية
StatusOrderReceivedPartiallyShort=تلقى جزئيا
StatusOrderReceivedAllShort=وتلقى كل شيء
StatusOrderReceivedAllShort=Products received
StatusOrderCanceled=ألغى
StatusOrderDraft=مشروع (لا بد من التحقق من صحة)
StatusOrderValidated=صادق
@ -51,7 +51,7 @@ StatusOrderApproved=وافق
StatusOrderRefused=رفض
StatusOrderBilled=المنقار
StatusOrderReceivedPartially=تلقى جزئيا
StatusOrderReceivedAll=وتلقى كل شيء
StatusOrderReceivedAll=All products received
ShippingExist=شحنة موجود
QtyOrdered=الكمية أمرت
ProductQtyInDraft=كمية المنتج في مشاريع المراسيم

View File

@ -68,14 +68,15 @@ PredefinedMailContentSendSupplierInvoice=__CONTACTCIVNAME__ سوف تجد هنا
PredefinedMailContentSendShipping=__CONTACTCIVNAME__ سوف تجد هنا الشحن __SHIPPINGREF__ __PERSONALIZED__Sincerely __SIGNATURE__
PredefinedMailContentSendFichInter=__CONTACTCIVNAME__ سوف تجد هنا تدخل __FICHINTERREF__ __PERSONALIZED__Sincerely __SIGNATURE__
PredefinedMailContentThirdparty=__CONTACTCIVNAME__ __PERSONALIZED__ __SIGNATURE__
DemoDesc=Dolibarr is a compact ERP/CRM supporting several functional modules. A demo showcasing all modules makes no sense as this scenario never occurs. So, several demo profiles are available.
DemoDesc=Dolibarr is a compact ERP/CRM supporting several business modules. A demo showcasing all modules makes no sense as this scenario never occurs (several hundred available). So, several demo profiles are available.
ChooseYourDemoProfil=Choose the demo profile that best suits your needs...
ChooseYourDemoProfilMore=...or build your own profile<br>(manual module selection)
DemoFundation=أعضاء في إدارة مؤسسة
DemoFundation2=إدارة وأعضاء في الحساب المصرفي للمؤسسة
DemoCompanyServiceOnly=إدارة نشاط بيع الخدمة لحسابهم الخاص فقط
DemoCompanyServiceOnly=Company or freelance selling service only
DemoCompanyShopWithCashDesk=تدير متجر مع مكتب النقدية
DemoCompanyProductAndStocks=إدارة شركة صغيرة أو متوسطة بيع المنتجات
DemoCompanyAll=إدارة شركة صغيرة أو متوسطة متعددة الأنشطة الرئيسية لجميع وحدات)
DemoCompanyProductAndStocks=Company selling products with a shop
DemoCompanyAll=Company with multiple activities (all main modules)
CreatedBy=أوجدتها ٪ ق
ModifiedBy=المعدلة ق ٪
ValidatedBy=يصادق عليها ق ٪

View File

@ -60,7 +60,7 @@ SellingPrice=سعر البيع
SellingPriceHT=سعر البيع (صافي الضرائب)
SellingPriceTTC=سعر البيع (شركة الضريبية)
CostPriceDescription=هذا السعر (صافية من الضرائب) يمكن استخدامها لتخزين متوسط ​​كمية هذا تكلفة المنتج لشركتك. قد يكون بأي ثمن على حساب نفسك، على سبيل المثال من متوسط ​​سعر الشراء بالإضافة إلى متوسط ​​إنتاج وتوزيع التكاليف.
CostPriceUsage=في النسخة المقبلة، ويمكن استخدام هذه القيمة لحساب الهامش.
CostPriceUsage=This value could be used for margin calculation.
SoldAmount=Sold amount
PurchasedAmount=Purchased amount
NewPrice=السعر الجديد
@ -142,6 +142,7 @@ ConfirmCloneProduct=Are you sure you want to clone product or service <b>%s</b>?
CloneContentProduct=استنساخ جميع المعلومات الرئيسية من المنتجات / الخدمات
ClonePricesProduct=استنساخ الرئيسية معلومات والأسعار
CloneCompositionProduct=استنساخ حزم المنتج / الخدمة
CloneCombinationsProduct=Clone product variants
ProductIsUsed=ويستخدم هذا المنتج
NewRefForClone=المرجع. من المنتجات الجديدة / خدمة
SellingPrices=أسعار بيع
@ -238,7 +239,7 @@ GlobalVariables=المتغيرات العالمية
VariableToUpdate=Variable to update
GlobalVariableUpdaters=updaters متغير العالمية
UpdateInterval=تحديث الفاصل الزمني (دقائق)
LastUpdated=آخر تحديث
LastUpdated=Latest update
CorrectlyUpdated=تحديثها بشكل صحيح
PropalMergePdfProductActualFile=استخدام الملفات لإضافة إلى PDF دازور هي / هو
PropalMergePdfProductChooseFile=اختر ملفات PDF
@ -258,4 +259,41 @@ VolumeUnits=Volume unit
SizeUnits=Size unit
DeleteProductBuyPrice=Delete buying price
ConfirmDeleteProductBuyPrice=Are you sure you want to delete this buying price?
SubProduct=Sub product
#Attributes
VariantAttributes=Variant attributes
ProductAttributes=Variant attributes for products
ProductAttributeName=Variant attribute %s
ProductAttribute=Variant attribute
ProductAttributeDeleteDialog=Are you sure you want to delete this attribute? All values will be deleted
ProductAttributeValueDeleteDialog=Are you sure you want to delete the value "%s" with reference "%s" of this attribute?
ProductCombinationDeleteDialog=Are you sure want to delete the variant of the product "<strong>%s</strong>"?
ProductCombinationAlreadyUsed=There was an error while deleting the variant. Please check it is not being used in any object
ProductCombinations=Variants
HideProductCombinations=Hide products variant in the products selector
ProductCombination=Variant
NewProductCombination=New variant
EditProductCombination=Editing variant
ProductCombinationGenerator=Variants generator
Features=Features
PriceImpact=Price impact
WeightImpact=Weight impact
NewProductAttribute=جديد السمة
NewProductAttributeValue=New attribute value
ErrorCreatingProductAttributeValue=There was an error while creating the attribute value. It could be because there is already an existing value with that reference
ProductCombinationGeneratorWarning=If you continue, before generating new variants, all previous ones will be DELETED. Already existing ones will be updated with the new values
TooMuchCombinationsWarning=Generating lots of variants may result in high CPU, memory usage and Dolibarr not able to create them. Enabling the option "%s" may help reduce memory usage.
DoNotRemovePreviousCombinations=Do not remove previous variants
UsePercentageVariations=Use percentage variations
PercentageVariation=Percentage variation
ErrorDeletingGeneratedProducts=There was an error while trying to delete existing product variants
NbOfDifferentValues=Nb of different values
NbProducts=Nb. of products
ParentProduct=Parent product
HideChildProducts=Hide child products
ConfirmCloneProductCombinations=Would you like to copy all the product variant to the product with the given reference?
CloneDestinationReference=Destination product reference
ErrorCopyProductCombinations=There was an error while copying the product variants
ErrorDestinationProductNotFound=Destination product not found
ErrorProductCombinationNotFound=Product variant not found

View File

@ -29,9 +29,9 @@ DeleteAProject=حذف مشروع
DeleteATask=حذف مهمة
ConfirmDeleteAProject=Are you sure you want to delete this project?
ConfirmDeleteATask=Are you sure you want to delete this task?
OpenedProjects=Open projects
OpenedTasks=Open tasks
OpportunitiesStatusForOpenedProjects=Opportunities amount of open projects by status
OpenedProjects=مشاريع فتح
OpenedTasks=Opened tasks
OpportunitiesStatusForOpenedProjects=فرص كمية من المشاريع فتحت حسب الحالة
OpportunitiesStatusForProjects=Opportunities amount of projects by status
ShowProject=وتبين للمشروع
SetProject=وضع المشروع
@ -47,7 +47,7 @@ TaskTimeSpent=الوقت المستغرق في المهام
TaskTimeUser=المستعمل
TaskTimeNote=ملاحظة
TaskTimeDate=Date
TasksOnOpenedProject=المهام على المشاريع المفتوحة
TasksOnOpenedProject=Tasks on opened projects
WorkloadNotDefined=عبء العمل غير محددة
NewTimeSpent=جديد الوقت الذي يقضيه
MyTimeSpent=وقتي قضى
@ -96,6 +96,7 @@ ValidateProject=تحقق من مشروع غابة
ConfirmValidateProject=Are you sure you want to validate this project?
CloseAProject=وثيقة المشروع
ConfirmCloseAProject=Are you sure you want to close this project?
AlsoCloseAProject=Also close project (keep it open if you still need to follow production tasks on it)
ReOpenAProject=فتح مشروع
ConfirmReOpenAProject=Are you sure you want to re-open this project?
ProjectContact=مشروع اتصالات
@ -121,7 +122,7 @@ CloneProjectFiles=انضم مشروع استنساخ ملفات
CloneTaskFiles=مهمة استنساخ (ق) انضم الملفات (إن مهمة (ق) المستنسخة)
CloneMoveDate=Update project/tasks dates from now?
ConfirmCloneProject=Are you sure to clone this project?
ProjectReportDate=تغيير موعد المهمة وفقا المشروع تاريخ بداية
ProjectReportDate=Change task dates according to new project start date
ErrorShiftTaskDate=من المستحيل تحويل التاريخ المهمة وفقا لتاريخ بدء المشروع الجديد
ProjectsAndTasksLines=المشاريع والمهام
ProjectCreatedInDolibarr=مشروع٪ الصورة التي تم إنشاؤها
@ -178,9 +179,9 @@ ProjectsStatistics=إحصاءات عن المشاريع / يؤدي
TaskAssignedToEnterTime=المهمة الموكلة. يجب دخول الوقت على هذه المهمة يكون ممكنا.
IdTaskTime=الوقت مهمة معرف
YouCanCompleteRef=If you want to complete the ref with some information (to use it as search filters), it is recommanded to add a - character to separate it, so the automatic numbering will still work correctly for next projects. For example %s-ABC. You may also prefer to add search keys into label. But best practice may be to add a dedicated field, also called complementary attributes.
OpenedProjectsByThirdparties=Open projects by thirdparties
OpenedProjectsByThirdparties=مشاريع افتتحه thirdparties
OnlyOpportunitiesShort=Only opportunities
OpenedOpportunitiesShort=Open opportunities
OpenedOpportunitiesShort=Opened opportunities
NotAnOpportunityShort=Not an opportunity
OpportunityTotalAmount=فرص المبلغ الإجمالي
OpportunityPonderatedAmount=كمية الفرص المرجحة

View File

@ -3,7 +3,7 @@ Proposals=مقترحات تجارية
Proposal=اقتراح التجارية
ProposalShort=اقتراح
ProposalsDraft=مقترحات مشاريع تجارية
ProposalsOpened=مقترحات التجارية المفتوحة
ProposalsOpened=افتتح مقترحات تجارية
Prop=مقترحات تجارية
CommercialProposal=اقتراح التجارية
ProposalCard=اقتراح بطاقة
@ -26,9 +26,9 @@ AmountOfProposalsByMonthHT=المبلغ في الشهر (بعد خصم الضر
NbOfProposals=عدد من المقترحات والتجاري
ShowPropal=وتظهر اقتراح
PropalsDraft=المسودات
PropalsOpened=فتح
PropalsOpened=Opened
PropalStatusDraft=مشروع (لا بد من التحقق من صحة)
PropalStatusValidated=صادق (اقتراح فتح)
PropalStatusValidated=Validated (proposal is opened)
PropalStatusSigned=وقعت (لمشروع القانون)
PropalStatusNotSigned=لم يتم التوقيع (مغلقة)
PropalStatusBilled=فواتير

Some files were not shown because too many files have changed in this diff Show More