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 * 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'); $ret=$user->fetch('','admin');
if (! $ret > 0) if (! $ret > 0)
@ -54,16 +105,15 @@ $user->getrights();
$socids = array(); $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); $resql = $db->query($sql);
if ($resql) if ($resql)
{ {
$num_socs = $db->num_rows($resql); $num_thirdparties = $db->num_rows($resql);
$i = 0; $i = 0;
while ($i < $num_socs) while ($i < $num_thirdparties)
{ {
$i++; $i++;
$row = $db->fetch_row($resql); $row = $db->fetch_row($resql);
$socids[$i] = $row[0]; $socids[$i] = $row[0];
} }
@ -79,7 +129,6 @@ if ($resql)
while ($i < $num_prods) while ($i < $num_prods)
{ {
$i++; $i++;
$row = $db->fetch_row($resql); $row = $db->fetch_row($resql);
$prodids[$i] = $row[0]; $prodids[$i] = $row[0];
} }
@ -90,46 +139,51 @@ $result=0;
while ($i < GEN_NUMBER_FACTURE && $result >= 0) while ($i < GEN_NUMBER_FACTURE && $result >= 0)
{ {
$i++; $i++;
$socid = mt_rand(1, $num_socs); $socid = mt_rand(1, $num_thirdparties);
print "Invoice ".$i." for socid ".$socid; print "Invoice ".$i." for socid ".$socid;
$facture = new Facture($db); $object = new Facture($db);
$facture->date = time(); $object->socid = $socids[$socid];
$facture->cond_reglement_id = 3; $object->date = $dates[mt_rand(1, count($dates)-1)];
$facture->mode_reglement_id = 3; $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) 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) if ($result)
{ {
$nbp = mt_rand(2, 5); print " OK with ref ".$object->ref."\n";;
$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";;
} }
else else
{ {
dol_print_error($db,$facture->error); dol_print_error($db,$object->error);
} }
} }
else 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.'/product/class/product.class.php';
include_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php'; include_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php';
include_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.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); 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'); $ret=$user->fetch('','admin');
if ($ret <= 0) if ($ret <= 0)
@ -57,34 +109,34 @@ if ($ret <= 0)
} }
$user->getrights(); $user->getrights();
$societesid = array();
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."societe"; $societesid = array(); $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."societe where client in (1, 3)";
$resql=$db->query($sql); $resql=$db->query($sql);
if ($resql) { if ($resql) {
$num = $db->num_rows($resql); $num_thirdparties = $db->num_rows($resql);
$i = 0; $i = 0;
while ($i < $num) { while ($i < $num_thirdparties) {
$row = $db->fetch_row($resql); $i++;
$row = $db->fetch_row($resql);
$societesid[$i] = $row[0]; $societesid[$i] = $row[0];
$i++;
} }
} }
else { print "err"; } 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); $resql=$db->query($sql);
if ($resql) { if ($resql) {
$num = $db->num_rows($resql); $num = $db->num_rows($resql);
$i = 0; $i = 0;
while ($i < $num) { while ($i < $num) {
$row = $db->fetch_row($resql);
$commandesid[$i] = $row[0];
$i++; $i++;
$row = $db->fetch_row($resql);
$commandesid[$i] = $row[0];
} }
} }
else { print "err"; } else { print "err"; }
$prodids = array(); $prodids = array();
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."product WHERE tosell=1"; $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."product WHERE tosell=1";
$resql = $db->query($sql); $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"; print "Build ".GEN_NUMBER_COMMANDE." orders\n";
@ -162,53 +161,63 @@ for ($s = 0 ; $s < GEN_NUMBER_COMMANDE ; $s++)
{ {
print "Process order ".$s."\n"; print "Process order ".$s."\n";
$com = new Commande($db); $object = new Commande($db);
$com->socid = 4; $object->socid = $societesid[mt_rand(1, $num_thirdparties)];
$com->date_commande = $dates[mt_rand(1, count($dates)-1)]; $object->date_commande = $dates[mt_rand(1, count($dates)-1)];
$com->note = 'A comment'; $object->note = 'My small comment about this order. Hum. Nothing.';
$com->source = 1; $object->source = 1;
$com->fk_project = 0; $object->fk_project = 0;
$com->remise_percent = 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(); $db->begin();
$result=$com->create($user); $result=$object->create($fuser);
if ($result >= 0) 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) 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(); $db->commit();
print " OK with ref ".$com->ref."\n"; print " OK with ref ".$object->ref."\n";
} }
else else
{ {
print " KO\n"; print " KO\n";
$db->rollback(); $db->rollback();
dol_print_error($db,$com->error); dol_print_error($db,$object->error);
} }
} }
else else
{ {
print " KO\n"; print " KO\n";
$db->rollback(); $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 * 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'); $ret=$user->fetch('','admin');
if (! $ret > 0) if (! $ret > 0)
@ -56,16 +107,15 @@ $user->getrights();
$socids = array(); $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); $resql = $db->query($sql);
if ($resql) if ($resql)
{ {
$num_socs = $db->num_rows($resql); $num_thirdparties = $db->num_rows($resql);
$i = 0; $i = 0;
while ($i < $num_socs) while ($i < $num_thirdparties)
{ {
$i++; $i++;
$row = $db->fetch_row($resql); $row = $db->fetch_row($resql);
$socids[$i] = $row[0]; $socids[$i] = $row[0];
} }
@ -81,7 +131,6 @@ if ($resql)
while ($i < $num_conts) while ($i < $num_conts)
{ {
$i++; $i++;
$row = $db->fetch_row($resql); $row = $db->fetch_row($resql);
$contids[$row[1]][0] = $row[0]; // A ameliorer $contids[$row[1]][0] = $row[0]; // A ameliorer
} }
@ -97,7 +146,6 @@ if ($resql)
while ($i < $num_prods) while ($i < $num_prods)
{ {
$i++; $i++;
$row = $db->fetch_row($resql); $row = $db->fetch_row($resql);
$prodids[$i] = $row[0]; $prodids[$i] = $row[0];
} }
@ -117,27 +165,25 @@ $result=0;
while ($i < GEN_NUMBER_PROPAL && $result >= 0) while ($i < GEN_NUMBER_PROPAL && $result >= 0)
{ {
$i++; $i++;
$socid = mt_rand(1, $num_socs); $socid = mt_rand(1, $num_thirdparties);
print "Proposal ".$i." for socid ".$socid; print "Proposal ".$i." for socid ".$socid;
$soc = new Societe($db); $soc = new Societe($db);
$propal = new Propal($db); $object = new Propal($db);
$obj = $conf->global->PROPALE_ADDON; $fuser = new User($db);
$modPropale = new $obj; $fuser->fetch(mt_rand(1,2));
$numpr = $modPropale->getNextValue($soc,$propal); $fuser->getRights();
$propal->ref = $numpr; $object->contactid = $contids[$socids[$socid]][0];
$propal->contactid = $contids[$socids[$socid]][0]; $object->socid = $socids[$socid];
$propal->socid = $socids[$socid]; $object->datep = $dates[mt_rand(1, count($dates)-1)];
$propal->datep = time(); $object->cond_reglement_id = 3;
$propal->cond_reglement_id = 3; $object->mode_reglement_id = 3;
$propal->mode_reglement_id = 3;
$propal->author = $user->id;
$result=$propal->create($user); $result=$object->create($fuser);
if ($result >= 0) if ($result >= 0)
{ {
$nbp = mt_rand(2, 5); $nbp = mt_rand(2, 5);
@ -147,18 +193,30 @@ while ($i < GEN_NUMBER_PROPAL && $result >= 0)
$prodid = mt_rand(1, $num_prods); $prodid = mt_rand(1, $num_prods);
$product=new Product($db); $product=new Product($db);
$result=$product->fetch($prodids[$prodid]); $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) if ($result < 0)
{ {
dol_print_error($db,$propal->error); dol_print_error($db,$object->error);
} }
$xnbp++; $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 else
{ {
dol_print_error($db,$propal->error); dol_print_error($db,$object->error);
} }
} }

View File

@ -1,17 +1,23 @@
README 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 Do a chmod 700 initdemo.sh
then run ./initdemo.sh to launch Graphic User Interface. 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" ] if [ "x$1" = "xall" ]
then then
for dir in `find htdocs/langs/* -type d` if [ "x$2" = "x" ]
do then
fic=`basename $dir` echo "tx pull"
if [ $fic != "en_US" ] tx pull
then else
echo "tx pull -l $fic $2 $3" for dir in `find htdocs/langs/* -type d`
tx pull -l $fic $2 $3 do
fi fic=`basename $dir`
done if [ $fic != "en_US" ]
then
echo "tx pull -l $fic $2 $3"
tx pull -l $fic $2 $3
fi
done
fi
cd - cd -
else else
echo "tx pull -l $1 $2 $3 $4 $5" echo "tx pull -l $1 $2 $3 $4 $5"

View File

@ -20,9 +20,8 @@
* \ingroup Advanced accountancy * \ingroup Advanced accountancy
* \brief Page to assign mass categories to accounts * \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 . '/core/lib/accounting.lib.php';
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/accountancycategory.class.php'; require_once DOL_DOCUMENT_ROOT . '/accountancy/class/accountancycategory.class.php';
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formaccounting.class.php'; require_once DOL_DOCUMENT_ROOT . '/core/class/html.formaccounting.class.php';
@ -48,8 +47,10 @@ $rowid = GETPOST('rowid', 'int');
$cancel = GETPOST('cancel'); $cancel = GETPOST('cancel');
// Security check // Security check
if (! $user->admin) if (! empty($user->rights->accountancy->chartofaccount))
{
accessforbidden(); accessforbidden();
}
$AccCat = new AccountancyCategory($db); $AccCat = new AccountancyCategory($db);
@ -89,7 +90,7 @@ llxheader('', $langs->trans('AccountAccounting'));
$formaccounting = new FormAccounting($db); $formaccounting = new FormAccounting($db);
$form = new Form($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 '<form name="add" action="' . $_SERVER["PHP_SELF"] . '" method="POST">' . "\n";
print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">'; print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
@ -101,8 +102,8 @@ print '<table class="border" width="100%">';
// Category // Category
print '<tr><td>' . $langs->trans("AccountingCategory") . '</td>'; print '<tr><td>' . $langs->trans("AccountingCategory") . '</td>';
print '<td>'; print '<td>';
$formaccounting->select_accounting_category($cat_id, 'account_category', 1); $formaccounting->select_accounting_category($cat_id, 'account_category', 1, 0, 0, 1);
print '<input class="button" type="submit" value="' . $langs->trans("Display") . '">'; print '<input class="button" type="submit" value="' . $langs->trans("Select") . '">';
print '</td></tr>'; print '</td></tr>';
if (! empty($cat_id)) { if (! empty($cat_id)) {
@ -113,11 +114,11 @@ if (! empty($cat_id)) {
print '<tr><td>' . $langs->trans("AddCompteFromBK") . '</td>'; print '<tr><td>' . $langs->trans("AddCompteFromBK") . '</td>';
print '<td>'; print '<td>';
if (is_array($AccCat->lines_cptbk) && count($AccCat->lines_cptbk) > 0) { 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 ) { 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 '<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>'; print '</td></tr>';
} }
@ -133,7 +134,7 @@ if ($action == 'display' || $action == 'delete') {
print '<table class="noborder" width="100%">'; 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)) { if (! empty($cat_id)) {
$return = $AccCat->display($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) { if (is_array($AccCat->lines_display) && count($AccCat->lines_display) > 0) {
foreach ( $AccCat->lines_display as $cpt ) { foreach ( $AccCat->lines_display as $cpt ) {
$var = ! $var; $var = ! $var;
print '<tr' . $bc[$var] . '>'; print '<tr ' . $bc[$var] . '>';
print '<td>' . length_accountg($cpt->account_number) . '</td>'; print '<td>' . length_accountg($cpt->account_number) . '</td>';
print '<td>' . $cpt->label . '</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); 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 '<table class="liste ' . ($moreforfilter ? "listwithfilterbefore" : "") . '">';
print '<tr class="liste_titre">'; 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("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("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("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); 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>\n";
print '<tr class="liste_titre">'; 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 $langs->trans('From');
print $formventilation->select_account($search_accountancy_code_start, 'search_accountancy_code_start', 1, array(), 1, 1, ''); print $formventilation->select_account($search_accountancy_code_start, 'search_accountancy_code_start', 1, array(), 1, 1, '');
print '<br>'; print '<br>';
@ -229,7 +229,7 @@ else {
if (empty($description)) { if (empty($description)) {
$link = '<a href="../admin/card.php?action=create&compte=' . length_accountg($line->numero_compte) . '">' . img_edit_add() . '</a>'; $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 // Permet d'afficher le compte comptable
if ($root_account_description != $displayed_account) { if ($root_account_description != $displayed_account) {
@ -255,9 +255,9 @@ else {
print '<td>' . length_accountg($line->numero_compte) . '</td>'; print '<td>' . length_accountg($line->numero_compte) . '</td>';
print '<td>' . $description . '</td>'; print '<td>' . $description . '</td>';
print '<td align="right">' . number_format($line->debit, 2, ',', ' ') . '</td>'; print '<td align="right">' . price($line->debit) . '</td>';
print '<td align="right">' . number_format($line->credit, 2, ',', ' ') . '</td>'; print '<td align="right">' . price($line->credit) . '</td>';
print '<td align="right">' . number_format($line->credit - $line->debit, 2, ',', ' ') . '</td>'; print '<td align="right">' . price($line->credit - $line->debit) . '</td>';
print '<td align="center">' . $link; print '<td align="center">' . $link;
print '</td>'; print '</td>';
print "</tr>\n"; print "</tr>\n";

View File

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

View File

@ -105,7 +105,6 @@ if ($action != 'export_csv' && ! isset($_POST['begin']) && ! isset($_GET['begin'
/* /*
* Action * Action
*/ */
@ -132,74 +131,7 @@ if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") || GETP
$search_date_end = ''; $search_date_end = '';
} }
if ($action == 'delbookkeeping') { // Must be after the remove filter action, before the export.
$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
*/
$param = ''; $param = '';
$filter = array (); $filter = array ();
if (! empty($search_date_start)) { if (! empty($search_date_start)) {
@ -266,6 +198,68 @@ if (! empty($search_mvt_num)) {
$param .= '&search_mvt_num=' . $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') { if ($action == 'export_csv') {
include DOL_DOCUMENT_ROOT . '/accountancy/class/accountancyexport.class.php'; include DOL_DOCUMENT_ROOT . '/accountancy/class/accountancyexport.class.php';
@ -287,6 +281,11 @@ if ($action == 'export_csv') {
} }
} }
/*
* View
*/
$title_page = $langs->trans("Bookkeeping"); $title_page = $langs->trans("Bookkeeping");
llxHeader('', $title_page); 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("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("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("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("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("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_liste_field_titre('', $_SERVER["PHP_SELF"], "", $param, "", 'width="60" align="center"', $sortfield, $sortorder);
print "</tr>\n"; print "</tr>\n";
print '<tr class="liste_titre">'; 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 '<td class="liste_titre center">';
print $langs->trans('From') . ': '; print $langs->trans('From') . ': ';
print $form->select_date($search_date_start, 'date_start', 0, 0, 1); print $form->select_date($search_date_start, 'date_start', 0, 0, 1);
@ -394,15 +393,15 @@ print '<br>';
print $langs->trans('to') . ': '; print $langs->trans('to') . ': ';
print $form->select_date($search_date_end, 'date_end', 0, 0, 1); print $form->select_date($search_date_end, 'date_end', 0, 0, 1);
print '</td>'; 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"><input type="text" name="search_doc_ref" size="8" value="' . dol_escape_htmltag($search_doc_ref) . '"></td>';
print '<td class="liste_titre center">'; print '<td class="liste_titre">';
print $langs->trans('From'); print $langs->trans('From');
print $formventilation->select_account($search_accountancy_code_start, 'search_accountancy_code_start', 1, array (), 1, 1, ''); print $formventilation->select_account($search_accountancy_code_start, 'search_accountancy_code_start', 1, array (), 1, 1, '');
print '<br>'; print '<br>';
print $langs->trans('to'); print $langs->trans('to');
print $formventilation->select_account($search_accountancy_code_end, 'search_accountancy_code_end', 1, array (), 1, 1, ''); print $formventilation->select_account($search_accountancy_code_end, 'search_accountancy_code_end', 1, array (), 1, 1, '');
print '</td>'; print '</td>';
print '<td class="liste_titre center">'; print '<td class="liste_titre">';
print $langs->trans('From'); print $langs->trans('From');
print $formventilation->select_auxaccount($search_accountancy_aux_code_start, 'search_accountancy_aux_code_start', 1); print $formventilation->select_auxaccount($search_accountancy_aux_code_start, 'search_accountancy_aux_code_start', 1);
print '<br>'; print '<br>';
@ -414,8 +413,8 @@ print '<input type="text" size="7" class="flat" name="search_mvt_label" value="'
print '</td>'; print '</td>';
print '<td class="liste_titre center">&nbsp;</td>'; print '<td class="liste_titre center">&nbsp;</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"><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">';
$searchpitco=$form->showFilterAndCheckAddButtons(0); $searchpitco=$form->showFilterAndCheckAddButtons(0);
print $searchpitco; print $searchpitco;
print '</td>'; print '</td>';

View File

@ -150,23 +150,27 @@ class AccountancyCategory
$sql .= " AND asy.rowid = " . $conf->global->CHARTOFACCOUNTS; $sql .= " AND asy.rowid = " . $conf->global->CHARTOFACCOUNTS;
$sql .= " AND aa.active = 1"; $sql .= " AND aa.active = 1";
$this->db->begin();
dol_syslog(__METHOD__, LOG_DEBUG); dol_syslog(__METHOD__, LOG_DEBUG);
$resql = $this->db->query($sql); $resql = $this->db->query($sql);
if (! $resql) { if (! $resql) {
$error ++; $error ++;
$this->errors[] = "Error " . $this->db->lasterror(); $this->errors[] = "Error " . $this->db->lasterror();
$this->db->rollback();
return -1; return -1;
} }
$this->db->begin(); while ( $obj = $this->db->fetch_object($resql))
while ( $obj = $this->db->fetch_object($resql)) { {
if (array_key_exists(length_accountg($obj->account_number), $cpts)) { if (array_key_exists(length_accountg($obj->account_number), $cpts))
{
$sql = "UPDATE " . MAIN_DB_PREFIX . "accounting_account"; $sql = "UPDATE " . MAIN_DB_PREFIX . "accounting_account";
$sql .= " SET fk_accounting_category=" . $id_cat; $sql .= " SET fk_accounting_category=" . $id_cat;
$sql .= " WHERE rowid=".$obj->rowid; $sql .= " WHERE rowid=".$obj->rowid;
dol_syslog(__METHOD__, LOG_DEBUG); dol_syslog(__METHOD__, LOG_DEBUG);
$resql = $this->db->query($sql); $resqlupdate = $this->db->query($sql);
if (! $resql) { if (! $resqlupdate) {
$error ++; $error ++;
$this->errors[] = "Error " . $this->db->lasterror(); $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 . ")"; $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))) { if (strlen(trim($search_invoice))) {
$sql .= " AND f.facnumber like '%" . $search_invoice . "%'"; $sql .= natural_search("f.facnumber", $search_invoice);
} }
if (strlen(trim($search_ref))) { if (strlen(trim($search_ref))) {
$sql .= " AND p.ref like '%" . $search_ref . "%'"; $sql .= natural_search("p.ref", $search_ref);
} }
if (strlen(trim($search_label))) { if (strlen(trim($search_label))) {
$sql .= " AND p.label like '%" . $search_label . "%'"; $sql .= natural_search("p.label", $search_label);
} }
if (strlen(trim($search_desc))) { if (strlen(trim($search_desc))) {
$sql .= " AND fd.description like '%" . $search_desc . "%'"; $sql .= natural_search("fd.description", $search_desc);
} }
if (strlen(trim($search_amount))) { 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))) { 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))) { 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))) { if (strlen(trim($search_country))) {
$sql .= " AND (co.label like'" . $search_country . "%')"; $sql .= natural_search("co.label", $search_country);
} }
if (strlen(trim($search_tvaintra))) { 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 .= " AND f.entity IN (" . getEntity("facture", 0) . ")"; // We don't share object for accountancy
$sql .= $db->order($sortfield, $sortorder); $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_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_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"><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); $searchpitco=$form->showFilterAndCheckAddButtons(1);
print $searchpitco; print $searchpitco;
print "</td></tr>\n"; 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";
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++; $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 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";
print "<br>\n"; print "<br>\n";
} }
/*
if (! empty($conf->don->enabled)) if (! empty($conf->don->enabled))
{ {
$step++; $step++;

View File

@ -43,6 +43,7 @@ $langs->load("bills");
$langs->load("other"); $langs->load("other");
$langs->load("main"); $langs->load("main");
$langs->load("accountancy"); $langs->load("accountancy");
$langs->load("trips");
$date_startmonth = GETPOST('date_startmonth'); $date_startmonth = GETPOST('date_startmonth');
$date_startday = GETPOST('date_startday'); $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.= " 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"; $sql.= " AND aa.rowid = l.fk_code_ventilation";
if (strlen(trim($search_invoice))) { if (strlen(trim($search_invoice))) {
$sql .= " AND f.ref like '%" . $search_invoice . "%'"; $sql .= natural_search("f.ref", $search_invoice);
} }
if (strlen(trim($search_ref))) { if (strlen(trim($search_ref))) {
$sql .= " AND p.ref like '%" . $search_ref . "%'"; $sql .= natural_search("p.ref", $search_ref);
} }
if (strlen(trim($search_label))) { if (strlen(trim($search_label))) {
$sql .= " AND p.label like '%" . $search_label . "%'"; $sql .= natural_search("p.label", $search_label);
} }
if (strlen(trim($search_desc))) { if (strlen(trim($search_desc))) {
$sql .= " AND l.description like '%" . $search_desc . "%'"; $sql .= natural_search("l.description", $search_desc);
} }
if (strlen(trim($search_amount))) { 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))) { 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))) { 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 $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 '<tr class="liste_titre">';
print '<td class="liste_titre"></td>'; 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"></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>'; 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="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" 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"><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); $searchpitco=$form->showFilterAndCheckAddButtons(1);
print $searchpitco; print $searchpitco;
print '</td>'; print '</td>';

View File

@ -44,11 +44,12 @@ $search_email = GETPOST('search_email','alpha');
$type = GETPOST('type','alpha'); $type = GETPOST('type','alpha');
$status = GETPOST('status','alpha'); $status = GETPOST('status','alpha');
$sortfield = GETPOST('sortfield','alpha'); $limit = GETPOST("limit")?GETPOST("limit","int"):$conf->liste_limit;
$sortorder = GETPOST('sortorder','alpha'); $sortfield = GETPOST("sortfield",'alpha');
$page = GETPOST('page','int'); $sortorder = GETPOST("sortorder",'alpha');
if ($page == -1) { $page = 0 ; } $page = GETPOST("page",'int');
$offset = $conf->liste_limit * $page ; if ($page == -1) { $page = 0; }
$offset = $limit * $page ;
$pageprev = $page - 1; $pageprev = $page - 1;
$pagenext = $page + 1; $pagenext = $page + 1;
if (! $sortorder) { $sortorder="DESC"; } if (! $sortorder) { $sortorder="DESC"; }
@ -166,9 +167,6 @@ $form=new Form($db);
// List of members type // List of members type
if (! $rowid && $action != 'create' && $action != 'edit') if (! $rowid && $action != 'create' && $action != 'edit')
{ {
print load_fiche_titre($langs->trans("MembersTypes"));
//dol_fiche_head(''); //dol_fiche_head('');
$sql = "SELECT d.rowid, d.libelle, d.subscription, d.vote"; $sql = "SELECT d.rowid, d.libelle, d.subscription, d.vote";
@ -179,8 +177,22 @@ if (! $rowid && $action != 'create' && $action != 'edit')
if ($result) if ($result)
{ {
$num = $db->num_rows($result); $num = $db->num_rows($result);
$nbtotalofrecords = $num;
$i = 0; $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 = ''; $moreforfilter = '';
print '<div class="div-table-responsive">'; print '<div class="div-table-responsive">';
@ -213,6 +225,8 @@ if (! $rowid && $action != 'create' && $action != 'edit')
} }
print "</table>"; print "</table>";
print '</div>'; print '</div>';
print '</form>';
} }
else else
{ {

View File

@ -86,7 +86,7 @@ $hookmanager->initHooks(array('admin'));
// Put here declaration of dictionaries properties // 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. // 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 // Name of SQL tables of dictionaries
$tabname=array(); $tabname=array();
@ -121,7 +121,7 @@ $tabname[28]= MAIN_DB_PREFIX."c_holiday_types";
$tabname[29]= MAIN_DB_PREFIX."c_lead_status"; $tabname[29]= MAIN_DB_PREFIX."c_lead_status";
$tabname[30]= MAIN_DB_PREFIX."c_format_cards"; $tabname[30]= MAIN_DB_PREFIX."c_format_cards";
//$tabname[31]= MAIN_DB_PREFIX."accounting_system"; //$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[33]= MAIN_DB_PREFIX."c_hrm_department";
$tabname[34]= MAIN_DB_PREFIX."c_hrm_function"; $tabname[34]= MAIN_DB_PREFIX."c_hrm_function";
@ -158,7 +158,7 @@ $tablib[28]= "DictionaryHolidayTypes";
$tablib[29]= "DictionaryOpportunityStatus"; $tablib[29]= "DictionaryOpportunityStatus";
$tablib[30]= "DictionaryFormatCards"; $tablib[30]= "DictionaryFormatCards";
//$tablib[31]= "DictionaryAccountancysystem"; //$tablib[31]= "DictionaryAccountancysystem";
$tablib[32]= "DictionaryAccountancyCategory"; //$tablib[32]= "DictionaryAccountancyCategory";
$tablib[33]= "DictionaryDepartment"; $tablib[33]= "DictionaryDepartment";
$tablib[34]= "DictionaryFunction"; $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[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[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[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[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"; $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[29]="position ASC";
$tabsqlsort[30]="code ASC"; $tabsqlsort[30]="code ASC";
//$tabsqlsort[31]="pcg_version ASC"; //$tabsqlsort[31]="pcg_version ASC";
$tabsqlsort[32]="position ASC"; //$tabsqlsort[32]="position ASC";
$tabsqlsort[33]="code ASC"; $tabsqlsort[33]="code ASC";
$tabsqlsort[34]="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[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[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[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[33]= "code,label";
$tabfield[34]= "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[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[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[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[33]= "code,label";
$tabfieldvalue[34]= "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[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[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[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[33]= "code,label";
$tabfieldinsert[34]= "code,label"; $tabfieldinsert[34]= "code,label";
@ -382,7 +382,7 @@ $tabrowid[28]= "";
$tabrowid[29]= ""; $tabrowid[29]= "";
$tabrowid[30]= ""; $tabrowid[30]= "";
//$tabrowid[31]= ""; //$tabrowid[31]= "";
$tabrowid[32]= ""; //$tabrowid[32]= "";
$tabrowid[33]= "rowid"; $tabrowid[33]= "rowid";
$tabrowid[34]= "rowid"; $tabrowid[34]= "rowid";
@ -419,7 +419,7 @@ $tabcond[28]= ! empty($conf->holiday->enabled);
$tabcond[29]= ! empty($conf->projet->enabled); $tabcond[29]= ! empty($conf->projet->enabled);
$tabcond[30]= ! empty($conf->label->enabled); $tabcond[30]= ! empty($conf->label->enabled);
//$tabcond[31]= ! empty($conf->accounting->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[33]= ! empty($conf->hrm->enabled);
$tabcond[34]= ! 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[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[30] = array('code'=>$langs->trans("EnterAnyCode"), 'name'=>$langs->trans("LabelName"), 'paper_size'=>$langs->trans("LabelPaperSize"));
//$tabhelp[31] = array('pcg_version'=>$langs->trans("EnterAnyCode")); //$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[33] = array('code'=>$langs->trans("EnterAnyCode"));
$tabhelp[34] = array('code'=>$langs->trans("EnterAnyCode")); $tabhelp[34] = array('code'=>$langs->trans("EnterAnyCode"));
@ -493,7 +493,7 @@ $tabfieldcheck[28] = array();
$tabfieldcheck[29] = array(); $tabfieldcheck[29] = array();
$tabfieldcheck[30] = array(); $tabfieldcheck[30] = array();
//$tabfieldcheck[31] = array(); //$tabfieldcheck[31] = array();
$tabfieldcheck[32] = array(); //$tabfieldcheck[32] = array();
$tabfieldcheck[33] = array(); $tabfieldcheck[33] = array();
$tabfieldcheck[34] = array(); $tabfieldcheck[34] = array();

View File

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

View File

@ -265,6 +265,7 @@ $configfileparameters=array(
'?dolibarr_main_db_prefix' => $langs->trans("Prefix"), '?dolibarr_main_db_prefix' => $langs->trans("Prefix"),
'separator2' => '', 'separator2' => '',
'dolibarr_main_authentication' => $langs->trans("AuthenticationMode"), 'dolibarr_main_authentication' => $langs->trans("AuthenticationMode"),
'?multicompany_transverse_mode'=> $langs->trans("MultiCompanyMode"),
'separator'=> '', 'separator'=> '',
'?dolibarr_main_auth_ldap_login_attribute' => 'dolibarr_main_auth_ldap_login_attribute', '?dolibarr_main_auth_ldap_login_attribute' => 'dolibarr_main_auth_ldap_login_attribute',
'?dolibarr_main_auth_ldap_host' => 'dolibarr_main_auth_ldap_host', '?dolibarr_main_auth_ldap_host' => 'dolibarr_main_auth_ldap_host',
@ -318,7 +319,11 @@ foreach($configfileparameters as $key => $value)
{ {
$newkey = preg_replace('/^\?/','',$key); $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; if (strpos($newkey, 'separator') !== false && $lastkeyshown == 'separator') continue;
$var=!$var; $var=!$var;

View File

@ -69,12 +69,18 @@ if ($action=='install')
} }
else else
{ {
if (! preg_match('/\.zip/i',$original_file)) if (! preg_match('/\.zip$/i',$original_file))
{ {
$langs->load("errors"); $langs->load("errors");
setEventMessages($langs->trans("ErrorFileMustBeADolibarrPackage",$original_file), null, 'errors'); setEventMessages($langs->trans("ErrorFileMustBeADolibarrPackage",$original_file), null, 'errors');
$error++; $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) if (! $error)
@ -117,7 +123,7 @@ if ($action=='install')
//var_dump($modulenamedir); //var_dump($modulenamedir);
if (! dol_is_dir($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++; $error++;
} }
} }
@ -143,7 +149,7 @@ if ($action=='install')
if (! $error) 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')) if (function_exists('curl_init'))
{ {
$conf->global->MAIN_USE_RESPONSE_TIMEOUT = 10;
$result = getURLContent('http://sourceforge.net/projects/dolibarr/rss'); $result = getURLContent('http://sourceforge.net/projects/dolibarr/rss');
//var_dump($result['content']); //var_dump($result['content']);
$sfurl = simplexml_load_string($result['content']); $sfurl = simplexml_load_string($result['content']);
@ -281,26 +289,32 @@ if ($allowfromweb < 1)
if ($allowfromweb >= 0) if ($allowfromweb >= 0)
{ {
if ($allowfromweb == 1) print $langs->trans("ThisIsProcessToFollow").'<br>'; if ($allowfromweb == 1)
else print $langs->trans("ThisIsAlternativeProcessToFollow").'<br>'; {
print '<b>'.$langs->trans("StepNb",1).'</b>: '; //print $langs->trans("ThisIsProcessToFollow").'<br>';
print $langs->trans("FindPackageFromWebSite",$fullurl).'<br>'; }
print '<b>'.$langs->trans("StepNb",2).'</b>: '; else
print $langs->trans("DownloadPackageFromWebSite",$fullurl).'<br>'; {
print '<b>'.$langs->trans("StepNb",3).'</b>: '; 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) 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 '<form enctype="multipart/form-data" method="POST" class="noborder" action="'.$_SERVER["PHP_SELF"].'" name="forminstall">';
print '<input type="hidden" name="action" value="install">'; print '<input type="hidden" name="action" value="install">';
print $langs->trans("YouCanSubmitFile").' <input type="file" name="fileinstall"> '; 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>'; print '</form>';
} }
else else
{ {
print $langs->trans("UnpackPackageInDolibarrRoot",$dirins).'<br>'; print $langs->trans("UnpackPackageInModulesRoot",$dirins).'<br>';
print '<b>'.$langs->trans("StepNb",4).'</b>: '; print '<b>'.$langs->trans("StepNb",4).'</b>: ';
print $langs->trans("SetupIsReadyForUse").'<br>'; print $langs->trans("SetupIsReadyForUse").'<br>';
} }

View File

@ -526,7 +526,17 @@ class Categorie extends CommonObject
} }
if (! $error) 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; $sql .= " WHERE fk_categorie = ".$this->id;
if (!$this->db->query($sql)) if (!$this->db->query($sql))
{ {
@ -535,6 +545,17 @@ class Categorie extends CommonObject
$error++; $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) if (! $error)
{ {

View File

@ -852,7 +852,9 @@ if ($id > 0)
$result4=$object->fetch_userassigned(); $result4=$object->fetch_userassigned();
$result5=$object->fetch_optionals($id,$extralabels); $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"]); $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"]); $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 // Status
print '<tr><td class="nowrap">'.$langs->trans("Status").' / '.$langs->trans("Percentage").'</td><td colspan="3">'; 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); $formactions->form_select_status_action('formaction',$percent,1);
print '</td></tr>'; print '</td></tr>';

View File

@ -1328,7 +1328,16 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa
$cssclass.= " unmovable"; $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; $h=''; $nowrapontd=1;
if ($action == 'show_day') { $h='height: 100%; '; $nowrapontd=0; } if ($action == 'show_day') { $h='height: 100%; '; $nowrapontd=0; }

View File

@ -704,7 +704,7 @@ if ($action == 'create')
dol_fiche_head(); dol_fiche_head();
print '<table class="border" width="100%">'; 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 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>'; 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 '</br><br>';
print '<table class="border" width="100%">'; 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 '<tr><td>'.$langs->trans("BackgroundColorByDefault").'</td><td colspan="3">';
print $htmlother->selectColor($_POST['bgcolor'],'bgcolor','new_mailing',0); print $htmlother->selectColor($_POST['bgcolor'],'bgcolor','new_mailing',0);
print '</td></tr>'; print '</td></tr>';

View File

@ -1166,14 +1166,9 @@ class Propal extends CommonObject
} }
$clonedObj->id=0; $clonedObj->id=0;
$clonedObj->ref='';
$clonedObj->statut=self::STATUS_DRAFT; $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 // Clear fields
$clonedObj->user_author = $user->id; $clonedObj->user_author = $user->id;
$clonedObj->user_valid = ''; $clonedObj->user_valid = '';
@ -1182,12 +1177,6 @@ class Propal extends CommonObject
$clonedObj->fin_validite = $clonedObj->date + ($clonedObj->duree_validite * 24 * 3600); $clonedObj->fin_validite = $clonedObj->date + ($clonedObj->duree_validite * 24 * 3600);
if (empty($conf->global->MAIN_KEEP_REF_CUSTOMER_ON_CLONING)) $clonedObj->ref_client = ''; 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 // Create clone
$result=$clonedObj->create($user); $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'; include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php';
// Do we click on purge search criteria ? // 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_categ='';
$search_user=''; $search_user='';
@ -363,7 +363,7 @@ if ($resql)
$arrayofselected=is_array($toselect)?$toselect:array(); $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 (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit; if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
if ($sall) $param.='&sall='.$sall; if ($sall) $param.='&sall='.$sall;
@ -377,6 +377,7 @@ if ($resql)
if ($search_montant_ht) $param.='&search_montant_ht='.$search_montant_ht; if ($search_montant_ht) $param.='&search_montant_ht='.$search_montant_ht;
if ($search_login) $param.='&search_login='.$search_login; if ($search_login) $param.='&search_login='.$search_login;
if ($search_town) $param.='&search_town='.$search_town; if ($search_town) $param.='&search_town='.$search_town;
if ($socid > 0) $param.='&socid='.$socid;
if ($optioncss != '') $param.='&optioncss='.$optioncss; if ($optioncss != '') $param.='&optioncss='.$optioncss;
// Add $param from extra fields // Add $param from extra fields
foreach ($search_array_options as $key => $val) foreach ($search_array_options as $key => $val)
@ -436,8 +437,8 @@ if ($resql)
dol_fiche_head(null, '', ''); dol_fiche_head(null, '', '');
$topicmail="SendProposalRef"; $topicmail="SendSupplierProposalRef";
$modelmail="propal_send"; $modelmail="supplier_proposal_send";
// Cree l'objet formulaire mail // Cree l'objet formulaire mail
include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php'; 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); $newdiscount2->amount_ttc=price2num($discount->amount_ttc-$newdiscount1->amount_ttc);
$newdiscount1->amount_ht=price2num($newdiscount1->amount_ttc/(1+$newdiscount1->tva_tx/100),'MT'); $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'); $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); $newdiscount2->amount_tva=price2num($newdiscount2->amount_ttc-$newdiscount2->amount_ht);
$db->begin(); $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 . '/projet/class/project.class.php';
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formprojet.class.php'; require_once DOL_DOCUMENT_ROOT . '/core/class/html.formprojet.class.php';
} }
require_once DOL_DOCUMENT_ROOT . '/core/class/doleditor.class.php'; require_once DOL_DOCUMENT_ROOT . '/core/class/doleditor.class.php';
$langs->load('orders'); $langs->load('orders');
@ -61,6 +62,7 @@ $langs->load('sendings');
$langs->load('products'); $langs->load('products');
if (!empty($conf->incoterm->enabled)) $langs->load('incoterm'); if (!empty($conf->incoterm->enabled)) $langs->load('incoterm');
if (! empty($conf->margin->enabled)) $langs->load('margins'); 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')); $id = (GETPOST('id', 'int') ? GETPOST('id', 'int') : GETPOST('orderid', 'int'));
$ref = GETPOST('ref', 'alpha'); $ref = GETPOST('ref', 'alpha');

View File

@ -62,6 +62,7 @@ $extrafields = new ExtraFields($db);
$extralabels=$extrafields->fetch_name_optionals_label($object->table_element); $extralabels=$extrafields->fetch_name_optionals_label($object->table_element);
/* /*
* Actions * Actions
*/ */
@ -152,6 +153,7 @@ if ($action == 'add')
else { else {
$error++; $error++;
setEventMessages($object->error, $object->errors, 'errors'); setEventMessages($object->error, $object->errors, 'errors');
$action='create'; // Force chargement page en mode creation $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 // Delete
$object = new Account($db); $object = new Account($db);
$object->fetch(GETPOST("id","int")); $object->fetch(GETPOST("id","int"));
$object->delete(); $result = $object->delete($user);
header("Location: ".DOL_URL_ROOT."/compta/bank/index.php"); if ($result > 0)
exit; {
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
*/ */

View File

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

View File

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

View File

@ -3939,7 +3939,7 @@ else if ($id > 0 || ! empty($ref))
} }
// Send by mail // 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) { if ($objectidnext) {
print '<div class="inline-block divButAction"><span class="butActionRefused" title="' . $langs->trans("DisabledBecauseReplacedInvoice") . '">' . $langs->trans('SendByMail') . '</span></div>'; print '<div class="inline-block divButAction"><span class="butActionRefused" title="' . $langs->trans("DisabledBecauseReplacedInvoice") . '">' . $langs->trans('SendByMail') . '</span></div>';
} else { } else {
@ -3950,19 +3950,25 @@ else if ($id > 0 || ! empty($ref))
} }
} }
// deprecated. Useless because now we can use templates // Request a direct debit order
if (! empty($conf->global->FACTURE_SHOW_SEND_REMINDER)) // For backward compatibility if ($object->statut > Facture::STATUS_DRAFT && $object->paye == 0 && $num == 0)
{ {
if (($object->statut == 1 || $object->statut == 2) && $resteapayer > 0) { if ($resteapayer > 0)
if ($objectidnext) { {
print '<div class="inline-block divButAction"><span class="butActionRefused" title="' . $langs->trans("DisabledBecauseReplacedInvoice") . '">' . $langs->trans('SendRemindByMail') . '</span></div>'; if ($user->rights->prelevement->bons->creer)
} else { {
if (empty($conf->global->MAIN_USE_ADVANCED_PERMS) || $user->rights->facture->invoice_advance->send) { $langs->load("withdrawals");
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>'; 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 '<div class="inline-block divButAction"><a class="butActionRefused" href="#">' . $langs->trans('SendRemindByMail') . '</a></div>'; 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 // Create payment

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_type_thirdparty) $sql .= " AND s.fk_typent IN (".$search_type_thirdparty.')';
if ($search_company) $sql .= natural_search('s.nom', $search_company); 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_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_montant_ttc != '') $sql.= natural_search('f.total_ttc', $search_montant_ttc, 1);
if ($search_status != '' && $search_status >= 0) if ($search_status != '' && $search_status >= 0)
{ {

View File

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

View File

@ -369,7 +369,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
} }
if ($(\'#fieldchqemetteur\').val() == \'\') 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); $(\'#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>'; $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 // Ref
print '<tr><td class="titlefield">'.$langs->trans('Ref').'</td><td colspan="3">'; 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 // Get supervariables
$action = GETPOST('action','alpha'); $action = GETPOST('action','alpha');
$id = GETPOST('id','int'); $id = GETPOST('id','int');
$socid = GETPOST('socid','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 * Actions
*/ */
if ( $action == 'confirm_delete' ) if ( $action == 'confirm_delete' )
{ {
$bon = new BonPrelevement($db,""); $bon = new BonPrelevement($db,"");
@ -73,10 +82,12 @@ if ( $action == 'confirm_credite' && GETPOST('confirm','alpha') == 'yes')
$bon = new BonPrelevement($db,""); $bon = new BonPrelevement($db,"");
$bon->fetch($id); $bon->fetch($id);
$bon->set_credite(); $res=$bon->set_credite();
if ($res >= 0)
header("Location: card.php?id=".$id); {
exit; header("Location: card.php?id=".$id);
exit;
}
} }
if ($action == 'infotrans' && $user->rights->prelevement->bons->send) if ($action == 'infotrans' && $user->rights->prelevement->bons->send)
@ -162,12 +173,12 @@ if ($id > 0)
print '<table class="border" width="100%">'; print '<table class="border" width="100%">';
print '<tr><td width="20%">'.$langs->trans("Ref").'</td><td>'.$bon->getNomUrl(1).'</td></tr>'; print '<tr><td class="titlefield">'.$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>'.$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>'.$langs->trans("Amount").'</td><td>'.price($bon->amount).'</td></tr>';
// Status // Status
print '<tr><td width="20%">'.$langs->trans('Status').'</td>'; print '<tr><td>'.$langs->trans('Status').'</td>';
print '<td>'.$bon->getLibStatut(1).'</td>'; print '<td>'.$bon->getLibStatut(1).'</td>';
print '</tr>'; print '</tr>';
@ -176,16 +187,16 @@ if ($id > 0)
$muser = new User($db); $muser = new User($db);
$muser->fetch($bon->user_trans); $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 dol_print_date($bon->date_trans,'day');
print ' '.$langs->trans("By").' '.$muser->getFullName($langs).'</td></tr>'; 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 $bon->methodes_trans[$bon->method_trans];
print '</td></tr>'; print '</td></tr>';
} }
if($bon->date_credit <> 0) 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 dol_print_date($bon->date_credit,'day');
print '</td></tr>'; print '</td></tr>';
} }
@ -194,7 +205,7 @@ if ($id > 0)
print '<br>'; 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>'; print $langs->trans("WithdrawalFile").'</td><td>';
$relativepath = 'receipts/'.$bon->ref.'.xml'; $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>'; 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') 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">'; 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 '<table class="border" width="100%">';
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print '<td colspan="3">'.$langs->trans("NotifyCredit").'</td></tr>'; 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 $form->select_date('','','','','',"infocredit",1,1);
print '</td></tr>'; print '</td></tr>';
print '</table>'; print '</table>';
@ -269,17 +279,11 @@ if ($id > 0)
$ligne=new LignePrelevement($db,$user); $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 * Lines into withdraw request
*/ */
$sql = "SELECT pl.rowid, pl.statut, pl.amount"; $sql = "SELECT pl.rowid, pl.statut, pl.amount,";
$sql.= ", s.rowid as socid, s.nom as name"; $sql.= " s.rowid as socid, s.nom as name";
$sql.= " FROM ".MAIN_DB_PREFIX."prelevement_lignes as pl"; $sql.= " FROM ".MAIN_DB_PREFIX."prelevement_lignes as pl";
$sql.= ", ".MAIN_DB_PREFIX."prelevement_bons as pb"; $sql.= ", ".MAIN_DB_PREFIX."prelevement_bons as pb";
$sql.= ", ".MAIN_DB_PREFIX."societe as s"; $sql.= ", ".MAIN_DB_PREFIX."societe as s";
@ -306,7 +310,7 @@ if ($id > 0)
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print_liste_field_titre($langs->trans("Lines"),$_SERVER["PHP_SELF"],"pl.rowid",'',$urladd); 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("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_liste_field_titre('');
print "</tr>\n"; print "</tr>\n";
@ -320,13 +324,12 @@ if ($id > 0)
print "<tr ".$bc[$var].">"; print "<tr ".$bc[$var].">";
// Status of line
print "<td>"; print "<td>";
print $ligne->LibStatut($obj->statut,2); print $ligne->LibStatut($obj->statut,2);
print "&nbsp;"; print "&nbsp;";
print '<a href="'.DOL_URL_ROOT.'/compta/prelevement/ligne.php?id='.$obj->rowid.'">'; 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>'; print '</a></td>';
$thirdparty=new Societe($db); $thirdparty=new Societe($db);
@ -335,7 +338,7 @@ if ($id > 0)
print $thirdparty->getNomUrl(1); print $thirdparty->getNomUrl(1);
print "</td>\n"; print "</td>\n";
print '<td align="center">'.price($obj->amount)."</td>\n"; print '<td align="right">'.price($obj->amount)."</td>\n";
print '<td>'; print '<td>';
@ -350,23 +353,18 @@ if ($id > 0)
print '</td></tr>'; print '</td></tr>';
$total += $obj->total_ttc; $total += $obj->amount;
$var=!$var; $var=!$var;
$i++; $i++;
} }
if($socid) if ($num > 0)
{ {
print "<tr ".$bc[$var].">"; print '<tr class="liste_total">';
print '<td>'.$langs->trans("Total").'</td>'; print '<td>'.$langs->trans("Total").'</td>';
print '<td align="center">'.price($total)."</td>\n";
print '<td>&nbsp;</td>'; print '<td>&nbsp;</td>';
print '<td align="right">'.price($total)."</td>\n";
print '<td>&nbsp;</td>'; print '<td>&nbsp;</td>';
print "</tr>\n"; print "</tr>\n";
} }

View File

@ -323,7 +323,7 @@ class BonPrelevement extends CommonObject
/** /**
* Set credite and set status of linked invoices * 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() function set_credite()
{ {

View File

@ -136,24 +136,22 @@ class LignePrelevement
{ {
return $langs->trans($this->statuts[$statut]); return $langs->trans($this->statuts[$statut]);
} }
if ($mode == 1) if ($mode == 1)
{ {
if ($statut==0) return img_picto($langs->trans($this->statuts[$statut]),'statut1').' '.$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]),'statut4').' '.$langs->trans($this->statuts[$statut]); 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]); if ($statut==3) return img_picto($langs->trans($this->statuts[$statut]),'statut8').' '.$langs->trans($this->statuts[$statut]); // Refused
} }
if ($mode == 2) if ($mode == 2)
{ {
if ($statut==0) return img_picto($langs->trans($this->statuts[$statut]),'statut1'); 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 ($statut==3) return img_picto($langs->trans($this->statuts[$statut]),'statut8');
} }
if ($mode == 3) if ($mode == 3)
{ {
if ($statut==0) return $langs->trans($this->statuts[$statut]).' '.img_picto($langs->trans($this->statuts[$statut]),'statut1'); 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'); 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 '<table class="border" width="100%">';
print '<tr><td class="titlefield">'.$langs->trans("NbOfInvoiceToWithdraw").'</td>'; print '<tr><td class="titlefield">'.$langs->trans("NbOfInvoiceToWithdraw").'</td>';
print '<td align="right">'; print '<td>';
print $nb; print $nb;
print '</td></tr>'; print '</td></tr>';
print '<tr><td>'.$langs->trans("AmountToWithdraw").'</td>'; print '<tr><td>'.$langs->trans("AmountToWithdraw").'</td>';
print '<td align="right">'; print '<td>';
print price($pricetowithdraw); print price($pricetowithdraw);
print '</td>'; print '</td>';
print '</tr>'; 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 '</table>';
print '</div>'; print '</div>';
@ -158,8 +150,6 @@ else
{ {
print '<a class="butActionRefused" href="#" title="'.dol_escape_htmltag($langs->transnoentitiesnoconv("NoInvoiceToWithdraw")).'">'.$langs->trans("CreateAll")."</a>\n"; 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 "</div>\n";
print '<br>'; print '<br>';
@ -247,8 +237,9 @@ else
/* /*
* List of last withdraws * List of latest withdraws
*/ */
/*
$limit=5; $limit=5;
print load_fiche_titre($langs->trans("LastWithdrawalReceipts",$limit),'',''); print load_fiche_titre($langs->trans("LastWithdrawalReceipts",$limit),'','');
@ -301,6 +292,7 @@ else
{ {
dol_print_error($db); dol_print_error($db);
} }
*/
llxFooter(); llxFooter();
$db->close(); $db->close();

View File

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

View File

@ -1,6 +1,6 @@
<?php <?php
/* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org> /* 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) 2005-2009 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2010-2012 Juanjo Menent <jmenent@2byte.es> * Copyright (C) 2010-2012 Juanjo Menent <jmenent@2byte.es>
* *
@ -43,9 +43,25 @@ if ($user->societe_id > 0) accessforbidden();
// Get supervariables // Get supervariables
$prev_id = GETPOST('id','int'); $prev_id = GETPOST('id','int');
$socid = GETPOST('socid','int'); $socid = GETPOST('socid','int');
$page = GETPOST('page','int');
$sortorder = ((GETPOST('sortorder','alpha')=="")) ? "DESC" : GETPOST('sortorder','alpha'); $limit = GETPOST("limit")?GETPOST("limit","int"):$conf->liste_limit;
$sortfield = ((GETPOST('sortfield','alpha')=="")) ? "p.ref" : GETPOST('sortfield','alpha'); $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")); llxHeader('',$langs->trans("WithdrawalsReceipts"));
@ -60,30 +76,27 @@ if ($prev_id)
print '<table class="border" width="100%">'; print '<table class="border" width="100%">';
print '<tr><td width="20%">'.$langs->trans("Ref").'</td><td>'.$bon->getNomUrl(1).'</td></tr>'; print '<tr><td class="titlefield">'.$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>'.$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>'.$langs->trans("Amount").'</td><td>'.price($bon->amount).'</td></tr>';
// Status // Status
print '<tr><td width="20%">'.$langs->trans('Status').'</td>'; print '<tr><td>'.$langs->trans('Status').'</td><td>'.$bon->getLibStatut(1).'</td></tr>';
print '<td>'.$bon->getLibStatut(1).'</td>';
print '</tr>';
if($bon->date_trans <> 0) if($bon->date_trans <> 0)
{ {
$muser = new User($db); $muser = new User($db);
$muser->fetch($bon->user_trans); $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 dol_print_date($bon->date_trans,'day');
print ' '.$langs->trans("By").' '.$muser->getFullName($langs).'</td></tr>'; 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 $bon->methodes_trans[$bon->method_trans];
print '</td></tr>'; print '</td></tr>';
} }
if($bon->date_credit <> 0) 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 dol_print_date($bon->date_credit,'day');
print '</td></tr>'; print '</td></tr>';
} }
@ -92,7 +105,7 @@ if ($prev_id)
print '<br>'; 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>'; print $langs->trans("WithdrawalFile").'</td><td>';
$relativepath = 'receipts/'.$bon->ref.'.xml'; $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>'; 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 ;
/* // List of invoices
* Liste des factures
*/
$sql = "SELECT pf.rowid"; $sql = "SELECT pf.rowid";
$sql.= ",f.rowid as facid, f.facnumber as ref, f.total_ttc"; $sql.= ",f.rowid as facid, f.facnumber as ref, f.total_ttc";
$sql.= ", s.rowid as socid, s.nom as name, pl.statut"; $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; $sql.= " AND f.entity = ".$conf->entity;
if ($prev_id) $sql.= " AND p.rowid=".$prev_id; if ($prev_id) $sql.= " AND p.rowid=".$prev_id;
if ($socid) $sql.= " AND s.rowid = ".$socid; 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); $result = $db->query($sql);
if ($result) if ($result)
{ {
$num = $db->num_rows($result); $num = $db->num_rows($result);
$i = 0; $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"\n<!-- debut table -->\n";
print '<table class="liste" width="100%">'; print '<table class="liste" width="100%">';
print '<tr class="liste_titre">'; 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("Bill"),$_SERVER["PHP_SELF"],"p.ref",'',$param,'',$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("ThirdParty"),$_SERVER["PHP_SELF"],"s.nom",'',$param,'',$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($langs->trans("Amount"),$_SERVER["PHP_SELF"],"f.total_ttc","",$param,'align="right"',$sortfield,$sortorder);
print_liste_field_titre(''); print_liste_field_titre($langs->trans("StatusDebitCredit"),$_SERVER["PHP_SELF"],"","",$param,'align="center"',$sortfield,$sortorder);
print_liste_field_titre(''); print_liste_field_titre('');
print "</tr>\n"; print "</tr>\n";
@ -155,24 +187,31 @@ if ($result)
$total = 0; $total = 0;
while ($i < min($num,$conf->liste_limit)) while ($i < min($num, $limit))
{ {
$obj = $db->fetch_object($result); $obj = $db->fetch_object($result);
print "<tr ".$bc[$var]."><td>"; $invoicetmp->id = $obj->facid;
$invoicetmp->ref = $obj->ref;
print '<a href="'.DOL_URL_ROOT.'/compta/facture.php?facid='.$obj->facid.'">'; $thirdpartytmp->id = $obj->socid;
print img_object($langs->trans("ShowBill"),"bill"); $thirdpartytmp->name = $obj->name;
print '</a>&nbsp;';
print '<a href="'.DOL_URL_ROOT.'/compta/facture.php?facid='.$obj->facid.'">'.$obj->ref."</a></td>\n"; print "<tr ".$bc[$var].">";
print '<td><a href="'.DOL_URL_ROOT.'/comm/card.php?socid='.$obj->socid.'">'; print "<td>";
print img_object($langs->trans("ShowCompany"),"company"). ' '.$obj->name."</a></td>\n"; print $invoicetmp->getNomUrl(1);
print "</td>\n";
print '<td align="center">'.price($obj->total_ttc)."</td>\n";
print '<td>'; 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) if ($obj->statut == 0)
{ {
@ -187,23 +226,25 @@ if ($result)
print '<b>'.$langs->trans("StatusRefused").'</b>'; print '<b>'.$langs->trans("StatusRefused").'</b>';
} }
print "</td></tr>\n"; print "</td>";
print "<td></td>";
print "</tr>\n";
$total += $obj->total_ttc; $total += $obj->total_ttc;
$var=!$var; $var=!$var;
$i++; $i++;
} }
if($socid) if ($num > 0)
{ {
print "<tr ".$bc[$var]."><td>"; print '<tr class="liste_total">';
print '<td>'.$langs->trans("Total").'</td>'; print '<td>'.$langs->trans("Total").'</td>';
print '<td align="center">'.price($total)."</td>\n";
print '<td>&nbsp;</td>'; print '<td>&nbsp;</td>';
print '<td align="right">'.price($total)."</td>\n";
print '<td>&nbsp;</td>';
print '<td>&nbsp;</td>';
print "</tr>\n"; print "</tr>\n";
} }

View File

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

View File

@ -57,12 +57,12 @@ if ($prev_id)
print '<table class="border" width="100%">'; print '<table class="border" width="100%">';
print '<tr><td width="20%">'.$langs->trans("Ref").'</td><td>'.$bon->getNomUrl(1).'</td></tr>'; print '<tr><td class="titlefield">'.$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>'.$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>'.$langs->trans("Amount").'</td><td>'.price($bon->amount).'</td></tr>';
// Status // Status
print '<tr><td width="20%">'.$langs->trans('Status').'</td>'; print '<tr><td>'.$langs->trans('Status').'</td>';
print '<td>'.$bon->getLibStatut(1).'</td>'; print '<td>'.$bon->getLibStatut(1).'</td>';
print '</tr>'; print '</tr>';
@ -71,16 +71,16 @@ if ($prev_id)
$muser = new User($db); $muser = new User($db);
$muser->fetch($bon->user_trans); $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 dol_print_date($bon->date_trans,'day');
print ' '.$langs->trans("By").' '.$muser->getFullName($langs).'</td></tr>'; 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 $bon->methodes_trans[$bon->method_trans];
print '</td></tr>'; print '</td></tr>';
} }
if($bon->date_credit <> 0) 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 dol_print_date($bon->date_credit,'day');
print '</td></tr>'; print '</td></tr>';
} }
@ -89,7 +89,7 @@ if ($prev_id)
print '<br>'; 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>'; print $langs->trans("WithdrawalFile").'</td><td>';
$relativepath = 'receipts/'.$bon->ref.'.xml'; $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>'; 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"; $sql.= " FROM ".MAIN_DB_PREFIX."socpeople as sp";
if (!$user->rights->societe->client->voir && !$user->societe_id) 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.= ", ".MAIN_DB_PREFIX."societe as s";
$sql.= " OUTER JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON s.rowid = sc.fk_soc"; $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
$sql.= " WHERE sc.fk_user = " .$user->id; $sql.= " WHERE sp.fk_soc = s.rowid AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
$clause = "AND"; $clause = "AND";
} }
$sql.= ' '.$clause.' sp.entity IN ('.getEntity($this->element, 1).')'; $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.= " 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.= " p.rowid as product_id, p.ref as product_ref";
$sql.= " FROM (".MAIN_DB_PREFIX."societe as s"; $sql.= " FROM (".MAIN_DB_PREFIX."societe as s";
$sql.= ", ".MAIN_DB_PREFIX."contrat as c"; $sql.= " INNER JOIN ".MAIN_DB_PREFIX."contrat as c ON s.rowid = c.fk_soc";
$sql.= ", ".MAIN_DB_PREFIX."contratdet as cd"; $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"; $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.= ")";
$sql.= " WHERE c.entity = ".$conf->entity; $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; if($user->societe_id) $sql.= " AND s.rowid = ".$user->societe_id;
$sql.= $db->order("c.tms","DESC"); $sql.= $db->order("c.tms","DESC");
$sql.= $db->plimit($max, 0); $sql.= $db->plimit($max, 0);

View File

@ -1443,7 +1443,13 @@ class Form
if ($includeUsers) $sql.= " AND u.rowid IN (".$includeUsers.")"; 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($conf->global->USER_HIDE_INACTIVE_IN_COMBOBOX) || $noactive) $sql.= " AND u.statut <> 0";
if (! empty($morefilter)) $sql.=" ".$morefilter; 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); dol_syslog(get_class($this)."::select_dolusers", LOG_DEBUG);
$resql=$this->db->query($sql); $resql=$this->db->query($sql);
@ -1494,7 +1500,12 @@ class Form
$out.= '>'; $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 // Complete name with more info
$moreinfo=0; $moreinfo=0;
if (! empty($conf->global->MAIN_SHOW_LOGIN)) if (! empty($conf->global->MAIN_SHOW_LOGIN))
@ -5311,7 +5322,7 @@ class Form
{ {
$nbofdifferenttypes = count($object->linkedObjects); $nbofdifferenttypes = count($object->linkedObjects);
print '<br>'; print '<br><!-- showLinkedObjectBlock -->';
print load_fiche_titre($langs->trans('RelatedObjects'), $morehtmlright, ''); print load_fiche_titre($langs->trans('RelatedObjects'), $morehtmlright, '');
print '<table class="noborder allwidth">'; print '<table class="noborder allwidth">';
@ -5403,7 +5414,7 @@ class Form
if (! $nboftypesoutput) 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>'; print '</table>';

View File

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

View File

@ -328,7 +328,7 @@ class FormMail extends Form
$out.= $langs->trans('SelectMailModel').': '.$this->selectarray('modelmailselected', $modelmail_array, 0, 1); $out.= $langs->trans('SelectMailModel').': '.$this->selectarray('modelmailselected', $modelmail_array, 0, 1);
if ($user->admin) $out.= info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1); if ($user->admin) $out.= info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1);
$out.= ' &nbsp; '; $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.= ' &nbsp; ';
$out.= '</div>'; $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. $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); if ($user->admin) $out.= info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1);
$out.= ' &nbsp; '; $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.= ' &nbsp; ';
$out.= '</div>'; $out.= '</div>';
} }

View File

@ -146,9 +146,10 @@ class Utils
* @param string $type 'mysql', 'postgresql', ... * @param string $type 'mysql', 'postgresql', ...
* @param int $usedefault 1=Use default backup profile (Set this to 1 when used as cron) * @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 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) * @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 $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; 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; return $ret;
} }
$const_name = $objMod->const_name;
if(!empty($conf->global->$const_name)){
return $ret;
}
$result=$objMod->init(); $result=$objMod->init();
if ($result <= 0) if ($result <= 0)
{ {
@ -784,7 +789,13 @@ function activateModule($value,$withdeps=1)
if (file_exists($dir.$objMod->depends[$i].".class.php")) if (file_exists($dir.$objMod->depends[$i].".class.php"))
{ {
$resarray = activateModule($objMod->depends[$i]); $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; break;
} }
} }

View File

@ -436,13 +436,23 @@ function dolCopyDir($srcfile, $destfile, $newmask, $overwriteifexists)
$result=0; $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; if (empty($srcfile) || empty($destfile)) return -1;
$destexists=dol_is_dir($destfile); $destexists=dol_is_dir($destfile);
if (! $overwriteifexists && $destexists) return 0; 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); $srcfile=dol_osencode($srcfile);
$destfile=dol_osencode($destfile); $destfile=dol_osencode($destfile);
@ -459,6 +469,7 @@ function dolCopyDir($srcfile, $destfile, $newmask, $overwriteifexists)
{ {
if (!is_dir($destfile."/".$file)) if (!is_dir($destfile."/".$file))
{ {
// We must set mask just before creating dir, becaause it can be set differently by dol_copy
umask(0); umask(0);
$dirmaskdec=octdec($newmask); $dirmaskdec=octdec($newmask);
if (empty($newmask) && ! empty($conf->global->MAIN_UMASK)) $dirmaskdec=octdec($conf->global->MAIN_UMASK); if (empty($newmask) && ! empty($conf->global->MAIN_UMASK)) $dirmaskdec=octdec($conf->global->MAIN_UMASK);

View File

@ -1,18 +1,18 @@
<?php <?php
/* Copyright (C) 2000-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org> /* Copyright (C) 2000-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2003 Jean-Louis Bergamo <jlb@j1b.org> * Copyright (C) 2003 Jean-Louis Bergamo <jlb@j1b.org>
* Copyright (C) 2004-2013 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2004-2013 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org> * Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be> * Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
* Copyright (C) 2004 Christophe Combelles <ccomb@free.fr> * Copyright (C) 2004 Christophe Combelles <ccomb@free.fr>
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com> * Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr> * Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
* Copyright (C) 2010-2016 Juanjo Menent <jmenent@2byte.es> * Copyright (C) 2010-2016 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr> * Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
* Copyright (C) 2013 Alexandre Spangaro <aspangaro.dolibarr@gmail.com> * Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@zendsi.com>
* Copyright (C) 2014 Cédric GROSS <c.gross@kreiz-it.fr> * Copyright (C) 2014 Cédric GROSS <c.gross@kreiz-it.fr>
* Copyright (C) 2014-2015 Marcos García <marcosgdf@gmail.com> * Copyright (C) 2014-2015 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr> * Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -271,8 +271,13 @@ function GETPOST($paramname,$check='',$method=0,$filter=NULL,$options=NULL)
} }
elseif ($reg[1] == 'YEAR') elseif ($reg[1] == 'YEAR')
{ {
$tmp=dol_getdate(dol_now(), true); $tmp=dol_getdate(dol_now(), true);
$out = $tmp['year']; $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); $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; if (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->barcode->lire_advance)) $showbarcode=0;
$modulepart='unknown'; $modulepart='unknown';
if ($object->element == 'societe') $modulepart='societe'; if ($object->element == 'societe') $modulepart='societe';
if ($object->element == 'contact') $modulepart='contact'; if ($object->element == 'contact') $modulepart='contact';
if ($object->element == 'member') $modulepart='memberphoto'; if ($object->element == 'member') $modulepart='memberphoto';
if ($object->element == 'user') $modulepart='userphoto'; if ($object->element == 'user') $modulepart='userphoto';
if ($object->element == 'product') $modulepart='product'; if ($object->element == 'product') $modulepart='product';
if ($object->element == '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'; $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>'; $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 else
@ -1088,7 +1092,11 @@ function dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='r
$morehtmlstatus.=$tmptxt; $morehtmlstatus.=$tmptxt;
} }
if (! empty($object->name_alias)) $morehtmlref.='<div class="refidno">'.$object->name_alias.'</div>'; // For thirdparty 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') if ($object->element != 'product' && $object->element != 'bookmark')
{ {

View File

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

View File

@ -97,7 +97,7 @@ function tree_showpad(&$fulltree,$key,$silent=0)
// ------------------------------- Used by menu editor, category view, ... ----------------- // ------------------------------- 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. * 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. * 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', * $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. * TODO Replace with jstree plugin instead of treeview plugin.
* *
* @param array $tab Array of all elements * @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 int $rang Level of element
* @param string $iddivjstree Id to use for parent ul 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 * @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.'">'; 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 //ballayage du tableau
$sizeoftab=count($tab); $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', 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', 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 -- 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 ('', '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__); 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', __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', 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', 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', 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_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', 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_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', 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_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', 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_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', 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 -- 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', __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__); 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', 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__); 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 -- 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 -- 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', __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__); 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 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 = "SELECT rowid, label, accountancy_journal";
$sql.= " FROM ".MAIN_DB_PREFIX."bank_account"; $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) while ($i < $numr)
{ {
$objp = $db->fetch_object($resql); $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++; $i++;
} }
} }
@ -349,9 +349,9 @@ function print_left_auguria_menu($db,$menu_array_before,$menu_array_after,&$tabM
$db->free($resql); $db->free($resql);
// Add other journal // Add other journal
$newmenu->add("/accountancy/journal/sellsjournal.php?leftmenu=journal",$langs->trans("SellsJournal"),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); $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); $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 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/',$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/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/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 ($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)) 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); 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 (! 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); 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 (! 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); 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', '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. 'langs'=>'products', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
'position'=>300, '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 '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'=>'', 'target'=>'',
'user'=>0); // 0=Menu for internal users, 1=external users, 2=both 'user'=>0); // 0=Menu for internal users, 1=external users, 2=both

View File

@ -102,7 +102,7 @@ class modCron extends DolibarrModules
// Cronjobs // Cronjobs
$this->cronjobs = array( $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), 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) // 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', '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. 'langs'=>'cron', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
'position'=>200, '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 'perms'=>'$user->rights->cron->read', // Use 'perms'=>'$user->rights->mymodule->level1->level2' if you want your menu with a permission rules
'target'=>'', 'target'=>'',
'user'=>2); // 0=Menu for internal users, 1=external users, 2=both '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_label[$r]='CustomersInvoicesAndInvoiceLines'; // Translation key (used only if key ExportDataset_xxx_z not found)
$this->export_icon[$r]='bill'; $this->export_icon[$r]='bill';
$this->export_permission[$r]=array(array("facture","facture","export","other")); $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. //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'=>"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_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.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_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 $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'; $keyforselect='facture'; $keyforelement='invoice'; $keyforaliasextra='extra';
include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php'; 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_label[$r]='CustomersInvoicesAndPayments'; // Translation key (used only if key ExportDataset_xxx_z not found)
$this->export_icon[$r]='bill'; $this->export_icon[$r]='bill';
$this->export_permission[$r]=array(array("facture","facture","export")); $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.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_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.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_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 $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'; $keyforselect='facture'; $keyforelement='invoice'; $keyforaliasextra='extra';
include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php'; 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', '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. 'langs'=>'printing', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
'position'=>300, '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 'perms'=>'$user->rights->printing->read', // Use 'perms'=>'1' if you want your menu with no permission rules
'target'=>'', 'target'=>'',
'user'=>0); // 0=Menu for internal users, 1=external users, 2=both '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', '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. 'langs'=>'products', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
'position'=>300, '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 'perms'=>'1', // Use 'perms'=>'$user->rights->mymodule->level1->level2' if you want your menu with a permission rules
'target'=>'', 'target'=>'',
'user'=>0); // 0=Menu for internal users, 1=external users, 2=both '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 // Create Object for the call module
$object = new $this->objectname($this->db); $object = new $this->objectname($this->db);
$params_arr = explode(", ",$this->params); $params_arr = array_map('trim', explode(",",$this->params));
if (!is_array($params_arr)) if (!is_array($params_arr))
{ {
$result = call_user_func(array($object, $this->methodename), $this->params); $result = call_user_func(array($object, $this->methodename), $this->params);

View File

@ -243,8 +243,8 @@ if (empty($reshook))
while (isset($_POST[$batch])) while (isset($_POST[$batch]))
{ {
// save line of detail into sub_qty // 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]['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]['id_batch']=GETPOST($batch,'int'); // the id into llx_product_batch of stock record to move
$subtotalqty+=$sub_qty[$j]['q']; $subtotalqty+=$sub_qty[$j]['q'];
//var_dump($qty);var_dump($batch);var_dump($sub_qty[$j]['q']);var_dump($sub_qty[$j]['id_batch']); //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 else
{ {
// Case we dont use the list of available qty for each warehouse/lot // No detail were provided for lots
// GUI does not allow this yet if (! empty($_POST[$qty]))
setEventMessage('StockRequiredToChooseWhichLotToUse', 'errors'); {
// 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])) else if (isset($_POST[$stockLocation]))
@ -810,7 +815,7 @@ if ($action == 'create')
print '<table class="noborder" width="100%">'; print '<table class="noborder" width="100%">';
// Lecture des expeditions deja effectuees // Load shipments already done for same order
$object->loadExpeditions(); $object->loadExpeditions();
if ($numAsked) if ($numAsked)
@ -919,6 +924,7 @@ if ($action == 'create')
print '<input name="qtydelivered'.$indiceAsked.'" id="qtydelivered'.$indiceAsked.'" type="hidden" value="'.$quantityDelivered.'">'; print '<input name="qtydelivered'.$indiceAsked.'" id="qtydelivered'.$indiceAsked.'" type="hidden" value="'.$quantityDelivered.'">';
print '</td>'; print '</td>';
// Qty to ship
$quantityAsked = $line->qty; $quantityAsked = $line->qty;
if ($line->product_type == 1 && empty($conf->global->STOCK_SUPPORTS_SERVICES)) 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 $stock = + $product->stock_warehouse[$warehouse_id]->real; // Convert to number
$deliverableQty=min($quantityToBeDelivered, $stock); $deliverableQty=min($quantityToBeDelivered, $stock);
if ($deliverableQty < 0) $deliverableQty = 0; 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 // Quantity to send
print '<td align="center">'; print '<td align="center">';
@ -1009,21 +1015,32 @@ if ($action == 'create')
} }
else else
{ {
// Product need lot
print '<td></td><td></td></tr>'; // end line and start a new one for lot/serial print '<td></td><td></td></tr>'; // end line and start a new one for lot/serial
$staticwarehouse=new Entrepot($db); $staticwarehouse=new Entrepot($db);
if ($warehouse_id > 0) $staticwarehouse->fetch($warehouse_id); if ($warehouse_id > 0) $staticwarehouse->fetch($warehouse_id);
$subj=0; $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.'">'; 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) foreach ($product->stock_warehouse[$warehouse_id]->detail_batch as $dbatch)
{ {
//var_dump($dbatch); //var_dump($dbatch);
$batchStock = + $dbatch->qty; // To get a numeric $batchStock = + $dbatch->qty; // To get a numeric
$deliverableQty = min($quantityToBeDelivered,$batchStock); $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 '<input name="qtyl'.$indiceAsked.'_'.$subj.'" id="qtyl'.$indiceAsked.'_'.$subj.'" type="text" size="4" value="'.$deliverableQty.'">';
print '</td>'; print '</td>';
@ -1045,8 +1062,8 @@ if ($action == 'create')
} }
else else
{ {
print '<!-- Case -->'; print '<!-- Case there is no details of lot at all -->';
print '<tr><td colspan="3"></td><td align="center">'; 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 '<input name="qtyl'.$indiceAsked.'_'.$subj.'" id="qtyl'.$indiceAsked.'_'.$subj.'" type="text" size="4" value="0" disabled="disabled"> ';
print '</td>'; print '</td>';
@ -1066,6 +1083,15 @@ if ($action == 'create')
print '<input name="idl'.$indiceAsked.'" type="hidden" value="'.$line->id.'">'; print '<input name="idl'.$indiceAsked.'" type="hidden" value="'.$line->id.'">';
$subj=0; $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 foreach ($product->stock_warehouse as $warehouse_id=>$stock_warehouse) // $stock_warehouse is product_stock
{ {
$warehouseObject=new Entrepot($db); $warehouseObject=new Entrepot($db);
@ -1076,7 +1102,8 @@ if ($action == 'create')
$deliverableQty = min($quantityToBeDelivered,$stock); $deliverableQty = min($quantityToBeDelivered,$stock);
$deliverableQty = max(0, $deliverableQty); $deliverableQty = max(0, $deliverableQty);
// Quantity to send // 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)) 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.'">'; 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); $warehouseObject=new Entrepot($db);
$productlotObject=new Productlot($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) foreach ($product->stock_warehouse as $warehouse_id=>$stock_warehouse)
{ {
$warehouseObject->fetch($warehouse_id); $warehouseObject->fetch($warehouse_id);
if (($stock_warehouse->real > 0) && (count($stock_warehouse->detail_batch))) { 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); //var_dump($dbatch);
$batchStock = + $dbatch->qty; // To get a numeric $batchStock = + $dbatch->qty; // To get a numeric
$deliverableQty = min($quantityToBeDelivered,$batchStock); $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 '<input name="qtyl'.$indiceAsked.'_'.$subj.'" id="qtyl'.$indiceAsked.'_'.$subj.'" type="text" size="4" value="'.$deliverableQty.'">';
print '</td>'; print '</td>';
@ -1185,10 +1223,14 @@ if ($action == 'create')
if ($subj == 0) // Line not shown yet, we show it if ($subj == 0) // Line not shown yet, we show it
{ {
print '<!-- 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)) 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:'').'> '; print '<input name="qtyl'.$indiceAsked.'_'.$subj.'" id="qtyl'.$indiceAsked.'_'.$subj.'" type="text" size="4" value="0"'.($disabled?' '.$disabled:'').'> ';
} }
else 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 VAT is not used in Dolibarr, set VAT rate to 0 because VAT rate is necessary.
if (empty($vatrate)) $vatrate = "0.000"; if (empty($vatrate)) $vatrate = "0.000";
$object_ligne->vatrate = price2num($vatrate); $object_ligne->vatrate = price2num($vatrate);
$object_ligne->fk_projet = $fk_projet; $object_ligne->fk_projet = $fk_projet;
@ -1080,13 +1079,17 @@ if (empty($reshook))
$value_unit = GETPOST('value_unit'); $value_unit = GETPOST('value_unit');
$vatrate = GETPOST('vatrate'); $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) if (! GETPOST('fk_c_type_fees') > 0)
{ {
$error++; $error++;
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Type")), null, 'errors'); setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Type")), null, 'errors');
$action=''; $action='';
} }
if (GETPOST('vatrate') < 0 || GETPOST('vatrate') == '') if ((int) $vatrate < 0 || $vatrate == '')
{ {
$error++; $error++;
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Vat")), null, 'errors'); 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.= ' LEFT JOIN '.MAIN_DB_PREFIX.'projet as pjt ON fde.fk_projet=pjt.rowid';
$sql.= ' WHERE fde.fk_expensereport = '.$object->id; $sql.= ' WHERE fde.fk_expensereport = '.$object->id;
print '<div style="clear: both;">'; print '<div style="clear: both;"></div>';
$actiontouse='updateligne'; $actiontouse='updateligne';
if (($object->fk_statut==0 || $object->fk_statut==99) && $action != 'editline') $actiontouse='addline'; 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="action" value="'.$actiontouse.'">';
print '<input type="hidden" name="id" value="'.$object->id.'">'; print '<input type="hidden" name="id" value="'.$object->id.'">';
print '<input type="hidden" name="fk_expensereport" 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); $resql = $db->query($sql);
if ($resql) if ($resql)
@ -2047,11 +2053,9 @@ else
} // Fin si c'est payé/validé } // Fin si c'est payé/validé
print '</table>'; print '</table>';
print '</form>';
print '</div>'; print '</div>';
print '</form>';
} }
else else
{ {
@ -2091,7 +2095,7 @@ if ($action != 'create' && $action != 'edit')
*/ */
if ($user->rights->expensereport->creer && $object->fk_statut==0) 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 // Modify
print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=edit&id='.$object->id.'">'.$langs->trans('Modify').'</a></div>'; 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 // Create
var $date_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 // Update
var $date_modif; var $date_modif;
@ -126,7 +126,7 @@ class ExpenseReport extends CommonObject
$now = dol_now(); $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; if (empty($fuserid)) $fuserid = $user->id;
$this->db->begin(); $this->db->begin();
@ -254,7 +254,7 @@ class ExpenseReport extends CommonObject
$this->statut=0; $this->statut=0;
// Clear fields // 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->fk_user_valid = '';
$this->date_create = ''; $this->date_create = '';
$this->date_creation = ''; $this->date_creation = '';
@ -301,9 +301,10 @@ class ExpenseReport extends CommonObject
* update * update
* *
* @param User $user User making change * @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 * @return int <0 if KO, >0 if OK
*/ */
function update($user) function update($user, $userofexpensereport=null)
{ {
global $langs; global $langs;
@ -313,10 +314,13 @@ class ExpenseReport extends CommonObject
$sql.= " , total_tva = ".$this->total_tva; $sql.= " , total_tva = ".$this->total_tva;
$sql.= " , date_debut = '".$this->db->idate($this->date_debut)."'"; $sql.= " , date_debut = '".$this->db->idate($this->date_debut)."'";
$sql.= " , date_fin = '".$this->db->idate($this->date_fin)."'"; $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_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_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_statut = ".($this->fk_statut >= 0 ? $this->fk_statut:'0');
$sql.= " , fk_c_paiement = ".($this->fk_c_paiement > 0 ? $this->fk_c_paiement:"null"); $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)."'":"''"); $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_refuse = $this->db->jdate($obj->date_refuse);
$this->date_cancel = $this->db->jdate($obj->date_cancel); $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_modif = $obj->fk_user_modif;
$this->fk_user_validator = $obj->fk_user_validator; $this->fk_user_validator = $obj->fk_user_validator;
$this->fk_user_valid = $obj->fk_user_valid; $this->fk_user_valid = $obj->fk_user_valid;
@ -958,7 +962,7 @@ class ExpenseReport extends CommonObject
{ {
$prefix="ER"; $prefix="ER";
if (! empty($conf->global->EXPENSE_REPORT_PREFIX)) $prefix=$conf->global->EXPENSE_REPORT_PREFIX; 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'; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
// We rename directory in order to avoid losing the attachments // 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)) if (!empty($obj->note_private) || !empty($obj->note_public))
{ {
print ' <span class="note">'; 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 '</span>';
} }
print '</td>'; 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'; require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
$langs->load("bills"); $langs->load("bills");
$langs->load("banks");
$chid=GETPOST("id"); $chid=GETPOST("id");
$action=GETPOST('action'); $action=GETPOST('action');
@ -62,19 +63,19 @@ if ($action == 'add_payment')
$datepaid = dol_mktime(12, 0, 0, $_POST["remonth"], $_POST["reday"], $_POST["reyear"]); $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++; $error++;
} }
if ($datepaid == '') if ($datepaid == '')
{ {
$mesg = $langs->trans("ErrorFieldRequired",$langs->transnoentities("Date")); setEventMessages($langs->trans("ErrorFieldRequired",$langs->transnoentities("Date")), null, 'errors');
$error++; $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++; $error++;
} }
@ -163,7 +164,6 @@ $form=new Form($db);
// Form to create expense report payment // Form to create expense report payment
if (GETPOST("action") == 'create') if (GETPOST("action") == 'create')
{ {
$expensereport = new ExpenseReport($db); $expensereport = new ExpenseReport($db);
$expensereport->fetch($chid); $expensereport->fetch($chid);
@ -171,11 +171,6 @@ if (GETPOST("action") == 'create')
print load_fiche_titre($langs->trans("DoPayment")); 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 '<form name="add_payment" action="'.$_SERVER['PHP_SELF'].'" method="post">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="id" value="'.$chid.'">'; print '<input type="hidden" name="id" value="'.$chid.'">';
@ -222,11 +217,14 @@ if (GETPOST("action") == 'create')
print "</td>\n"; print "</td>\n";
print '</tr>'; print '</tr>';
print '<tr>'; if (! empty($conf->banque->enabled))
print '<td class="fieldrequired">'.$langs->trans('AccountToDebit').'</td>'; {
print '<td colspan="2">'; print '<tr>';
$form->select_comptes(isset($_POST["accountid"])?$_POST["accountid"]:$expensereport->accountid, "accountid", 0, '',1); // Show open bank account list print '<td class="fieldrequired">'.$langs->trans('AccountToDebit').'</td>';
print '</td></tr>'; 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 // Number
print '<tr><td>'.$langs->trans('Numero'); print '<tr><td>'.$langs->trans('Numero');
@ -243,9 +241,7 @@ if (GETPOST("action") == 'create')
dol_fiche_end(); dol_fiche_end();
/* // List of expenses ereport not already paid completely
* Autres charges impayees
*/
$num = 1; $num = 1;
$i = 0; $i = 0;

View File

@ -31,7 +31,7 @@
*/ */
if (! defined('DOL_APPLICATION_TITLE')) define('DOL_APPLICATION_TITLE','Dolibarr'); 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)); if (! defined('EURO')) define('EURO',chr(128));

View File

@ -187,7 +187,25 @@ if (empty($reshook))
if ($result < 0) if ($result < 0)
{ {
setEventMessages($object->error,$object->errors,'errors'); 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 (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 (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 (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 (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 (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); INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (230,'UZ','UZB','Ouzbékistan',1,0);

View File

@ -324,3 +324,6 @@ INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) va
-- Regions Panama (id country=178) -- 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

@ -1492,3 +1492,15 @@ 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-8', 17801, '', 0, '', 'Panamá', 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-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; drop table tmp_c_shipment_mode;
-- VMYSQL4.1 SET sql_mode = 'ALLOW_INVALID_DATES'; -- 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 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'; -- 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 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 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 -- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by -- it under the terms of the GNU General Public License as published by
@ -14,6 +14,7 @@
-- You should have received a copy of the GNU General Public License -- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>. -- 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 create table llx_bank_class

View File

@ -15,6 +15,7 @@
-- You should have received a copy of the GNU General Public License -- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>. -- 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 CREATE TABLE llx_categorie_account

View File

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

View File

@ -9,17 +9,20 @@ VersionDevelopment=تطويرية
VersionUnknown=غير معروف VersionUnknown=غير معروف
VersionRecommanded=موصى بها VersionRecommanded=موصى بها
FileCheck=Files integrity checker 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. 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 GlobalChecksum=Global checksum
MakeIntegrityAnalysisFrom=Make integrity analysis of application files from MakeIntegrityAnalysisFrom=Make integrity analysis of application files from
LocalSignature=Embedded local signature (less reliable) LocalSignature=Embedded local signature (less reliable)
RemoteSignature=Remote distant signature (more reliable) RemoteSignature=Remote distant signature (more reliable)
FilesMissing=الملفات المفقودة FilesMissing=الملفات المفقودة
FilesUpdated=الملفات التي تم تحديثها FilesUpdated=الملفات التي تم تحديثها
FilesModified=Modified Files
FilesAdded=Added Files
FileCheckDolibarr=Check integrity of application 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 XmlNotFound=Xml Integrity File of application not found
SessionId=Session ID SessionId=Session ID
SessionSaveHandler=معالج لحفظ الجلسات SessionSaveHandler=معالج لحفظ الجلسات
@ -188,7 +191,9 @@ BoxesDesc=Widgets are components showing some information that you can add to pe
OnlyActiveElementsAreShown=فقط العناصر من <a href="%s">النماذج المفعلة </a> سوف تظهر. 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. 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... 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 / خارجي إدارة علاقات العملاء 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) 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... WebSiteDesc=Reference websites to find more modules...
@ -280,20 +285,21 @@ MenuHandlers=قائمة مناولي
MenuAdmin=قائمة تحرير MenuAdmin=قائمة تحرير
DoNotUseInProduction=لا تستخدمها مع المنتج DoNotUseInProduction=لا تستخدمها مع المنتج
ThisIsProcessToFollow=This is steps to process: ThisIsProcessToFollow=This is steps to process:
ThisIsAlternativeProcessToFollow=هذا هو الإعداد بديل للعملية: ThisIsAlternativeProcessToFollow=This is an alternative setup to process manually:
StepNb=الخطوة %s StepNb=الخطوة %s
FindPackageFromWebSite=العثور على الحزمة التي توفر ميزة تريد (على سبيل المثال على موقع الويب %s). FindPackageFromWebSite=العثور على الحزمة التي توفر ميزة تريد (على سبيل المثال على موقع الويب %s).
DownloadPackageFromWebSite=تحميل الحزمة (على سبيل المثال من الموقع الرسمي على الإنترنت%s). DownloadPackageFromWebSite=تحميل الحزمة (على سبيل المثال من الموقع الرسمي على الإنترنت%s).
UnpackPackageInDolibarrRoot=ملف حزمة فك إلى Dolibarr دليل خادم مخصص لوحدات <b>الخارجية:%s</b> UnpackPackageInDolibarrRoot=Unpack the packaged files into server directory dedicated to Dolibarr: <b>%s</b>
SetupIsReadyForUse=الانتهاء من تركيب وDolibarr على استعداد لاستخدام هذا العنصر الجديد. UnpackPackageInModulesRoot=To deploy/install an external module, unpack the packaged files into the server directory dedicated to modules: <b>%s</b>
NotExistsDirect=لم يتم تعريف الدليل الجذر بديل. <br> 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>.
InfDirAlt=منذ الإصدار 3 من الممكن تعريف directory.This الجذر بديلة يسمح لك لتخزين ونفس المكان، والمكونات الإضافية والقوالب المخصصة. <br> مجرد إنشاء دليل على جذر Dolibarr (على سبيل المثال: مخصص). <br> NotExistsDirect=The alternative root directory is not defined to an existing directory.<br>
InfDirExample=<br> ثم نعلن ذلك في conf.php ملف <br> $ dolibarr_main_url_root_alt = 'HTTP: // MYSERVER / مخصص " <br> $ dolibarr_main_document_root_alt = '/ مسار / لعام / dolibarr / htdocs / مخصص " <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=لهذه الخطوة، يمكنك إرسال حزمة باستخدام هذه الأداة: اختر ملف الوحدة النمطية YouCanSubmitFile=لهذه الخطوة، يمكنك إرسال حزمة باستخدام هذه الأداة: اختر ملف الوحدة النمطية
CurrentVersion=Dolibarr النسخة الحالية CurrentVersion=Dolibarr النسخة الحالية
CallUpdatePage=Go to the page that updates the database structure and data: %s. CallUpdatePage=Go to the page that updates the database structure and data: %s.
LastStableVersion=Latest stable version LastStableVersion=Latest stable version
LastActivationDate=Last activation date LastActivationDate=Latest activation date
UpdateServerOffline=خادم التحديث متواجد حاليا 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> 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> 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 ExtrafieldRadio=Radio button
ExtrafieldCheckBoxFromList= مربع من الجدول ExtrafieldCheckBoxFromList= مربع من الجدول
ExtrafieldLink=رابط إلى كائن 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>... 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>... 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 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 :<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 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 ExtrafieldParamHelplink=يجب أن يكون المعلمات ObjectName: CLASSPATH <br> بناء الجملة: ObjectName: CLASSPATH <br> مثال: سوسيتيه: سوسيتيه / فئة / societe.class.php
LibraryToBuildPDF=Library used for PDF generation 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> 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. 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... 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). 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 # Modules
Module0Name=& مجموعات المستخدمين Module0Name=& مجموعات المستخدمين
Module0Desc=إدارة المستخدمين والمجموعات Module0Desc=Users / Employees and Groups management
Module1Name=أطراف ثالثة Module1Name=أطراف ثالثة
Module1Desc=شركات الاتصالات وإدارة Module1Desc=شركات الاتصالات وإدارة
Module2Name=التجارية Module2Name=التجارية
@ -689,7 +695,7 @@ PermissionAdvanced253=إنشاء / تعديل المستخدمين خارجي /
Permission254=حذف أو تعطيل المستخدمين الآخرين Permission254=حذف أو تعطيل المستخدمين الآخرين
Permission255=إنشاء / تعديل بلده معلومات المستخدم Permission255=إنشاء / تعديل بلده معلومات المستخدم
Permission256=تعديل بنفسه كلمة المرور 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=قراءة في كاليفورنيا Permission271=قراءة في كاليفورنيا
Permission272=قراءة الفواتير Permission272=قراءة الفواتير
Permission273=قضية الفواتير Permission273=قضية الفواتير
@ -891,7 +897,7 @@ Offset=ويقابل
AlwaysActive=حركة دائمة AlwaysActive=حركة دائمة
Upgrade=ترقية Upgrade=ترقية
MenuUpgrade=ترقية / توسيع MenuUpgrade=ترقية / توسيع
AddExtensionThemeModuleOrOther=إضافة التمديد) الموضوع ، وحدة ،...) AddExtensionThemeModuleOrOther=Deploy/install external module
WebServer=خادم الويب WebServer=خادم الويب
DocumentRootServer=خادم الويب 'sالدليل الرئيسي DocumentRootServer=خادم الويب 'sالدليل الرئيسي
DataRootServer=دليل ملفات البيانات DataRootServer=دليل ملفات البيانات
@ -1165,10 +1171,6 @@ FreeLegalTextOnOrders=بناء على أوامر النص الحر
WatermarkOnDraftOrders=العلامة المائية على مشاريع المراسيم (أي إذا فارغ) WatermarkOnDraftOrders=العلامة المائية على مشاريع المراسيم (أي إذا فارغ)
ShippableOrderIconInList=إضافة رمز في قائمة الطلبيات التي تشير إلى أمر غير قابل للشحن إذا ShippableOrderIconInList=إضافة رمز في قائمة الطلبيات التي تشير إلى أمر غير قابل للشحن إذا
BANK_ASK_PAYMENT_BANK_DURING_ORDER=اسأل عن وجهة حساب مصرفي من أجل 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 ##### ##### Interventions #####
InterventionsSetup=وحدة التدخل الإعداد InterventionsSetup=وحدة التدخل الإعداد
FreeLegalTextOnInterventions=حرر النص على وثائق التدخل FreeLegalTextOnInterventions=حرر النص على وثائق التدخل
@ -1395,7 +1397,7 @@ SendingsSetup=ارسال وحدة الإعداد
SendingsReceiptModel=ارسال استلام نموذج SendingsReceiptModel=ارسال استلام نموذج
SendingsNumberingModules=Sendings ترقيم الوحدات SendingsNumberingModules=Sendings ترقيم الوحدات
SendingsAbility=أوراق دعم الشحن للشحنات العملاء 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=النص الحر على الشحنات FreeLegalTextOnShippings=النص الحر على الشحنات
##### Deliveries ##### ##### Deliveries #####
DeliveryOrderNumberingModules=تلقي شحنات المنتجات الترقيم وحدة DeliveryOrderNumberingModules=تلقي شحنات المنتجات الترقيم وحدة
@ -1477,7 +1479,9 @@ AGENDA_DEFAULT_FILTER_STATUS=تلقائيا تعيين هذه الحالة مع
AGENDA_DEFAULT_VIEW=علامة التبويب التي تريد فتح افتراضيا عند اختيار القائمة جدول الأعمال 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=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 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 على سبيل المثال. ClickToDialDesc=هذه الوحدة تسمح لجعل أرقام هواتف يمكن النقر عليها. وهناك انقر على هذه الأيقونة دعوة تجعل هاتفك إلى الاتصال برقم الهاتف. وهذا يمكن أن تستخدم لاستدعاء نظام مركز الاتصال من Dolibarr يمكن أن نسميه ورقم الهاتف على نظام SIP على سبيل المثال.
ClickToDialUseTelLink=مجرد استخدام الرابط "الهاتف:" على أرقام الهواتف ClickToDialUseTelLink=مجرد استخدام الرابط "الهاتف:" على أرقام الهواتف
ClickToDialUseTelLinkDesc=استخدام هذا الأسلوب إذا كان المستخدمون يكون الهاتف الرقمي أو واجهة البرامج المثبتة على الكمبيوتر نفسه من المتصفح، ويسمى عند النقر على رابط في المتصفح التي تبدأ ب "الهاتف". إذا كنت في حاجة الى حل خادم الكامل (لا حاجة لتثبيت البرامج المحلية)، يجب عليك تعيين هذا إلى "لا" وملء الحقل التالي. ClickToDialUseTelLinkDesc=استخدام هذا الأسلوب إذا كان المستخدمون يكون الهاتف الرقمي أو واجهة البرامج المثبتة على الكمبيوتر نفسه من المتصفح، ويسمى عند النقر على رابط في المتصفح التي تبدأ ب "الهاتف". إذا كنت في حاجة الى حل خادم الكامل (لا حاجة لتثبيت البرامج المحلية)، يجب عليك تعيين هذا إلى "لا" وملء الحقل التالي.
@ -1505,10 +1509,11 @@ EndPointIs=SOAP clients must send their requests to the Dolibarr endpoint availa
##### API #### ##### API ####
ApiSetup=API وحدة الإعداد ApiSetup=API وحدة الإعداد
ApiDesc=من خلال تمكين هذه الوحدة، Dolibarr يصبح الخادم REST لتوفير خدمات الإنترنت المتنوعة. 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 ApiExporerIs=You can explore the APIs at url
OnlyActiveElementsAreExposed=ويتعرض عناصر فقط من وحدات تمكين OnlyActiveElementsAreExposed=ويتعرض عناصر فقط من وحدات تمكين
ApiKey=مفتاح API 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 ##### ##### Bank #####
BankSetupModule=إعداد وحدة مصرفية BankSetupModule=إعداد وحدة مصرفية
FreeLegalTextOnChequeReceipts=نص حر على الشيكات والإيصالات FreeLegalTextOnChequeReceipts=نص حر على الشيكات والإيصالات
@ -1577,7 +1582,7 @@ BackupDumpWizard=المعالج لبناء قاعدة بيانات النسخ ا
SomethingMakeInstallFromWebNotPossible=تركيب وحدة خارجية غير ممكن من واجهة ويب للسبب التالي: SomethingMakeInstallFromWebNotPossible=تركيب وحدة خارجية غير ممكن من واجهة ويب للسبب التالي:
SomethingMakeInstallFromWebNotPossible2=لهذا السبب، عملية لترقية وصفت هنا هو دليل على بعد خطوات قليلة يمكن للمستخدم متميز القيام به. SomethingMakeInstallFromWebNotPossible2=لهذا السبب، عملية لترقية وصفت هنا هو دليل على بعد خطوات قليلة يمكن للمستخدم متميز القيام به.
InstallModuleFromWebHasBeenDisabledByFile=تثبيت وحدة خارجية من التطبيق قد تم تعطيلها من قبل المسؤول. يجب أن يطلب منه إزالة <strong>الملف٪ s</strong> للسماح هذه الميزة. 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=تسليط الضوء على خطوط الجدول عندما يمر تحرك الماوس فوق HighlightLinesOnMouseHover=تسليط الضوء على خطوط الجدول عندما يمر تحرك الماوس فوق
HighlightLinesColor=تسليط الضوء على لون الخط عند تمرير الماوس فوق (الحفاظ فارغة دون تمييز) HighlightLinesColor=تسليط الضوء على لون الخط عند تمرير الماوس فوق (الحفاظ فارغة دون تمييز)
TextTitleColor=Color of page title TextTitleColor=Color of page title
@ -1607,6 +1612,7 @@ FixTZ=الإصلاح والوقت
FillFixTZOnlyIfRequired=مثال: +2 (ملء فقط إذا كانت المشكلة من ذوي الخبرة) FillFixTZOnlyIfRequired=مثال: +2 (ملء فقط إذا كانت المشكلة من ذوي الخبرة)
ExpectedChecksum=اختباري المتوقع ExpectedChecksum=اختباري المتوقع
CurrentChecksum=اختباري الحالي CurrentChecksum=اختباري الحالي
ForcedConstants=Required constant values
MailToSendProposal=لإرسال اقتراح العملاء MailToSendProposal=لإرسال اقتراح العملاء
MailToSendOrder=لإرسال طلب العميل MailToSendOrder=لإرسال طلب العميل
MailToSendInvoice=لإرسال فاتورة العملاء MailToSendInvoice=لإرسال فاتورة العملاء
@ -1615,9 +1621,10 @@ MailToSendIntervention=لإرسال التدخل
MailToSendSupplierRequestForQuotation=لإرسال طلب الاقتباس إلى المورد MailToSendSupplierRequestForQuotation=لإرسال طلب الاقتباس إلى المورد
MailToSendSupplierOrder=لإرسال المورد أجل MailToSendSupplierOrder=لإرسال المورد أجل
MailToSendSupplierInvoice=لإرسال فاتورة المورد MailToSendSupplierInvoice=لإرسال فاتورة المورد
MailToSendContract=To send a contract
MailToThirdparty=To send email from third party page MailToThirdparty=To send email from third party page
ByDefaultInList=تظهر بشكل افتراضي على عرض القائمة ByDefaultInList=تظهر بشكل افتراضي على عرض القائمة
YouUseLastStableVersion=كنت تستخدم إصدار مستقر الماضي YouUseLastStableVersion=You use the latest stable version
TitleExampleForMajorRelease=مثال على رسالة يمكنك استخدامها ليعلن هذا الإصدار الرئيسي (لا تتردد في استخدامها على مواقع الويب الخاص بك) TitleExampleForMajorRelease=مثال على رسالة يمكنك استخدامها ليعلن هذا الإصدار الرئيسي (لا تتردد في استخدامها على مواقع الويب الخاص بك)
TitleExampleForMaintenanceRelease=مثال على الرسالة التي يمكن استخدامها ليعلن هذا البيان الصيانة (لا تتردد في استخدامها على مواقع الويب الخاص بك) 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. 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=توفيق Conciliation=توفيق
ReconciliationLate=Reconciliation late ReconciliationLate=Reconciliation late
IncludeClosedAccount=وتشمل حسابات مغلقة IncludeClosedAccount=وتشمل حسابات مغلقة
OnlyOpenedAccount=حسابات مفتوحة فقط OnlyOpenedAccount=إلا فتح حسابات
AccountToCredit=الحساب على الائتمان AccountToCredit=الحساب على الائتمان
AccountToDebit=لحساب الخصم AccountToDebit=لحساب الخصم
DisableConciliation=تعطيل ميزة التوفيق لهذا الحساب DisableConciliation=تعطيل ميزة التوفيق لهذا الحساب
ConciliationDisabled=توفيق سمة المعوقين ConciliationDisabled=توفيق سمة المعوقين
LinkedToAConciliatedTransaction=Linked to a conciliated entry LinkedToAConciliatedTransaction=Linked to a conciliated entry
StatusAccountOpened=فتح StatusAccountOpened=Opened
StatusAccountClosed=مغلقة StatusAccountClosed=مغلقة
AccountIdShort=عدد AccountIdShort=عدد
LineRecord=المعاملات LineRecord=المعاملات

View File

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

View File

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

View File

@ -81,6 +81,7 @@ PaymentBankAccount=Payment bank account
OverAllProposals=Total proposals OverAllProposals=Total proposals
OverAllOrders=Total orders OverAllOrders=Total orders
OverAllInvoices=Total invoices OverAllInvoices=Total invoices
OverAllSupplierProposals=Total price requests
##### Local Taxes ##### ##### Local Taxes #####
LocalTax1IsUsed=استخدام الضرائب الثانية LocalTax1IsUsed=استخدام الضرائب الثانية
LocalTax1IsUsedES= يتم استخدام الطاقة المتجددة LocalTax1IsUsedES= يتم استخدام الطاقة المتجددة
@ -389,7 +390,7 @@ ListCustomersShort=قائمة العملاء
ThirdPartiesArea=أطراف ثالثة، ومنطقة الاتصال ThirdPartiesArea=أطراف ثالثة، ومنطقة الاتصال
LastModifiedThirdParties=Latest %s modified third parties LastModifiedThirdParties=Latest %s modified third parties
UniqueThirdParties=مجموع الأطراف الثالثة فريدة من نوعها UniqueThirdParties=مجموع الأطراف الثالثة فريدة من نوعها
InActivity=فتح InActivity=Opened
ActivityCeased=مغلق ActivityCeased=مغلق
ThirdPartyIsClosed=Third party is closed ThirdPartyIsClosed=Third party is closed
ProductsIntoElements=قائمة المنتجات / الخدمات إلى %s 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. 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 ThirdpartiesMergeSuccess=تم دمج Thirdparties
SaleRepresentativeLogin=Login of sales representative SaleRepresentativeLogin=Login of sales representative
SaleRepresentativeFirstname=Firstname of sales representative SaleRepresentativeFirstname=First name of sales representative
SaleRepresentativeLastname=Lastname of sales representative SaleRepresentativeLastname=Last name of sales representative
ErrorThirdpartiesMerge=كان هناك خطأ عند حذف thirdparties. يرجى التحقق من السجل. وقد عادت التغييرات. ErrorThirdpartiesMerge=كان هناك خطأ عند حذف thirdparties. يرجى التحقق من السجل. وقد عادت التغييرات.
NewCustomerSupplierCodeProposed=New customer or supplier code suggested on duplicate code NewCustomerSupplierCodeProposed=New customer or supplier code suggested on duplicate code

View File

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

View File

@ -17,14 +17,14 @@ CronMethodDoesNotExists=Class %s does not contains any method %s
# Menu # Menu
EnabledAndDisabled=Enabled and disabled EnabledAndDisabled=Enabled and disabled
# Page list # Page list
CronLastOutput=نشاط انتاج المدى CronLastOutput=Latest run output
CronLastResult=آخر رمز النتيجة CronLastResult=Latest result code
CronCommand=أمر CronCommand=أمر
CronList=المهام المجدولة CronList=المهام المجدولة
CronDelete=حذف المهام المجدولة CronDelete=حذف المهام المجدولة
CronConfirmDelete=هل أنت متأكد أنك تريد حذف هذه المهام المجدولة؟ CronConfirmDelete=Are you sure you want to delete these scheduled jobs?
CronExecute=Launch scheduled job CronExecute=Launch scheduled job
CronConfirmExecute=هل أنت متأكد أنك تريد تنفيذ هذه المهام المجدولة الآن؟ CronConfirmExecute=Are you sure you want to execute these scheduled jobs now?
CronInfo=وحدة مهمة مجدولة تسمح لتنفيذ المهمة التي تم التخطيط لها CronInfo=وحدة مهمة مجدولة تسمح لتنفيذ المهمة التي تم التخطيط لها
CronTask=وظيفة CronTask=وظيفة
CronNone=بلا CronNone=بلا
@ -39,7 +39,7 @@ CronMethod=الطريقة
CronModule=وحدة CronModule=وحدة
CronNoJobs=أي وظيفة سجلت CronNoJobs=أي وظيفة سجلت
CronPriority=الأولوية CronPriority=الأولوية
CronLabel=Label CronLabel=ملصق
CronNbRun=ملحوظة. إطلاق CronNbRun=ملحوظة. إطلاق
CronMaxRun=Max nb. launch CronMaxRun=Max nb. launch
CronEach=كل CronEach=كل
@ -73,7 +73,7 @@ CronType_method=استدعاء الأسلوب من فئة Dolibarr
CronType_command=الأمر Shell CronType_command=الأمر Shell
CronCannotLoadClass=لا يمكن تحميل الطبقة %s أو الكائن %s CronCannotLoadClass=لا يمكن تحميل الطبقة %s أو الكائن %s
UseMenuModuleToolsToAddCronJobs=Go into menu "Home - Admin tools - Scheduled jobs" to see and edit scheduled jobs. UseMenuModuleToolsToAddCronJobs=Go into menu "Home - Admin tools - Scheduled jobs" to see and edit scheduled jobs.
JobDisabled=Job disabled JobDisabled=تعطيل وظيفة
MakeLocalDatabaseDumpShort=Local database backup MakeLocalDatabaseDumpShort=Local database backup
MakeLocalDatabaseDump=Create a local database dump 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. 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=المجموعة ٪ ق موجود بالفعل. ErrorGroupAlreadyExists=المجموعة ٪ ق موجود بالفعل.
ErrorRecordNotFound=لم يتم العثور على السجل. ErrorRecordNotFound=لم يتم العثور على السجل.
ErrorFailToCopyFile=فشل في نسخ الملف <b>'%s'</b> إلى <b>'%s</b> &quot;. 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;. ErrorFailToRenameFile=فشل لإعادة تسمية الملف <b>'%s'</b> إلى <b>'%s</b> &quot;.
ErrorFailToDeleteFile=فشل إزالة الملف <b>'٪ ق.</b> ErrorFailToDeleteFile=فشل إزالة الملف <b>'٪ ق.</b>
ErrorFailToCreateFile=فشل إنشاء الملف <b>'٪ ق.</b> ErrorFailToCreateFile=فشل إنشاء الملف <b>'٪ ق.</b>
@ -115,7 +116,7 @@ ErrorNoActivatedBarcode=لا يوجد نوع الباركود تفعيلها
ErrUnzipFails=فشل بفك٪ الصورة مع ZipArchive ErrUnzipFails=فشل بفك٪ الصورة مع ZipArchive
ErrNoZipEngine=لا المحرك لبفك الصورة ملف٪ في هذا PHP ErrNoZipEngine=لا المحرك لبفك الصورة ملف٪ في هذا PHP
ErrorFileMustBeADolibarrPackage=يجب أن يكون الملف٪ s حزمة البريدي Dolibarr ErrorFileMustBeADolibarrPackage=يجب أن يكون الملف٪ s حزمة البريدي Dolibarr
ErrorFileRequired=فإنه يأخذ ملف حزمة Dolibarr ErrorModuleFileRequired=You must select a Dolibarr module package file
ErrorPhpCurlNotInstalled=وPHP الضفيرة لم يتم تثبيت، وهذا أمر ضروري لاجراء محادثات مع باي بال ErrorPhpCurlNotInstalled=وPHP الضفيرة لم يتم تثبيت، وهذا أمر ضروري لاجراء محادثات مع باي بال
ErrorFailedToAddToMailmanList=فشل لاضافة التسجيلة٪ s إلى قائمة ميلمان٪ الصورة أو قاعدة SPIP ErrorFailedToAddToMailmanList=فشل لاضافة التسجيلة٪ s إلى قائمة ميلمان٪ الصورة أو قاعدة SPIP
ErrorFailedToRemoveToMailmanList=فشل لإزالة سجل٪ 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. 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. ErrorUserNotAssignedToTask=User must be assigned to task to be able to enter time consumed.
ErrorTaskAlreadyAssigned=Task already assigned to user 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 # Warnings
WarningPasswordSetWithNoAccount=تم تعيين كلمة مرور لهذا العضو. ومع ذلك، تم إنشاء أي حساب المستخدم. لذلك يتم تخزين كلمة المرور هذه ولكن لا يمكن استخدامها للدخول إلى Dolibarr. ويمكن استخدامه من قبل وحدة / واجهة خارجية ولكن إذا كنت لا تحتاج إلى تعريف أي تسجيل دخول أو كلمة المرور لأحد أفراد، يمكنك تعطيل خيار "إدارة تسجيل دخول لكل عضو" من إعداد وحدة الأعضاء. إذا كنت بحاجة إلى إدارة تسجيل الدخول ولكن لا تحتاج إلى أي كلمة المرور، يمكنك الحفاظ على هذا الحقل فارغا لتجنب هذا التحذير. ملاحظة: يمكن أيضا أن تستخدم البريد الإلكتروني لتسجيل الدخول إذا تم ربط عضو إلى المستخدم. WarningPasswordSetWithNoAccount=تم تعيين كلمة مرور لهذا العضو. ومع ذلك، تم إنشاء أي حساب المستخدم. لذلك يتم تخزين كلمة المرور هذه ولكن لا يمكن استخدامها للدخول إلى Dolibarr. ويمكن استخدامه من قبل وحدة / واجهة خارجية ولكن إذا كنت لا تحتاج إلى تعريف أي تسجيل دخول أو كلمة المرور لأحد أفراد، يمكنك تعطيل خيار "إدارة تسجيل دخول لكل عضو" من إعداد وحدة الأعضاء. إذا كنت بحاجة إلى إدارة تسجيل الدخول ولكن لا تحتاج إلى أي كلمة المرور، يمكنك الحفاظ على هذا الحقل فارغا لتجنب هذا التحذير. ملاحظة: يمكن أيضا أن تستخدم البريد الإلكتروني لتسجيل الدخول إذا تم ربط عضو إلى المستخدم.

View File

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

View File

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

View File

@ -74,14 +74,18 @@ ResultOfMailSending=نتيجة لإرسال البريد الإلكتروني ا
NbSelected=ملحوظة مختارة NbSelected=ملحوظة مختارة
NbIgnored=ملحوظة تجاهلها NbIgnored=ملحوظة تجاهلها
NbSent=أرسلت ملحوظة 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 # Libelle des modules de liste de destinataires mailing
LineInFile=خط المستندات في ملف ٪ LineInFile=خط المستندات في ملف ٪
RecipientSelectionModules=حددت لطلبات المستفيدين الاختيار RecipientSelectionModules=حددت لطلبات المستفيدين الاختيار
MailSelectedRecipients=اختيار المستفيدين MailSelectedRecipients=اختيار المستفيدين
MailingArea=EMailings المنطقة MailingArea=EMailings المنطقة
LastMailings=ق emailings الماضي ٪ LastMailings=Latest %s emailings
TargetsStatistics=أهداف الإحصاءات TargetsStatistics=أهداف الإحصاءات
NbOfCompaniesContacts=فريدة من شركات الاتصالات NbOfCompaniesContacts=فريدة من شركات الاتصالات
MailNoChangePossible=صادق المتلقين للمراسلة لا يمكن تغيير MailNoChangePossible=صادق المتلقين للمراسلة لا يمكن تغيير
@ -146,3 +150,6 @@ AdvTgtCreateFilter=Create filter
AdvTgtOrCreateNewFilter=Name of new filter AdvTgtOrCreateNewFilter=Name of new filter
NoContactWithCategoryFound=No contact/address with a category found NoContactWithCategoryFound=No contact/address with a category found
NoContactLinkedToThirdpartieWithCategoryFound=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=تحديد تاريخ SelectDate=تحديد تاريخ
SeeAlso=انظر أيضا الصورة٪ SeeAlso=انظر أيضا الصورة٪
SeeHere=انظر هنا SeeHere=انظر هنا
Apply=تطبيق
BackgroundColorByDefault=لون الخلفية الافتراضية BackgroundColorByDefault=لون الخلفية الافتراضية
FileRenamed=The file was successfully renamed FileRenamed=The file was successfully renamed
FileUploaded=تم تحميل الملف بنجاح FileUploaded=تم تحميل الملف بنجاح
@ -87,7 +88,7 @@ Undefined=غير محدد
PasswordForgotten=Password forgotten? PasswordForgotten=Password forgotten?
SeeAbove=أنظر فوق SeeAbove=أنظر فوق
HomeArea=المنطقة الرئيسية HomeArea=المنطقة الرئيسية
LastConnexion=آخر إتصال LastConnexion=Latest connection
PreviousConnexion=الاتصال السابق PreviousConnexion=الاتصال السابق
PreviousValue=Previous value PreviousValue=Previous value
ConnectedOnMultiCompany=إتصال على البيئة ConnectedOnMultiCompany=إتصال على البيئة
@ -237,7 +238,7 @@ DateCreation=تاريخ الإنشاء
DateCreationShort=يخلق. التاريخ DateCreationShort=يخلق. التاريخ
DateModification=تاريخ التعديل DateModification=تاريخ التعديل
DateModificationShort=Modif. التاريخ DateModificationShort=Modif. التاريخ
DateLastModification=تاريخ آخر تعديل DateLastModification=Latest modification date
DateValidation=تاريخ التحقق من الصحة DateValidation=تاريخ التحقق من الصحة
DateClosing=الموعد النهائي DateClosing=الموعد النهائي
DateDue=تاريخ الاستحقاق DateDue=تاريخ الاستحقاق
@ -433,7 +434,7 @@ Reportings=التقارير
Draft=مسودة Draft=مسودة
Drafts=الداما Drafts=الداما
Validated=التحقق من صحة Validated=التحقق من صحة
Opened=فتح Opened=Opened
New=جديد New=جديد
Discount=تخفيض السعر Discount=تخفيض السعر
Unknown=غير معروف Unknown=غير معروف
@ -599,6 +600,8 @@ SessionName=اسم الدورة
Method=الطريقة Method=الطريقة
Receive=استقبال Receive=استقبال
CompleteOrNoMoreReceptionExpected=Complete or nothing more expected CompleteOrNoMoreReceptionExpected=Complete or nothing more expected
ExpectedValue=Expected Value
CurrentValue=القيمة الحالية
PartialWoman=جزئي PartialWoman=جزئي
TotalWoman=المجموع TotalWoman=المجموع
NeverReceived=لم يتلق NeverReceived=لم يتلق
@ -756,6 +759,7 @@ SomeTranslationAreUncomplete=Some languages may be partially translated or may c
DirectDownloadLink=Direct download link DirectDownloadLink=Direct download link
Download=Download Download=Download
ActualizeCurrency=Update currency rate ActualizeCurrency=Update currency rate
Fiscalyear=السنة المالية
# Week day # Week day
Monday=يوم الاثنين Monday=يوم الاثنين
Tuesday=الثلاثاء Tuesday=الثلاثاء
@ -812,3 +816,5 @@ SearchIntoContracts=عقود
SearchIntoCustomerShipments=Customer shipments SearchIntoCustomerShipments=Customer shipments
SearchIntoExpenseReports=تقارير المصاريف SearchIntoExpenseReports=تقارير المصاريف
SearchIntoLeaves=أوراق SearchIntoLeaves=أوراق
BulkActions=Bulk actions

View File

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

View File

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

View File

@ -68,14 +68,15 @@ PredefinedMailContentSendSupplierInvoice=__CONTACTCIVNAME__ سوف تجد هنا
PredefinedMailContentSendShipping=__CONTACTCIVNAME__ سوف تجد هنا الشحن __SHIPPINGREF__ __PERSONALIZED__Sincerely __SIGNATURE__ PredefinedMailContentSendShipping=__CONTACTCIVNAME__ سوف تجد هنا الشحن __SHIPPINGREF__ __PERSONALIZED__Sincerely __SIGNATURE__
PredefinedMailContentSendFichInter=__CONTACTCIVNAME__ سوف تجد هنا تدخل __FICHINTERREF__ __PERSONALIZED__Sincerely __SIGNATURE__ PredefinedMailContentSendFichInter=__CONTACTCIVNAME__ سوف تجد هنا تدخل __FICHINTERREF__ __PERSONALIZED__Sincerely __SIGNATURE__
PredefinedMailContentThirdparty=__CONTACTCIVNAME__ __PERSONALIZED__ __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... ChooseYourDemoProfil=Choose the demo profile that best suits your needs...
ChooseYourDemoProfilMore=...or build your own profile<br>(manual module selection)
DemoFundation=أعضاء في إدارة مؤسسة DemoFundation=أعضاء في إدارة مؤسسة
DemoFundation2=إدارة وأعضاء في الحساب المصرفي للمؤسسة DemoFundation2=إدارة وأعضاء في الحساب المصرفي للمؤسسة
DemoCompanyServiceOnly=إدارة نشاط بيع الخدمة لحسابهم الخاص فقط DemoCompanyServiceOnly=Company or freelance selling service only
DemoCompanyShopWithCashDesk=تدير متجر مع مكتب النقدية DemoCompanyShopWithCashDesk=تدير متجر مع مكتب النقدية
DemoCompanyProductAndStocks=إدارة شركة صغيرة أو متوسطة بيع المنتجات DemoCompanyProductAndStocks=Company selling products with a shop
DemoCompanyAll=إدارة شركة صغيرة أو متوسطة متعددة الأنشطة الرئيسية لجميع وحدات) DemoCompanyAll=Company with multiple activities (all main modules)
CreatedBy=أوجدتها ٪ ق CreatedBy=أوجدتها ٪ ق
ModifiedBy=المعدلة ق ٪ ModifiedBy=المعدلة ق ٪
ValidatedBy=يصادق عليها ق ٪ ValidatedBy=يصادق عليها ق ٪

View File

@ -60,7 +60,7 @@ SellingPrice=سعر البيع
SellingPriceHT=سعر البيع (صافي الضرائب) SellingPriceHT=سعر البيع (صافي الضرائب)
SellingPriceTTC=سعر البيع (شركة الضريبية) SellingPriceTTC=سعر البيع (شركة الضريبية)
CostPriceDescription=هذا السعر (صافية من الضرائب) يمكن استخدامها لتخزين متوسط ​​كمية هذا تكلفة المنتج لشركتك. قد يكون بأي ثمن على حساب نفسك، على سبيل المثال من متوسط ​​سعر الشراء بالإضافة إلى متوسط ​​إنتاج وتوزيع التكاليف. CostPriceDescription=هذا السعر (صافية من الضرائب) يمكن استخدامها لتخزين متوسط ​​كمية هذا تكلفة المنتج لشركتك. قد يكون بأي ثمن على حساب نفسك، على سبيل المثال من متوسط ​​سعر الشراء بالإضافة إلى متوسط ​​إنتاج وتوزيع التكاليف.
CostPriceUsage=في النسخة المقبلة، ويمكن استخدام هذه القيمة لحساب الهامش. CostPriceUsage=This value could be used for margin calculation.
SoldAmount=Sold amount SoldAmount=Sold amount
PurchasedAmount=Purchased amount PurchasedAmount=Purchased amount
NewPrice=السعر الجديد NewPrice=السعر الجديد
@ -142,6 +142,7 @@ ConfirmCloneProduct=Are you sure you want to clone product or service <b>%s</b>?
CloneContentProduct=استنساخ جميع المعلومات الرئيسية من المنتجات / الخدمات CloneContentProduct=استنساخ جميع المعلومات الرئيسية من المنتجات / الخدمات
ClonePricesProduct=استنساخ الرئيسية معلومات والأسعار ClonePricesProduct=استنساخ الرئيسية معلومات والأسعار
CloneCompositionProduct=استنساخ حزم المنتج / الخدمة CloneCompositionProduct=استنساخ حزم المنتج / الخدمة
CloneCombinationsProduct=Clone product variants
ProductIsUsed=ويستخدم هذا المنتج ProductIsUsed=ويستخدم هذا المنتج
NewRefForClone=المرجع. من المنتجات الجديدة / خدمة NewRefForClone=المرجع. من المنتجات الجديدة / خدمة
SellingPrices=أسعار بيع SellingPrices=أسعار بيع
@ -238,7 +239,7 @@ GlobalVariables=المتغيرات العالمية
VariableToUpdate=Variable to update VariableToUpdate=Variable to update
GlobalVariableUpdaters=updaters متغير العالمية GlobalVariableUpdaters=updaters متغير العالمية
UpdateInterval=تحديث الفاصل الزمني (دقائق) UpdateInterval=تحديث الفاصل الزمني (دقائق)
LastUpdated=آخر تحديث LastUpdated=Latest update
CorrectlyUpdated=تحديثها بشكل صحيح CorrectlyUpdated=تحديثها بشكل صحيح
PropalMergePdfProductActualFile=استخدام الملفات لإضافة إلى PDF دازور هي / هو PropalMergePdfProductActualFile=استخدام الملفات لإضافة إلى PDF دازور هي / هو
PropalMergePdfProductChooseFile=اختر ملفات PDF PropalMergePdfProductChooseFile=اختر ملفات PDF
@ -258,4 +259,41 @@ VolumeUnits=Volume unit
SizeUnits=Size unit SizeUnits=Size unit
DeleteProductBuyPrice=Delete buying price DeleteProductBuyPrice=Delete buying price
ConfirmDeleteProductBuyPrice=Are you sure you want to delete this 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=حذف مهمة DeleteATask=حذف مهمة
ConfirmDeleteAProject=Are you sure you want to delete this project? ConfirmDeleteAProject=Are you sure you want to delete this project?
ConfirmDeleteATask=Are you sure you want to delete this task? ConfirmDeleteATask=Are you sure you want to delete this task?
OpenedProjects=Open projects OpenedProjects=مشاريع فتح
OpenedTasks=Open tasks OpenedTasks=Opened tasks
OpportunitiesStatusForOpenedProjects=Opportunities amount of open projects by status OpportunitiesStatusForOpenedProjects=فرص كمية من المشاريع فتحت حسب الحالة
OpportunitiesStatusForProjects=Opportunities amount of projects by status OpportunitiesStatusForProjects=Opportunities amount of projects by status
ShowProject=وتبين للمشروع ShowProject=وتبين للمشروع
SetProject=وضع المشروع SetProject=وضع المشروع
@ -47,7 +47,7 @@ TaskTimeSpent=الوقت المستغرق في المهام
TaskTimeUser=المستعمل TaskTimeUser=المستعمل
TaskTimeNote=ملاحظة TaskTimeNote=ملاحظة
TaskTimeDate=Date TaskTimeDate=Date
TasksOnOpenedProject=المهام على المشاريع المفتوحة TasksOnOpenedProject=Tasks on opened projects
WorkloadNotDefined=عبء العمل غير محددة WorkloadNotDefined=عبء العمل غير محددة
NewTimeSpent=جديد الوقت الذي يقضيه NewTimeSpent=جديد الوقت الذي يقضيه
MyTimeSpent=وقتي قضى MyTimeSpent=وقتي قضى
@ -96,6 +96,7 @@ ValidateProject=تحقق من مشروع غابة
ConfirmValidateProject=Are you sure you want to validate this project? ConfirmValidateProject=Are you sure you want to validate this project?
CloseAProject=وثيقة المشروع CloseAProject=وثيقة المشروع
ConfirmCloseAProject=Are you sure you want to close this project? 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=فتح مشروع ReOpenAProject=فتح مشروع
ConfirmReOpenAProject=Are you sure you want to re-open this project? ConfirmReOpenAProject=Are you sure you want to re-open this project?
ProjectContact=مشروع اتصالات ProjectContact=مشروع اتصالات
@ -121,7 +122,7 @@ CloneProjectFiles=انضم مشروع استنساخ ملفات
CloneTaskFiles=مهمة استنساخ (ق) انضم الملفات (إن مهمة (ق) المستنسخة) CloneTaskFiles=مهمة استنساخ (ق) انضم الملفات (إن مهمة (ق) المستنسخة)
CloneMoveDate=Update project/tasks dates from now? CloneMoveDate=Update project/tasks dates from now?
ConfirmCloneProject=Are you sure to clone this project? ConfirmCloneProject=Are you sure to clone this project?
ProjectReportDate=تغيير موعد المهمة وفقا المشروع تاريخ بداية ProjectReportDate=Change task dates according to new project start date
ErrorShiftTaskDate=من المستحيل تحويل التاريخ المهمة وفقا لتاريخ بدء المشروع الجديد ErrorShiftTaskDate=من المستحيل تحويل التاريخ المهمة وفقا لتاريخ بدء المشروع الجديد
ProjectsAndTasksLines=المشاريع والمهام ProjectsAndTasksLines=المشاريع والمهام
ProjectCreatedInDolibarr=مشروع٪ الصورة التي تم إنشاؤها ProjectCreatedInDolibarr=مشروع٪ الصورة التي تم إنشاؤها
@ -178,9 +179,9 @@ ProjectsStatistics=إحصاءات عن المشاريع / يؤدي
TaskAssignedToEnterTime=المهمة الموكلة. يجب دخول الوقت على هذه المهمة يكون ممكنا. TaskAssignedToEnterTime=المهمة الموكلة. يجب دخول الوقت على هذه المهمة يكون ممكنا.
IdTaskTime=الوقت مهمة معرف 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. 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 OnlyOpportunitiesShort=Only opportunities
OpenedOpportunitiesShort=Open opportunities OpenedOpportunitiesShort=Opened opportunities
NotAnOpportunityShort=Not an opportunity NotAnOpportunityShort=Not an opportunity
OpportunityTotalAmount=فرص المبلغ الإجمالي OpportunityTotalAmount=فرص المبلغ الإجمالي
OpportunityPonderatedAmount=كمية الفرص المرجحة OpportunityPonderatedAmount=كمية الفرص المرجحة

View File

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

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