Merge branch 'develop' into qual_rename_facnumber
This commit is contained in:
commit
f97b561af0
@ -342,6 +342,9 @@ script:
|
||||
php upgrade.php 8.0.0 9.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade800900.log
|
||||
php upgrade2.php 8.0.0 9.0.0 > $TRAVIS_BUILD_DIR/upgrade800900-2.log
|
||||
php step5.php 8.0.0 9.0.0 > $TRAVIS_BUILD_DIR/upgrade800900-3.log
|
||||
php upgrade.php 9.0.0 10.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade9001000.log
|
||||
php upgrade2.php 9.0.0 10.0.0 > $TRAVIS_BUILD_DIR/upgrade9001000-2.log
|
||||
php step5.php 9.0.0 10.0.0 > $TRAVIS_BUILD_DIR/upgrade9001000-3.log
|
||||
cd -
|
||||
set +e
|
||||
echo
|
||||
|
||||
1
build/debian/source/include-binaries
Normal file
1
build/debian/source/include-binaries
Normal file
@ -0,0 +1 @@
|
||||
htdocs/install/doctemplates/websites/website_template-corporate.zip
|
||||
@ -30,7 +30,7 @@ return "Regis Houssin";
|
||||
# script_dolibarr_versions()
|
||||
sub script_dolibarr_versions
|
||||
{
|
||||
return ( "7.0.0", "6.0.5", "5.0.7" );
|
||||
return ( "9.0.0", "8.0.3", "7.0.4", "6.0.8", "5.0.7" );
|
||||
}
|
||||
|
||||
sub script_dolibarr_release
|
||||
@ -263,15 +263,16 @@ if ($upgrade) {
|
||||
local @params = ( [ "action", "upgrade" ],
|
||||
[ "versionfrom", $upgrade->{'version'} ],
|
||||
[ "versionto", $ver ],
|
||||
[ "installlock", "444" ],
|
||||
);
|
||||
local $p = $ver >= 3.8 ? "step5" : "etape5";
|
||||
local $err = &call_dolibarr_wizard_page(\@params, $p, $d, $opts);
|
||||
return (-1, "Dolibarr wizard failed : $err") if ($err);
|
||||
|
||||
# Remove the installation directory.
|
||||
local $dinstall = "$opts->{'dir'}/install";
|
||||
$dinstall =~ s/\/$//;
|
||||
$out = &run_as_domain_user($d, "rm -rf ".quotemeta($dinstall));
|
||||
# Remove the installation directory. (deprecated)
|
||||
# local $dinstall = "$opts->{'dir'}/install";
|
||||
# $dinstall =~ s/\/$//;
|
||||
# $out = &run_as_domain_user($d, "rm -rf ".quotemeta($dinstall));
|
||||
|
||||
}
|
||||
else {
|
||||
@ -306,15 +307,18 @@ else {
|
||||
[ "login", "admin" ],
|
||||
[ "pass", $dompass ],
|
||||
[ "pass_verif", $dompass ],
|
||||
[ "installlock", "444" ],
|
||||
);
|
||||
local $p = $ver >= 3.8 ? "step5" : "etape5";
|
||||
local $err = &call_dolibarr_wizard_page(\@params, $p, $d, $opts);
|
||||
return (-1, "Dolibarr wizard failed : $err") if ($err);
|
||||
|
||||
# Remove the installation directory and protect config file.
|
||||
local $dinstall = "$opts->{'dir'}/install";
|
||||
$dinstall =~ s/\/$//;
|
||||
$out = &run_as_domain_user($d, "rm -rf ".quotemeta($dinstall));
|
||||
# Remove the installation directory (deprecated)
|
||||
# local $dinstall = "$opts->{'dir'}/install";
|
||||
# $dinstall =~ s/\/$//;
|
||||
# $out = &run_as_domain_user($d, "rm -rf ".quotemeta($dinstall));
|
||||
|
||||
# Protect config file
|
||||
&set_permissions_as_domain_user($d, 0644, $cfile);
|
||||
&set_permissions_as_domain_user($d, 0755, $cfiledir);
|
||||
}
|
||||
@ -386,6 +390,8 @@ sub script_dolibarr_check_latest
|
||||
{
|
||||
local ($ver) = @_;
|
||||
local @vers = &osdn_package_versions("dolibarr",
|
||||
$ver >= 9.0 ? "dolibarr\\-(9\\.0\\.[0-9\\.]+)\\.tgz" :
|
||||
$ver >= 8.0 ? "dolibarr\\-(8\\.0\\.[0-9\\.]+)\\.tgz" :
|
||||
$ver >= 7.0 ? "dolibarr\\-(7\\.0\\.[0-9\\.]+)\\.tgz" :
|
||||
$ver >= 6.0 ? "dolibarr\\-(6\\.0\\.[0-9\\.]+)\\.tgz" :
|
||||
$ver >= 5.0 ? "dolibarr\\-(5\\.0\\.[0-9\\.]+)\\.tgz" :
|
||||
|
||||
@ -1,12 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<uml:Model xmi:version="2.1" xmlns:xmi="http://schema.omg.org/spec/XMI/2.1" xmlns:uml="http://www.eclipse.org/uml2/2.1.0/UML" xmi:id="_qb8akM37EdqwVrslYOdUDA">
|
||||
<packagedElement xmi:type="uml:Package" xmi:id="_w8IxIM37EdqwVrslYOdUDA" name="dolibarr">
|
||||
<packagedElement xmi:type="uml:Package" xmi:id="_T5aZ4FK9Ed60vaZbVikprw" name="OrdersModule"/>
|
||||
<packagedElement xmi:type="uml:Package" xmi:id="_ZhuGMlK9Ed60vaZbVikprw" name="InvoiceModule"/>
|
||||
<packagedElement xmi:type="uml:Package" xmi:id="_cf3SUlK9Ed60vaZbVikprw" name="UserModule"/>
|
||||
<packagedElement xmi:type="uml:Package" xmi:id="_maM0glK9Ed60vaZbVikprw" name="FoundationModule"/>
|
||||
<packagedElement xmi:type="uml:Package" xmi:id="_oqTO4lK9Ed60vaZbVikprw" name="ContractsModule"/>
|
||||
<packagedElement xmi:type="uml:Package" xmi:id="_rEq_klK9Ed60vaZbVikprw" name="ProposalsModule"/>
|
||||
<packagedElement xmi:type="uml:Package" xmi:id="_vxYmUlK9Ed60vaZbVikprw" name="EMailingManagement"/>
|
||||
</packagedElement>
|
||||
</uml:Model>
|
||||
@ -1,53 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<diagrams:Diagrams xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:di="http://www.topcased.org/DI/1.0" xmlns:diagrams="http://www.topcased.org/Diagrams/1.0" xmi:id="_SI6FkFK9Ed60vaZbVikprw" activeDiagram="_SI6FkVK9Ed60vaZbVikprw">
|
||||
<model href="dolibarr.uml#_w8IxIM37EdqwVrslYOdUDA"/>
|
||||
<diagrams xmi:id="_SI6FkVK9Ed60vaZbVikprw" position="0,0" size="100,100" name="dolibarr" viewport="0,0">
|
||||
<property xmi:id="_SJ9OcFK9Ed60vaZbVikprw" key="pageFormatName" value="A4"/>
|
||||
<property xmi:id="_SJ9OcVK9Ed60vaZbVikprw" key="diagramWidth" value="840"/>
|
||||
<property xmi:id="_SJ9OclK9Ed60vaZbVikprw" key="diagramHeight" value="1188"/>
|
||||
<property xmi:id="_SJ9Oc1K9Ed60vaZbVikprw" key="pageMarginName" value="Small Margin"/>
|
||||
<property xmi:id="_SJ9OdFK9Ed60vaZbVikprw" key="diagramTopMargin" value="20"/>
|
||||
<property xmi:id="_SJ9OdVK9Ed60vaZbVikprw" key="diagramBottomMargin" value="20"/>
|
||||
<property xmi:id="_SJ9OdlK9Ed60vaZbVikprw" key="diagramLeftMargin" value="20"/>
|
||||
<property xmi:id="_SJ9Od1K9Ed60vaZbVikprw" key="diagramRightMargin" value="20"/>
|
||||
<property xmi:id="_SJ9OeFK9Ed60vaZbVikprw" key="orientation" value="portrait"/>
|
||||
<semanticModel xsi:type="di:EMFSemanticModelBridge" xmi:id="_SI6FklK9Ed60vaZbVikprw" presentation="org.topcased.modeler.uml.classdiagram">
|
||||
<element href="dolibarr.uml#_w8IxIM37EdqwVrslYOdUDA"/>
|
||||
</semanticModel>
|
||||
<contained xsi:type="di:GraphNode" xmi:id="_T2b-YFK9Ed60vaZbVikprw" position="15,190" size="176,81">
|
||||
<semanticModel xsi:type="di:EMFSemanticModelBridge" xmi:id="_T2b-YVK9Ed60vaZbVikprw" presentation="default">
|
||||
<element href="dolibarr.uml#_T5aZ4FK9Ed60vaZbVikprw"/>
|
||||
</semanticModel>
|
||||
</contained>
|
||||
<contained xsi:type="di:GraphNode" xmi:id="_ZhuGMFK9Ed60vaZbVikprw" position="15,118" size="177,68">
|
||||
<semanticModel xsi:type="di:EMFSemanticModelBridge" xmi:id="_ZhuGMVK9Ed60vaZbVikprw" presentation="default">
|
||||
<element href="dolibarr.uml#_ZhuGMlK9Ed60vaZbVikprw"/>
|
||||
</semanticModel>
|
||||
</contained>
|
||||
<contained xsi:type="di:GraphNode" xmi:id="_cf3SUFK9Ed60vaZbVikprw" position="15,10" size="174,81">
|
||||
<semanticModel xsi:type="di:EMFSemanticModelBridge" xmi:id="_cf3SUVK9Ed60vaZbVikprw" presentation="default">
|
||||
<element href="dolibarr.uml#_cf3SUlK9Ed60vaZbVikprw"/>
|
||||
</semanticModel>
|
||||
</contained>
|
||||
<contained xsi:type="di:GraphNode" xmi:id="_maM0gFK9Ed60vaZbVikprw" position="291,118" size="145,73">
|
||||
<semanticModel xsi:type="di:EMFSemanticModelBridge" xmi:id="_maM0gVK9Ed60vaZbVikprw" presentation="default">
|
||||
<element href="dolibarr.uml#_maM0glK9Ed60vaZbVikprw"/>
|
||||
</semanticModel>
|
||||
</contained>
|
||||
<contained xsi:type="di:GraphNode" xmi:id="_oqTO4FK9Ed60vaZbVikprw" position="15,274" size="179,80">
|
||||
<semanticModel xsi:type="di:EMFSemanticModelBridge" xmi:id="_oqTO4VK9Ed60vaZbVikprw" presentation="default">
|
||||
<element href="dolibarr.uml#_oqTO4lK9Ed60vaZbVikprw"/>
|
||||
</semanticModel>
|
||||
</contained>
|
||||
<contained xsi:type="di:GraphNode" xmi:id="_rEq_kFK9Ed60vaZbVikprw" position="15,358" size="181,73">
|
||||
<semanticModel xsi:type="di:EMFSemanticModelBridge" xmi:id="_rEq_kVK9Ed60vaZbVikprw" presentation="default">
|
||||
<element href="dolibarr.uml#_rEq_klK9Ed60vaZbVikprw"/>
|
||||
</semanticModel>
|
||||
</contained>
|
||||
<contained xsi:type="di:GraphNode" xmi:id="_vxYmUFK9Ed60vaZbVikprw" position="15,490" size="181,80">
|
||||
<semanticModel xsi:type="di:EMFSemanticModelBridge" xmi:id="_vxYmUVK9Ed60vaZbVikprw" presentation="default">
|
||||
<element href="dolibarr.uml#_vxYmUlK9Ed60vaZbVikprw"/>
|
||||
</semanticModel>
|
||||
</contained>
|
||||
</diagrams>
|
||||
</diagrams:Diagrams>
|
||||
Binary file not shown.
@ -7,12 +7,12 @@ Download
|
||||
--------------------------------
|
||||
|
||||
* Dolibarr ERP/CRM can be downloaded at sourceforge:
|
||||
http://sourceforge.net/projects/dolibarr/files
|
||||
or from Dolibarr official web site:
|
||||
http://www.dolibarr.org
|
||||
https://sourceforge.net/projects/dolibarr/files
|
||||
or from Dolibarr official web site:
|
||||
https://www.dolibarr.org
|
||||
|
||||
* Most external modules are only available on DoliStore:
|
||||
http://www.dolistore.org
|
||||
https://www.dolistore.com
|
||||
|
||||
|
||||
--------------------------------
|
||||
@ -22,4 +22,4 @@ Install
|
||||
* For a Quick guide, take a look at README file into root directory.
|
||||
|
||||
* More complete documentations are also available on line on the Dolibarr Wiki:
|
||||
http://wiki.dolibarr.org
|
||||
https://wiki.dolibarr.org
|
||||
|
||||
33
doc/install/README-DE
Normal file
33
doc/install/README-DE
Normal file
@ -0,0 +1,33 @@
|
||||
README (deutsch / german / allemand)
|
||||
--------------------------------
|
||||
|
||||
|
||||
--------------------------------
|
||||
Download / Herunterladen
|
||||
--------------------------------
|
||||
|
||||
* Dolibarr ERP/CRM kann man über die offizielle Dolibarr Website
|
||||
https://www.dolibarr.org/downloads
|
||||
oder direkt von Sourceforge
|
||||
https://sourceforge.net/projects/dolibarr/files/
|
||||
herunterladen.
|
||||
|
||||
|
||||
|
||||
* Die meisten externen Module/Themens sind über den DoliStore verfügbar:
|
||||
https://www.dolistore.com/de/
|
||||
|
||||
|
||||
--------------------------------
|
||||
Installation
|
||||
--------------------------------
|
||||
|
||||
* Für eine kurze Einleitung, schau auf die README Datei im Hauptverzeichnis.
|
||||
|
||||
* Umfangreiche Dokumentationen sind im Dolibarr Wiki zu finden:
|
||||
https://wiki.dolibarr.org/index.php/Hauptseite
|
||||
|
||||
* eine Deutsche Community bietet der Dolibarr e.V. unter
|
||||
https://www.dolibarr.de/
|
||||
|
||||
|
||||
@ -1286,8 +1286,11 @@ else
|
||||
$cate_arbo = $form->select_all_categories(Categorie::TYPE_MEMBER, null, null, null, null, 1);
|
||||
$c = new Categorie($db);
|
||||
$cats = $c->containing($object->id, Categorie::TYPE_MEMBER);
|
||||
foreach ($cats as $cat) {
|
||||
$arrayselected[] = $cat->id;
|
||||
$arrayselected = array();
|
||||
if (is_array($cats)) {
|
||||
foreach ($cats as $cat) {
|
||||
$arrayselected[] = $cat->id;
|
||||
}
|
||||
}
|
||||
print $form->multiselectarray('memcats', $cate_arbo, $arrayselected, '', 0, '', 0, '100%');
|
||||
print "</td></tr>";
|
||||
|
||||
@ -59,6 +59,9 @@ class Adherent extends CommonObject
|
||||
|
||||
public $mesgs;
|
||||
|
||||
/**
|
||||
* @var string login of member
|
||||
*/
|
||||
public $login;
|
||||
|
||||
//! Clear password in memory
|
||||
@ -68,29 +71,70 @@ class Adherent extends CommonObject
|
||||
//! Encrypted password in database (always defined)
|
||||
public $pass_indatabase_crypted;
|
||||
|
||||
/**
|
||||
* @var string company name
|
||||
* @deprecated
|
||||
*/
|
||||
public $societe;
|
||||
|
||||
/**
|
||||
* @var Societe $company {@type Societe}
|
||||
* @var string company name
|
||||
*/
|
||||
public $company;
|
||||
|
||||
/**
|
||||
* @var int Thirdparty ID
|
||||
*/
|
||||
public $fk_soc;
|
||||
|
||||
/**
|
||||
* @var string Address
|
||||
*/
|
||||
public $address;
|
||||
|
||||
public $zip;
|
||||
/**
|
||||
* @var string zipcode
|
||||
*/
|
||||
public $zip;
|
||||
|
||||
/**
|
||||
* @var string town
|
||||
*/
|
||||
public $town;
|
||||
|
||||
public $state_id; // Id of department
|
||||
public $state_code; // Code of department
|
||||
public $state; // Label of department
|
||||
/**
|
||||
* @var int Id of state
|
||||
*/
|
||||
public $state_id;
|
||||
|
||||
/**
|
||||
* @var string Code of state
|
||||
*/
|
||||
public $state_code;
|
||||
|
||||
/**
|
||||
* @var string Label of state
|
||||
*/
|
||||
public $state;
|
||||
|
||||
/**
|
||||
* @var string email
|
||||
*/
|
||||
public $email;
|
||||
|
||||
public $skype;
|
||||
public $twitter;
|
||||
/**
|
||||
* @var string skype account
|
||||
*/
|
||||
public $skype;
|
||||
|
||||
/**
|
||||
* @var string twitter account
|
||||
*/
|
||||
public $twitter;
|
||||
|
||||
/**
|
||||
* @var string facebook account
|
||||
*/
|
||||
public $facebook;
|
||||
|
||||
/**
|
||||
@ -120,8 +164,12 @@ class Adherent extends CommonObject
|
||||
|
||||
public $morphy;
|
||||
public $public;
|
||||
public $statut; // -1:brouillon, 0:resilie, >=1:valide,paye
|
||||
public $photo;
|
||||
|
||||
// -1:brouillon, 0:resilie, >=1:valide,paye
|
||||
// def in common object
|
||||
//public $statut;
|
||||
|
||||
public $photo;
|
||||
|
||||
public $datec;
|
||||
public $datem;
|
||||
@ -129,21 +177,20 @@ class Adherent extends CommonObject
|
||||
|
||||
public $birth;
|
||||
|
||||
public $note_public;
|
||||
public $note_private;
|
||||
/**
|
||||
* @var int id type member
|
||||
*/
|
||||
public $typeid;
|
||||
|
||||
public $typeid; // Id type adherent
|
||||
public $type; // Libelle type adherent
|
||||
/**
|
||||
* @var string label type member
|
||||
*/
|
||||
public $type;
|
||||
public $need_subscription;
|
||||
|
||||
public $user_id;
|
||||
public $user_login;
|
||||
|
||||
/**
|
||||
* @var int Thirdparty ID
|
||||
*/
|
||||
public $fk_soc;
|
||||
|
||||
public $datefin; // From member table
|
||||
|
||||
// Fields loaded by fetch_subscriptions()
|
||||
@ -155,7 +202,10 @@ class Adherent extends CommonObject
|
||||
public $last_subscription_amount;
|
||||
public $subscriptions=array();
|
||||
|
||||
public $oldcopy; // To contains a clone of this when we need to save old properties of object
|
||||
/**
|
||||
* @var Adherent To contains a clone of this when we need to save old properties of object
|
||||
*/
|
||||
public $oldcopy;
|
||||
|
||||
/**
|
||||
* @var int Entity
|
||||
@ -593,11 +643,11 @@ class Adherent extends CommonObject
|
||||
$luser->societe_id=$this->societe;
|
||||
|
||||
$luser->birth=$this->birth;
|
||||
$luser->address=$this->address;
|
||||
$luser->zip=$this->zip;
|
||||
$luser->town=$this->town;
|
||||
$luser->country_id=$this->country_id;
|
||||
$luser->state_id=$this->state_id;
|
||||
$luser->address=$this->address;
|
||||
$luser->zip=$this->zip;
|
||||
$luser->town=$this->town;
|
||||
$luser->country_id=$this->country_id;
|
||||
$luser->state_id=$this->state_id;
|
||||
|
||||
$luser->email=$this->email;
|
||||
$luser->skype=$this->skype;
|
||||
|
||||
@ -337,11 +337,14 @@ class Subscription extends CommonObject
|
||||
/**
|
||||
* Return clicable name (with picto eventually)
|
||||
*
|
||||
* @param int $withpicto 0=No picto, 1=Include picto into link, 2=Only picto
|
||||
* @param int $notooltip 1=Disable tooltip
|
||||
* @return string Chaine avec URL
|
||||
* @param int $withpicto 0=No picto, 1=Include picto into link, 2=Only picto
|
||||
* @param int $notooltip 1=Disable tooltip
|
||||
* @param string $option Page for link ('', 'nolink', ...)
|
||||
* @param string $morecss Add more css on link
|
||||
* @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking
|
||||
* @return string Chaine avec URL
|
||||
*/
|
||||
function getNomUrl($withpicto=0, $notooltip=0)
|
||||
function getNomUrl($withpicto=0, $notooltip=0, $option='', $morecss='', $save_lastsearch_value=-1)
|
||||
{
|
||||
global $langs;
|
||||
|
||||
@ -350,8 +353,18 @@ class Subscription extends CommonObject
|
||||
$langs->load("members");
|
||||
$label=$langs->trans("ShowSubscription").': '.$this->ref;
|
||||
|
||||
$linkstart = '<a href="'.DOL_URL_ROOT.'/adherents/subscription/card.php?rowid='.$this->id.'" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">';
|
||||
$linkend='</a>';
|
||||
$url = DOL_URL_ROOT.'/adherents/subscription/card.php?rowid='.$this->id;
|
||||
|
||||
if ($option != 'nolink')
|
||||
{
|
||||
// Add param to save lastsearch_values or not
|
||||
$add_save_lastsearch_values=($save_lastsearch_value == 1 ? 1 : 0);
|
||||
if ($save_lastsearch_value == -1 && preg_match('/list\.php/',$_SERVER["PHP_SELF"])) $add_save_lastsearch_values=1;
|
||||
if ($add_save_lastsearch_values) $url.='&save_lastsearch_values=1';
|
||||
}
|
||||
|
||||
$linkstart = '<a href="'.$url.'" class="classfortooltip" title="'.dol_escape_htmltag($label, 1).'">';
|
||||
$linkend = '</a>';
|
||||
|
||||
$picto='payment';
|
||||
|
||||
|
||||
@ -79,8 +79,9 @@ $pagenext = $page + 1;
|
||||
if (! $sortorder) { $sortorder=($filter=='outofdate'?"DESC":"ASC"); }
|
||||
if (! $sortfield) { $sortfield=($filter=='outofdate'?"d.datefin":"d.lastname"); }
|
||||
|
||||
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
|
||||
$object = new Adherent($db);
|
||||
|
||||
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
|
||||
$hookmanager->initHooks(array('memberlist'));
|
||||
$extrafields = new ExtraFields($db);
|
||||
|
||||
@ -348,8 +349,8 @@ include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php';
|
||||
|
||||
// List of mass actions available
|
||||
$arrayofmassactions = array(
|
||||
// 'presend'=>$langs->trans("SendByMail"),
|
||||
// 'builddoc'=>$langs->trans("PDFMerge"),
|
||||
//'presend'=>$langs->trans("SendByMail"),
|
||||
//'builddoc'=>$langs->trans("PDFMerge"),
|
||||
);
|
||||
if ($user->rights->adherent->supprimer) $arrayofmassactions['predelete']=$langs->trans("Delete");
|
||||
if (in_array($massaction, array('presend','predelete'))) $arrayofmassactions=array();
|
||||
@ -603,6 +604,7 @@ print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"],"",'','','align="c
|
||||
print "</tr>\n";
|
||||
|
||||
$i = 0;
|
||||
$totalarray=array();
|
||||
while ($i < min($num, $limit))
|
||||
{
|
||||
$obj = $db->fetch_object($resql);
|
||||
@ -631,6 +633,7 @@ while ($i < min($num, $limit))
|
||||
if (! empty($conf->global->MAIN_SHOW_TECHNICAL_ID))
|
||||
{
|
||||
print '<td align="center">'.$obj->rowid.'</td>';
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
}
|
||||
|
||||
// Ref
|
||||
@ -639,6 +642,7 @@ while ($i < min($num, $limit))
|
||||
print "<td>";
|
||||
print $memberstatic->getNomUrl(-1, 0, 'card', 'ref');
|
||||
print "</td>\n";
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
}
|
||||
// Civility
|
||||
if (! empty($arrayfields['d.civility']['checked']))
|
||||
@ -646,6 +650,7 @@ while ($i < min($num, $limit))
|
||||
print "<td>";
|
||||
print $obj->civility;
|
||||
print "</td>\n";
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
}
|
||||
// Firstname
|
||||
if (! empty($arrayfields['d.firstname']['checked']))
|
||||
@ -653,6 +658,7 @@ while ($i < min($num, $limit))
|
||||
print "<td>";
|
||||
print $obj->firstname;
|
||||
print "</td>\n";
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
}
|
||||
// Lastname
|
||||
if (! empty($arrayfields['d.lastname']['checked']))
|
||||
@ -660,6 +666,7 @@ while ($i < min($num, $limit))
|
||||
print "<td>";
|
||||
print $obj->lastname;
|
||||
print "</td>\n";
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
}
|
||||
// Company
|
||||
if (! empty($arrayfields['d.company']['checked']))
|
||||
@ -672,11 +679,13 @@ while ($i < min($num, $limit))
|
||||
if (! empty($arrayfields['d.login']['checked']))
|
||||
{
|
||||
print "<td>".$obj->login."</td>\n";
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
}
|
||||
// Moral/Physique
|
||||
if (! empty($arrayfields['d.morphy']['checked']))
|
||||
{
|
||||
print "<td>".$memberstatic->getmorphylib($obj->morphy)."</td>\n";
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
}
|
||||
// Type label
|
||||
if (! empty($arrayfields['t.libelle']['checked']))
|
||||
@ -686,6 +695,7 @@ while ($i < min($num, $limit))
|
||||
print '<td class="nowrap">';
|
||||
print $membertypestatic->getNomUrl(1,32);
|
||||
print '</td>';
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
}
|
||||
// Address
|
||||
if (! empty($arrayfields['d.address']['checked']))
|
||||
@ -693,6 +703,7 @@ while ($i < min($num, $limit))
|
||||
print '<td class="nocellnopadd">';
|
||||
print $obj->address;
|
||||
print '</td>';
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
}
|
||||
// Zip
|
||||
if (! empty($arrayfields['d.zip']['checked']))
|
||||
@ -828,6 +839,36 @@ while ($i < min($num, $limit))
|
||||
$i++;
|
||||
}
|
||||
|
||||
// Show total line
|
||||
if (isset($totalarray['pos']))
|
||||
{
|
||||
print '<tr class="liste_total">';
|
||||
$i=0;
|
||||
while ($i < $totalarray['nbfield'])
|
||||
{
|
||||
$i++;
|
||||
if (! empty($totalarray['pos'][$i])) print '<td align="right">'.price($totalarray['val'][$totalarray['pos'][$i]]).'</td>';
|
||||
else
|
||||
{
|
||||
if ($i == 1)
|
||||
{
|
||||
if ($num < $limit) print '<td align="left">'.$langs->trans("Total").'</td>';
|
||||
else print '<td align="left">'.$langs->trans("Totalforthispage").'</td>';
|
||||
}
|
||||
else print '<td></td>';
|
||||
}
|
||||
}
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
// If no record found
|
||||
if ($num == 0)
|
||||
{
|
||||
$colspan=1;
|
||||
foreach($arrayfields as $key => $val) { if (! empty($val['checked'])) $colspan++; }
|
||||
print '<tr><td colspan="'.$colspan.'" class="opacitymedium">'.$langs->trans("NoRecordFound").'</td></tr>';
|
||||
}
|
||||
|
||||
$db->free($resql);
|
||||
|
||||
$parameters=array('sql' => $sql);
|
||||
|
||||
@ -191,7 +191,7 @@ if ($user->rights->adherent->cotisation->creer && $action == 'edit')
|
||||
|
||||
dol_fiche_head($head, 'general', $langs->trans("Subscription"), 0, 'payment');
|
||||
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/adherents/subscription/list.php">'.$langs->trans("BackToList").'</a>';
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/adherents/subscription/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
|
||||
|
||||
print "\n";
|
||||
print '<table class="border" width="100%">';
|
||||
@ -290,7 +290,7 @@ if ($rowid && $action != 'edit')
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/adherents/subscription/list.php">'.$langs->trans("BackToList").'</a>';
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/adherents/subscription/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
|
||||
|
||||
dol_banner_tab($object, 'rowid', $linkback, 1);
|
||||
|
||||
|
||||
@ -28,12 +28,18 @@ require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/adherents/class/subscription.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
||||
|
||||
$langs->load("members");
|
||||
$langs->load(array("members","companies"));
|
||||
|
||||
$filter=$_GET["filter"];
|
||||
$statut=isset($_GET["statut"])?$_GET["statut"]:1;
|
||||
$action=GETPOST('action','aZ09');
|
||||
$massaction=GETPOST('massaction','alpha');
|
||||
$confirm=GETPOST('confirm','alpha');
|
||||
$toselect = GETPOST('toselect', 'array');
|
||||
|
||||
$filter=GETPOST("filter","alpha");
|
||||
$statut=(GETPOSTISSET("statut")?GETPOST("statut","alpha"):1);
|
||||
$search_ref=GETPOST('search_ref','alpha');
|
||||
$search_lastname=GETPOST('search_lastname','alpha');
|
||||
$search_firstname=GETPOST('search_firstname','alpha');
|
||||
$search_login=GETPOST('search_login','alpha');
|
||||
$search_note=GETPOST('search_note','alpha');
|
||||
$search_account=GETPOST('search_account','int');
|
||||
@ -67,6 +73,20 @@ $search_array_options=$extrafields->getOptionalsFromPost($object->table_element,
|
||||
$fieldstosearchall = array(
|
||||
);
|
||||
$arrayfields=array(
|
||||
'd.ref'=>array('label'=>$langs->trans("Ref"), 'checked'=>1),
|
||||
'd.lastname'=>array('label'=>$langs->trans("Lastname"), 'checked'=>1),
|
||||
'd.firstname'=>array('label'=>$langs->trans("Firstname"), 'checked'=>1),
|
||||
'd.login'=>array('label'=>$langs->trans("Login"), 'checked'=>1),
|
||||
't.libelle'=>array('label'=>$langs->trans("Type"), 'checked'=>1),
|
||||
'd.bank'=>array('label'=>$langs->trans("BankAccount"), 'checked'=>1, 'enabled'=>(! empty($conf->banque->enabled))),
|
||||
/*'d.note_public'=>array('label'=>$langs->trans("NotePublic"), 'checked'=>0),
|
||||
'd.note_private'=>array('label'=>$langs->trans("NotePrivate"), 'checked'=>0),*/
|
||||
'd.datedebut'=>array('label'=>$langs->trans("DateSubscription"), 'checked'=>1, 'position'=>100),
|
||||
'd.datefin'=>array('label'=>$langs->trans("EndSubscription"), 'checked'=>1, 'position'=>101),
|
||||
'd.amount'=>array('label'=>$langs->trans("Amount"), 'checked'=>1, 'position'=>102),
|
||||
'd.datec'=>array('label'=>$langs->trans("DateCreation"), 'checked'=>0, 'position'=>500),
|
||||
'd.tms'=>array('label'=>$langs->trans("DateModificationShort"), 'checked'=>0, 'position'=>500),
|
||||
// 'd.statut'=>array('label'=>$langs->trans("Status"), 'checked'=>1, 'position'=>1000)
|
||||
);
|
||||
|
||||
// Security check
|
||||
@ -74,7 +94,7 @@ $result=restrictedArea($user,'adherent','','','cotisation');
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
* Actions
|
||||
*/
|
||||
|
||||
if (GETPOST('cancel','alpha')) { $action='list'; $massaction=''; }
|
||||
@ -111,15 +131,16 @@ if (empty($reshook))
|
||||
*/
|
||||
|
||||
$form=new Form($db);
|
||||
$subscription=new Subscription($db);
|
||||
$adherent=new Adherent($db);
|
||||
$accountstatic=new Account($db);
|
||||
|
||||
llxHeader('',$langs->trans("ListOfSubscriptions"),'EN:Module_Foundations|FR:Module_Adhérents|ES:Módulo_Miembros');
|
||||
|
||||
$now=dol_now();
|
||||
|
||||
// List of subscriptions
|
||||
$sql = "SELECT d.rowid, d.login, d.firstname, d.lastname, d.societe, d.photo,";
|
||||
$sql.= " c.rowid as crowid, c.subscription,";
|
||||
$sql.= " c.dateadh,";
|
||||
$sql.= " c.datef,";
|
||||
$sql.= " c.dateadh, c.datef, c.datec as date_creation, c.tms as date_update,";
|
||||
$sql.= " c.fk_bank as bank, c.note,";
|
||||
$sql.= " b.fk_account";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."adherent as d, ".MAIN_DB_PREFIX."subscription as c";
|
||||
@ -136,253 +157,444 @@ if ($search_ref)
|
||||
if (is_numeric($search_ref)) $sql.= " AND (c.rowid = ".$db->escape($search_ref).")";
|
||||
else $sql.=" AND 1 = 2"; // Always wrong
|
||||
}
|
||||
if ($search_lastname) $sql.= natural_search(array('d.firstname','d.lastname','d.societe'), $search_lastname);
|
||||
if ($search_login) $sql.= natural_search('c.subscription', $search_login);
|
||||
if ($search_lastname) $sql.= natural_search(array('d.lastname','d.societe'), $search_lastname);
|
||||
if ($search_firstname) $sql.= natural_search(array('d.firstname'), $search_firstname);
|
||||
if ($search_login) $sql.= natural_search('d.login', $search_login);
|
||||
if ($search_note) $sql.= natural_search('c.note', $search_note);
|
||||
if ($search_account > 0) $sql.= " AND b.fk_account = ".$search_account;
|
||||
if ($search_account > 0) $sql.= " AND b.fk_account = ".urldecode($search_account);
|
||||
if ($search_amount) $sql.= natural_search('c.subscription', $search_amount, 1);
|
||||
|
||||
// Add where from extra fields
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_sql.tpl.php';
|
||||
|
||||
// Add where from hooks
|
||||
$parameters=array();
|
||||
$reshook=$hookmanager->executeHooks('printFieldListWhere',$parameters); // Note that $action and $object may have been modified by hook
|
||||
$sql.=$hookmanager->resPrint;
|
||||
|
||||
$sql.= $db->order($sortfield,$sortorder);
|
||||
|
||||
// Count total nb of records with no order and no limits
|
||||
$nbtotalofrecords = '';
|
||||
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
|
||||
{
|
||||
$result = $db->query($sql);
|
||||
$nbtotalofrecords = $db->num_rows($result);
|
||||
$resql = $db->query($sql);
|
||||
if ($resql) $nbtotalofrecords = $db->num_rows($resql);
|
||||
else dol_print_error($db);
|
||||
if (($page * $limit) > $nbtotalofrecords) // if total resultset is smaller then paging size (filtering), goto and load page 0
|
||||
{
|
||||
$page = 0;
|
||||
$offset = 0;
|
||||
}
|
||||
}
|
||||
|
||||
// Add limit
|
||||
$sql.= $db->plimit($limit+1, $offset);
|
||||
|
||||
$result = $db->query($sql);
|
||||
if ($result)
|
||||
if (! $result)
|
||||
{
|
||||
$num = $db->num_rows($result);
|
||||
dol_print_error($db);
|
||||
exit;
|
||||
}
|
||||
|
||||
$arrayofselected=is_array($toselect)?$toselect:array();
|
||||
$num = $db->num_rows($result);
|
||||
|
||||
$i = 0;
|
||||
$arrayofselected=is_array($toselect)?$toselect:array();
|
||||
|
||||
$title=$langs->trans("ListOfSubscriptions");
|
||||
if (! empty($date_select)) $title.=' ('.$langs->trans("Year").' '.$date_select.')';
|
||||
if ($num == 1 && ! empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && $sall)
|
||||
{
|
||||
$obj = $db->fetch_object($resql);
|
||||
$id = $obj->rowid;
|
||||
header("Location: ".DOL_URL_ROOT.'/adherents/subscription/card.php?id='.$id);
|
||||
exit;
|
||||
}
|
||||
|
||||
$param='';
|
||||
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
|
||||
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
|
||||
if ($statut != '') $param.="&statut=".$statut;
|
||||
if ($date_select) $param.="&date_select=".$date_select;
|
||||
if ($search_lastname) $param.="&search_lastname=".$search_lastname;
|
||||
if ($search_login) $param.="&search_login=".$search_login;
|
||||
if ($search_acount) $param.="&search_account=".$search_account;
|
||||
if ($search_amount) $param.="&search_amount=".$search_amount;
|
||||
if ($optioncss != '') $param.='&optioncss='.$optioncss;
|
||||
llxHeader('',$langs->trans("ListOfSubscriptions"),'EN:Module_Foundations|FR:Module_Adhérents|ES:Módulo_Miembros');
|
||||
|
||||
// List of mass actions available
|
||||
$arrayofmassactions = array(
|
||||
//'presend'=>$langs->trans("SendByMail"),
|
||||
//'builddoc'=>$langs->trans("PDFMerge"),
|
||||
);
|
||||
if ($user->rights->adherent->supprimer) $arrayofmassactions['predelete']=$langs->trans("Delete");
|
||||
if (in_array($massaction, array('presend','predelete'))) $arrayofmassactions=array();
|
||||
$massactionbutton=$form->selectMassAction('', $arrayofmassactions);
|
||||
$i = 0;
|
||||
|
||||
$newcardbutton='';
|
||||
if ($user->rights->adherent->cotisation->creer)
|
||||
{
|
||||
$newcardbutton='<a class="butActionNew" href="'.DOL_URL_ROOT.'/adherents/list.php?status=-1,1"><span class="valignmiddle">'.$langs->trans('NewSubscription').'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
}
|
||||
$title=$langs->trans("ListOfSubscriptions");
|
||||
if (! empty($date_select)) $title.=' ('.$langs->trans("Year").' '.$date_select.')';
|
||||
|
||||
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="view" value="'.dol_escape_htmltag($view).'">';
|
||||
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
||||
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||
print '<input type="hidden" name="page" value="'.$page.'">';
|
||||
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
|
||||
$param='';
|
||||
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.urlencode($contextpage);
|
||||
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.urlencode($limit);
|
||||
if ($statut != '') $param.="&statut=".urlencode($statut);
|
||||
if ($date_select) $param.="&date_select=".urlencode($date_select);
|
||||
if ($search_lastname) $param.="&search_lastname=".urlencode($search_lastname);
|
||||
if ($search_login) $param.="&search_login=".urlencode($search_login);
|
||||
if ($search_acount) $param.="&search_account=".urlencode($search_account);
|
||||
if ($search_amount) $param.="&search_amount=".urlencode($search_amount);
|
||||
if ($optioncss != '') $param.='&optioncss='.urlencode($optioncss);
|
||||
// Add $param from extra fields
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php';
|
||||
|
||||
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_generic.png', 0, $newcardbutton, '', $limit);
|
||||
// List of mass actions available
|
||||
$arrayofmassactions = array(
|
||||
//'presend'=>$langs->trans("SendByMail"),
|
||||
//'builddoc'=>$langs->trans("PDFMerge"),
|
||||
);
|
||||
//if ($user->rights->adherent->supprimer) $arrayofmassactions['predelete']=$langs->trans("Delete");
|
||||
if (in_array($massaction, array('presend','predelete'))) $arrayofmassactions=array();
|
||||
$massactionbutton=$form->selectMassAction('', $arrayofmassactions);
|
||||
|
||||
$topicmail="Information";
|
||||
$modelmail="subscription";
|
||||
$objecttmp=new Subscription($db);
|
||||
$trackid='sub'.$object->id;
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php';
|
||||
$newcardbutton='';
|
||||
if ($user->rights->adherent->cotisation->creer)
|
||||
{
|
||||
$newcardbutton='<a class="butActionNew" href="'.DOL_URL_ROOT.'/adherents/list.php?status=-1,1"><span class="valignmiddle">'.$langs->trans('NewSubscription').'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
}
|
||||
|
||||
if ($sall)
|
||||
{
|
||||
print $langs->trans("Filter")." (".$langs->trans("Ref").", ".$langs->trans("Lastname").", ".$langs->trans("Firstname").", ".$langs->trans("EMail").", ".$langs->trans("Address")." ".$langs->trans("or")." ".$langs->trans("Town")."): ".$sall;
|
||||
}
|
||||
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="view" value="'.dol_escape_htmltag($view).'">';
|
||||
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
||||
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||
print '<input type="hidden" name="page" value="'.$page.'">';
|
||||
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
|
||||
|
||||
$moreforfilter = '';
|
||||
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_generic.png', 0, $newcardbutton, '', $limit);
|
||||
|
||||
$varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage;
|
||||
$selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields
|
||||
if ($massactionbutton) $selectedfields.=$form->showCheckAddButtons('checkforselect', 1);
|
||||
$topicmail="Information";
|
||||
$modelmail="subscription";
|
||||
$objecttmp=new Subscription($db);
|
||||
$trackid='sub'.$object->id;
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php';
|
||||
|
||||
print '<div class="div-table-responsive">';
|
||||
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
|
||||
if ($sall)
|
||||
{
|
||||
foreach($fieldstosearchall as $key => $val) $fieldstosearchall[$key]=$langs->trans($val);
|
||||
print '<div class="divsearchfieldfilter">'.$langs->trans("FilterOnInto", $sall) . join(', ',$fieldstosearchall).'</div>';
|
||||
}
|
||||
|
||||
// Line for filters fields
|
||||
print '<tr class="liste_titre_filter">';
|
||||
$moreforfilter = '';
|
||||
|
||||
$varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage;
|
||||
$selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields
|
||||
if ($massactionbutton) $selectedfields.=$form->showCheckAddButtons('checkforselect', 1);
|
||||
|
||||
print '<div class="div-table-responsive">';
|
||||
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
|
||||
|
||||
|
||||
// Line for filters fields
|
||||
print '<tr class="liste_titre_filter">';
|
||||
|
||||
// Line numbering
|
||||
if (! empty($conf->global->MAIN_SHOW_TECHNICAL_ID))
|
||||
{
|
||||
print '<td class="liste_titre"> </td>';
|
||||
}
|
||||
|
||||
// Ref
|
||||
if (! empty($arrayfields['d.ref']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre" align="left">';
|
||||
print '<input class="flat" type="text" name="search_ref" value="'.dol_escape_htmltag($search_ref).'" size="4"></td>';
|
||||
}
|
||||
|
||||
if (! empty($arrayfields['d.lastname']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre" align="left">';
|
||||
print '<input class="flat" type="text" name="search_lastname" value="'.dol_escape_htmltag($search_lastname).'" size="12"></td>';
|
||||
print '<input class="flat" type="text" name="search_lastname" value="'.dol_escape_htmltag($search_lastname).'" size="7"></td>';
|
||||
}
|
||||
|
||||
if (! empty($arrayfields['d.firstname']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre" align="left">';
|
||||
print '<input class="flat" type="text" name="search_firstname" value="'.dol_escape_htmltag($search_firstname).'" size="12"></td>';
|
||||
}
|
||||
|
||||
if (! empty($arrayfields['d.login']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre" align="left">';
|
||||
print '<input class="flat" type="text" name="search_login" value="'.dol_escape_htmltag($search_login).'" size="7"></td>';
|
||||
}
|
||||
|
||||
print '<td class="liste_titre" align="left">';
|
||||
print '<input class="flat" type="text" name="search_note" value="'.dol_escape_htmltag($search_note).'" size="7"></td>';
|
||||
if (! empty($arrayfields['t.libelle']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre">';
|
||||
print '';
|
||||
print '</td>';
|
||||
}
|
||||
|
||||
if (! empty($conf->banque->enabled))
|
||||
{
|
||||
print '<td class="liste_titre">';
|
||||
print $form->select_comptes($search_account, 'search_account', 0, '', 1);
|
||||
print '</td>';
|
||||
}
|
||||
if (! empty($arrayfields['d.bank']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre">';
|
||||
print $form->select_comptes($search_account, 'search_account', 0, '', 1);
|
||||
print '</td>';
|
||||
}
|
||||
|
||||
if (! empty($arrayfields['d.date_debut']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre"> </td>';
|
||||
}
|
||||
|
||||
if (! empty($arrayfields['d.date_fin']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre"> </td>';
|
||||
}
|
||||
|
||||
if (! empty($arrayfields['d.amount']['checked']))
|
||||
{
|
||||
print '<td align="right" class="liste_titre">';
|
||||
print '<input class="flat" type="text" name="search_amount" value="'.dol_escape_htmltag($search_amount).'" size="4">';
|
||||
print '</td>';
|
||||
|
||||
// Action column
|
||||
print '<td class="liste_titre" align="right">';
|
||||
$searchpicto=$form->showFilterButtons();
|
||||
print $searchpicto;
|
||||
print '</td>';
|
||||
|
||||
print "</tr>\n";
|
||||
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre("Ref",$_SERVER["PHP_SELF"],"c.rowid",$param,"","",$sortfield,$sortorder);
|
||||
print_liste_field_titre("Name",$_SERVER["PHP_SELF"],"d.lastname",$param,"","",$sortfield,$sortorder);
|
||||
print_liste_field_titre("Login",$_SERVER["PHP_SELF"],"d.login",$param,"","",$sortfield,$sortorder);
|
||||
print_liste_field_titre("Label",$_SERVER["PHP_SELF"],"c.note",$param,"",'align="left"',$sortfield,$sortorder);
|
||||
if (! empty($conf->banque->enabled))
|
||||
{
|
||||
print_liste_field_titre("Account",$_SERVER["PHP_SELF"],"b.fk_account",$pram,"","",$sortfield,$sortorder);
|
||||
}
|
||||
print_liste_field_titre("Date",$_SERVER["PHP_SELF"],"c.dateadh",$param,"",'align="center"',$sortfield,$sortorder);
|
||||
print_liste_field_titre("DateEnd",$_SERVER["PHP_SELF"],"c.datef",$param,"",'align="center"',$sortfield,$sortorder);
|
||||
print_liste_field_titre("Amount",$_SERVER["PHP_SELF"],"c.subscription",$param,"",'align="right"',$sortfield,$sortorder);
|
||||
//print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"],"",'','','align="center"',$sortfield,$sortorder,'maxwidthsearch ');
|
||||
print_liste_field_titre('', $_SERVER["PHP_SELF"],"",'','','align="center"',$sortfield,$sortorder,'maxwidthsearch ');
|
||||
print "</tr>\n";
|
||||
|
||||
|
||||
// Static objects
|
||||
$subscription=new Subscription($db);
|
||||
$adherent=new Adherent($db);
|
||||
$accountstatic=new Account($db);
|
||||
|
||||
$total=0;
|
||||
while ($i < min($num, $limit))
|
||||
{
|
||||
$obj = $db->fetch_object($result);
|
||||
$total+=$obj->subscription;
|
||||
|
||||
$subscription->ref=$obj->crowid;
|
||||
$subscription->id=$obj->crowid;
|
||||
|
||||
$adherent->lastname=$obj->lastname;
|
||||
$adherent->firstname=$obj->firstname;
|
||||
$adherent->ref=$obj->rowid;
|
||||
$adherent->id=$obj->rowid;
|
||||
$adherent->statut=$obj->statut;
|
||||
$adherent->login=$obj->login;
|
||||
$adherent->photo=$obj->photo;
|
||||
|
||||
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
|
||||
// Ref
|
||||
print '<td>'.$subscription->getNomUrl(1).'</td>';
|
||||
|
||||
// Lastname
|
||||
print '<td>'.$adherent->getNomUrl(-1).'</td>';
|
||||
|
||||
// Login
|
||||
print '<td>'.$adherent->login.'</td>';
|
||||
|
||||
// Libelle
|
||||
print '<td>';
|
||||
print dol_trunc($obj->note,32);
|
||||
print '</td>';
|
||||
|
||||
// Banque
|
||||
if (! empty($conf->banque->enabled))
|
||||
{
|
||||
if ($obj->fk_account > 0)
|
||||
{
|
||||
$accountstatic->id=$obj->fk_account;
|
||||
$accountstatic->fetch($obj->fk_account);
|
||||
//$accountstatic->label=$obj->label;
|
||||
print '<td>'.$accountstatic->getNomUrl(1).'</td>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print "<td>";
|
||||
print "</td>\n";
|
||||
}
|
||||
}
|
||||
|
||||
// Date start
|
||||
print '<td align="center">'.dol_print_date($db->jdate($obj->dateadh),'day')."</td>\n";
|
||||
|
||||
// Date end
|
||||
print '<td align="center">'.dol_print_date($db->jdate($obj->datef),'day')."</td>\n";
|
||||
|
||||
// Price
|
||||
print '<td align="right">'.price($obj->subscription).'</td>';
|
||||
|
||||
print '<td></td>';
|
||||
|
||||
print "</tr>";
|
||||
|
||||
$i++;
|
||||
}
|
||||
|
||||
// Total
|
||||
|
||||
print '<tr class="liste_total">';
|
||||
print "<td>".$langs->trans("Total")."</td>\n";
|
||||
print "<td align=\"right\"> </td>\n";
|
||||
print "<td align=\"right\"> </td>\n";
|
||||
print "<td align=\"right\"> </td>\n";
|
||||
if (! empty($conf->banque->enabled))
|
||||
{
|
||||
print '<td> </td>';
|
||||
}
|
||||
print '<td> </td>';
|
||||
print '<td> </td>';
|
||||
print '<td align="right">'.price($total)."</td>\n";
|
||||
print '<td></td>';
|
||||
print "</tr>\n";
|
||||
|
||||
print "</table>";
|
||||
print '</div>';
|
||||
print '</form>';
|
||||
}
|
||||
else
|
||||
// Extra fields
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_input.tpl.php';
|
||||
|
||||
// Fields from hook
|
||||
$parameters=array('arrayfields'=>$arrayfields);
|
||||
$reshook=$hookmanager->executeHooks('printFieldListOption',$parameters); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
// Date creation
|
||||
if (! empty($arrayfields['d.datec']['checked']))
|
||||
{
|
||||
dol_print_error($db);
|
||||
print '<td class="liste_titre">';
|
||||
print '</td>';
|
||||
}
|
||||
// Date modification
|
||||
if (! empty($arrayfields['d.tms']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre">';
|
||||
print '</td>';
|
||||
}
|
||||
|
||||
// Action column
|
||||
print '<td class="liste_titre" align="right">';
|
||||
$searchpicto=$form->showFilterButtons();
|
||||
print $searchpicto;
|
||||
print '</td>';
|
||||
|
||||
print "</tr>\n";
|
||||
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
if (! empty($arrayfields['d.ref']['checked']))
|
||||
{
|
||||
print_liste_field_titre("Ref",$_SERVER["PHP_SELF"],"c.rowid",$param,"","",$sortfield,$sortorder);
|
||||
}
|
||||
if (! empty($arrayfields['d.lastname']['checked']))
|
||||
{
|
||||
print_liste_field_titre("LastName",$_SERVER["PHP_SELF"],"d.lastname",$param,"","",$sortfield,$sortorder);
|
||||
}
|
||||
if (! empty($arrayfields['d.firstname']['checked']))
|
||||
{
|
||||
print_liste_field_titre("FirstName",$_SERVER["PHP_SELF"],"d.firstname",$param,"","",$sortfield,$sortorder);
|
||||
}
|
||||
if (! empty($arrayfields['d.login']['checked']))
|
||||
{
|
||||
print_liste_field_titre("Login",$_SERVER["PHP_SELF"],"d.login",$param,"","",$sortfield,$sortorder);
|
||||
}
|
||||
if (! empty($arrayfields['t.libelle']['checked']))
|
||||
{
|
||||
print_liste_field_titre("Label",$_SERVER["PHP_SELF"],"c.note",$param,"",'align="left"',$sortfield,$sortorder);
|
||||
}
|
||||
if (! empty($arrayfields['d.bank']['checked']))
|
||||
{
|
||||
print_liste_field_titre("Account",$_SERVER["PHP_SELF"],"b.fk_account",$pram,"","",$sortfield,$sortorder);
|
||||
}
|
||||
if (! empty($arrayfields['d.date_debut']['checked']))
|
||||
{
|
||||
print_liste_field_titre("Date",$_SERVER["PHP_SELF"],"c.dateadh",$param,"",'align="center"',$sortfield,$sortorder);
|
||||
}
|
||||
if (! empty($arrayfields['d.date_fin']['checked']))
|
||||
{
|
||||
print_liste_field_titre("DateEnd",$_SERVER["PHP_SELF"],"c.datef",$param,"",'align="center"',$sortfield,$sortorder);
|
||||
}
|
||||
if (! empty($arrayfields['d.amount']['checked']))
|
||||
{
|
||||
print_liste_field_titre("Amount",$_SERVER["PHP_SELF"],"c.subscription",$param,"",'align="right"',$sortfield,$sortorder);
|
||||
}
|
||||
// Extra fields
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php';
|
||||
|
||||
// Hook fields
|
||||
$parameters=array('arrayfields'=>$arrayfields,'param'=>$param,'sortfield'=>$sortfield,'sortorder'=>$sortorder);
|
||||
$reshook=$hookmanager->executeHooks('printFieldListTitle',$parameters); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
if (! empty($arrayfields['d.datec']['checked'])) print_liste_field_titre($arrayfields['d.datec']['label'],$_SERVER["PHP_SELF"],"d.datec","",$param,'align="center" class="nowrap"',$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['d.tms']['checked'])) print_liste_field_titre($arrayfields['d.tms']['label'],$_SERVER["PHP_SELF"],"d.tms","",$param,'align="center" class="nowrap"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"],"",'','','align="center"',$sortfield,$sortorder,'maxwidthsearch ');
|
||||
print "</tr>\n";
|
||||
|
||||
|
||||
$total=0;
|
||||
$totalarray=array();
|
||||
while ($i < min($num, $limit))
|
||||
{
|
||||
$obj = $db->fetch_object($result);
|
||||
$total+=$obj->subscription;
|
||||
|
||||
$subscription->ref=$obj->crowid;
|
||||
$subscription->id=$obj->crowid;
|
||||
|
||||
$adherent->lastname=$obj->lastname;
|
||||
$adherent->firstname=$obj->firstname;
|
||||
$adherent->ref=$obj->rowid;
|
||||
$adherent->id=$obj->rowid;
|
||||
$adherent->statut=$obj->statut;
|
||||
$adherent->login=$obj->login;
|
||||
$adherent->photo=$obj->photo;
|
||||
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
|
||||
// Ref
|
||||
if (! empty($arrayfields['d.ref']['checked']))
|
||||
{
|
||||
print '<td>'.$subscription->getNomUrl(1).'</td>';
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
}
|
||||
|
||||
// Lastname
|
||||
if (! empty($arrayfields['d.lastname']['checked']))
|
||||
{
|
||||
$adherent->firstname = '';
|
||||
print '<td>'.$adherent->getNomUrl(-1).'</td>';
|
||||
$adherent->firstname = $obj->firstname;
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
}
|
||||
// Firstname
|
||||
if (! empty($arrayfields['d.firstname']['checked']))
|
||||
{
|
||||
print '<td>'.$adherent->firstname.'</td>';
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
}
|
||||
|
||||
// Login
|
||||
if (! empty($arrayfields['d.login']['checked']))
|
||||
{
|
||||
print '<td>'.$adherent->login.'</td>';
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
}
|
||||
|
||||
// Label
|
||||
if (! empty($arrayfields['t.libelle']['checked']))
|
||||
{
|
||||
print '<td>';
|
||||
print dol_trunc($obj->note,128);
|
||||
print '</td>';
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
}
|
||||
|
||||
// Banque
|
||||
if (! empty($arrayfields['d.bank']['checked']))
|
||||
{
|
||||
print "<td>";
|
||||
if ($obj->fk_account > 0)
|
||||
{
|
||||
$accountstatic->id=$obj->fk_account;
|
||||
$accountstatic->fetch($obj->fk_account);
|
||||
//$accountstatic->label=$obj->label;
|
||||
print $accountstatic->getNomUrl(1);
|
||||
}
|
||||
print "</td>\n";
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
}
|
||||
|
||||
// Date start
|
||||
if (! empty($arrayfields['d.date_start']['checked']))
|
||||
{
|
||||
print '<td align="center">'.dol_print_date($db->jdate($obj->dateadh),'day')."</td>\n";
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
}
|
||||
// Date end
|
||||
if (! empty($arrayfields['d.date_end']['checked']))
|
||||
{
|
||||
print '<td align="center">'.dol_print_date($db->jdate($obj->datef),'day')."</td>\n";
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
}
|
||||
// Price
|
||||
if (! empty($arrayfields['d.amount']['checked']))
|
||||
{
|
||||
print '<td align="right">'.price($obj->subscription).'</td>';
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
if (! $i) $totalarray['pos'][$totalarray['nbfield']]='d.amount';
|
||||
$totalarray['val']['d.amount'] += $obj->subscription;
|
||||
}
|
||||
// Extra fields
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php';
|
||||
// Fields from hook
|
||||
$parameters=array('arrayfields'=>$arrayfields, 'obj'=>$obj);
|
||||
$reshook=$hookmanager->executeHooks('printFieldListValue',$parameters); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
// Date creation
|
||||
if (! empty($arrayfields['d.datec']['checked']))
|
||||
{
|
||||
print '<td align="center" class="nowrap">';
|
||||
print dol_print_date($db->jdate($obj->date_creation), 'dayhour', 'tzuser');
|
||||
print '</td>';
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
}
|
||||
// Date modification
|
||||
if (! empty($arrayfields['d.tms']['checked']))
|
||||
{
|
||||
print '<td align="center" class="nowrap">';
|
||||
print dol_print_date($db->jdate($obj->date_update), 'dayhour', 'tzuser');
|
||||
print '</td>';
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
}
|
||||
// Action column
|
||||
print '<td align="center">';
|
||||
if ($massactionbutton || $massaction) // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
|
||||
{
|
||||
$selected=0;
|
||||
if (in_array($obj->rowid, $arrayofselected)) $selected=1;
|
||||
print '<input id="cb'.$obj->rowid.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->rowid.'"'.($selected?' checked="checked"':'').'>';
|
||||
}
|
||||
print '</td>';
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
|
||||
print "</tr>\n";
|
||||
$i++;
|
||||
}
|
||||
|
||||
// Show total line
|
||||
if (isset($totalarray['pos']))
|
||||
{
|
||||
print '<tr class="liste_total">';
|
||||
$i=0;
|
||||
while ($i < $totalarray['nbfield'])
|
||||
{
|
||||
$i++;
|
||||
if (! empty($totalarray['pos'][$i])) print '<td align="right">'.price($totalarray['val'][$totalarray['pos'][$i]]).'</td>';
|
||||
else
|
||||
{
|
||||
if ($i == 1)
|
||||
{
|
||||
if ($num < $limit) print '<td align="left">'.$langs->trans("Total").'</td>';
|
||||
else print '<td align="left">'.$langs->trans("Totalforthispage").'</td>';
|
||||
}
|
||||
else print '<td></td>';
|
||||
}
|
||||
}
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
// If no record found
|
||||
if ($num == 0)
|
||||
{
|
||||
$colspan=1;
|
||||
foreach($arrayfields as $key => $val) { if (! empty($val['checked'])) $colspan++; }
|
||||
print '<tr><td colspan="'.$colspan.'" class="opacitymedium">'.$langs->trans("NoRecordFound").'</td></tr>';
|
||||
}
|
||||
|
||||
$db->free($resql);
|
||||
|
||||
$parameters=array('sql' => $sql);
|
||||
$reshook=$hookmanager->executeHooks('printFieldListFooter',$parameters); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
|
||||
print "</table>";
|
||||
print '</div>';
|
||||
print '</form>';
|
||||
|
||||
|
||||
// End of page
|
||||
llxFooter();
|
||||
|
||||
@ -397,7 +397,7 @@ print '<br><br>';
|
||||
*/
|
||||
//if (! empty($conf->global->MAIN_FEATURES_LEVEL))
|
||||
//{
|
||||
print load_fiche_titre($langs->trans("BankAccountReleveModule"), '', '');
|
||||
print load_fiche_titre($langs->trans("Other"), '', '');
|
||||
|
||||
|
||||
print "<table class=\"noborder\" width=\"100%\">\n";
|
||||
|
||||
@ -63,7 +63,7 @@ if ($action == 'setcoder')
|
||||
$resql=$db->query($sqlp);
|
||||
if (! $resql) dol_print_error($db);
|
||||
}
|
||||
else if ($action == 'update')
|
||||
elseif ($action == 'update')
|
||||
{
|
||||
$location = GETPOST('GENBARCODE_LOCATION','alpha');
|
||||
$res = dolibarr_set_const($db, "GENBARCODE_LOCATION",$location,'chaine',0,'',$conf->entity);
|
||||
@ -71,17 +71,8 @@ else if ($action == 'update')
|
||||
$res = dolibarr_set_const($db, "PRODUIT_DEFAULT_BARCODE_TYPE", $coder_id,'chaine',0,'',$conf->entity);
|
||||
$coder_id = GETPOST('GENBARCODE_BARCODETYPE_THIRDPARTY','alpha');
|
||||
$res = dolibarr_set_const($db, "GENBARCODE_BARCODETYPE_THIRDPARTY", $coder_id,'chaine',0,'',$conf->entity);
|
||||
}
|
||||
else if ($action == 'updateengine')
|
||||
{
|
||||
// TODO Update engines.
|
||||
}
|
||||
|
||||
if ($action && $action != 'setcoder' && $action != 'setModuleOptions')
|
||||
{
|
||||
if (! $res > 0) $error++;
|
||||
|
||||
if (! $error)
|
||||
if ($res > 0)
|
||||
{
|
||||
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||
}
|
||||
@ -90,6 +81,42 @@ if ($action && $action != 'setcoder' && $action != 'setModuleOptions')
|
||||
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||
}
|
||||
}
|
||||
elseif ($action == 'updateengine')
|
||||
{
|
||||
$sql = "SELECT rowid, coder";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."c_barcode_type";
|
||||
$sql.= " WHERE entity = ".$conf->entity;
|
||||
$sql.= " ORDER BY code";
|
||||
|
||||
$resql=$db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
$num = $db->num_rows($resql);
|
||||
$i = 0;
|
||||
|
||||
while ($i < $num)
|
||||
{
|
||||
$obj = $db->fetch_object($resql);
|
||||
|
||||
if (GETPOST('coder'.$obj->rowid, 'alpha'))
|
||||
{
|
||||
$coder = GETPOST('coder'.$obj->rowid,'alpha');
|
||||
$code_id = $obj->rowid;
|
||||
|
||||
$sqlp = "UPDATE ".MAIN_DB_PREFIX."c_barcode_type";
|
||||
$sqlp.= " SET coder = '" . $coder."'";
|
||||
$sqlp.= " WHERE rowid = ". $code_id;
|
||||
$sqlp.= " AND entity = ".$conf->entity;
|
||||
|
||||
$upsql=$db->query($sqlp);
|
||||
if (! $upsql) dol_print_error($db);
|
||||
}
|
||||
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* View
|
||||
@ -161,9 +188,12 @@ foreach($dirbarcode as $reldir)
|
||||
print '<br>';
|
||||
print load_fiche_titre($langs->trans("BarcodeEncodeModule"),'','');
|
||||
|
||||
//print "<form method=\"post\" action=\"".$_SERVER["PHP_SELF"]."\">";
|
||||
//print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
//print "<input type=\"hidden\" name=\"action\" value=\"updateengine\">";
|
||||
if (empty($conf->use_javascript_ajax))
|
||||
{
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST" id="form_engine">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="action" value="updateengine">';
|
||||
}
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
@ -258,10 +288,9 @@ print "</table>\n";
|
||||
|
||||
if (empty($conf->use_javascript_ajax))
|
||||
{
|
||||
// TODO Implement code behind action updateengine
|
||||
//print '<div class="center"><input type="submit" class="button" name="save" value="'.$langs->trans("Save").'"></div>';
|
||||
print '<div class="center"><input type="submit" class="button" name="save" value="'.$langs->trans("Save").'"></div>';
|
||||
print '</form>';
|
||||
}
|
||||
//print '</form>';
|
||||
|
||||
print "<br>";
|
||||
|
||||
|
||||
@ -380,11 +380,24 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
||||
$sourcedir = $object->source_directory;
|
||||
$targetdir = ($object->target_directory ? $object->target_directory : ''); // Can be '[Gmail]/Trash' or 'mytag'
|
||||
|
||||
$connectstringserver = $object->getConnectStringIMAP();
|
||||
$connectstringsource = $connectstringserver.imap_utf7_encode($sourcedir);
|
||||
$connectstringtarget = $connectstringserver.imap_utf7_encode($targetdir);
|
||||
$connection = null;
|
||||
$connectstringserver = '';
|
||||
$connectstringsource = '';
|
||||
$connectstringtarget = '';
|
||||
|
||||
if (function_exists('imap_open'))
|
||||
{
|
||||
$connectstringserver = $object->getConnectStringIMAP();
|
||||
$connectstringsource = $connectstringserver.imap_utf7_encode($sourcedir);
|
||||
$connectstringtarget = $connectstringserver.imap_utf7_encode($targetdir);
|
||||
|
||||
$connection = imap_open($connectstringsource, $object->user, $object->password);
|
||||
$connection = imap_open($connectstringsource, $object->user, $object->password);
|
||||
}
|
||||
else
|
||||
{
|
||||
$morehtml .= 'IMAP functions not available on your PHP';
|
||||
}
|
||||
|
||||
if (! $connection)
|
||||
{
|
||||
$morehtml .= 'Failed to open IMAP connection '.$connectstringsource;
|
||||
@ -395,8 +408,11 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
||||
$morehtml .= imap_num_msg($connection);
|
||||
}
|
||||
|
||||
imap_close($connection);
|
||||
|
||||
if ($connection)
|
||||
{
|
||||
imap_close($connection);
|
||||
}
|
||||
|
||||
dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref.'<div class="refidno">'.$morehtml.'</div>', '', 0, '', '', 0, '');
|
||||
|
||||
print '<div class="fichecenter">';
|
||||
|
||||
@ -11,6 +11,7 @@
|
||||
* Copyright (C) 2011-2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||
* Copyright (C) 2015 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2016 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -447,8 +448,6 @@ $sql.=$db->plimit($listlimit+1,$offset);
|
||||
$fieldlist=explode(',',$tabfield[$id]);
|
||||
|
||||
// Form to add a new line
|
||||
$alabelisused=0;
|
||||
|
||||
print '<form action="'.$_SERVER['PHP_SELF'].'?id='.$id.'" method="POST">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="from" value="'.dol_escape_htmltag(GETPOST('from','alpha')).'">';
|
||||
@ -460,38 +459,37 @@ print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
foreach ($fieldlist as $field => $value)
|
||||
{
|
||||
// Determine le nom du champ par rapport aux noms possibles
|
||||
// dans les dictionnaires de donnees
|
||||
$valuetoshow=ucfirst($fieldlist[$field]); // Par defaut
|
||||
$valuetoshow=$langs->trans($valuetoshow); // try to translate
|
||||
$align="left";
|
||||
if ($fieldlist[$field]=='fk_user') { $valuetoshow=$langs->trans("Owner");}
|
||||
if ($fieldlist[$field]=='lang') { $valuetoshow=(empty($conf->global->MAIN_MULTILANGS) ? ' ' : $langs->trans("Language")); }
|
||||
if ($fieldlist[$field]=='type') { $valuetoshow=$langs->trans("Type"); }
|
||||
if ($fieldlist[$field]=='code') { $valuetoshow=$langs->trans("Code"); }
|
||||
if ($fieldlist[$field]=='libelle' || $fieldlist[$field]=='label') { $valuetoshow=$langs->trans("Code"); }
|
||||
if ($fieldlist[$field]=='type_template') { $valuetoshow=$langs->trans("TypeOfTemplate"); }
|
||||
if ($fieldlist[$field]=='private') { $align='center'; }
|
||||
if ($fieldlist[$field]=='position') { $align='center'; }
|
||||
// Determine le nom du champ par rapport aux noms possibles
|
||||
// dans les dictionnaires de donnees
|
||||
$valuetoshow=ucfirst($fieldlist[$field]); // Par defaut
|
||||
$valuetoshow=$langs->trans($valuetoshow); // try to translate
|
||||
$align="left";
|
||||
if ($fieldlist[$field]=='fk_user') { $valuetoshow=$langs->trans("Owner");}
|
||||
if ($fieldlist[$field]=='lang') { $valuetoshow=(empty($conf->global->MAIN_MULTILANGS) ? ' ' : $langs->trans("Language")); }
|
||||
if ($fieldlist[$field]=='type') { $valuetoshow=$langs->trans("Type"); }
|
||||
if ($fieldlist[$field]=='code') { $valuetoshow=$langs->trans("Code"); }
|
||||
if ($fieldlist[$field]=='libelle' || $fieldlist[$field]=='label') { $valuetoshow=$langs->trans("Code"); }
|
||||
if ($fieldlist[$field]=='type_template') { $valuetoshow=$langs->trans("TypeOfTemplate"); }
|
||||
if ($fieldlist[$field]=='private') { $align='center'; }
|
||||
if ($fieldlist[$field]=='position') { $align='center'; }
|
||||
|
||||
if ($fieldlist[$field]=='topic') { $valuetoshow=''; }
|
||||
if ($fieldlist[$field]=='joinfiles') { $valuetoshow=''; }
|
||||
if ($fieldlist[$field]=='content') { $valuetoshow=''; }
|
||||
if ($fieldlist[$field]=='content_lines') { $valuetoshow=''; }
|
||||
if ($fieldlist[$field]=='topic') { $valuetoshow=''; }
|
||||
if ($fieldlist[$field]=='joinfiles') { $valuetoshow=''; }
|
||||
if ($fieldlist[$field]=='content') { $valuetoshow=''; }
|
||||
if ($fieldlist[$field]=='content_lines') { $valuetoshow=''; }
|
||||
|
||||
if ($valuetoshow != '')
|
||||
{
|
||||
print '<td align="'.$align.'">';
|
||||
if (! empty($tabhelp[$id][$value]) && preg_match('/^http(s*):/i',$tabhelp[$id][$value])) print '<a href="'.$tabhelp[$id][$value].'" target="_blank">'.$valuetoshow.' '.img_help(1,$valuetoshow).'</a>';
|
||||
else if (! empty($tabhelp[$id][$value]))
|
||||
{
|
||||
if (in_array($value, array('topic'))) print $form->textwithpicto($valuetoshow, $tabhelp[$id][$value], 1, 'help', '', 0, 2, $value); // Tooltip on click
|
||||
else print $form->textwithpicto($valuetoshow, $tabhelp[$id][$value], 1, 'help', '', 0, 2); // Tooltip on hover
|
||||
}
|
||||
else print $valuetoshow;
|
||||
print '</td>';
|
||||
}
|
||||
if ($fieldlist[$field]=='libelle' || $fieldlist[$field]=='label') $alabelisused=1;
|
||||
if ($valuetoshow != '')
|
||||
{
|
||||
print '<td align="'.$align.'">';
|
||||
if (! empty($tabhelp[$id][$value]) && preg_match('/^http(s*):/i',$tabhelp[$id][$value])) print '<a href="'.$tabhelp[$id][$value].'" target="_blank">'.$valuetoshow.' '.img_help(1,$valuetoshow).'</a>';
|
||||
else if (! empty($tabhelp[$id][$value]))
|
||||
{
|
||||
if (in_array($value, array('topic'))) print $form->textwithpicto($valuetoshow, $tabhelp[$id][$value], 1, 'help', '', 0, 2, $value); // Tooltip on click
|
||||
else print $form->textwithpicto($valuetoshow, $tabhelp[$id][$value], 1, 'help', '', 0, 2); // Tooltip on hover
|
||||
}
|
||||
else print $valuetoshow;
|
||||
print '</td>';
|
||||
}
|
||||
}
|
||||
print '<td>';
|
||||
print '<input type="hidden" name="id" value="' . $id . '">';
|
||||
@ -534,6 +532,7 @@ print '<td align="right">';
|
||||
print '</td>';
|
||||
print "</tr>";
|
||||
|
||||
// Show fields for topic, join files and body
|
||||
$fieldsforcontent = array('topic', 'joinfiles', 'content');
|
||||
if (! empty($conf->global->MAIN_EMAIL_TEMPLATES_FOR_OBJECT_LINES)) { $fieldsforcontent = array('content','content_lines'); }
|
||||
foreach ($fieldsforcontent as $tmpfieldlist)
|
||||
@ -630,11 +629,11 @@ if ($resql)
|
||||
$filterfound=0;
|
||||
foreach ($fieldlist as $field => $value)
|
||||
{
|
||||
if ($value == 'label') print '<td class="liste_titre"><input type="text" name="search_label" value="'.dol_escape_htmltag($search_label).'"></td>';
|
||||
if ($value == 'label') print '<td class="liste_titre"><input type="text" name="search_label" class="maxwidth100" value="'.dol_escape_htmltag($search_label).'"></td>';
|
||||
elseif ($value == 'lang')
|
||||
{
|
||||
print '<td class="liste_titre">';
|
||||
print $formadmin->select_language($search_lang, 'search_lang', 0, null, 1, 0, 0, 'maxwidth150');
|
||||
print $formadmin->select_language($search_lang, 'search_lang', 0, null, 1, 0, 0, 'maxwidth100');
|
||||
print '</td>';
|
||||
}
|
||||
elseif ($value == 'fk_user')
|
||||
@ -643,13 +642,13 @@ if ($resql)
|
||||
$restrictid=array();
|
||||
if (! $user->admin) $restrictid=array($user->id);
|
||||
//var_dump($restrictid);
|
||||
print $form->select_dolusers($search_fk_user, 'search_fk_user', 1, null, 0, 'hierarchyme', null, 0, 0, 1, '', 0, '', 'maxwidth200');
|
||||
print $form->select_dolusers($search_fk_user, 'search_fk_user', 1, null, 0, 'hierarchyme', null, 0, 0, 1, '', 0, '', 'maxwidth100');
|
||||
print '</td>';
|
||||
}
|
||||
elseif ($value == 'topic') print '<td class="liste_titre"><input type="text" name="search_topic" value="'.dol_escape_htmltag($search_topic).'"></td>';
|
||||
elseif ($value == 'type_template')
|
||||
{
|
||||
print '<td class="liste_titre">'.$form->selectarray('search_type_template', $elementList, $search_type_template, 1, 0, 0, '', 0, 0, 0, '', 'maxwidth200 maxwidth100onsmartphone').'</td>';
|
||||
print '<td class="liste_titre">'.$form->selectarray('search_type_template', $elementList, $search_type_template, 1, 0, 0, '', 0, 0, 0, '', 'maxwidth100 maxwidth100onsmartphone').'</td>';
|
||||
}
|
||||
elseif (! in_array($value, array('content', 'content_lines'))) print '<td class="liste_titre"></td>';
|
||||
}
|
||||
@ -671,6 +670,7 @@ if ($resql)
|
||||
$align="left";
|
||||
$sortable=1;
|
||||
$valuetoshow='';
|
||||
$forcenowrap=1;
|
||||
/*
|
||||
$tmparray=getLabelOfField($fieldlist[$field]);
|
||||
$showfield=$tmp['showfield'];
|
||||
@ -688,7 +688,7 @@ if ($resql)
|
||||
if ($fieldlist[$field]=='private') { $align='center'; }
|
||||
if ($fieldlist[$field]=='position') { $align='center'; }
|
||||
|
||||
if ($fieldlist[$field]=='joinfiles') { $valuetoshow=$langs->trans("FilesAttachedToEmail"); $align='center'; }
|
||||
if ($fieldlist[$field]=='joinfiles') { $valuetoshow=$langs->trans("FilesAttachedToEmail"); $align='center'; $forcenowrap=0; }
|
||||
if ($fieldlist[$field]=='content') { $valuetoshow=$langs->trans("Content"); $showfield=0;}
|
||||
if ($fieldlist[$field]=='content_lines') { $valuetoshow=$langs->trans("ContentLines"); $showfield=0; }
|
||||
|
||||
@ -697,8 +697,8 @@ if ($resql)
|
||||
{
|
||||
if (! empty($tabhelp[$id][$value]))
|
||||
{
|
||||
if (in_array($value, array('topic'))) $valuetoshow = $form->textwithpicto($valuetoshow, $tabhelp[$id][$value], 1, 'help', '', 0, 2, 'tooltip'.$value); // Tooltip on click
|
||||
else $valuetoshow = $form->textwithpicto($valuetoshow, $tabhelp[$id][$value], 1, 'help', '', 0, 2, '', 1); // Tooltip on hover
|
||||
if (in_array($value, array('topic'))) $valuetoshow = $form->textwithpicto($valuetoshow, $tabhelp[$id][$value], 1, 'help', '', 0, 2, 'tooltip'.$value, $forcenowrap); // Tooltip on click
|
||||
else $valuetoshow = $form->textwithpicto($valuetoshow, $tabhelp[$id][$value], 1, 'help', '', 0, 2, '', $forcenowrap); // Tooltip on hover
|
||||
}
|
||||
print getTitleFieldOfList($valuetoshow, 0, $_SERVER["PHP_SELF"], ($sortable?$fieldlist[$field]:''), ($page?'page='.$page.'&':''), $param, "align=".$align, $sortfield, $sortorder);
|
||||
}
|
||||
@ -995,7 +995,7 @@ function fieldList($fieldlist, $obj='', $tabname='', $context='')
|
||||
print '<td>';
|
||||
if (! empty($conf->global->MAIN_MULTILANGS))
|
||||
{
|
||||
$selectedlang = GETPOSTISSET('langcode','aZ09')?GETPOST('langcode','aZ09'):$langs->defaultlang;
|
||||
$selectedlang = GETPOSTISSET('langcode')?GETPOST('langcode', 'aZ09'):$langs->defaultlang;
|
||||
if ($context == 'edit') $selectedlang = $obj->{$fieldlist[$field]};
|
||||
print $formadmin->select_language($selectedlang, 'langcode', 0, null, 1, 0, 0, 'maxwidth150');
|
||||
}
|
||||
@ -1023,17 +1023,18 @@ function fieldList($fieldlist, $obj='', $tabname='', $context='')
|
||||
}
|
||||
else
|
||||
{
|
||||
print $form->selectarray('type_template', $elementList, (! empty($obj->{$fieldlist[$field]})?$obj->{$fieldlist[$field]}:''), 1, 0, 0, '', 0, 0, 0, '', 'maxwidth200');
|
||||
print $form->selectarray('type_template', $elementList, (! empty($obj->{$fieldlist[$field]})?$obj->{$fieldlist[$field]}:''), 1, 0, 0, '', 0, 0, 0, '', 'maxwidth150 maxwidth100onsmartphone');
|
||||
}
|
||||
print '</td>';
|
||||
}
|
||||
elseif ($context == 'add' && in_array($fieldlist[$field], array('topic', 'joinfiles', 'content', 'content_lines'))) continue;
|
||||
elseif ($context == 'add' && in_array($fieldlist[$field], array('topic', 'joinfiles', 'content', 'content_lines'))) continue;
|
||||
elseif ($context == 'edit' && in_array($fieldlist[$field], array('topic', 'joinfiles', 'content', 'content_lines'))) continue;
|
||||
elseif ($context == 'hide' && in_array($fieldlist[$field], array('topic', 'joinfiles', 'content', 'content_lines'))) continue;
|
||||
else
|
||||
{
|
||||
$size=''; $class=''; $classtd='';
|
||||
if ($fieldlist[$field]=='code') $class='maxwidth100';
|
||||
if ($fieldlist[$field]=='label') $class='maxwidth100';
|
||||
if ($fieldlist[$field]=='private') { $class='maxwidth50'; $classtd='center'; }
|
||||
if ($fieldlist[$field]=='position') { $class='maxwidth50'; $classtd='center'; }
|
||||
if ($fieldlist[$field]=='libelle') $class='quatrevingtpercent';
|
||||
|
||||
@ -96,6 +96,7 @@ if ($action == 'update')
|
||||
$menu->perms=GETPOST('perms','alpha');
|
||||
$menu->target=GETPOST('target','alpha');
|
||||
$menu->user=GETPOST('user','alpha');
|
||||
$menu->mainmenu=GETPOST('propertymainmenu','alpha');
|
||||
if (is_numeric(GETPOST('menuIdParent','alpha')))
|
||||
{
|
||||
$menu->fk_menu=GETPOST('menuIdParent','alpha');
|
||||
@ -123,14 +124,11 @@ if ($action == 'update')
|
||||
setEventMessages($menu->error, $menu->errors, 'errors');
|
||||
}
|
||||
$action = "edit";
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
header("Location: ".DOL_URL_ROOT."/admin/menus/index.php?menu_handler=".$menu_handler);
|
||||
exit;
|
||||
}
|
||||
|
||||
if ($_GET['return'])
|
||||
else
|
||||
{
|
||||
header("Location: ".DOL_URL_ROOT."/admin/menus/index.php?menu_handler=".$menu_handler);
|
||||
exit;
|
||||
@ -215,6 +213,7 @@ if ($action == 'add')
|
||||
$menu->perms=GETPOST('perms','alpha');
|
||||
$menu->target=GETPOST('target','alpha');
|
||||
$menu->user=GETPOST('user','alpha');
|
||||
$menu->mainmenu=GETPOST('propertymainmenu','alpha');
|
||||
if (is_numeric(GETPOST('menuId','int')))
|
||||
{
|
||||
$menu->fk_menu=GETPOST('menuId','int');
|
||||
@ -289,10 +288,13 @@ if ($action == 'create')
|
||||
{
|
||||
jQuery("#menuId").prop("disabled", true);
|
||||
jQuery("#menuId").val(\'\');
|
||||
jQuery("#propertymainmenu").removeAttr("disabled");
|
||||
jQuery("#propertymainmenu").val(\'\');
|
||||
}
|
||||
else
|
||||
if (jQuery("#topleft").val() == \'left\')
|
||||
{
|
||||
jQuery("#menuId").removeAttr("disabled");
|
||||
jQuery("#propertymainmenu").prop("disabled", true);
|
||||
}
|
||||
}
|
||||
init_topleft();
|
||||
@ -338,7 +340,7 @@ if ($action == 'create')
|
||||
print '</td>';
|
||||
print '<td>'.$langs->trans('DetailMenuHandler').'</td></tr>';
|
||||
|
||||
//User
|
||||
// User
|
||||
print '<tr><td class="nowrap fieldrequired">'.$langs->trans('MenuForUsers').'</td>';
|
||||
print '<td><select class="flat" name="user">';
|
||||
print '<option value="2" selected>'.$langs->trans("AllMenus").'</option>';
|
||||
@ -362,9 +364,15 @@ if ($action == 'create')
|
||||
print '<option value="left"'.($_POST["type"] && $_POST["type"]=='left'?' selected':'').'>'.$langs->trans('Left').'</option>';
|
||||
print '</select>';
|
||||
}
|
||||
// print '<input type="text" size="50" name="type" value="'.$type.'">';
|
||||
print '</td><td>'.$langs->trans('DetailType').'</td></tr>';
|
||||
|
||||
// Mainmenu code
|
||||
print '<tr><td class="fieldrequired">'.$langs->trans('MainMenuCode').'</td>';
|
||||
print '<td><input type="text" class="minwidth300" id="propertymainmenu" name="propertymainmenu" value="'.(GETPOST("propertymainmenu", 'alpha')?GETPOST("propertymainmenu", 'alpha'):'').'"></td>';
|
||||
print '<td>';
|
||||
print $langs->trans("Example").': mytopmenukey';
|
||||
print '</td></tr>';
|
||||
|
||||
// MenuId Parent
|
||||
print '<tr><td class="fieldrequired">'.$langs->trans('MenuIdParent').'</td>';
|
||||
if ($parent_rowid)
|
||||
@ -373,23 +381,23 @@ if ($action == 'create')
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<td><input type="text" size="48" id="menuId" name="menuId" value="'.(GETPOST("menuId", 'int')?GETPOST("menuId", 'int'):'').'"></td>';
|
||||
print '<td><input type="text" class="minwidth300" id="menuId" name="menuId" value="'.(GETPOST("menuId", 'int')?GETPOST("menuId", 'int'):'').'"></td>';
|
||||
}
|
||||
print '<td>'.$langs->trans('DetailMenuIdParent');
|
||||
print ', '.$langs->trans("Example").': fk_mainmenu=abc&fk_leftmenu=def';
|
||||
print '</td></tr>';
|
||||
|
||||
// Title
|
||||
print '<tr><td class="fieldrequired">'.$langs->trans('Title').'</td><td><input type="text" size="30" name="titre" value="'.dol_escape_htmltag(GETPOST("titre",'alpha')).'"></td><td>'.$langs->trans('DetailTitre').'</td></tr>';
|
||||
print '<tr><td class="fieldrequired">'.$langs->trans('Title').'</td><td><input type="text" class="minwidth300" name="titre" value="'.dol_escape_htmltag(GETPOST("titre",'alpha')).'"></td><td>'.$langs->trans('DetailTitre').'</td></tr>';
|
||||
|
||||
// URL
|
||||
print '<tr><td class="fieldrequired">'.$langs->trans('URL').'</td><td><input type="text" size="60" name="url" value="'.GETPOST("url",'alpha').'"></td><td>'.$langs->trans('DetailUrl').'</td></tr>';
|
||||
print '<tr><td class="fieldrequired">'.$langs->trans('URL').'</td><td><input type="text" class="minwidth500" name="url" value="'.GETPOST("url",'alpha').'"></td><td>'.$langs->trans('DetailUrl').'</td></tr>';
|
||||
|
||||
// Langs
|
||||
print '<tr><td>'.$langs->trans('LangFile').'</td><td><input type="text" size="30" name="langs" value="'.$parent_langs.'"></td><td>'.$langs->trans('DetailLangs').'</td></tr>';
|
||||
print '<tr><td>'.$langs->trans('LangFile').'</td><td><input type="text" class="minwidth300" name="langs" value="'.$parent_langs.'"></td><td>'.$langs->trans('DetailLangs').'</td></tr>';
|
||||
|
||||
// Position
|
||||
print '<tr><td>'.$langs->trans('Position').'</td><td><input type="text" size="5" name="position" value="'.dol_escape_htmltag(isset($_POST["position"])?$_POST["position"]:100).'"></td><td>'.$langs->trans('DetailPosition').'</td></tr>';
|
||||
print '<tr><td>'.$langs->trans('Position').'</td><td><input type="text" class="width100" name="position" value="'.dol_escape_htmltag(isset($_POST["position"])?$_POST["position"]:100).'"></td><td>'.$langs->trans('DetailPosition').'</td></tr>';
|
||||
|
||||
// Target
|
||||
print '<tr><td>'.$langs->trans('Target').'</td><td><select class="flat" name="target">';
|
||||
@ -398,10 +406,10 @@ if ($action == 'create')
|
||||
print '</select></td></td><td>'.$langs->trans('DetailTarget').'</td></tr>';
|
||||
|
||||
// Enabled
|
||||
print '<tr><td>'.$langs->trans('Enabled').'</td><td><input type="text" size="60" name="enabled" value="'.GETPOST("enabled",'alpha').'"></td><td>'.$langs->trans('DetailEnabled').'</td></tr>';
|
||||
print '<tr><td>'.$langs->trans('Enabled').'</td><td><input type="text" class="minwidth500" name="enabled" value="'.(GETPOSTISSET('enabled')?GETPOST("enabled",'alpha'):'1').'"></td><td>'.$langs->trans('DetailEnabled').'</td></tr>';
|
||||
|
||||
// Perms
|
||||
print '<tr><td>'.$langs->trans('Rights').'</td><td><input type="text" size="60" name="perms" value="'.GETPOST('perms','alpha').'"></td><td>'.$langs->trans('DetailRight').'</td></tr>';
|
||||
print '<tr><td>'.$langs->trans('Rights').'</td><td><input type="text" class="minwidth500" name="perms" value="'.(GETPOSTISSET('perms')?GETPOST('perms','alpha'):'1').'"></td><td>'.$langs->trans('DetailRight').'</td></tr>';
|
||||
|
||||
print '</table>';
|
||||
|
||||
@ -455,13 +463,30 @@ elseif ($action == 'edit')
|
||||
// Type
|
||||
print '<tr><td class="fieldrequired">'.$langs->trans('Type').'</td><td>'.$langs->trans(ucfirst($menu->type)).'</td><td>'.$langs->trans('DetailType').'</td></tr>';
|
||||
|
||||
// Mainmenu code
|
||||
if ($menu->type == 'top')
|
||||
{
|
||||
print '<tr><td class="fieldrequired">'.$langs->trans('MainMenuCode').'</td>';
|
||||
/*if ($parent_rowid)
|
||||
{
|
||||
print '<td>'.$parent_rowid.'<input type="hidden" name="propertyleftmenu" value="'.$parent_rowid.'"></td>';
|
||||
}
|
||||
else
|
||||
{*/
|
||||
print '<td><input type="text" class="minwidth300" id="propertymainmenu" name="propertymainmenu" value="'.(GETPOST("propertymainmenu", 'alpha')?GETPOST("propertymainmenu", 'alpha'):$menu->mainmenu).'"></td>';
|
||||
//}
|
||||
print '<td>';
|
||||
print $langs->trans("Example").': mytopmenukey';
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
// MenuId Parent
|
||||
print '<tr><td class="fieldrequired">'.$langs->trans('MenuIdParent');
|
||||
print '</td>';
|
||||
$valtouse=$menu->fk_menu;
|
||||
if ($menu->fk_mainmenu) $valtouse='fk_mainmenu='.$menu->fk_mainmenu;
|
||||
if ($menu->fk_leftmenu) $valtouse.='&fk_leftmenu='.$menu->fk_leftmenu;
|
||||
print '<td><input type="text" name="menuIdParent" value="'.$valtouse.'" size="48"></td>';
|
||||
print '<td><input type="text" name="menuIdParent" value="'.$valtouse.'" class="minwidth300"></td>';
|
||||
print '<td>'.$langs->trans('DetailMenuIdParent');
|
||||
print ', '.$langs->trans("Example").': fk_mainmenu=abc&fk_leftmenu=def';
|
||||
print '</td></tr>';
|
||||
@ -470,16 +495,16 @@ elseif ($action == 'edit')
|
||||
//print '<tr><td>'.$langs->trans('Level').'</td><td>'.$menu->level.'</td><td>'.$langs->trans('DetailLevel').'</td></tr>';
|
||||
|
||||
// Title
|
||||
print '<tr><td class="fieldrequired">'.$langs->trans('Title').'</td><td><input type="text" size="30" name="titre" value="'.dol_escape_htmltag($menu->titre).'"></td><td>'.$langs->trans('DetailTitre').'</td></tr>';
|
||||
print '<tr><td class="fieldrequired">'.$langs->trans('Title').'</td><td><input type="text" class="minwidth300" name="titre" value="'.dol_escape_htmltag($menu->titre).'"></td><td>'.$langs->trans('DetailTitre').'</td></tr>';
|
||||
|
||||
// Url
|
||||
print '<tr><td class="fieldrequired">'.$langs->trans('URL').'</td><td><input type="text" class="quatrevingtpercent" name="url" value="'.$menu->url.'"></td><td>'.$langs->trans('DetailUrl').'</td></tr>';
|
||||
|
||||
// Langs
|
||||
print '<tr><td>'.$langs->trans('LangFile').'</td><td><input type="text" size="30" name="langs" value="'.dol_escape_htmltag($menu->langs).'"></td><td>'.$langs->trans('DetailLangs').'</td></tr>';
|
||||
print '<tr><td>'.$langs->trans('LangFile').'</td><td><input type="text" class="minwidth300" name="langs" value="'.dol_escape_htmltag($menu->langs).'"></td><td>'.$langs->trans('DetailLangs').'</td></tr>';
|
||||
|
||||
// Position
|
||||
print '<tr><td>'.$langs->trans('Position').'</td><td><input type="text" size="5" name="position" value="'.$menu->position.'"></td><td>'.$langs->trans('DetailPosition').'</td></tr>';
|
||||
print '<tr><td>'.$langs->trans('Position').'</td><td><input type="text" class="minwidth100" name="position" value="'.$menu->position.'"></td><td>'.$langs->trans('DetailPosition').'</td></tr>';
|
||||
|
||||
// Target
|
||||
print '<tr><td>'.$langs->trans('Target').'</td><td><select class="flat" name="target">';
|
||||
@ -488,12 +513,12 @@ elseif ($action == 'edit')
|
||||
print '</select></td><td>'.$langs->trans('DetailTarget').'</td></tr>';
|
||||
|
||||
// Enabled
|
||||
print '<tr><td>'.$langs->trans('Enabled').'</td><td><input type="text" size="60" name="enabled" value="'.dol_escape_htmltag($menu->enabled).'"></td><td>'.$langs->trans('DetailEnabled');
|
||||
print '<tr><td>'.$langs->trans('Enabled').'</td><td><input type="text" class="minwidth500" name="enabled" value="'.dol_escape_htmltag($menu->enabled).'"></td><td>'.$langs->trans('DetailEnabled');
|
||||
if (! empty($menu->enabled)) print ' ('.$langs->trans("ConditionIsCurrently").': '.yn(dol_eval($menu->enabled,1)).')';
|
||||
print '</td></tr>';
|
||||
|
||||
// Perms
|
||||
print '<tr><td>'.$langs->trans('Rights').'</td><td><input type="text" size="60" name="perms" value="'.dol_escape_htmltag($menu->perms).'"></td><td>'.$langs->trans('DetailRight');
|
||||
print '<tr><td>'.$langs->trans('Rights').'</td><td><input type="text" class="minwidth500" name="perms" value="'.dol_escape_htmltag($menu->perms).'"></td><td>'.$langs->trans('DetailRight');
|
||||
if (! empty($menu->perms)) print ' ('.$langs->trans("ConditionIsCurrently").': '.yn(dol_eval($menu->perms,1)).')';
|
||||
print '</td></tr>';
|
||||
|
||||
|
||||
@ -89,7 +89,7 @@ dol_fiche_head($head, 'setup', '', 0, 'user');
|
||||
|
||||
print '<br>';
|
||||
|
||||
$arrayofsocialnetworks=array('skype'=>'Skype', 'twitter'=>'Twitter', 'facebook'=>'Facebook');
|
||||
$arrayofsocialnetworks=array('jabber'=>'Jabber', 'skype'=>'Skype', 'twitter'=>'Twitter', 'facebook'=>'Facebook');
|
||||
|
||||
foreach($arrayofsocialnetworks as $snkey => $snlabel)
|
||||
{
|
||||
|
||||
@ -517,7 +517,6 @@ print '<br>';
|
||||
<input type="hidden" name="export_type" value="server" />
|
||||
|
||||
<fieldset><legend class="legendforfieldsetstep" style="font-size: 3em">2</legend>
|
||||
<div class="fichehalfleft">
|
||||
|
||||
<?php
|
||||
print $langs->trans("BackupDesc2",DOL_DATA_ROOT).'<br>';
|
||||
@ -525,6 +524,13 @@ print $langs->trans("BackupDescX").'<br><br>';
|
||||
|
||||
?>
|
||||
|
||||
<div id="backupfilesleft" class="fichehalfleft">
|
||||
|
||||
<?php
|
||||
|
||||
print load_fiche_titre($title?$title:$langs->trans("BackupDumpWizard"));
|
||||
?>
|
||||
|
||||
<label for="zipfilename_template"> <?php echo $langs->trans("FileNameToGenerate"); ?></label><br>
|
||||
<input type="text" name="zipfilename_template" style="width: 90%"
|
||||
id="zipfilename_template"
|
||||
@ -537,6 +543,7 @@ echo $file;
|
||||
?>" /> <br>
|
||||
<br>
|
||||
|
||||
|
||||
<?php
|
||||
// Show compression choices
|
||||
print '<div class="formelementrow">';
|
||||
|
||||
@ -65,7 +65,7 @@ class Categorie extends CommonObject
|
||||
*
|
||||
* @note This array should be remove in future, once previous constants are moved to the string value. Deprecated
|
||||
*/
|
||||
private $MAP_ID = array(
|
||||
protected $MAP_ID = array(
|
||||
'product' => 0,
|
||||
'supplier' => 1,
|
||||
'customer' => 2,
|
||||
@ -97,7 +97,7 @@ class Categorie extends CommonObject
|
||||
*
|
||||
* @note Move to const array when PHP 5.6 will be our minimum target
|
||||
*/
|
||||
private $MAP_CAT_FK = array(
|
||||
protected $MAP_CAT_FK = array(
|
||||
'product' => 'product',
|
||||
'customer' => 'soc',
|
||||
'supplier' => 'soc',
|
||||
@ -114,7 +114,7 @@ class Categorie extends CommonObject
|
||||
*
|
||||
* @note Move to const array when PHP 5.6 will be our minimum target
|
||||
*/
|
||||
private $MAP_CAT_TABLE = array(
|
||||
protected $MAP_CAT_TABLE = array(
|
||||
'product' => 'product',
|
||||
'customer' => 'societe',
|
||||
'supplier' => 'fournisseur',
|
||||
@ -131,7 +131,7 @@ class Categorie extends CommonObject
|
||||
*
|
||||
* @note Move to const array when PHP 5.6 will be our minimum target
|
||||
*/
|
||||
private $MAP_OBJ_CLASS = array(
|
||||
protected $MAP_OBJ_CLASS = array(
|
||||
'product' => 'Product',
|
||||
'customer' => 'Societe',
|
||||
'supplier' => 'Fournisseur',
|
||||
@ -148,7 +148,7 @@ class Categorie extends CommonObject
|
||||
*
|
||||
* @note Move to const array when PHP 5.6 will be our minimum target
|
||||
*/
|
||||
private $MAP_OBJ_TABLE = array(
|
||||
protected $MAP_OBJ_TABLE = array(
|
||||
'product' => 'product',
|
||||
'customer' => 'societe',
|
||||
'supplier' => 'societe',
|
||||
@ -944,7 +944,7 @@ class Categorie extends CommonObject
|
||||
*
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
private function load_motherof()
|
||||
protected function load_motherof()
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
|
||||
@ -1292,7 +1292,8 @@ class ActionComm extends CommonObject
|
||||
$tooltip .= '<br><b>' . $langs->trans('Type') . ':</b> ' . $labeltype;
|
||||
if (! empty($this->location))
|
||||
$tooltip .= '<br><b>' . $langs->trans('Location') . ':</b> ' . $this->location;
|
||||
|
||||
if (! empty($this->note))
|
||||
$tooltip .= '<br><b>' . $langs->trans('Note') . ':</b> ' . $this->note;
|
||||
$linkclose='';
|
||||
if (! empty($conf->global->AGENDA_USE_EVENT_TYPE) && $this->type_color)
|
||||
$linkclose = ' style="background-color:#'.$this->type_color.'"';
|
||||
|
||||
@ -72,7 +72,7 @@ $object = new Mailing($db);
|
||||
|
||||
if ($action == 'add')
|
||||
{
|
||||
$module=GETPOST("module");
|
||||
$module=GETPOST("module",'alpha');
|
||||
$result=-1;
|
||||
|
||||
foreach ($modulesdir as $dir)
|
||||
@ -89,14 +89,10 @@ if ($action == 'add')
|
||||
{
|
||||
require_once $file;
|
||||
|
||||
// We fill $filtersarray. Using this variable is now deprecated. Kept for backward compatibility.
|
||||
$filtersarray=array();
|
||||
if (isset($_POST["filter"])) $filtersarray[0]=$_POST["filter"];
|
||||
|
||||
// Add targets into database
|
||||
$obj = new $classname($db);
|
||||
dol_syslog("Call add_to_target on class ".$classname);
|
||||
$result=$obj->add_to_target($id,$filtersarray);
|
||||
$result=$obj->add_to_target($id);
|
||||
}
|
||||
}
|
||||
if ($result > 0)
|
||||
@ -329,14 +325,16 @@ if ($object->fetch($id) >= 0)
|
||||
// Si le module mailing est qualifie
|
||||
if ($qualified)
|
||||
{
|
||||
$var = ! $var;
|
||||
|
||||
if ($allowaddtarget)
|
||||
{
|
||||
print '<form class="oddeven tagtr" name="'.$modulename.'" action="'.$_SERVER['PHP_SELF'].'?action=add&id='.$object->id.'&module='.$modulename.'" method="POST" enctype="multipart/form-data">';
|
||||
print '<form '.$bctag[$var].' name="'.$modulename.'" action="'.$_SERVER['PHP_SELF'].'?action=add&id='.$object->id.'&module='.$modulename.'" method="POST" enctype="multipart/form-data">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<div class="oddeven tagtr">';
|
||||
print '<div '.$bctag[$var].'>';
|
||||
}
|
||||
|
||||
print '<div class="tagtd">';
|
||||
|
||||
@ -745,7 +745,16 @@ class AdvanceTargetingMailing extends CommonObject
|
||||
$sqlwhere[]= " (t.civility IN ('".$this->db->escape(implode("','",$arrayquery['contact_civility']))."'))";
|
||||
}
|
||||
if ($arrayquery['contact_no_email']!='') {
|
||||
$sqlwhere[]= " (t.no_email='".$this->db->escape($arrayquery['contact_no_email'])."')";
|
||||
$tmpwhere = '';
|
||||
if (! empty($arrayquery['contact_no_email']))
|
||||
{
|
||||
$tmpwhere.= "(t.email IN (SELECT email FROM ".MAIN_DB_PREFIX."mailing_unsubscribe WHERE t.entity IN (".getEntity('mailing').") AND email = '".$this->db->escape($arrayquery['contact_no_email'])."'))";
|
||||
}
|
||||
else
|
||||
{
|
||||
$tmpwhere.= "(t.email NOT IN (SELECT email FROM ".MAIN_DB_PREFIX."mailing_unsubscribe WHERE t.entity IN (".getEntity('mailing').") AND email = '".$this->db->escape($arrayquery['contact_no_email'])."'))";
|
||||
}
|
||||
$sqlwhere[]= $tmpwhere;
|
||||
}
|
||||
if ($arrayquery['contact_update_st_dt']!='') {
|
||||
$sqlwhere[]= " (t.tms >= '".$this->db->idate($arrayquery['contact_update_st_dt'])."' AND t.tms <= '".$this->db->idate($arrayquery['contact_update_end_dt'])."')";
|
||||
|
||||
@ -14,6 +14,7 @@
|
||||
* Copyright (C) 2014-2015 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2018 Ferran Marcet <fmarcet@2byte.es>
|
||||
*
|
||||
* 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
|
||||
@ -438,38 +439,40 @@ class Propal extends CommonObject
|
||||
global $mysoc, $conf, $langs;
|
||||
|
||||
dol_syslog(get_class($this)."::addline propalid=$this->id, desc=$desc, pu_ht=$pu_ht, qty=$qty, txtva=$txtva, fk_product=$fk_product, remise_except=$remise_percent, price_base_type=$price_base_type, pu_ttc=$pu_ttc, info_bits=$info_bits, type=$type, fk_remise_except=".$fk_remise_except);
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php';
|
||||
|
||||
// Clean parameters
|
||||
if (empty($remise_percent)) $remise_percent=0;
|
||||
if (empty($qty)) $qty=0;
|
||||
if (empty($info_bits)) $info_bits=0;
|
||||
if (empty($rang)) $rang=0;
|
||||
if (empty($fk_parent_line) || $fk_parent_line < 0) $fk_parent_line=0;
|
||||
|
||||
$remise_percent=price2num($remise_percent);
|
||||
$qty=price2num($qty);
|
||||
$pu_ht=price2num($pu_ht);
|
||||
$pu_ht_devise=price2num($pu_ht_devise);
|
||||
$pu_ttc=price2num($pu_ttc);
|
||||
$txtva=price2num($txtva); // $txtva can have format '5.0(XXX)' or '5'
|
||||
$txlocaltax1=price2num($txlocaltax1);
|
||||
$txlocaltax2=price2num($txlocaltax2);
|
||||
$pa_ht=price2num($pa_ht);
|
||||
if ($price_base_type=='HT')
|
||||
{
|
||||
$pu=$pu_ht;
|
||||
}
|
||||
else
|
||||
{
|
||||
$pu=$pu_ttc;
|
||||
}
|
||||
|
||||
// Check parameters
|
||||
if ($type < 0) return -1;
|
||||
|
||||
if ($this->statut == self::STATUS_DRAFT)
|
||||
{
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php';
|
||||
|
||||
// Clean parameters
|
||||
if (empty($remise_percent)) $remise_percent=0;
|
||||
if (empty($qty)) $qty=0;
|
||||
if (empty($info_bits)) $info_bits=0;
|
||||
if (empty($rang)) $rang=0;
|
||||
if (empty($fk_parent_line) || $fk_parent_line < 0) $fk_parent_line=0;
|
||||
|
||||
$remise_percent=price2num($remise_percent);
|
||||
$qty=price2num($qty);
|
||||
$pu_ht=price2num($pu_ht);
|
||||
$pu_ht_devise=price2num($pu_ht_devise);
|
||||
$pu_ttc=price2num($pu_ttc);
|
||||
if (!preg_match('/\((.*)\)/', $txtva)) {
|
||||
$txtva = price2num($txtva); // $txtva can have format '5,1' or '5.1' or '5.1(XXX)', we must clean only if '5,1'
|
||||
}
|
||||
$txlocaltax1=price2num($txlocaltax1);
|
||||
$txlocaltax2=price2num($txlocaltax2);
|
||||
$pa_ht=price2num($pa_ht);
|
||||
if ($price_base_type=='HT')
|
||||
{
|
||||
$pu=$pu_ht;
|
||||
}
|
||||
else
|
||||
{
|
||||
$pu=$pu_ttc;
|
||||
}
|
||||
|
||||
// Check parameters
|
||||
if ($type < 0) return -1;
|
||||
|
||||
$this->db->begin();
|
||||
|
||||
$product_type=$type;
|
||||
|
||||
@ -9,8 +9,8 @@
|
||||
* Copyright (C) 2012 Cedric Salvador <csalvador@gpcsolutions.fr>
|
||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2014-2015 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2016-2017 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||
* Copyright (C) 2016-2018 Ferran Marcet <fmarcet@2byte.es>
|
||||
*
|
||||
* 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
|
||||
@ -1312,45 +1312,47 @@ class Commande extends CommonOrder
|
||||
$logtext.= ", date_end=$date_end, type=$type special_code=$special_code, fk_unit=$fk_unit, origin=$origin, origin_id=$origin_id, pu_ht_devise=$pu_ht_devise";
|
||||
dol_syslog(get_class($this).$logtext, LOG_DEBUG);
|
||||
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php';
|
||||
|
||||
// Clean parameters
|
||||
if (empty($remise_percent)) $remise_percent=0;
|
||||
if (empty($qty)) $qty=0;
|
||||
if (empty($info_bits)) $info_bits=0;
|
||||
if (empty($rang)) $rang=0;
|
||||
if (empty($txtva)) $txtva=0;
|
||||
if (empty($txlocaltax1)) $txlocaltax1=0;
|
||||
if (empty($txlocaltax2)) $txlocaltax2=0;
|
||||
if (empty($fk_parent_line) || $fk_parent_line < 0) $fk_parent_line=0;
|
||||
if (empty($this->fk_multicurrency)) $this->fk_multicurrency=0;
|
||||
|
||||
$remise_percent=price2num($remise_percent);
|
||||
$qty=price2num($qty);
|
||||
$pu_ht=price2num($pu_ht);
|
||||
$pu_ht_devise=price2num($pu_ht_devise);
|
||||
$pu_ttc=price2num($pu_ttc);
|
||||
$pa_ht=price2num($pa_ht);
|
||||
$txtva = price2num($txtva);
|
||||
$txlocaltax1 = price2num($txlocaltax1);
|
||||
$txlocaltax2 = price2num($txlocaltax2);
|
||||
if ($price_base_type=='HT')
|
||||
{
|
||||
$pu=$pu_ht;
|
||||
}
|
||||
else
|
||||
{
|
||||
$pu=$pu_ttc;
|
||||
}
|
||||
$label=trim($label);
|
||||
$desc=trim($desc);
|
||||
|
||||
// Check parameters
|
||||
if ($type < 0) return -1;
|
||||
|
||||
if ($this->statut == self::STATUS_DRAFT)
|
||||
{
|
||||
$this->db->begin();
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php';
|
||||
|
||||
// Clean parameters
|
||||
if (empty($remise_percent)) $remise_percent=0;
|
||||
if (empty($qty)) $qty=0;
|
||||
if (empty($info_bits)) $info_bits=0;
|
||||
if (empty($rang)) $rang=0;
|
||||
if (empty($txtva)) $txtva=0;
|
||||
if (empty($txlocaltax1)) $txlocaltax1=0;
|
||||
if (empty($txlocaltax2)) $txlocaltax2=0;
|
||||
if (empty($fk_parent_line) || $fk_parent_line < 0) $fk_parent_line=0;
|
||||
if (empty($this->fk_multicurrency)) $this->fk_multicurrency=0;
|
||||
|
||||
$remise_percent=price2num($remise_percent);
|
||||
$qty=price2num($qty);
|
||||
$pu_ht=price2num($pu_ht);
|
||||
$pu_ht_devise=price2num($pu_ht_devise);
|
||||
$pu_ttc=price2num($pu_ttc);
|
||||
$pa_ht=price2num($pa_ht);
|
||||
if (!preg_match('/\((.*)\)/', $txtva)) {
|
||||
$txtva = price2num($txtva); // $txtva can have format '5,1' or '5.1' or '5.1(XXX)', we must clean only if '5,1'
|
||||
}
|
||||
$txlocaltax1 = price2num($txlocaltax1);
|
||||
$txlocaltax2 = price2num($txlocaltax2);
|
||||
if ($price_base_type=='HT')
|
||||
{
|
||||
$pu=$pu_ht;
|
||||
}
|
||||
else
|
||||
{
|
||||
$pu=$pu_ttc;
|
||||
}
|
||||
$label=trim($label);
|
||||
$desc=trim($desc);
|
||||
|
||||
// Check parameters
|
||||
if ($type < 0) return -1;
|
||||
|
||||
$this->db->begin();
|
||||
|
||||
$product_type=$type;
|
||||
if (!empty($fk_product))
|
||||
|
||||
@ -634,7 +634,7 @@ if ($resql)
|
||||
}
|
||||
|
||||
// Using BANK_REPORT_LAST_NUM_RELEVE to automatically report last num (or not)
|
||||
if ($conf->global->BANK_REPORT_LAST_NUM_RELEVE == 1)
|
||||
if (! empty($conf->global->BANK_REPORT_LAST_NUM_RELEVE))
|
||||
{
|
||||
print '
|
||||
<script type="text/javascript">
|
||||
|
||||
@ -1471,7 +1471,7 @@ class Account extends CommonObject
|
||||
{
|
||||
$country_code=$this->getCountryCode();
|
||||
|
||||
if (in_array($country_code,array('CH','FR','ES','GA','IT','NC'))) return 1; // France, Spain, Gabon, ...
|
||||
if (in_array($country_code,array('FR','ES','GA','IT','NC'))) return 1; // France, Spain, Gabon, ... - Not valid for CH
|
||||
if (in_array($country_code,array('AU','BE','CA','DE','DK','GR','GB','ID','IE','IR','KR','NL','NZ','UK','US'))) return 2; // Australia, England...
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -2663,55 +2663,47 @@ class Facture extends CommonInvoice
|
||||
global $mysoc, $conf, $langs;
|
||||
|
||||
dol_syslog(get_class($this)."::addline id=$this->id,desc=$desc,pu_ht=$pu_ht,qty=$qty,txtva=$txtva, txlocaltax1=$txlocaltax1, txlocaltax2=$txlocaltax2, fk_product=$fk_product,remise_percent=$remise_percent,date_start=$date_start,date_end=$date_end,ventil=$ventil,info_bits=$info_bits,fk_remise_except=$fk_remise_except,price_base_type=$price_base_type,pu_ttc=$pu_ttc,type=$type, fk_unit=$fk_unit", LOG_DEBUG);
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php';
|
||||
|
||||
// Clean parameters
|
||||
if (empty($remise_percent)) $remise_percent=0;
|
||||
if (empty($qty)) $qty=0;
|
||||
if (empty($info_bits)) $info_bits=0;
|
||||
if (empty($rang)) $rang=0;
|
||||
if (empty($ventil)) $ventil=0;
|
||||
if (empty($txtva)) $txtva=0;
|
||||
if (empty($txlocaltax1)) $txlocaltax1=0;
|
||||
if (empty($txlocaltax2)) $txlocaltax2=0;
|
||||
if (empty($fk_parent_line) || $fk_parent_line < 0) $fk_parent_line=0;
|
||||
if (empty($fk_prev_id)) $fk_prev_id = 'null';
|
||||
if (! isset($situation_percent) || $situation_percent > 100 || (string) $situation_percent == '') $situation_percent = 100;
|
||||
|
||||
$localtaxes_type=getLocalTaxesFromRate($txtva, 0, $this->thirdparty, $mysoc);
|
||||
|
||||
// Clean vat code
|
||||
$vat_src_code='';
|
||||
if (preg_match('/\((.*)\)/', $txtva, $reg))
|
||||
{
|
||||
$vat_src_code = $reg[1];
|
||||
$txtva = preg_replace('/\s*\(.*\)/', '', $txtva); // Remove code into vatrate.
|
||||
}
|
||||
|
||||
$remise_percent=price2num($remise_percent);
|
||||
$qty=price2num($qty);
|
||||
$pu_ht=price2num($pu_ht);
|
||||
$pu_ht_devise=price2num($pu_ht_devise);
|
||||
$pu_ttc=price2num($pu_ttc);
|
||||
$pa_ht=price2num($pa_ht);
|
||||
$txtva=price2num($txtva);
|
||||
$txlocaltax1=price2num($txlocaltax1);
|
||||
$txlocaltax2=price2num($txlocaltax2);
|
||||
|
||||
if ($price_base_type=='HT')
|
||||
{
|
||||
$pu=$pu_ht;
|
||||
}
|
||||
else
|
||||
{
|
||||
$pu=$pu_ttc;
|
||||
}
|
||||
|
||||
// Check parameters
|
||||
if ($type < 0) return -1;
|
||||
|
||||
if (! empty($this->brouillon))
|
||||
{
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php';
|
||||
|
||||
// Clean parameters
|
||||
if (empty($remise_percent)) $remise_percent=0;
|
||||
if (empty($qty)) $qty=0;
|
||||
if (empty($info_bits)) $info_bits=0;
|
||||
if (empty($rang)) $rang=0;
|
||||
if (empty($ventil)) $ventil=0;
|
||||
if (empty($txtva)) $txtva=0;
|
||||
if (empty($txlocaltax1)) $txlocaltax1=0;
|
||||
if (empty($txlocaltax2)) $txlocaltax2=0;
|
||||
if (empty($fk_parent_line) || $fk_parent_line < 0) $fk_parent_line=0;
|
||||
if (empty($fk_prev_id)) $fk_prev_id = 'null';
|
||||
if (! isset($situation_percent) || $situation_percent > 100 || (string) $situation_percent == '') $situation_percent = 100;
|
||||
|
||||
$remise_percent=price2num($remise_percent);
|
||||
$qty=price2num($qty);
|
||||
$pu_ht=price2num($pu_ht);
|
||||
$pu_ht_devise=price2num($pu_ht_devise);
|
||||
$pu_ttc=price2num($pu_ttc);
|
||||
$pa_ht=price2num($pa_ht);
|
||||
if (!preg_match('/\((.*)\)/', $txtva)) {
|
||||
$txtva = price2num($txtva); // $txtva can have format '5.0(XXX)' or '5'
|
||||
}
|
||||
$txlocaltax1=price2num($txlocaltax1);
|
||||
$txlocaltax2=price2num($txlocaltax2);
|
||||
|
||||
if ($price_base_type=='HT')
|
||||
{
|
||||
$pu=$pu_ht;
|
||||
}
|
||||
else
|
||||
{
|
||||
$pu=$pu_ttc;
|
||||
}
|
||||
|
||||
// Check parameters
|
||||
if ($type < 0) return -1;
|
||||
|
||||
$this->db->begin();
|
||||
|
||||
$product_type=$type;
|
||||
@ -2729,6 +2721,16 @@ class Facture extends CommonInvoice
|
||||
}
|
||||
}
|
||||
|
||||
$localtaxes_type=getLocalTaxesFromRate($txtva, 0, $this->thirdparty, $mysoc);
|
||||
|
||||
// Clean vat code
|
||||
$vat_src_code='';
|
||||
if (preg_match('/\((.*)\)/', $txtva, $reg))
|
||||
{
|
||||
$vat_src_code = $reg[1];
|
||||
$txtva = preg_replace('/\s*\(.*\)/', '', $txtva); // Remove code into vatrate.
|
||||
}
|
||||
|
||||
// Calcul du total TTC et de la TVA pour la ligne a partir de
|
||||
// qty, pu, remise_percent et txtva
|
||||
// TRES IMPORTANT: C'est au moment de l'insertion ligne qu'on doit stocker
|
||||
|
||||
@ -125,11 +125,6 @@ echo $this->control->tpl['ajax_selectcountry'];
|
||||
<?php } ?>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><?php echo $langs->trans("IM"); ?></td>
|
||||
<td colspan="3"><input name="jabberid" type="text" size="50" maxlength="80" value="<?php echo $this->control->tpl['jabberid']; ?>"></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><?php echo $langs->trans("ContactVisibility"); ?></td>
|
||||
<td colspan="3"><?php echo $this->control->tpl['select_visibility']; ?></td>
|
||||
|
||||
@ -110,11 +110,6 @@ dol_htmloutput_errors($this->control->tpl['error'],$this->control->tpl['errors']
|
||||
<?php } ?>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><?php echo $langs->trans("IM"); ?></td>
|
||||
<td colspan="3"><?php echo $this->control->tpl['jabberid']; ?></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><?php echo $langs->trans("ContactVisibility"); ?></td>
|
||||
<td colspan="3"><?php echo $this->control->tpl['visibility']; ?></td>
|
||||
|
||||
@ -194,7 +194,6 @@ if (empty($reshook))
|
||||
$object->phone_mobile = GETPOST("phone_mobile",'alpha');
|
||||
$object->fax = GETPOST("fax",'alpha');
|
||||
$object->jabberid = GETPOST("jabberid",'alpha');
|
||||
$object->no_email = GETPOST("no_email",'int');
|
||||
$object->priv = GETPOST("priv",'int');
|
||||
$object->note_public = GETPOST("note_public",'none');
|
||||
$object->note_private = GETPOST("note_private",'none');
|
||||
@ -367,7 +366,6 @@ if (empty($reshook))
|
||||
$object->phone_mobile = GETPOST("phone_mobile",'alpha');
|
||||
$object->fax = GETPOST("fax",'alpha');
|
||||
$object->jabberid = GETPOST("jabberid",'alpha');
|
||||
$object->no_email = GETPOST("no_email",'int');
|
||||
$object->priv = GETPOST("priv",'int');
|
||||
$object->note_public = GETPOST("note_public",'none');
|
||||
$object->note_private = GETPOST("note_private",'none');
|
||||
@ -651,8 +649,21 @@ else
|
||||
print '<td><input name="email" id="email" type="text" class="maxwidth100onsmartphone" value="'.dol_escape_htmltag(GETPOST("email",'alpha')?GETPOST("email",'alpha'):$object->email).'"></td>';
|
||||
if (! empty($conf->mailing->enabled))
|
||||
{
|
||||
$noemail = '';
|
||||
if (empty($noemail) && ! empty($object->email))
|
||||
{
|
||||
$sql="SELECT COUNT(*) as nb FROM ".MAIN_DB_PREFIX."mailing_unsubscribe WHERE entity IN (".getEntity('mailing').") AND email = '".$db->escape($object->email)."'";
|
||||
//print $sql;
|
||||
$resql=$db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
$obj=$db->fetch_object($resql);
|
||||
$noemail = $obj->nb;
|
||||
}
|
||||
}
|
||||
|
||||
print '<td><label for="no_email">'.$langs->trans("No_Email").'</label></td>';
|
||||
print '<td>'.$form->selectyesno('no_email',(GETPOST("no_email",'alpha')?GETPOST("no_email",'alpha'):$object->no_email), 1).'</td>';
|
||||
print '<td>'.$form->selectyesno('no_email',(GETPOSTISSET("no_email")?GETPOST("no_email",'alpha'):$noemail), 1).'</td>';
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -660,12 +671,14 @@ else
|
||||
}
|
||||
print '</tr>';
|
||||
|
||||
// Instant message and no email
|
||||
print '<tr><td><label for="jabberid">'.$langs->trans("IM").'</label></td>';
|
||||
print '<td colspan="3"><input name="jabberid" id="jabberid" type="text" class="minwidth100" maxlength="80" value="'.dol_escape_htmltag(GETPOSTISSET("jabberid")?GETPOST("jabberid",'alpha'):$object->jabberid).'"></td></tr>';
|
||||
|
||||
if (! empty($conf->socialnetworks->enabled))
|
||||
{
|
||||
// Jabber
|
||||
if (! empty($conf->global->SOCIALNETWORKS_JABBER))
|
||||
{
|
||||
print '<tr><td><label for="skype">'.fieldLabel('Jabber','jabberid').'</label></td>';
|
||||
print '<td colspan="3"><input type="text" name="jabberid" id="jabberid" class="minwidth100" maxlength="80" value="'.dol_escape_htmltag(GETPOSTISSET("jabberid")?GETPOST("jabberid",'alpha'):$object->jabberid).'"></td></tr>';
|
||||
}
|
||||
// Skype
|
||||
if (! empty($conf->global->SOCIALNETWORKS_SKYPE))
|
||||
{
|
||||
@ -919,13 +932,25 @@ else
|
||||
}
|
||||
print '</tr>';
|
||||
|
||||
// Jabberid
|
||||
print '<tr><td><label for="jabberid">'.$langs->trans("IM").'</label></td>';
|
||||
print '<td><input name="jabberid" id="jabberid" type="text" class="minwidth100" maxlength="80" value="'.(isset($_POST["jabberid"])?$_POST["jabberid"]:$object->jabberid).'"></td>';
|
||||
// Unsubscribe
|
||||
print '<tr>';
|
||||
if (! empty($conf->mailing->enabled))
|
||||
{
|
||||
$noemail = '';
|
||||
if (empty($noemail) && ! empty($object->email))
|
||||
{
|
||||
$sql="SELECT COUNT(*) as nb FROM ".MAIN_DB_PREFIX."mailing_unsubscribe WHERE entity IN (".getEntity('mailing').") AND email = '".$db->escape($object->email)."'";
|
||||
//print $sql;
|
||||
$resql=$db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
$obj=$db->fetch_object($resql);
|
||||
$noemail = $obj->nb;
|
||||
}
|
||||
}
|
||||
|
||||
print '<td><label for="no_email">'.$langs->trans("No_Email").'</label></td>';
|
||||
print '<td>'.$form->selectyesno('no_email',(isset($_POST["no_email"])?$_POST["no_email"]:$object->no_email), 1).'</td>';
|
||||
print '<td>'.$form->selectyesno('no_email',(GETPOSTISSET("no_email")?GETPOST("no_email",'alpha'):$noemail), 1).'</td>';
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -935,6 +960,12 @@ else
|
||||
|
||||
if (! empty($conf->socialnetworks->enabled))
|
||||
{
|
||||
// Jabber ID
|
||||
if (! empty($conf->global->SOCIALNETWORKS_JABBER))
|
||||
{
|
||||
print '<tr><td><label for="jabberid">'.fieldLabel('Jabber','jabberid').'</label></td>';
|
||||
print '<td><input type="text" name="jabberid" id="jabberid" class="minwidth100" maxlength="80" value="'.dol_escape_htmltag(GETPOSTISSET("jabberid")?GETPOST("jabberid",'alpha'):$object->jabberid).'"></td></tr>';
|
||||
}
|
||||
// Skype
|
||||
if (! empty($conf->global->SOCIALNETWORKS_SKYPE))
|
||||
{
|
||||
@ -1153,11 +1184,23 @@ else
|
||||
print '<td><a href="'.DOL_URL_ROOT.'/comm/mailing/list.php?filteremail='.urlencode($object->email).'">'.$object->getNbOfEMailings().'</a></td></tr>';
|
||||
}
|
||||
|
||||
// Instant message and no email
|
||||
print '<tr><td>'.$langs->trans("IM").'</td><td>'.$object->jabberid.'</td></tr>';
|
||||
// Unsubscribe opt-out
|
||||
if (!empty($conf->mailing->enabled))
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("No_Email").'</td><td>'.yn($object->no_email).'</td></tr>';
|
||||
//print 'eee'.$object->email;
|
||||
$noemail = $object->no_email;
|
||||
if (empty($noemail) && ! empty($object->email))
|
||||
{
|
||||
$sql="SELECT COUNT(*) as nb FROM ".MAIN_DB_PREFIX."mailing_unsubscribe WHERE entity IN (".getEntity('mailing').") AND email = '".$db->escape($object->email)."'";
|
||||
//print $sql;
|
||||
$resql=$db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
$obj=$db->fetch_object($resql);
|
||||
$noemail = $obj->nb;
|
||||
}
|
||||
}
|
||||
print '<tr><td>'.$langs->trans("No_Email").'</td><td>'.yn($noemail).'</td></tr>';
|
||||
}
|
||||
|
||||
print '<tr><td>'.$langs->trans("ContactVisibility").'</td><td>';
|
||||
|
||||
@ -123,7 +123,6 @@ class Contact extends CommonObject
|
||||
|
||||
public $birthday;
|
||||
public $default_lang;
|
||||
public $no_email; // 1=Don't send e-mail to this contact, 0=do
|
||||
|
||||
public $ref_facturation; // Reference number of invoice for which it is contact
|
||||
public $ref_contrat; // Nb de reference contrat pour lequel il est contact
|
||||
@ -372,7 +371,6 @@ class Contact extends CommonObject
|
||||
$sql .= ", statut = ".$this->db->escape($this->statut);
|
||||
$sql .= ", fk_user_modif=".($user->id > 0 ? "'".$this->db->escape($user->id)."'":"NULL");
|
||||
$sql .= ", default_lang=".($this->default_lang?"'".$this->db->escape($this->default_lang)."'":"NULL");
|
||||
$sql .= ", no_email=".($this->no_email?"'".$this->db->escape($this->no_email)."'":"0");
|
||||
$sql .= ", entity = " . $this->db->escape($this->entity);
|
||||
$sql .= " WHERE rowid=".$this->db->escape($id);
|
||||
|
||||
@ -709,7 +707,7 @@ class Contact extends CommonObject
|
||||
$sql.= " c.birthday,";
|
||||
$sql.= " c.poste, c.phone, c.phone_perso, c.phone_mobile, c.fax, c.email, c.jabberid, c.skype, c.twitter, c.facebook,";
|
||||
$sql.= " c.photo,";
|
||||
$sql.= " c.priv, c.note_private, c.note_public, c.default_lang, c.no_email, c.canvas,";
|
||||
$sql.= " c.priv, c.note_private, c.note_public, c.default_lang, c.canvas,";
|
||||
$sql.= " c.import_key,";
|
||||
$sql.= " c.datec as date_creation, c.tms as date_modification,";
|
||||
$sql.= " co.label as country, co.code as country_code,";
|
||||
@ -790,7 +788,6 @@ class Contact extends CommonObject
|
||||
$this->note_private = $obj->note_private;
|
||||
$this->note_public = $obj->note_public;
|
||||
$this->default_lang = $obj->default_lang;
|
||||
$this->no_email = $obj->no_email;
|
||||
$this->user_id = $obj->user_id;
|
||||
$this->user_login = $obj->user_login;
|
||||
$this->canvas = $obj->canvas;
|
||||
|
||||
@ -158,6 +158,7 @@ $arrayfields=array(
|
||||
'p.phone_mobile'=>array('label'=>"PhoneMobile", 'checked'=>1),
|
||||
'p.fax'=>array('label'=>"Fax", 'checked'=>0),
|
||||
'p.email'=>array('label'=>"EMail", 'checked'=>1),
|
||||
'p.jabberid'=>array('label'=>"Jabber", 'checked'=>1, 'enabled'=>(! empty($conf->socialnetworks->enabled))),
|
||||
'p.skype'=>array('label'=>"Skype", 'checked'=>1, 'enabled'=>(! empty($conf->socialnetworks->enabled))),
|
||||
'p.twitter'=>array('label'=>"Twitter", 'checked'=>1, 'enabled'=>(! empty($conf->socialnetworks->enabled))),
|
||||
'p.facebook'=>array('label'=>"Facebook", 'checked'=>1, 'enabled'=>(! empty($conf->socialnetworks->enabled))),
|
||||
@ -822,12 +823,19 @@ while ($i < min($num,$limit))
|
||||
print '<td>'.dol_print_email($obj->email,$obj->rowid,$obj->socid,'AC_EMAIL',18).'</td>';
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
}
|
||||
|
||||
// Skype
|
||||
if (! empty($arrayfields['p.skype']['checked']))
|
||||
{
|
||||
if (! empty($conf->socialnetworks->enabled)) { print '<td>'.dol_print_socialnetworks($obj->skype,$obj->rowid,$obj->socid,'skype').'</td>'; }
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
}
|
||||
// Jabber
|
||||
if (! empty($arrayfields['p.jabberid']['checked']))
|
||||
{
|
||||
if (! empty($conf->socialnetworks->enabled)) { print '<td>'.dol_print_socialnetworks($obj->jabberid,$obj->rowid,$obj->socid,'jabberid').'</td>'; }
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
}
|
||||
// Twitter
|
||||
if (! empty($arrayfields['p.twitter']['checked']))
|
||||
{
|
||||
|
||||
@ -8,9 +8,9 @@
|
||||
* Copyright (C) 2013 Christophe Battarel <christophe.battarel@altairis.fr>
|
||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2014-2015 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2015-2017 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2015-2018 Ferran Marcet <fmarcet@2byte.es>
|
||||
*
|
||||
* 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
|
||||
@ -1382,7 +1382,9 @@ class Contrat extends CommonObject
|
||||
$pu_ht=price2num($pu_ht);
|
||||
$pu_ttc=price2num($pu_ttc);
|
||||
$pa_ht=price2num($pa_ht);
|
||||
$txtva=price2num($txtva);
|
||||
if (!preg_match('/\((.*)\)/', $txtva)) {
|
||||
$txtva = price2num($txtva); // $txtva can have format '5.0(XXX)' or '5'
|
||||
}
|
||||
$txlocaltax1=price2num($txlocaltax1);
|
||||
$txlocaltax2=price2num($txlocaltax2);
|
||||
$remise_percent=price2num($remise_percent);
|
||||
@ -1407,21 +1409,21 @@ class Contrat extends CommonObject
|
||||
// Check parameters
|
||||
if (empty($remise_percent)) $remise_percent=0;
|
||||
|
||||
$localtaxes_type=getLocalTaxesFromRate($txtva, 0, $this->societe, $mysoc);
|
||||
|
||||
// Clean vat code
|
||||
$vat_src_code='';
|
||||
if (preg_match('/\((.*)\)/', $txtva, $reg))
|
||||
{
|
||||
$vat_src_code = $reg[1];
|
||||
$txtva = preg_replace('/\s*\(.*\)/', '', $txtva); // Remove code into vatrate.
|
||||
}
|
||||
|
||||
// Calcul du total TTC et de la TVA pour la ligne a partir de
|
||||
// qty, pu, remise_percent et txtva
|
||||
// TRES IMPORTANT: C'est au moment de l'insertion ligne qu'on doit stocker
|
||||
// la part ht, tva et ttc, et ce au niveau de la ligne qui a son propre taux tva.
|
||||
|
||||
$localtaxes_type=getLocalTaxesFromRate($txtva, 0, $this->societe, $mysoc);
|
||||
|
||||
// Clean vat code
|
||||
$vat_src_code='';
|
||||
if (preg_match('/\((.*)\)/', $txtva, $reg))
|
||||
{
|
||||
$vat_src_code = $reg[1];
|
||||
$txtva = preg_replace('/\s*\(.*\)/', '', $txtva); // Remove code into vatrate.
|
||||
}
|
||||
|
||||
$tabprice=calcul_price_total($qty, $pu, $remise_percent, $txtva, $txlocaltax1, $txlocaltax2, 0, $price_base_type, $info_bits, 1,$mysoc, $localtaxes_type);
|
||||
$total_ht = $tabprice[0];
|
||||
$total_tva = $tabprice[1];
|
||||
|
||||
@ -179,7 +179,7 @@ if ($type == 'directory')
|
||||
$sorting = (strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC);
|
||||
|
||||
// Right area. If module is defined here, we are in automatic ecm.
|
||||
$automodules = array('company', 'invoice', 'invoice_supplier', 'propal', 'supplier_proposal', 'order', 'order_supplier', 'contract', 'product', 'tax', 'project', 'fichinter', 'user', 'expensereport');
|
||||
$automodules = array('company', 'invoice', 'invoice_supplier', 'propal', 'supplier_proposal', 'order', 'order_supplier', 'contract', 'product', 'tax', 'project', 'fichinter', 'user', 'expensereport', 'holiday');
|
||||
|
||||
// TODO change for multicompany sharing
|
||||
// Auto area for suppliers invoices
|
||||
@ -210,6 +210,8 @@ if ($type == 'directory')
|
||||
else if ($module == 'user') $upload_dir = $conf->user->dir_output;
|
||||
// Auto area for expense report
|
||||
else if ($module == 'expensereport') $upload_dir = $conf->expensereport->dir_output;
|
||||
// Auto area for holiday
|
||||
else if ($module == 'holiday') $upload_dir = $conf->holiday->dir_output;
|
||||
|
||||
// Automatic list
|
||||
if (in_array($module, $automodules))
|
||||
|
||||
@ -1028,7 +1028,7 @@ abstract class CommonDocGenerator
|
||||
if(empty($columnText)) return;
|
||||
$pdf->SetXY($this->getColumnContentXStart($colKey),$curY); // Set curent position
|
||||
$colDef = $this->cols[$colKey];
|
||||
$pdf->MultiCell( $this->getColumnContentWidth($colKey),2, $columnText,'',$colDef['content']['align']);
|
||||
$pdf->writeHTMLCell( $this->getColumnContentWidth($colKey),2,$this->getColumnContentXStart($colKey),$curY, $columnText,'',$colDef['content']['align']);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -620,14 +620,10 @@ abstract class CommonObject
|
||||
{
|
||||
if ($this->skype) $out.=dol_print_socialnetworks($this->skype,$this->id,$object->id,'skype');
|
||||
$outdone++;
|
||||
}
|
||||
if (! empty($conf->socialnetworks->enabled))
|
||||
{
|
||||
if ($this->jabberid) $out.=dol_print_socialnetworks($this->jabberid,$this->id,$object->id,'jabber');
|
||||
$outdone++;
|
||||
if ($this->twitter) $out.=dol_print_socialnetworks($this->twitter,$this->id,$object->id,'twitter');
|
||||
$outdone++;
|
||||
}
|
||||
if (! empty($conf->socialnetworks->enabled))
|
||||
{
|
||||
if ($this->facebook) $out.=dol_print_socialnetworks($this->facebook,$this->id,$object->id,'facebook');
|
||||
$outdone++;
|
||||
}
|
||||
|
||||
@ -428,10 +428,11 @@ class Conf
|
||||
$this->global->MAIN_MAIL_USE_MULTI_PART=1;
|
||||
|
||||
// societe
|
||||
if (empty($this->global->SOCIETE_CODECLIENT_ADDON)) $this->global->SOCIETE_CODECLIENT_ADDON="mod_codeclient_leopard";
|
||||
if (empty($this->global->SOCIETE_CODECOMPTA_ADDON)) $this->global->SOCIETE_CODECOMPTA_ADDON="mod_codecompta_panicum";
|
||||
if (empty($this->global->SOCIETE_CODECLIENT_ADDON)) $this->global->SOCIETE_CODECLIENT_ADDON="mod_codeclient_leopard";
|
||||
if (empty($this->global->SOCIETE_CODECOMPTA_ADDON)) $this->global->SOCIETE_CODECOMPTA_ADDON="mod_codecompta_panicum";
|
||||
|
||||
if (empty($this->global->CHEQUERECEIPTS_ADDON)) $this->global->CHEQUERECEIPTS_ADDON='mod_chequereceipt_mint';
|
||||
if (empty($this->global->CHEQUERECEIPTS_ADDON)) $this->global->CHEQUERECEIPTS_ADDON='mod_chequereceipt_mint';
|
||||
if (empty($conf->global->TICKETSUP_ADDON)) $this->global->TICKETSUP_ADDON='mod_ticket_simple';
|
||||
|
||||
// Security
|
||||
if (empty($this->global->USER_PASSWORD_GENERATED)) $this->global->USER_PASSWORD_GENERATED='standard'; // Default password generator
|
||||
|
||||
@ -76,9 +76,9 @@ class Events // extends CommonObject
|
||||
|
||||
// List of all Audit/Security events supported by triggers
|
||||
public $eventstolog=array(
|
||||
/*array('id'=>'USER_LOGIN', 'test'=>1),
|
||||
array('id'=>'USER_LOGIN', 'test'=>1),
|
||||
array('id'=>'USER_LOGIN_FAILED', 'test'=>1),
|
||||
array('id'=>'USER_LOGOUT', 'test'=>1),*/
|
||||
array('id'=>'USER_LOGOUT', 'test'=>1),
|
||||
array('id'=>'USER_CREATE', 'test'=>1),
|
||||
array('id'=>'USER_MODIFY', 'test'=>1),
|
||||
array('id'=>'USER_NEW_PASSWORD', 'test'=>1),
|
||||
|
||||
@ -18,7 +18,8 @@
|
||||
* Copyright (C) 2014 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||
* Copyright (C) 2018 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||
* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||
* Copyright (C) 2018 Josep Lluis Amador <joseplluis@lliuretic.cat>
|
||||
*
|
||||
* 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
|
||||
@ -993,7 +994,7 @@ class Form
|
||||
|
||||
$this->load_cache_types_fees();
|
||||
|
||||
print '<select class="flat" name="'.$htmlname.'">';
|
||||
print '<select id="select_'.$htmlname.'" class="flat" name="'.$htmlname.'">';
|
||||
if ($showempty)
|
||||
{
|
||||
print '<option value="-1"';
|
||||
@ -1310,7 +1311,7 @@ class Form
|
||||
$resql=$this->db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
print '<select class="flat maxwidthonsmartphone" name="'.$htmlname.'">';
|
||||
print '<select id="select_'.$htmlname.'" class="flat maxwidthonsmartphone" name="'.$htmlname.'">';
|
||||
$num = $this->db->num_rows($resql);
|
||||
|
||||
$qualifiedlines=$num;
|
||||
@ -2788,7 +2789,7 @@ class Form
|
||||
{
|
||||
$num = $this->db->num_rows($result);
|
||||
|
||||
$form = '<select class="flat" name="'.$htmlname.'">';
|
||||
$form = '<select class="flat" id="select_'.$htmlname.'" name="'.$htmlname.'">';
|
||||
|
||||
if (! $num)
|
||||
{
|
||||
@ -2889,7 +2890,7 @@ class Form
|
||||
$resql=$this->db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
print '<select class="flat" name="'.$htmlname.'">';
|
||||
print '<select class="flat" id="select_'.$htmlname.'" name="'.$htmlname.'">';
|
||||
if ($showempty) print '<option value="0"> </option>';
|
||||
$num = $this->db->num_rows($resql);
|
||||
$i = 0;
|
||||
@ -3119,7 +3120,7 @@ class Form
|
||||
|
||||
$this->loadCacheInputReason();
|
||||
|
||||
print '<select class="flat" name="'.$htmlname.'">';
|
||||
print '<select class="flat" id="select_'.$htmlname.'" name="'.$htmlname.'">';
|
||||
if ($addempty) print '<option value="0"'.(empty($selected)?' selected':'').'> </option>';
|
||||
foreach($this->cache_demand_reason as $id => $arraydemandreason)
|
||||
{
|
||||
@ -3316,7 +3317,7 @@ class Form
|
||||
|
||||
$return='';
|
||||
|
||||
$return.= '<select class="flat" name="'.$htmlname.'">';
|
||||
$return.= '<select class="flat" id="select_'.$htmlname.'" name="'.$htmlname.'">';
|
||||
$options = array(
|
||||
'HT'=>$langs->trans("HT"),
|
||||
'TTC'=>$langs->trans("TTC")
|
||||
@ -5398,7 +5399,7 @@ class Form
|
||||
|
||||
if ($typehour=='select' )
|
||||
{
|
||||
$retstring.='<select class="flat" name="'.$prefix.'hour"'.($disabled?' disabled':'').'>';
|
||||
$retstring.='<select class="flat" id="select_'.$prefix.'hour" name="'.$prefix.'hour"'.($disabled?' disabled':'').'>';
|
||||
for ($hour = 0; $hour < 25; $hour++) // For a duration, we allow 24 hours
|
||||
{
|
||||
$retstring.='<option value="'.$hour.'"';
|
||||
@ -5425,7 +5426,7 @@ class Form
|
||||
|
||||
if ($typehour=='select' || $typehour=='textselect')
|
||||
{
|
||||
$retstring.='<select class="flat" name="'.$prefix.'min"'.($disabled?' disabled':'').'>';
|
||||
$retstring.='<select class="flat" id="select_'.$prefix.'min" name="'.$prefix.'min"'.($disabled?' disabled':'').'>';
|
||||
for ($min = 0; $min <= 55; $min=$min+5)
|
||||
{
|
||||
$retstring.='<option value="'.$min.'"';
|
||||
@ -6605,7 +6606,7 @@ class Form
|
||||
$result = $this->db->query($sql);
|
||||
if ($result)
|
||||
{
|
||||
print '<select class="flat" name="'.$htmlname.'">';
|
||||
print '<select class="flat" id="select_'.$htmlname.'" name="'.$htmlname.'">';
|
||||
if ($useempty)
|
||||
{
|
||||
print '<option value="-1"> </option>';
|
||||
@ -6861,10 +6862,10 @@ class Form
|
||||
$dir=$conf->user->dir_output;
|
||||
if (! empty($object->photo))
|
||||
{
|
||||
if ((string) $imagesize == 'mini') $file=get_exdir($id, 2, 0, 0, $object, 'user').getImageFileNameForSize($object->photo, '_mini');
|
||||
else if ((string) $imagesize == 'small') $file=get_exdir($id, 2, 0, 0, $object, 'user').getImageFileNameForSize($object->photo, '_small');
|
||||
else $file=get_exdir($id, 2, 0, 0, $object, 'user').$object->photo;
|
||||
$originalfile=get_exdir($id, 2, 0, 0, $object, 'user').$object->photo;
|
||||
if ((string) $imagesize == 'mini') $file=get_exdir(0, 0, 0, 0, $object, 'user').$object->id.'/'.getImageFileNameForSize($object->photo, '_mini');
|
||||
else if ((string) $imagesize == 'small') $file=get_exdir(0, 0, 0, 0, $object, 'user').$object->id.'/'.getImageFileNameForSize($object->photo, '_small');
|
||||
else $file=get_exdir(0, 0, 0, 0, $object, 'user').'/'.$object->id.'/'.$object->photo;
|
||||
$originalfile=get_exdir(0, 0, 0, 0, $object, 'user').'/'.$object->id.'/'.$object->photo;
|
||||
}
|
||||
if (! empty($conf->global->MAIN_OLD_IMAGE_LINKS)) $altfile=$object->id.".jpg"; // For backward compatibility
|
||||
$email=$object->email;
|
||||
@ -7170,7 +7171,7 @@ class Form
|
||||
$resql = $db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
$out = '<select name="'.$htmlname.'" class="'.$htmlname.' flat minwidth75imp">';
|
||||
$out = '<select id="select_'.$htmlname.'" name="'.$htmlname.'" class="'.$htmlname.' flat minwidth75imp">';
|
||||
if ($useempty) $out.= '<option value="0"> </option>';
|
||||
|
||||
while ($obj = $db->fetch_object($resql))
|
||||
@ -7257,7 +7258,7 @@ class Form
|
||||
$resql = $db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
$out = '<select name="'.$htmlname.'" class="'.$htmlname.' flat minwidth75imp">';
|
||||
$out = '<select id="select_'.$htmlname.'" name="'.$htmlname.'" class="'.$htmlname.' flat minwidth75imp">';
|
||||
if ($useempty) $out.= '<option value="0"></option>';
|
||||
|
||||
while ($obj = $db->fetch_object($resql))
|
||||
@ -7294,7 +7295,7 @@ class Form
|
||||
$resql = $db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
$out = '<select name="'.$htmlname.'" class="'.$htmlname.' flat minwidth75imp">';
|
||||
$out = '<select id="select_'.$htmlname.'" name="'.$htmlname.'" class="'.$htmlname.' flat minwidth75imp">';
|
||||
if ($useempty) $out.= '<option value="0"></option>';
|
||||
if ($allchoice) $out.= '<option value="-1">'.$langs->trans('AllExpenseReport').'</option>';
|
||||
|
||||
|
||||
@ -66,7 +66,7 @@ class FormBarCode
|
||||
|
||||
$disable = '';
|
||||
|
||||
if ($conf->use_javascript_ajax)
|
||||
if (!empty($conf->use_javascript_ajax))
|
||||
{
|
||||
print "\n".'<script type="text/javascript" language="javascript">';
|
||||
print 'jQuery(document).ready(function () {
|
||||
@ -86,19 +86,29 @@ class FormBarCode
|
||||
{
|
||||
$disable = 'disabled';
|
||||
}
|
||||
|
||||
$select_encoder = '<form action="'.DOL_URL_ROOT.'/admin/barcode.php" method="post" id="form'.$idForm.'">';
|
||||
$select_encoder.= '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
$select_encoder.= '<input type="hidden" name="action" value="update">';
|
||||
$select_encoder.= '<input type="hidden" name="code_id" value="'.$code_id.'">';
|
||||
$select_encoder.= '<select id="select'.$idForm.'" class="flat" name="coder">';
|
||||
|
||||
if (!empty($conf->use_javascript_ajax))
|
||||
{
|
||||
$select_encoder = '<form action="'.DOL_URL_ROOT.'/admin/barcode.php" method="POST" id="form'.$idForm.'">';
|
||||
$select_encoder.= '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
$select_encoder.= '<input type="hidden" name="action" value="update">';
|
||||
$select_encoder.= '<input type="hidden" name="code_id" value="'.$code_id.'">';
|
||||
}
|
||||
|
||||
$selectname=(!empty($conf->use_javascript_ajax)?'coder':'coder'.$code_id);
|
||||
$select_encoder.= '<select id="select'.$idForm.'" class="flat" name="'.$selectname.'">';
|
||||
$select_encoder.= '<option value="0"'.($selected==0?' selected':'').' '.$disable.'>'.$langs->trans('Disable').'</option>';
|
||||
$select_encoder.= '<option value="-1" disabled>--------------------</option>';
|
||||
foreach($barcodelist as $key => $value)
|
||||
{
|
||||
$select_encoder.= '<option value="'.$key.'"'.($selected==$key?' selected':'').'>'.$value.'</option>';
|
||||
}
|
||||
$select_encoder.= '</select></form>';
|
||||
$select_encoder.= '</select>';
|
||||
|
||||
if (!empty($conf->use_javascript_ajax))
|
||||
{
|
||||
$select_encoder.= '</form>';
|
||||
}
|
||||
|
||||
return $select_encoder;
|
||||
}
|
||||
|
||||
@ -1510,6 +1510,11 @@ class FormFile
|
||||
include_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport.class.php';
|
||||
$object_instance=new ExpenseReport($this->db);
|
||||
}
|
||||
else if ($modulepart == 'holiday')
|
||||
{
|
||||
include_once DOL_DOCUMENT_ROOT.'/holiday/class/holiday.class.php';
|
||||
$object_instance=new Holiday($this->db);
|
||||
}
|
||||
|
||||
foreach($filearray as $key => $file)
|
||||
{
|
||||
@ -1539,7 +1544,8 @@ class FormFile
|
||||
if ($modulepart == 'project') { preg_match('/(.*)\/[^\/]+$/',$relativefile,$reg); $ref=(isset($reg[1])?$reg[1]:'');}
|
||||
if ($modulepart == 'fichinter') { preg_match('/(.*)\/[^\/]+$/',$relativefile,$reg); $ref=(isset($reg[1])?$reg[1]:'');}
|
||||
if ($modulepart == 'user') { preg_match('/(.*)\/[^\/]+$/',$relativefile,$reg); $id=(isset($reg[1])?$reg[1]:'');}
|
||||
if ($modulepart == 'expensereport') { preg_match('/(.*)\/[^\/]+$/',$relativefile,$reg); $id=(isset($reg[1])?$reg[1]:'');}
|
||||
if ($modulepart == 'expensereport') { preg_match('/(.*)\/[^\/]+$/',$relativefile,$reg); $ref=(isset($reg[1])?$reg[1]:'');}
|
||||
if ($modulepart == 'holiday') { preg_match('/(.*)\/[^\/]+$/',$relativefile,$reg); $id=(isset($reg[1])?$reg[1]:'');}
|
||||
|
||||
if (! $id && ! $ref) continue;
|
||||
$found=0;
|
||||
|
||||
@ -334,7 +334,7 @@ class FormProjets
|
||||
$out='';
|
||||
|
||||
$hideunselectables = false;
|
||||
if (! empty($conf->global->CONTRACT_HIDE_UNSELECTABLES)) $hideunselectables = true;
|
||||
if (! empty($conf->global->PROJECT_HIDE_UNSELECTABLES)) $hideunselectables = true;
|
||||
|
||||
if (empty($projectsListId))
|
||||
{
|
||||
@ -346,11 +346,11 @@ class FormProjets
|
||||
}
|
||||
|
||||
// Search all projects
|
||||
$sql = 'SELECT t.rowid, t.ref as tref, t.label as tlabel, p.ref, p.title, p.fk_soc, p.fk_statut, p.public,';
|
||||
$sql = 'SELECT t.rowid, t.ref as tref, t.label as tlabel, p.rowid as pid, p.ref, p.title, p.fk_soc, p.fk_statut, p.public,';
|
||||
$sql.= ' s.nom as name';
|
||||
$sql.= ' FROM '.MAIN_DB_PREFIX .'projet as p';
|
||||
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'societe as s ON s.rowid = p.fk_soc';
|
||||
$sql.= ', '.MAIN_DB_PREFIX.'projet_task as t';
|
||||
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'societe as s ON s.rowid = p.fk_soc,';
|
||||
$sql.= ' '.MAIN_DB_PREFIX.'projet_task as t';
|
||||
$sql.= " WHERE p.entity IN (".getEntity('project').")";
|
||||
$sql.= " AND t.fk_projet = p.rowid";
|
||||
if ($projectsListId) $sql.= " AND p.rowid IN (".$projectsListId.")";
|
||||
@ -393,7 +393,7 @@ class FormProjets
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($discard_closed == 1 && $obj->fk_statut == 2)
|
||||
if ($discard_closed == 1 && $obj->fk_statut == Project::STATUS_CLOSED)
|
||||
{
|
||||
$i++;
|
||||
continue;
|
||||
@ -411,12 +411,12 @@ class FormProjets
|
||||
if ($obj->name) $labeltoshow.=' ('.$obj->name.')';
|
||||
|
||||
$disabled=0;
|
||||
if ($obj->fk_statut == 0)
|
||||
if ($obj->fk_statut == Project::STATUS_DRAFT)
|
||||
{
|
||||
$disabled=1;
|
||||
$labeltoshow.=' - '.$langs->trans("Draft");
|
||||
}
|
||||
else if ($obj->fk_statut == 2)
|
||||
else if ($obj->fk_statut == Project::STATUS_CLOSED)
|
||||
{
|
||||
if ($discard_closed == 2) $disabled=1;
|
||||
$labeltoshow.=' - '.$langs->trans("Closed");
|
||||
|
||||
@ -589,7 +589,6 @@ class Menubase
|
||||
|
||||
$a = 0;
|
||||
$b = 0;
|
||||
$oldrowid=0;
|
||||
while ($a < $numa)
|
||||
{
|
||||
//$objm = $this->db->fetch_object($resql);
|
||||
|
||||
@ -377,7 +377,7 @@ function ajax_combobox($htmlname, $events=array(), $minLengthToAutocomplete=0, $
|
||||
|
||||
// select2 disabled for smartphones with standard browser.
|
||||
// TODO With select2 v4, it seems ok, except that responsive style on table become crazy when scrolling at end of array)
|
||||
if ($conf->browser->layout == 'phone') return '';
|
||||
if (! empty($conf->browser->layout) && $conf->browser->layout == 'phone') return '';
|
||||
|
||||
if (! empty($conf->global->MAIN_DISABLE_AJAX_COMBOX)) return '';
|
||||
if (empty($conf->use_javascript_ajax)) return '';
|
||||
|
||||
@ -1286,8 +1286,8 @@ function show_actions_todo($conf,$langs,$db,$filterobj,$objcon='',$noprint=0,$ac
|
||||
* @param Conf $conf Object conf
|
||||
* @param Translate $langs Object langs
|
||||
* @param DoliDB $db Object db
|
||||
* @param mixed $filterobj Object Adherent|Societe|Project|Product|CommandeFournisseur|Dolresource
|
||||
* @param Contact $objcon Object contact
|
||||
* @param mixed $filterobj Filter on object Adherent|Societe|Project|Product|CommandeFournisseur|Dolresource|Ticket|... to list events linked to an object
|
||||
* @param Contact $objcon Filter on object contact to filter events on a contact
|
||||
* @param int $noprint Return string but does not output it
|
||||
* @param string $actioncode Filter on actioncode
|
||||
* @param string $donetodo Filter on event 'done' or 'todo' or ''=nofilter (all).
|
||||
@ -1295,11 +1295,10 @@ function show_actions_todo($conf,$langs,$db,$filterobj,$objcon='',$noprint=0,$ac
|
||||
* @param string $sortfield Sort field
|
||||
* @param string $sortorder Sort order
|
||||
* @return mixed Return html part or void if noprint is 1
|
||||
* TODO change function to be able to list event linked to an object.
|
||||
*/
|
||||
function show_actions_done($conf, $langs, $db, $filterobj, $objcon='', $noprint=0, $actioncode='', $donetodo='done', $filters=array(), $sortfield='a.datep,a.id', $sortorder='DESC')
|
||||
{
|
||||
global $user,$conf;
|
||||
global $user, $conf;
|
||||
global $form;
|
||||
|
||||
global $param;
|
||||
@ -1317,14 +1316,14 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon='', $noprint=
|
||||
if (! empty($conf->agenda->enabled))
|
||||
{
|
||||
// Recherche histo sur actioncomm
|
||||
if (is_object($objcon) && $objcon->id) {
|
||||
$sql = "SELECT DISTINCT a.id, a.label,";
|
||||
}
|
||||
else
|
||||
{
|
||||
$sql = "SELECT a.id, a.label,";
|
||||
}
|
||||
$sql.= " a.datep as dp,";
|
||||
if (is_object($objcon) && $objcon->id) {
|
||||
$sql = "SELECT DISTINCT a.id, a.label,";
|
||||
}
|
||||
else
|
||||
{
|
||||
$sql = "SELECT a.id, a.label,";
|
||||
}
|
||||
$sql.= " a.datep as dp,";
|
||||
$sql.= " a.datep2 as dp2,";
|
||||
$sql.= " a.note, a.percent,";
|
||||
$sql.= " a.fk_element, a.elementtype,";
|
||||
@ -1333,8 +1332,8 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon='', $noprint=
|
||||
$sql.= " u.rowid as user_id, u.login as user_login, u.photo as user_photo, u.firstname as user_firstname, u.lastname as user_lastname";
|
||||
if (is_object($filterobj) && get_class($filterobj) == 'Societe') $sql.= ", sp.lastname, sp.firstname";
|
||||
elseif (is_object($filterobj) && get_class($filterobj) == 'Adherent') $sql.= ", m.lastname, m.firstname";
|
||||
elseif (is_object($filterobj) && get_class($filterobj) == 'CommandeFournisseur') $sql.= ", o.ref";
|
||||
elseif (is_object($filterobj) && get_class($filterobj) == 'Product') $sql.= ", o.ref";
|
||||
elseif (is_object($filterobj) && get_class($filterobj) == 'Facture') $sql.= ", o.ref";
|
||||
else $sql.= ", o.ref";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."actioncomm as a";
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."user as u on u.rowid = a.fk_user_action";
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_actioncomm as c ON a.fk_action = c.id";
|
||||
@ -1353,6 +1352,7 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon='', $noprint=
|
||||
elseif (is_object($filterobj) && get_class($filterobj) == 'Adherent') $sql.= ", ".MAIN_DB_PREFIX."adherent as m";
|
||||
elseif (is_object($filterobj) && get_class($filterobj) == 'CommandeFournisseur') $sql.= ", ".MAIN_DB_PREFIX."commande_fournisseur as o";
|
||||
elseif (is_object($filterobj) && get_class($filterobj) == 'Product') $sql.= ", ".MAIN_DB_PREFIX."product as o";
|
||||
elseif (is_object($filterobj) && get_class($filterobj) == 'Ticket') $sql.= ", ".MAIN_DB_PREFIX."ticket as o";
|
||||
|
||||
$sql.= " WHERE a.entity IN (".getEntity('agenda').")";
|
||||
if (is_object($filterobj) && in_array(get_class($filterobj), array('Societe', 'Client', 'Fournisseur')) && $filterobj->id) $sql.= " AND a.fk_soc = ".$filterobj->id;
|
||||
@ -1372,6 +1372,11 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon='', $noprint=
|
||||
$sql.= " AND a.fk_element = o.rowid AND a.elementtype = 'product'";
|
||||
if ($filterobj->id) $sql.= " AND a.fk_element = ".$filterobj->id;
|
||||
}
|
||||
elseif (is_object($filterobj) && get_class($filterobj) == 'Ticket')
|
||||
{
|
||||
$sql.= " AND a.fk_element = o.rowid AND a.elementtype = 'ticket'";
|
||||
if ($filterobj->id) $sql.= " AND a.fk_element = ".$filterobj->id;
|
||||
}
|
||||
|
||||
// Work with new table actioncomm_resources and multiple contact affectation.
|
||||
if (is_object($objcon) && $objcon->id)
|
||||
@ -1403,8 +1408,8 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon='', $noprint=
|
||||
if ($donetodo == 'todo') $sql.= " AND ((a.percent >= 0 AND a.percent < 100) OR (a.percent = -1 AND a.datep > '".$db->idate($now)."'))";
|
||||
elseif ($donetodo == 'done') $sql.= " AND (a.percent = 100 OR (a.percent = -1 AND a.datep <= '".$db->idate($now)."'))";
|
||||
if (is_array($filters) && $filters['search_agenda_label']) $sql.= natural_search('a.label', $filters['search_agenda_label']);
|
||||
|
||||
//TODO Add limit for thirdparty in contexte very all result
|
||||
|
||||
//TODO Add limit for thirdparty in contexte very all result
|
||||
$sql.= $db->order($sortfield, $sortorder);
|
||||
dol_syslog("company.lib::show_actions_done", LOG_DEBUG);
|
||||
$resql=$db->query($sql);
|
||||
|
||||
@ -3010,7 +3010,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
|
||||
if (empty($srconly) && in_array($pictowithoutext, array(
|
||||
'bank', 'close_title', 'delete', 'edit', 'ellipsis-h', 'filter', 'grip', 'grip_title', 'list', 'listlight', 'off', 'on', 'play', 'playdisabled', 'printer', 'resize',
|
||||
'note','switch_off', 'switch_on', 'unlink', 'uparrow', '1downarrow', '1uparrow',
|
||||
'skype','twitter','facebook'
|
||||
'jabber','skype','twitter','facebook'
|
||||
)
|
||||
)) {
|
||||
$fakey = $pictowithoutext;
|
||||
@ -3093,10 +3093,14 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
|
||||
elseif ($pictowithoutext == 'playdisabled') {
|
||||
$fakey = 'fa-play';
|
||||
$facolor = '#ccc';
|
||||
} elseif ($pictowithoutext == 'play') {
|
||||
}
|
||||
elseif ($pictowithoutext == 'play') {
|
||||
$fakey = 'fa-play';
|
||||
$facolor = '#444';
|
||||
}
|
||||
elseif ($pictowithoutext == 'jabber') {
|
||||
$fakey = 'fa-comment-o';
|
||||
}
|
||||
else {
|
||||
$fakey = 'fa-'.$pictowithoutext;
|
||||
$facolor = '#444';
|
||||
@ -4816,7 +4820,7 @@ function getLocalTaxesFromRate($vatrate, $local, $buyer, $seller, $firstparamisi
|
||||
{
|
||||
$vatratecleaned = $vatrate;
|
||||
$vatratecode = '';
|
||||
if (preg_match('/^(.*)\s*\((.*)\)$/', $vatrate, $reg)) // If vat is "xx (yy)"
|
||||
if (preg_match('/^(.*)\s*\((.*)\)$/', $vatrate, $reg)) // If vat is "x.x (yy)"
|
||||
{
|
||||
$vatratecleaned = $reg[1];
|
||||
$vatratecode = $reg[2];
|
||||
|
||||
@ -728,7 +728,7 @@ function pdf_bank(&$pdf,$outputlangs,$curx,$cury,$account,$onlynumber=0,$default
|
||||
$cury+=3;
|
||||
}
|
||||
|
||||
if (empty($conf->global->PDF_BANK_HIDE_NUMBER_SHOW_ONLY_BICIBAN)) // Note that some countries still need bank number, BIC/IBAN not enought for them
|
||||
if (empty($conf->global->PDF_BANK_HIDE_NUMBER_SHOW_ONLY_BICIBAN)) // Note that some countries still need bank number, BIC/IBAN not enougth for them
|
||||
{
|
||||
// Note:
|
||||
// bank = code_banque (FR), sort code (GB, IR. Example: 12-34-56)
|
||||
@ -1347,6 +1347,7 @@ function pdf_getlinedesc($object,$i,$outputlangs,$hideref=0,$hidedesc=0,$issuppl
|
||||
if (! empty($libelleproduitservice) && ! empty($ref_prodserv)) $ref_prodserv .= " - ";
|
||||
}
|
||||
|
||||
if(!empty($ref_prodserv) && !empty($conf->global->ADD_HTML_FORMATING_INTO_DESC_DOC)){ $ref_prodserv = '<b>'.$ref_prodserv.'</b>'; }
|
||||
$libelleproduitservice=$prefix_prodserv.$ref_prodserv.$libelleproduitservice;
|
||||
|
||||
// Add an additional description for the category products
|
||||
@ -1382,7 +1383,11 @@ function pdf_getlinedesc($object,$i,$outputlangs,$hideref=0,$hidedesc=0,$issuppl
|
||||
$period='('.$outputlangs->transnoentitiesnoconv('DateUntil',dol_print_date($object->lines[$i]->date_end, $format, false, $outputlangs)).')';
|
||||
}
|
||||
//print '>'.$outputlangs->charset_output.','.$period;
|
||||
if(!empty($conf->global->ADD_HTML_FORMATING_INTO_DESC_DOC)){
|
||||
$libelleproduitservice.= '<b style="color:#333666;" ><em>'."__N__</b> ".$period.'</em>';
|
||||
}else{
|
||||
$libelleproduitservice.="__N__".$period;
|
||||
}
|
||||
//print $libelleproduitservice;
|
||||
}
|
||||
|
||||
|
||||
@ -52,9 +52,44 @@ function project_prepare_head($object)
|
||||
$head[$h][2] = 'contact';
|
||||
$h++;
|
||||
|
||||
if (empty($conf->global->PROJECT_HIDE_TASKS))
|
||||
{
|
||||
// Then tab for sub level of projet, i mean tasks
|
||||
$head[$h][0] = DOL_URL_ROOT.'/projet/tasks.php?id='.$object->id;
|
||||
$head[$h][1] = $langs->trans("Tasks");
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/projet/class/task.class.php';
|
||||
$taskstatic=new Task($db);
|
||||
$nbTasks=count($taskstatic->getTasksArray(0, 0, $object->id, 0, 0));
|
||||
if ($nbTasks > 0) $head[$h][1].= ' <span class="badge">'.($nbTasks).'</span>';
|
||||
$head[$h][2] = 'tasks';
|
||||
$h++;
|
||||
|
||||
$nbTimeSpent=0;
|
||||
$sql = "SELECT t.rowid";
|
||||
//$sql .= " FROM ".MAIN_DB_PREFIX."projet_task_time as t, ".MAIN_DB_PREFIX."projet_task as pt, ".MAIN_DB_PREFIX."user as u";
|
||||
//$sql .= " WHERE t.fk_user = u.rowid AND t.fk_task = pt.rowid";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."projet_task_time as t, ".MAIN_DB_PREFIX."projet_task as pt";
|
||||
$sql .= " WHERE t.fk_task = pt.rowid";
|
||||
$sql .= " AND pt.fk_projet =".$object->id;
|
||||
$resql = $db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
$obj = $db->fetch_object($resql);
|
||||
if ($obj) $nbTimeSpent=1;
|
||||
}
|
||||
else dol_print_error($db);
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT.'/projet/tasks/time.php?withproject=1&projectid='.$object->id;
|
||||
$head[$h][1] = $langs->trans("TimeSpent");
|
||||
if ($nbTimeSpent > 0) $head[$h][1].= ' <span class="badge">...</span>';
|
||||
$head[$h][2] = 'timespent';
|
||||
$h++;
|
||||
}
|
||||
|
||||
if (! empty($conf->fournisseur->enabled) || ! empty($conf->propal->enabled) || ! empty($conf->commande->enabled)
|
||||
|| ! empty($conf->facture->enabled) || ! empty($conf->contrat->enabled)
|
||||
|| ! empty($conf->ficheinter->enabled) || ! empty($conf->agenda->enabled) || ! empty($conf->deplacement->enabled))
|
||||
|| ! empty($conf->facture->enabled) || ! empty($conf->contrat->enabled)
|
||||
|| ! empty($conf->ficheinter->enabled) || ! empty($conf->agenda->enabled) || ! empty($conf->deplacement->enabled))
|
||||
{
|
||||
$head[$h][0] = DOL_URL_ROOT.'/projet/element.php?id='.$object->id;
|
||||
$head[$h][1] = $langs->trans("ProjectOverview");
|
||||
@ -92,41 +127,6 @@ function project_prepare_head($object)
|
||||
$head[$h][2] = 'document';
|
||||
$h++;
|
||||
|
||||
if (empty($conf->global->PROJECT_HIDE_TASKS))
|
||||
{
|
||||
// Then tab for sub level of projet, i mean tasks
|
||||
$head[$h][0] = DOL_URL_ROOT.'/projet/tasks.php?id='.$object->id;
|
||||
$head[$h][1] = $langs->trans("Tasks");
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/projet/class/task.class.php';
|
||||
$taskstatic=new Task($db);
|
||||
$nbTasks=count($taskstatic->getTasksArray(0, 0, $object->id, 0, 0));
|
||||
if ($nbTasks > 0) $head[$h][1].= ' <span class="badge">'.($nbTasks).'</span>';
|
||||
$head[$h][2] = 'tasks';
|
||||
$h++;
|
||||
|
||||
$nbTimeSpent=0;
|
||||
$sql = "SELECT t.rowid";
|
||||
//$sql .= " FROM ".MAIN_DB_PREFIX."projet_task_time as t, ".MAIN_DB_PREFIX."projet_task as pt, ".MAIN_DB_PREFIX."user as u";
|
||||
//$sql .= " WHERE t.fk_user = u.rowid AND t.fk_task = pt.rowid";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."projet_task_time as t, ".MAIN_DB_PREFIX."projet_task as pt";
|
||||
$sql .= " WHERE t.fk_task = pt.rowid";
|
||||
$sql .= " AND pt.fk_projet =".$object->id;
|
||||
$resql = $db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
$obj = $db->fetch_object($resql);
|
||||
if ($obj) $nbTimeSpent=1;
|
||||
}
|
||||
else dol_print_error($db);
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT.'/projet/tasks/time.php?withproject=1&projectid='.$object->id;
|
||||
$head[$h][1] = $langs->trans("TimeSpent");
|
||||
if ($nbTimeSpent > 0) $head[$h][1].= ' <span class="badge">...</span>';
|
||||
$head[$h][2] = 'timespent';
|
||||
$h++;
|
||||
}
|
||||
|
||||
// Manage discussion
|
||||
if (!empty($conf->global->PROJECT_ALLOW_COMMENT_ON_PROJECT))
|
||||
{
|
||||
@ -1205,7 +1205,7 @@ function projectLinesPerWeek(&$inc, $firstdaytoshow, $fuser, $parent, $lines, &$
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
// Break on a new project
|
||||
if ($parent == 0 && $lines[$i]->fk_project != $lastprojectid)
|
||||
{
|
||||
|
||||
@ -142,7 +142,7 @@ function dol_hash($chain, $type='0')
|
||||
* If constant MAIN_SECURITY_HASH_ALGO is defined, we use this function as hashing function.
|
||||
* If constant MAIN_SECURITY_SALT is defined, we use it as a salt.
|
||||
*
|
||||
* @param string $chain String to hash
|
||||
* @param string $chain String to hash (not hashed string)
|
||||
* @param string $hash hash to compare
|
||||
* @param string $type Type of hash ('0':auto, '1':sha1, '2':sha1+md5, '3':md5, '4':md5 for OpenLdap, '5':sha256). Use '3' here, if hash is not needed for security purpose, for security need, prefer '0'.
|
||||
* @return bool True if the computed hash is the same as the given one
|
||||
|
||||
@ -103,7 +103,7 @@ function ticket_prepare_head($object)
|
||||
|
||||
|
||||
// History
|
||||
$head[$h][0] = DOL_URL_ROOT.'/ticket/history.php?track_id=' . $object->track_id;
|
||||
$head[$h][0] = DOL_URL_ROOT.'/ticket/agenda.php?track_id=' . $object->track_id;
|
||||
$head[$h][1] = $langs->trans('Events');
|
||||
if (! empty($conf->agenda->enabled) && (!empty($user->rights->agenda->myactions->read) || !empty($user->rights->agenda->allactions->read) ))
|
||||
{
|
||||
|
||||
@ -468,6 +468,8 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
|
||||
{
|
||||
global $user,$conf,$langs,$dolibarr_main_db_name,$mysoc;
|
||||
|
||||
//var_dump($tabMenu);
|
||||
|
||||
$newmenu = $menu;
|
||||
|
||||
$mainmenu=($forcemainmenu?$forcemainmenu:$_SESSION["mainmenu"]);
|
||||
@ -523,7 +525,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
|
||||
* We update newmenu with entries found into database
|
||||
* --------------------------------------------------
|
||||
*/
|
||||
if ($mainmenu)
|
||||
if ($mainmenu) // If this is empty, loading hard coded menu and loading personalised menu will fail
|
||||
{
|
||||
/*
|
||||
* Menu HOME
|
||||
@ -1628,6 +1630,9 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
|
||||
}
|
||||
}
|
||||
|
||||
//var_dump($tabMenu); //
|
||||
//var_dump($newmenu->liste);
|
||||
|
||||
// Build final $menu_array = $menu_array_before +$newmenu->liste + $menu_array_after
|
||||
//var_dump($menu_array_before);exit;
|
||||
//var_dump($menu_array_after);exit;
|
||||
|
||||
@ -31,7 +31,7 @@ class MenuManager
|
||||
* @var DoliDB Database handler.
|
||||
*/
|
||||
public $db;
|
||||
|
||||
|
||||
var $type_user; // Put 0 for internal users, 1 for external users
|
||||
var $atarget=""; // To store default target to use onto links
|
||||
var $name="eldy";
|
||||
@ -109,6 +109,7 @@ class MenuManager
|
||||
$menuArbo = new Menubase($this->db,'eldy');
|
||||
$menuArbo->menuLoad($mainmenu, $leftmenu, $this->type_user, 'eldy', $tabMenu);
|
||||
$this->tabMenu=$tabMenu;
|
||||
//var_dump($tabMenu);
|
||||
|
||||
//if ($forcemainmenu == 'all') { var_dump($this->tabMenu); exit; }
|
||||
}
|
||||
@ -116,7 +117,7 @@ class MenuManager
|
||||
|
||||
/**
|
||||
* Show menu.
|
||||
* Module defined in sql tables are stored into this->tabMenu BEFORE this is called.
|
||||
* Module defined in sql tables were stored into $this->tabMenu BEFORE this is called.
|
||||
*
|
||||
* @param string $mode 'top', 'topnb', 'left', 'jmobile' (used to get full xml ul/li menu)
|
||||
* @param array $moredata An array with more data to output
|
||||
@ -126,6 +127,8 @@ class MenuManager
|
||||
{
|
||||
global $conf, $langs, $user;
|
||||
|
||||
//var_dump($this->tabMenu);
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/menus/standard/eldy.lib.php';
|
||||
|
||||
if ($this->type_user == 1)
|
||||
|
||||
@ -370,7 +370,7 @@ class pdf_strato extends ModelePDFContract
|
||||
$pdf->writeHTMLCell(0, 0, $curX, $curY, dol_concatdesc($txtpredefinedservice, dol_concatdesc($txt, $desc)), 0, 1, 0);
|
||||
$pageposafter=$pdf->getPage();
|
||||
$posyafter=$pdf->GetY();
|
||||
|
||||
|
||||
if ($posyafter > ($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))) // There is no space left for total+free text
|
||||
{
|
||||
if ($i == ($nblines-1)) // No more lines, and no space left to show total, so we create a new page
|
||||
@ -394,7 +394,7 @@ class pdf_strato extends ModelePDFContract
|
||||
|
||||
$nexY = $pdf->GetY() + 2;
|
||||
$pageposafter=$pdf->getPage();
|
||||
|
||||
|
||||
$pdf->setPage($pageposbefore);
|
||||
$pdf->setTopMargin($this->marge_haute);
|
||||
$pdf->setPageOrientation('', 1, 0); // The only function to edit the bottom margin of current page to set it.
|
||||
@ -423,7 +423,7 @@ class pdf_strato extends ModelePDFContract
|
||||
$pdf->setPage($pagenb);
|
||||
$pdf->setPageOrientation('', 1, 0); // The only function to edit the bottom margin of current page to set it.
|
||||
}
|
||||
|
||||
|
||||
if (isset($object->lines[$i+1]->pagebreak) && $object->lines[$i+1]->pagebreak)
|
||||
{
|
||||
if ($pagenb == 1)
|
||||
@ -447,7 +447,7 @@ class pdf_strato extends ModelePDFContract
|
||||
if ($pagenb == 1)
|
||||
{
|
||||
$this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforinfotot - $heightforfreetext - $heightforfooter, 0, $outputlangs, 0, 0);
|
||||
$this->_tab_signature($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforinfotot - $heightforfreetext - $heightforfooter, $outputlangs);
|
||||
$this->tabSignature($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforinfotot - $heightforfreetext - $heightforfooter, $outputlangs);
|
||||
$bottomlasttab=$this->page_hauteur - $heightforfooter - $heightforfooter + 1;
|
||||
}
|
||||
else
|
||||
@ -456,7 +456,7 @@ class pdf_strato extends ModelePDFContract
|
||||
$this->tabSignature($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforinfotot - $heightforfreetext - $heightforfooter, $outputlangs);
|
||||
$bottomlasttab=$this->page_hauteur - $heightforfooter - $heightforfooter + 1;
|
||||
}
|
||||
|
||||
|
||||
$this->_pagefoot($pdf,$object,$outputlangs);
|
||||
if (method_exists($pdf,'AliasNbPages')) $pdf->AliasNbPages();
|
||||
|
||||
|
||||
@ -331,10 +331,9 @@ class mailing_contacts1 extends MailingTargets
|
||||
* Ajoute destinataires dans table des cibles
|
||||
*
|
||||
* @param int $mailing_id Id of emailing
|
||||
* @param array $filtersarray Optional filter data (deprecated)
|
||||
* @return int <0 si erreur, nb ajout si ok
|
||||
*/
|
||||
function add_to_target($mailing_id,$filtersarray=array())
|
||||
function add_to_target($mailing_id)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf, $langs;
|
||||
|
||||
@ -61,10 +61,9 @@ class mailing_example extends MailingTargets
|
||||
* This is the main function that returns the array of emails
|
||||
*
|
||||
* @param int $mailing_id Id of mailing. No need to use it.
|
||||
* @param array $filtersarray If you used the formFilter function. Empty otherwise.
|
||||
* @return int <0 if error, number of emails added if ok
|
||||
*/
|
||||
function add_to_target($mailing_id,$filtersarray=array())
|
||||
function add_to_target($mailing_id)
|
||||
{
|
||||
// phpcs:enable
|
||||
$target = array();
|
||||
|
||||
@ -225,17 +225,11 @@ class mailing_fraise extends MailingTargets
|
||||
* Ajoute destinataires dans table des cibles
|
||||
*
|
||||
* @param int $mailing_id Id of emailing
|
||||
* @param array $filtersarray Param to filter sql request. Deprecated. Should use $_POST instead.
|
||||
* @return int < 0 si erreur, nb ajout si ok
|
||||
*/
|
||||
function add_to_target($mailing_id,$filtersarray=array())
|
||||
function add_to_target($mailing_id)
|
||||
{
|
||||
// phpcs:enable
|
||||
// Deprecation warning
|
||||
if ($filtersarray) {
|
||||
dol_syslog(__METHOD__ . ": filtersarray parameter is deprecated", LOG_WARNING);
|
||||
}
|
||||
|
||||
global $langs,$_POST;
|
||||
|
||||
// Load translation files required by the page
|
||||
|
||||
@ -166,7 +166,7 @@ class MailingTargets // This can't be abstract as it is used for some method
|
||||
|
||||
$this->db->begin();
|
||||
|
||||
// Insert emailing targest from array into database
|
||||
// Insert emailing targets from array into database
|
||||
$j = 0;
|
||||
$num = count($cibles);
|
||||
foreach ($cibles as $targetarray)
|
||||
@ -211,6 +211,7 @@ class MailingTargets // This can't be abstract as it is used for some method
|
||||
|
||||
dol_syslog(get_class($this)."::".__METHOD__.": mailing ".$j." targets added");
|
||||
|
||||
/*
|
||||
//Update the status to show thirdparty mail that don't want to be contacted anymore'
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."mailing_cibles";
|
||||
$sql .= " SET statut=3";
|
||||
@ -219,8 +220,6 @@ class MailingTargets // This can't be abstract as it is used for some method
|
||||
dol_syslog(get_class($this)."::".__METHOD__.": mailing update status to display thirdparty mail that do not want to be contacted");
|
||||
$result=$this->db->query($sql);
|
||||
|
||||
|
||||
|
||||
//Update the status to show contact mail that don't want to be contacted anymore'
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."mailing_cibles";
|
||||
$sql .= " SET statut=3";
|
||||
@ -228,11 +227,23 @@ class MailingTargets // This can't be abstract as it is used for some method
|
||||
$sql .= " INNER JOIN ".MAIN_DB_PREFIX."societe s ON s.rowid=sc.fk_soc WHERE s.fk_stcomm=-1 OR no_email=1))";
|
||||
dol_syslog(get_class($this)."::".__METHOD__.": mailing update status to display contact mail that do not want to be contacted",LOG_DEBUG);
|
||||
$result=$this->db->query($sql);
|
||||
*/
|
||||
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."mailing_cibles";
|
||||
$sql .= " SET statut=3";
|
||||
$sql .= " WHERE fk_mailing=".$mailing_id." AND email IN (SELECT mu.email FROM ".MAIN_DB_PREFIX."mailing_unsubscribe AS mu WHERE mu.entity IN ('".getEntity('mailing')."'))";
|
||||
|
||||
dol_syslog(get_class($this)."::".__METHOD__.":mailing update status to display emails that do not want to be contacted anymore", LOG_DEBUG);
|
||||
$result=$this->db->query($sql);
|
||||
if (! $result)
|
||||
{
|
||||
dol_print_error($this->db);
|
||||
}
|
||||
|
||||
$this->update_nb($mailing_id);
|
||||
|
||||
$this->db->commit();
|
||||
|
||||
return $j;
|
||||
}
|
||||
|
||||
|
||||
@ -151,17 +151,11 @@ class mailing_pomme extends MailingTargets
|
||||
* Ajoute destinataires dans table des cibles
|
||||
*
|
||||
* @param int $mailing_id Id of emailing
|
||||
* @param array $filtersarray Requete sql de selection des destinataires
|
||||
* @return int < 0 si erreur, nb ajout si ok
|
||||
*/
|
||||
function add_to_target($mailing_id, $filtersarray=array())
|
||||
function add_to_target($mailing_id)
|
||||
{
|
||||
// phpcs:enable
|
||||
// Deprecation warning
|
||||
if ($filtersarray) {
|
||||
dol_syslog(__METHOD__ . ": filtersarray parameter is deprecated", LOG_WARNING);
|
||||
}
|
||||
|
||||
global $conf, $langs;
|
||||
$langs->load("companies");
|
||||
|
||||
|
||||
@ -57,10 +57,9 @@ class mailing_thirdparties extends MailingTargets
|
||||
* This is the main function that returns the array of emails
|
||||
*
|
||||
* @param int $mailing_id Id of mailing. No need to use it.
|
||||
* @param array $filtersarray If you used the formFilter function. Empty otherwise.
|
||||
* @return int <0 if error, number of emails added if ok
|
||||
*/
|
||||
function add_to_target($mailing_id, $filtersarray=array())
|
||||
function add_to_target($mailing_id)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf, $langs;
|
||||
|
||||
@ -82,26 +82,26 @@ class mailing_thirdparties_services_expired extends MailingTargets
|
||||
* This is the main function that returns the array of emails
|
||||
*
|
||||
* @param int $mailing_id Id of mailing. No need to use it.
|
||||
* @param array $filtersarray If you used the formFilter function. Empty otherwise.
|
||||
* @return int <0 if error, number of emails added if ok
|
||||
*/
|
||||
function add_to_target($mailing_id,$filtersarray=array())
|
||||
function add_to_target($mailing_id)
|
||||
{
|
||||
// phpcs:enable
|
||||
$target = array();
|
||||
|
||||
// ----- Your code start here -----
|
||||
$key=GETPOST('filter','int');
|
||||
|
||||
$cibles = array();
|
||||
$j = 0;
|
||||
|
||||
$product='';
|
||||
foreach($filtersarray as $key)
|
||||
if ($key == '0')
|
||||
{
|
||||
if ($key == '0') return "Error: You must choose a filter";
|
||||
$product=$this->arrayofproducts[$key];
|
||||
$this->error = "Error: You must choose a filter";
|
||||
$this->errors[] = $this->error;
|
||||
return $this->error;
|
||||
}
|
||||
|
||||
$product=$this->arrayofproducts[$key];
|
||||
|
||||
$now=dol_now();
|
||||
|
||||
// La requete doit retourner: id, email, name
|
||||
|
||||
@ -115,10 +115,9 @@ class mailing_xinputfile extends MailingTargets
|
||||
* Ajoute destinataires dans table des cibles
|
||||
*
|
||||
* @param int $mailing_id Id of emailing
|
||||
* @param array $filtersarray Requete sql de selection des destinataires
|
||||
* @return int < 0 si erreur, nb ajout si ok
|
||||
*/
|
||||
function add_to_target($mailing_id,$filtersarray=array())
|
||||
function add_to_target($mailing_id)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf,$langs,$_FILES;
|
||||
|
||||
@ -113,10 +113,9 @@ class mailing_xinputuser extends MailingTargets
|
||||
* Ajoute destinataires dans table des cibles
|
||||
*
|
||||
* @param int $mailing_id Id of emailing
|
||||
* @param array $filtersarray Requete sql de selection des destinataires
|
||||
* @return int < 0 si erreur, nb ajout si ok
|
||||
*/
|
||||
function add_to_target($mailing_id,$filtersarray=array())
|
||||
function add_to_target($mailing_id)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf,$langs,$_FILES;
|
||||
|
||||
@ -284,6 +284,7 @@ class modCategorie extends DolibarrModules
|
||||
'p.email' => 'Email',
|
||||
'p.note_private' => 'NotePrivate',
|
||||
'p.note_public' => 'NotePublic',
|
||||
'p.statut' => 'Status',
|
||||
's.nom'=>"Name",
|
||||
's.client'=>"Customer",
|
||||
's.fournisseur'=>"Supplier",
|
||||
@ -301,6 +302,7 @@ class modCategorie extends DolibarrModules
|
||||
'u.description' => "Text",
|
||||
'p.lastname' => 'Text',
|
||||
'p.firstname' => 'Text',
|
||||
'p.statut'=>"Numeric",
|
||||
's.nom'=>"Text",
|
||||
's.status'=>"Text",
|
||||
's.address'=>"Text",
|
||||
@ -333,6 +335,7 @@ class modCategorie extends DolibarrModules
|
||||
'p.email' => 'contact',
|
||||
'p.note_private' => 'contact',
|
||||
'p.note_public' => 'contact',
|
||||
'p.statut' => 'contact',
|
||||
's.nom'=>"company",
|
||||
's.client'=>"company",
|
||||
's.fournisseur'=>"company",
|
||||
|
||||
@ -265,7 +265,7 @@ class modSociete extends DolibarrModules
|
||||
's.code_client'=>"CustomerCode",'s.code_fournisseur'=>"SupplierCode",'s.code_compta'=>"AccountancyCode",'s.code_compta_fournisseur'=>"SupplierAccountancyCode",
|
||||
's.address'=>"Address",'s.zip'=>"Zip",'s.town'=>"Town",'d.nom'=>'State','c.label'=>"Country",'c.code'=>"CountryCode",'s.phone'=>"Phone",'s.fax'=>"Fax",
|
||||
's.url'=>"Url",'s.email'=>"Email",'s.default_lang'=>"DefaultLang",'s.siren'=>"ProfId1",'s.siret'=>"ProfId2",'s.ape'=>"ProfId3",'s.idprof4'=>"ProfId4",
|
||||
's.idprof5'=>"ProfId5",'s.idprof6'=>"ProfId6",'s.tva_intra'=>"VATIntraShort",'s.capital'=>"Capital",'s.note_private'=>"NotePrivate",'s.note_public'=>"NotePublic",
|
||||
's.idprof5'=>"ProfId5",'s.idprof6'=>"ProfId6",'s.tva_intra'=>"VATIntraShort",'s.capital'=>"Capital",'s.note_private'=>"NotePrivate",'s.note_public'=>"NotePublic",'s.canvas'=>"Canvas",
|
||||
't.libelle'=>"ThirdPartyType",'ce.code'=>"Staff","cfj.libelle"=>"JuridicalStatus",'s.fk_prospectlevel'=>'ProspectLevel',
|
||||
'st.code'=>'ProspectStatus','payterm.libelle'=>'PaymentConditions','paymode.libelle'=>'PaymentMode'
|
||||
);
|
||||
@ -292,7 +292,7 @@ class modSociete extends DolibarrModules
|
||||
's.code_client'=>"Text",'s.code_fournisseur'=>"Text",'s.code_compta'=>"Text",'s.code_compta_fournisseur'=>"Text",'s.address'=>"Text",'s.zip'=>"Text",
|
||||
's.town'=>"Text",'c.label'=>"List:c_country:label:label",'c.code'=>"Text",'s.phone'=>"Text",'s.fax'=>"Text",'s.url'=>"Text",'s.email'=>"Text",
|
||||
's.default_lang'=>"Text",'s.siret'=>"Text",'s.siren'=>"Text",'s.ape'=>"Text",'s.idprof4'=>"Text",'s.idprof5'=>"Text",'s.idprof6'=>"Text",
|
||||
's.tva_intra'=>"Text",'s.capital'=>"Numeric",'s.note_private'=>"Text",'s.note_public'=>"Text",'t.libelle'=>"Text",
|
||||
's.tva_intra'=>"Text",'s.capital'=>"Numeric",'s.note_private'=>"Text",'s.note_public'=>"Text",'s.canvas'=>"Text",'t.libelle'=>"Text",
|
||||
'ce.code'=>"List:c_effectif:libelle:code","cfj.libelle"=>"Text",'s.fk_prospectlevel'=>'List:c_prospectlevel:label:code',
|
||||
'st.code'=>'List:c_stcomm:libelle:code','d.nom'=>'Text','u.login'=>'Text','u.firstname'=>'Text','u.lastname'=>'Text','payterm.libelle'=>'Text',
|
||||
'paymode.libelle'=>'Text','s.entity'=>'Numeric'
|
||||
@ -390,7 +390,7 @@ class modSociete extends DolibarrModules
|
||||
's.code_compta'=>"CustomerAccountancyCode",'s.code_compta_fournisseur'=>"SupplierAccountancyCode",'s.address'=>"Address",'s.zip'=>"Zip",'s.town'=>"Town",
|
||||
's.fk_departement'=>"StateId",'s.fk_pays'=>"CountryCode",'s.phone'=>"Phone",'s.fax'=>"Fax",'s.url'=>"Url",'s.email'=>"Email",'s.siren'=>"ProfId1",
|
||||
's.siret'=>"ProfId2",'s.ape'=>"ProfId3",'s.idprof4'=>"ProfId4",'s.idprof5'=>"ProfId5",'s.idprof6'=>"ProfId6",'s.tva_intra'=>"VATIntraShort",
|
||||
's.capital'=>"Capital",'s.note_private'=>"NotePrivate",'s.note_public'=>"NotePublic",'s.fk_typent'=>"ThirdPartyType",'s.fk_effectif'=>"Staff",
|
||||
's.capital'=>"Capital",'s.note_private'=>"NotePrivate",'s.note_public'=>"NotePublic",'s.canvas'=>"Canvas",'s.fk_typent'=>"ThirdPartyType",'s.fk_effectif'=>"Staff",
|
||||
"s.fk_forme_juridique"=>"JuridicalStatus",'s.fk_prospectlevel'=>'ProspectLevel','s.fk_stcomm'=>'ProspectStatus','s.default_lang'=>'DefaultLanguage',
|
||||
's.barcode'=>'BarCode','s.datec'=>"DateCreation"
|
||||
);
|
||||
@ -494,7 +494,7 @@ class modSociete extends DolibarrModules
|
||||
'sr.cle_rib'=>"22",'sr.bic'=>"USHINGMMXXX",'sr.iban_prefix'=>"US00 0000 1111 22 3333 3333",'sr.domiciliation'=>"PARIS",'sr.proprio' => "Name of owner", 'sr.owner_address' => "15 paris street 75000 Paris", 'sr.default_rib' => '1 or 0'
|
||||
);
|
||||
|
||||
// Import Company Salesman
|
||||
// Import Company Sales representatives
|
||||
$r++;
|
||||
$this->import_code[$r]=$this->rights_class.'_'.$r;
|
||||
$this->import_label[$r]="ImportDataset_company_4"; // Translation key
|
||||
|
||||
@ -70,7 +70,7 @@ class InterfaceLogevents extends DolibarrTriggers
|
||||
$date = dol_now();
|
||||
|
||||
// Actions
|
||||
/*if ($action == 'USER_LOGIN')
|
||||
if ($action == 'USER_LOGIN')
|
||||
{
|
||||
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
|
||||
|
||||
@ -97,7 +97,7 @@ class InterfaceLogevents extends DolibarrTriggers
|
||||
// Initialisation donnees (date,duree,texte,desc)
|
||||
$text="(UserLogoff,".$object->login.")";
|
||||
$desc="(UserLogoff,".$object->login.")";
|
||||
}*/
|
||||
}
|
||||
if ($action == 'USER_CREATE')
|
||||
{
|
||||
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
|
||||
|
||||
@ -799,7 +799,8 @@ class InterfaceActionsAuto extends DolibarrTriggers
|
||||
if ($object->sendtoid > 0) $contactforaction->fetch($object->sendtoid);
|
||||
}
|
||||
// Set societeforaction.
|
||||
if ($object->socid > 0) $societeforaction->fetch($object->socid);
|
||||
if ($object->socid > 0) $societeforaction->fetch($object->socid);
|
||||
elseif ($object->fk_soc > 0) $societeforaction->fetch($object->fk_soc);
|
||||
|
||||
$projectid = isset($object->fk_project)?$object->fk_project:0;
|
||||
if ($object->element == 'project') $projectid = $object->id;
|
||||
@ -811,6 +812,7 @@ class InterfaceActionsAuto extends DolibarrTriggers
|
||||
$elementid = $object->fk_adherent;
|
||||
$elementtype = 'member';
|
||||
}
|
||||
//var_dump($societeforaction);var_dump($contactforaction);exit;
|
||||
|
||||
// Insertion action
|
||||
require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php';
|
||||
|
||||
@ -1338,22 +1338,22 @@ class Cronjob extends CommonObject
|
||||
}
|
||||
elseif ($mode == 2)
|
||||
{
|
||||
if ($status == 1) return img_picto($langs->trans('Enabled'),'statut4','class="pictostatus"').' '.$langs->trans('Enabled').$moretext;
|
||||
if ($status == 1) return img_picto($langs->trans('Enabled'),'statut'.($processing?'1':'4'),'class="pictostatus"').' '.$langs->trans('Enabled').$moretext;
|
||||
elseif ($status == 0) return img_picto($langs->trans('Disabled'),'statut5','class="pictostatus"').' '.$langs->trans('Disabled').$moretext;
|
||||
}
|
||||
elseif ($mode == 3)
|
||||
{
|
||||
if ($status == 1) return img_picto($langs->trans('Enabled').$moretext,'statut4','class="pictostatus"');
|
||||
if ($status == 1) return img_picto($langs->trans('Enabled').$moretext,'statut'.($processing?'1':'4'),'class="pictostatus"');
|
||||
elseif ($status == 0) return img_picto($langs->trans('Disabled').$moretext,'statut5','class="pictostatus"');
|
||||
}
|
||||
elseif ($mode == 4)
|
||||
{
|
||||
if ($status == 1) return img_picto($langs->trans('Enabled').$moretext,'statut4','class="pictostatus"').' '.$langs->trans('Enabled').$moretext;
|
||||
if ($status == 1) return img_picto($langs->trans('Enabled').$moretext,'statut'.($processing?'1':'4'),'class="pictostatus"').' '.$langs->trans('Enabled').$moretext;
|
||||
elseif ($status == 0) return img_picto($langs->trans('Disabled').$moretext,'statut5','class="pictostatus"').' '.$langs->trans('Disabled').$moretext;
|
||||
}
|
||||
elseif ($mode == 5)
|
||||
{
|
||||
if ($status == 1) return $langs->trans('Enabled').$moretext.' '.img_picto($langs->trans('Enabled').$moretext,'statut4','class="pictostatus"');
|
||||
if ($status == 1) return $langs->trans('Enabled').$moretext.' '.img_picto($langs->trans('Enabled').$moretext,'statut'.($processing?'1':'4'),'class="pictostatus"');
|
||||
elseif ($status == 0) return $langs->trans('Disabled').$moretext.' '.img_picto($langs->trans('Disabled').$moretext,'statut5','class="pictostatus"');
|
||||
}
|
||||
}
|
||||
|
||||
@ -230,6 +230,7 @@ $sql.= " t.params,";
|
||||
$sql.= " t.md5params,";
|
||||
$sql.= " t.module_name,";
|
||||
$sql.= " t.priority,";
|
||||
$sql.= " t.processing,";
|
||||
$sql.= " t.datelastrun,";
|
||||
$sql.= " t.datenextrun,";
|
||||
$sql.= " t.dateend,";
|
||||
@ -418,10 +419,9 @@ print "</tr>\n";
|
||||
if ($num > 0)
|
||||
{
|
||||
// Loop on each job
|
||||
$style='pair';
|
||||
$now = dol_now();
|
||||
$i=0;
|
||||
$totalarray=array();
|
||||
|
||||
while ($i < min($num,$limit))
|
||||
{
|
||||
$obj = $db->fetch_object($result);
|
||||
@ -434,6 +434,7 @@ if ($num > 0)
|
||||
$object->label = $obj->label;
|
||||
$object->status = $obj->status;
|
||||
$object->priority = $obj->priority;
|
||||
$object->processing = $obj->processing;
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
|
||||
|
||||
@ -180,8 +180,15 @@ class EcmFiles extends CommonObject
|
||||
if (empty($this->date_m)) $this->date_m = dol_now();
|
||||
|
||||
// If ref not defined
|
||||
$ref = dol_hash($this->filepath.'/'.$this->filename, 3);
|
||||
if (! empty($this->ref)) $ref=$this->ref;
|
||||
$ref = '';
|
||||
if (! empty($this->ref))
|
||||
{
|
||||
$ref=$this->ref;
|
||||
}
|
||||
else {
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/security.lib.php';
|
||||
$ref = dol_hash($this->filepath.'/'.$this->filename, 3);
|
||||
}
|
||||
|
||||
$maxposition=0;
|
||||
if (empty($this->position)) // Get max used
|
||||
|
||||
@ -331,6 +331,7 @@ if (! empty($conf->global->ECM_AUTO_TREE_ENABLED))
|
||||
if (! empty($conf->projet->enabled)) { $rowspan++; $sectionauto[]=array('level'=>1, 'module'=>'project', 'test'=>$conf->projet->enabled, 'label'=>$langs->trans("Projects"), 'desc'=>$langs->trans("ECMDocsByProjects")); }
|
||||
if (! empty($conf->ficheinter->enabled)) { $langs->load("interventions"); $rowspan++; $sectionauto[]=array('level'=>1, 'module'=>'fichinter', 'test'=>$conf->ficheinter->enabled, 'label'=>$langs->trans("Interventions"), 'desc'=>$langs->trans("ECMDocsByInterventions")); }
|
||||
if (! empty($conf->expensereport->enabled)) { $langs->load("trips"); $rowspan++; $sectionauto[]=array('level'=>1, 'module'=>'expensereport', 'test'=>$conf->expensereport->enabled, 'label'=>$langs->trans("ExpenseReports"), 'desc'=>$langs->trans("ECMDocsByExpenseReports")); }
|
||||
if (! empty($conf->holiday->enabled)) { $langs->load("holiday"); $rowspan++; $sectionauto[]=array('level'=>1, 'module'=>'holiday', 'test'=>$conf->holiday->enabled, 'label'=>$langs->trans("Holidays"), 'desc'=>$langs->trans("ECMDocsByHolidays")); }
|
||||
$rowspan++; $sectionauto[]=array('level'=>1, 'module'=>'user', 'test'=>1, 'label'=>$langs->trans("Users"), 'desc'=>$langs->trans("ECMDocsByUsers"));
|
||||
}
|
||||
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
<?php
|
||||
/* Copyright (C) 2011 Dimitri Mouillard <dmouillard@teclib.com>
|
||||
* Copyright (C) 2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2015 Alexandre Spangaro <aspangaro@zendsi.com>
|
||||
* Copyright (C) 2016 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||
/* Copyright (C) 2011 Dimitri Mouillard <dmouillard@teclib.com>
|
||||
* Copyright (C) 2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2015 Alexandre Spangaro <aspangaro@zendsi.com>
|
||||
* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||
* Copyright (c) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2016-2018 Ferran Marcet <fmarcet@2byte.es>
|
||||
*
|
||||
* 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
|
||||
@ -1692,27 +1692,32 @@ class ExpenseReport extends CommonObject
|
||||
*/
|
||||
function addline($qty=0, $up=0, $fk_c_type_fees=0, $vatrate=0, $date='', $comments='', $fk_project=0, $fk_c_exp_tax_cat=0, $type=0)
|
||||
{
|
||||
global $conf,$langs;
|
||||
global $conf,$langs,$mysoc;
|
||||
|
||||
dol_syslog(get_class($this)."::addline qty=$qty, up=$up, fk_c_type_fees=$fk_c_type_fees, vatrate=$vatrate, date=$date, fk_project=$fk_project, type=$type, comments=$comments", LOG_DEBUG);
|
||||
|
||||
if (empty($qty)) $qty = 0;
|
||||
if (empty($fk_c_type_fees) || $fk_c_type_fees < 0) $fk_c_type_fees = 0;
|
||||
if (empty($fk_c_exp_tax_cat) || $fk_c_exp_tax_cat < 0) $fk_c_exp_tax_cat = 0;
|
||||
if (empty($vatrate) || $vatrate < 0) $vatrate = 0;
|
||||
if (empty($date)) $date = '';
|
||||
if (empty($fk_project)) $fk_project = 0;
|
||||
|
||||
$qty = price2num($qty);
|
||||
$vatrate = price2num($vatrate);
|
||||
$up = price2num($up);
|
||||
|
||||
if ($this->fk_statut == self::STATUS_DRAFT)
|
||||
{
|
||||
{
|
||||
if (empty($qty)) $qty = 0;
|
||||
if (empty($fk_c_type_fees) || $fk_c_type_fees < 0) $fk_c_type_fees = 0;
|
||||
if (empty($fk_c_exp_tax_cat) || $fk_c_exp_tax_cat < 0) $fk_c_exp_tax_cat = 0;
|
||||
if (empty($vatrate) || $vatrate < 0) $vatrate = 0;
|
||||
if (empty($date)) $date = '';
|
||||
if (empty($fk_project)) $fk_project = 0;
|
||||
|
||||
$qty = price2num($qty);
|
||||
if (!preg_match('/\((.*)\)/', $vatrate)) {
|
||||
$vatrate = price2num($vatrate); // $txtva can have format '5.0(XXX)' or '5'
|
||||
}
|
||||
$up = price2num($up);
|
||||
|
||||
$this->db->begin();
|
||||
|
||||
$this->line = new ExpenseReportLine($this->db);
|
||||
|
||||
$localtaxes_type=getLocalTaxesFromRate($vatrate,0,$mysoc,$this->thirdparty);
|
||||
|
||||
$vat_src_code = '';
|
||||
if (preg_match('/\((.*)\)/', $vatrate, $reg))
|
||||
{
|
||||
$vat_src_code = $reg[1];
|
||||
@ -1721,7 +1726,8 @@ class ExpenseReport extends CommonObject
|
||||
$vatrate = preg_replace('/\*/','',$vatrate);
|
||||
|
||||
$seller = ''; // seller is unknown
|
||||
$tmp = calcul_price_total($qty, $up, 0, $vatrate, 0, 0, 0, 'TTC', 0, $type, $seller);
|
||||
|
||||
$tmp = calcul_price_total($qty, $up, 0, $vatrate, 0, 0, 0, 'TTC', 0, $type, $seller, $localtaxes_type);
|
||||
|
||||
$this->line->value_unit = $up;
|
||||
$this->line->vatrate = price2num($vatrate);
|
||||
|
||||
@ -623,11 +623,11 @@ if ($step == 2 && $datatoexport)
|
||||
}
|
||||
if (! empty($objexport->array_export_examplevalues[0][$code]))
|
||||
{
|
||||
$htmltext.=$langs->trans("SourceExample").': <b>'.$objexport->array_export_examplevalues[0][$code].'</b><br>';
|
||||
$htmltext.='<b>'.$langs->trans("SourceExample").':</b> '.$objexport->array_export_examplevalues[0][$code].'<br>';
|
||||
}
|
||||
if (! empty($objexport->array_export_TypeFields[0][$code]))
|
||||
{
|
||||
$htmltext.=$langs->trans("Type").': <b>'.$objexport->array_export_TypeFields[0][$code].'</b><br>';
|
||||
$htmltext.='<b>'.$langs->trans("Type").':</b> '.$objexport->array_export_TypeFields[0][$code].'<br>';
|
||||
}
|
||||
|
||||
if (isset($array_selected[$code]) && $array_selected[$code])
|
||||
|
||||
@ -21,8 +21,9 @@
|
||||
* \ingroup externalsite
|
||||
* \brief Page that build two frames: One for menu, the other for the target page to show
|
||||
* Usage:
|
||||
* mydomain.com/externalsite/frames.php to show URL set into setup
|
||||
* mydomain.com/externalsite/frames.php?keyforcontent to show content defined into conf->global->$keyforcontent
|
||||
* /externalsite/frames.php to show URL set into setup
|
||||
* /externalsite/frames.php?keyforcontent=EXTERNAL_SITE_CONTENT_abc to show html text defined into $conf->global->EXTERNAL_SITE_CONTENT_abc
|
||||
* /externalsite/frames.php?keyforcontent=EXTERNAL_SITE_URL_abc to show URL defined into $conf->global->EXTERNAL_SITE_URL_abc
|
||||
*/
|
||||
|
||||
require '../main.inc.php';
|
||||
@ -56,19 +57,58 @@ if (! empty($keyforcontent))
|
||||
|
||||
print '<div class="framecontent" style="height: '.($_SESSION['dol_screenheight']-90).'px">';
|
||||
|
||||
if (! preg_match('/EXTERNAL_SITE_CONTENT_/', $keyforcontent))
|
||||
if (! preg_match('/EXTERNAL_SITE_CONTENT_/', $keyforcontent)
|
||||
&& ! preg_match('/EXTERNAL_SITE_URL_/', $keyforcontent))
|
||||
{
|
||||
$langs->load("errors");
|
||||
print $langs->trans("Variablekeyforcontentmustbenamed", 'EXTERNAL_SITE_CONTENT_');
|
||||
print $langs->trans("ErrorBadSyntaxForParamKeyForContent", 'EXTERNAL_SITE_CONTENT_', 'EXTERNAL_SITE_URL_');
|
||||
}
|
||||
else if (empty($conf->global->$keyforcontent))
|
||||
{
|
||||
$langs->load("errors");
|
||||
print $langs->trans("ErrorNoContentDefinedIntoVar", $keyforcontent);
|
||||
print $langs->trans("ErrorVariableKeyForContentMustBeSet", 'EXTERNAL_SITE_CONTENT_'.$keyforcontent, 'EXTERNAL_SITE_URL_'.$keyforcontent);
|
||||
}
|
||||
else
|
||||
{
|
||||
print $conf->global->$keyforcontent;
|
||||
if (preg_match('/EXTERNAL_SITE_CONTENT_/', $keyforcontent))
|
||||
{
|
||||
print $conf->global->$keyforcontent;
|
||||
}
|
||||
elseif (preg_match('/EXTERNAL_SITE_URL_/', $keyforcontent))
|
||||
{
|
||||
/*print "
|
||||
<html>
|
||||
<head>
|
||||
<title>Dolibarr frame for external web site</title>
|
||||
</head>
|
||||
|
||||
<frameset ".(empty($conf->global->MAIN_MENU_INVERT)?"rows":"cols")."=\"".$heightforframes.",*\" border=0 framespacing=0 frameborder=0>
|
||||
<frame name=\"barre\" src=\"frametop.php?mainmenu=".$mainmenu."&leftmenu=".$leftmenu."&idmenu=".$idmenu.($theme?'&theme='.$theme:'').($codelang?'&lang='.$codelang:'')."&nobackground=1\" noresize scrolling=\"NO\" noborder>
|
||||
";
|
||||
print '<frame name="main" src="';
|
||||
print $conf->global->$keyforcontent;
|
||||
print '">';
|
||||
print "
|
||||
<noframes>
|
||||
<body>
|
||||
|
||||
</body>
|
||||
</noframes>
|
||||
</frameset>
|
||||
|
||||
<noframes>
|
||||
<body>
|
||||
<br><div class=\"center\">
|
||||
Sorry, your browser is too old or not correctly configured to view this area.<br>
|
||||
Your browser must support frames.<br>
|
||||
</div>
|
||||
</body>
|
||||
</noframes>
|
||||
|
||||
</html>
|
||||
";*/
|
||||
print '<iframe src="'.$conf->global->$keyforcontent.'"></iframe>';
|
||||
}
|
||||
}
|
||||
|
||||
print '<div>';
|
||||
|
||||
@ -31,7 +31,7 @@
|
||||
*/
|
||||
|
||||
if (! defined('DOL_APPLICATION_TITLE')) define('DOL_APPLICATION_TITLE','Dolibarr');
|
||||
if (! defined('DOL_VERSION')) define('DOL_VERSION','9.0.0-beta'); // a.b.c-alpha, a.b.c-beta, a.b.c-rcX or a.b.c
|
||||
if (! defined('DOL_VERSION')) define('DOL_VERSION','10.0.0-alpha'); // a.b.c-alpha, a.b.c-beta, a.b.c-rcX or a.b.c
|
||||
|
||||
if (! defined('EURO')) define('EURO',chr(128));
|
||||
|
||||
|
||||
@ -10,6 +10,7 @@
|
||||
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
|
||||
* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2018 Ferran Marcet <fmarcet@2byte.es>
|
||||
*
|
||||
* 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
|
||||
@ -1289,9 +1290,9 @@ class CommandeFournisseur extends CommonOrder
|
||||
// insert products details into database
|
||||
for ($i=0;$i<$num;$i++)
|
||||
{
|
||||
|
||||
|
||||
$this->special_code = $this->lines[$i]->special_code; // TODO : remove this in 9.0 and add special_code param to addline()
|
||||
|
||||
|
||||
$result = $this->addline( // This include test on qty if option SUPPLIER_ORDER_WITH_NOPRICEDEFINED is not set
|
||||
$this->lines[$i]->desc,
|
||||
$this->lines[$i]->subprice,
|
||||
@ -1504,42 +1505,47 @@ class CommandeFournisseur extends CommonOrder
|
||||
dol_syslog(get_class($this)."::addline $desc, $pu_ht, $qty, $txtva, $txlocaltax1, $txlocaltax2, $fk_product, $fk_prod_fourn_price, $ref_supplier, $remise_percent, $price_base_type, $pu_ttc, $type, $info_bits, $notrigger, $date_start, $date_end, $fk_unit, $pu_ht_devise, $origin, $origin_id");
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php';
|
||||
|
||||
// Clean parameters
|
||||
if (! $qty) $qty=1;
|
||||
if (! $info_bits) $info_bits=0;
|
||||
if (empty($txtva)) $txtva=0;
|
||||
if (empty($txlocaltax1)) $txlocaltax1=0;
|
||||
if (empty($txlocaltax2)) $txlocaltax2=0;
|
||||
if (empty($remise_percent)) $remise_percent=0;
|
||||
if ($this->statut == self::STATUS_DRAFT)
|
||||
{
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php';
|
||||
|
||||
$remise_percent=price2num($remise_percent);
|
||||
$qty=price2num($qty);
|
||||
$pu_ht=price2num($pu_ht);
|
||||
$pu_ht_devise=price2num($pu_ht_devise);
|
||||
$pu_ttc=price2num($pu_ttc);
|
||||
$txtva = price2num($txtva);
|
||||
$txlocaltax1 = price2num($txlocaltax1);
|
||||
$txlocaltax2 = price2num($txlocaltax2);
|
||||
if ($price_base_type=='HT')
|
||||
{
|
||||
$pu=$pu_ht;
|
||||
}
|
||||
else
|
||||
{
|
||||
$pu=$pu_ttc;
|
||||
}
|
||||
$desc=trim($desc);
|
||||
// Clean parameters
|
||||
if (! $qty) $qty=1;
|
||||
if (! $info_bits) $info_bits=0;
|
||||
if (empty($txtva)) $txtva=0;
|
||||
if (empty($txlocaltax1)) $txlocaltax1=0;
|
||||
if (empty($txlocaltax2)) $txlocaltax2=0;
|
||||
if (empty($remise_percent)) $remise_percent=0;
|
||||
|
||||
$remise_percent=price2num($remise_percent);
|
||||
$qty=price2num($qty);
|
||||
$pu_ht=price2num($pu_ht);
|
||||
$pu_ht_devise=price2num($pu_ht_devise);
|
||||
$pu_ttc=price2num($pu_ttc);
|
||||
if (!preg_match('/\((.*)\)/', $txtva)) {
|
||||
$txtva = price2num($txtva); // $txtva can have format '5.0(XXX)' or '5'
|
||||
}
|
||||
$txlocaltax1 = price2num($txlocaltax1);
|
||||
$txlocaltax2 = price2num($txlocaltax2);
|
||||
if ($price_base_type=='HT')
|
||||
{
|
||||
$pu=$pu_ht;
|
||||
}
|
||||
else
|
||||
{
|
||||
$pu=$pu_ttc;
|
||||
}
|
||||
$desc=trim($desc);
|
||||
|
||||
// Check parameters
|
||||
if ($qty < 1 && ! $fk_product)
|
||||
{
|
||||
$this->error=$langs->trans("ErrorFieldRequired",$langs->trans("Product"));
|
||||
return -1;
|
||||
}
|
||||
if ($type < 0) return -1;
|
||||
|
||||
// Check parameters
|
||||
if ($qty < 1 && ! $fk_product)
|
||||
{
|
||||
$this->error=$langs->trans("ErrorFieldRequired",$langs->trans("Product"));
|
||||
return -1;
|
||||
}
|
||||
if ($type < 0) return -1;
|
||||
|
||||
if ($this->statut == self::STATUS_DRAFT)
|
||||
{
|
||||
$this->db->begin();
|
||||
|
||||
if ($fk_product > 0)
|
||||
@ -1605,10 +1611,9 @@ class CommandeFournisseur extends CommonOrder
|
||||
$product_type = $type;
|
||||
}
|
||||
|
||||
// Calcul du total TTC et de la TVA pour la ligne a partir de
|
||||
// qty, pu, remise_percent et txtva
|
||||
// TRES IMPORTANT: C'est au moment de l'insertion ligne qu'on doit stocker
|
||||
// la part ht, tva et ttc, et ce au niveau de la ligne qui a son propre taux tva.
|
||||
if ($conf->multicurrency->enabled && $pu_ht_devise > 0) {
|
||||
$pu = 0;
|
||||
}
|
||||
|
||||
$localtaxes_type=getLocalTaxesFromRate($txtva,0,$mysoc,$this->thirdparty);
|
||||
|
||||
@ -1620,9 +1625,10 @@ class CommandeFournisseur extends CommonOrder
|
||||
$txtva = preg_replace('/\s*\(.*\)/', '', $txtva); // Remove code into vatrate.
|
||||
}
|
||||
|
||||
if ($conf->multicurrency->enabled && $pu_ht_devise > 0) {
|
||||
$pu = 0;
|
||||
}
|
||||
// Calcul du total TTC et de la TVA pour la ligne a partir de
|
||||
// qty, pu, remise_percent et txtva
|
||||
// TRES IMPORTANT: C'est au moment de l'insertion ligne qu'on doit stocker
|
||||
// la part ht, tva et ttc, et ce au niveau de la ligne qui a son propre taux tva.
|
||||
|
||||
$tabprice = calcul_price_total($qty, $pu, $remise_percent, $txtva, $txlocaltax1, $txlocaltax2, 0, $price_base_type, $info_bits, $product_type, $this->thirdparty, $localtaxes_type, 100, $this->multicurrency_tx,$pu_ht_devise);
|
||||
|
||||
|
||||
@ -1564,201 +1564,214 @@ class FactureFournisseur extends CommonInvoice
|
||||
dol_syslog(get_class($this)."::addline $desc,$pu,$qty,$txtva,$fk_product,$remise_percent,$date_start,$date_end,$ventil,$info_bits,$price_base_type,$type,$fk_unit", LOG_DEBUG);
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php';
|
||||
|
||||
// Clean parameters
|
||||
if (empty($remise_percent)) $remise_percent=0;
|
||||
if (empty($qty)) $qty=0;
|
||||
if (empty($info_bits)) $info_bits=0;
|
||||
if (empty($rang)) $rang=0;
|
||||
if (empty($ventil)) $ventil=0;
|
||||
if (empty($txtva)) $txtva=0;
|
||||
if (empty($txlocaltax1)) $txlocaltax1=0;
|
||||
if (empty($txlocaltax2)) $txlocaltax2=0;
|
||||
if ($this->statut == self::STATUS_DRAFT)
|
||||
{
|
||||
// Clean parameters
|
||||
if (empty($remise_percent)) $remise_percent=0;
|
||||
if (empty($qty)) $qty=0;
|
||||
if (empty($info_bits)) $info_bits=0;
|
||||
if (empty($rang)) $rang=0;
|
||||
if (empty($ventil)) $ventil=0;
|
||||
if (empty($txtva)) $txtva=0;
|
||||
if (empty($txlocaltax1)) $txlocaltax1=0;
|
||||
if (empty($txlocaltax2)) $txlocaltax2=0;
|
||||
|
||||
$this->db->begin();
|
||||
$remise_percent=price2num($remise_percent);
|
||||
$qty=price2num($qty);
|
||||
$pu=price2num($pu);
|
||||
$txlocaltax1=price2num($txlocaltax1);
|
||||
$txlocaltax2=price2num($txlocaltax2);
|
||||
if (!preg_match('/\((.*)\)/', $txtva)) {
|
||||
$txtva = price2num($txtva); // $txtva can have format '5,1' or '5.1' or '5.1(XXX)', we must clean only if '5,1'
|
||||
}
|
||||
|
||||
if ($fk_product > 0)
|
||||
{
|
||||
if (! empty($conf->global->SUPPLIER_INVOICE_WITH_PREDEFINED_PRICES_ONLY))
|
||||
{
|
||||
// Check quantity is enough
|
||||
dol_syslog(get_class($this)."::addline we check supplier prices fk_product=".$fk_product." qty=".$qty." ref_supplier=".$ref_supplier);
|
||||
$prod = new Product($this->db, $fk_product);
|
||||
if ($prod->fetch($fk_product) > 0)
|
||||
{
|
||||
$product_type = $prod->type;
|
||||
$label = $prod->label;
|
||||
$fk_prod_fourn_price = 0;
|
||||
$this->db->begin();
|
||||
|
||||
// We use 'none' instead of $ref_supplier, because $ref_supplier may not exists anymore. So we will take the first supplier price ok.
|
||||
// If we want a dedicated supplier price, we must provide $fk_prod_fourn_price.
|
||||
$result=$prod->get_buyprice($fk_prod_fourn_price, $qty, $fk_product, 'none', ($this->fk_soc?$this->fk_soc:$this->socid)); // Search on couple $fk_prod_fourn_price/$qty first, then on triplet $qty/$fk_product/$ref_supplier/$this->fk_soc
|
||||
if ($result > 0)
|
||||
{
|
||||
$pu = $prod->fourn_pu; // Unit price supplier price set by get_buyprice
|
||||
$ref_supplier = $prod->ref_supplier; // Ref supplier price set by get_buyprice
|
||||
// is remise percent not keyed but present for the product we add it
|
||||
if ($remise_percent == 0 && $prod->remise_percent !=0)
|
||||
$remise_percent =$prod->remise_percent;
|
||||
}
|
||||
if ($result == 0) // If result == 0, we failed to found the supplier reference price
|
||||
{
|
||||
$langs->load("errors");
|
||||
$this->error = "Ref " . $prod->ref . " " . $langs->trans("ErrorQtyTooLowForThisSupplier");
|
||||
$this->db->rollback();
|
||||
dol_syslog(get_class($this)."::addline we did not found supplier price, so we can't guess unit price");
|
||||
//$pu = $prod->fourn_pu; // We do not overwrite unit price
|
||||
//$ref = $prod->ref_fourn; // We do not overwrite ref supplier price
|
||||
return -1;
|
||||
}
|
||||
if ($result == -1)
|
||||
{
|
||||
$langs->load("errors");
|
||||
$this->error = "Ref " . $prod->ref . " " . $langs->trans("ErrorQtyTooLowForThisSupplier");
|
||||
$this->db->rollback();
|
||||
dol_syslog(get_class($this)."::addline result=".$result." - ".$this->error, LOG_DEBUG);
|
||||
return -1;
|
||||
}
|
||||
if ($result < -1)
|
||||
{
|
||||
$this->error=$prod->error;
|
||||
$this->db->rollback();
|
||||
dol_syslog(get_class($this)."::addline result=".$result." - ".$this->error, LOG_ERR);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->error=$prod->error;
|
||||
$this->db->rollback();
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
if ($fk_product > 0)
|
||||
{
|
||||
if (! empty($conf->global->SUPPLIER_INVOICE_WITH_PREDEFINED_PRICES_ONLY))
|
||||
{
|
||||
// Check quantity is enough
|
||||
dol_syslog(get_class($this)."::addline we check supplier prices fk_product=".$fk_product." qty=".$qty." ref_supplier=".$ref_supplier);
|
||||
$prod = new Product($this->db, $fk_product);
|
||||
if ($prod->fetch($fk_product) > 0)
|
||||
{
|
||||
$product_type = $prod->type;
|
||||
$label = $prod->label;
|
||||
$fk_prod_fourn_price = 0;
|
||||
|
||||
// We use 'none' instead of $ref_supplier, because $ref_supplier may not exists anymore. So we will take the first supplier price ok.
|
||||
// If we want a dedicated supplier price, we must provide $fk_prod_fourn_price.
|
||||
$result=$prod->get_buyprice($fk_prod_fourn_price, $qty, $fk_product, 'none', ($this->fk_soc?$this->fk_soc:$this->socid)); // Search on couple $fk_prod_fourn_price/$qty first, then on triplet $qty/$fk_product/$ref_supplier/$this->fk_soc
|
||||
if ($result > 0)
|
||||
{
|
||||
$pu = $prod->fourn_pu; // Unit price supplier price set by get_buyprice
|
||||
$ref_supplier = $prod->ref_supplier; // Ref supplier price set by get_buyprice
|
||||
// is remise percent not keyed but present for the product we add it
|
||||
if ($remise_percent == 0 && $prod->remise_percent !=0)
|
||||
$remise_percent =$prod->remise_percent;
|
||||
}
|
||||
if ($result == 0) // If result == 0, we failed to found the supplier reference price
|
||||
{
|
||||
$langs->load("errors");
|
||||
$this->error = "Ref " . $prod->ref . " " . $langs->trans("ErrorQtyTooLowForThisSupplier");
|
||||
$this->db->rollback();
|
||||
dol_syslog(get_class($this)."::addline we did not found supplier price, so we can't guess unit price");
|
||||
//$pu = $prod->fourn_pu; // We do not overwrite unit price
|
||||
//$ref = $prod->ref_fourn; // We do not overwrite ref supplier price
|
||||
return -1;
|
||||
}
|
||||
if ($result == -1)
|
||||
{
|
||||
$langs->load("errors");
|
||||
$this->error = "Ref " . $prod->ref . " " . $langs->trans("ErrorQtyTooLowForThisSupplier");
|
||||
$this->db->rollback();
|
||||
dol_syslog(get_class($this)."::addline result=".$result." - ".$this->error, LOG_DEBUG);
|
||||
return -1;
|
||||
}
|
||||
if ($result < -1)
|
||||
{
|
||||
$this->error=$prod->error;
|
||||
$this->db->rollback();
|
||||
dol_syslog(get_class($this)."::addline result=".$result." - ".$this->error, LOG_ERR);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->error=$prod->error;
|
||||
$this->db->rollback();
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$product_type = $type;
|
||||
}
|
||||
|
||||
if ($conf->multicurrency->enabled && $pu_ht_devise > 0) {
|
||||
$pu = 0;
|
||||
}
|
||||
|
||||
$localtaxes_type=getLocalTaxesFromRate($txtva, 0, $mysoc, $this->thirdparty);
|
||||
|
||||
// Clean vat code
|
||||
$vat_src_code='';
|
||||
if (preg_match('/\((.*)\)/', $txtva, $reg))
|
||||
{
|
||||
$vat_src_code = $reg[1];
|
||||
$txtva = preg_replace('/\s*\(.*\)/', '', $txtva); // Remove code into vatrate.
|
||||
}
|
||||
|
||||
// Calcul du total TTC et de la TVA pour la ligne a partir de
|
||||
// qty, pu, remise_percent et txtva
|
||||
// TRES IMPORTANT: C'est au moment de l'insertion ligne qu'on doit stocker
|
||||
// la part ht, tva et ttc, et ce au niveau de la ligne qui a son propre taux tva.
|
||||
|
||||
$tabprice = calcul_price_total($qty, $pu, $remise_percent, $txtva, $txlocaltax1, $txlocaltax2, 0, $price_base_type, $info_bits, $type, $this->thirdparty, $localtaxes_type, 100, $this->multicurrency_tx, $pu_ht_devise);
|
||||
$total_ht = $tabprice[0];
|
||||
$total_tva = $tabprice[1];
|
||||
$total_ttc = $tabprice[2];
|
||||
$total_localtax1 = $tabprice[9];
|
||||
$total_localtax2 = $tabprice[10];
|
||||
$pu_ht = $tabprice[3];
|
||||
|
||||
// MultiCurrency
|
||||
$multicurrency_total_ht = $tabprice[16];
|
||||
$multicurrency_total_tva = $tabprice[17];
|
||||
$multicurrency_total_ttc = $tabprice[18];
|
||||
$pu_ht_devise = $tabprice[19];
|
||||
|
||||
// Check parameters
|
||||
if ($type < 0) return -1;
|
||||
|
||||
if ($rang < 0)
|
||||
{
|
||||
$rangmax = $this->line_max();
|
||||
$rang = $rangmax + 1;
|
||||
}
|
||||
|
||||
// Insert line
|
||||
$this->line=new SupplierInvoiceLine($this->db);
|
||||
|
||||
$this->line->context = $this->context;
|
||||
|
||||
$this->line->fk_facture_fourn=$this->id;
|
||||
//$this->line->label=$label; // deprecated
|
||||
$this->line->desc=$desc;
|
||||
$this->line->qty= ($this->type==self::TYPE_CREDIT_NOTE?abs($qty):$qty); // For credit note, quantity is always positive and unit price negative
|
||||
$this->line->ref_supplier=$ref_supplier;
|
||||
|
||||
$this->line->vat_src_code=$vat_src_code;
|
||||
$this->line->tva_tx=$txtva;
|
||||
$this->line->localtax1_tx=($total_localtax1?$localtaxes_type[1]:0);
|
||||
$this->line->localtax2_tx=($total_localtax2?$localtaxes_type[3]:0);
|
||||
$this->line->localtax1_type = $localtaxes_type[0];
|
||||
$this->line->localtax2_type = $localtaxes_type[2];
|
||||
$this->line->fk_product=$fk_product;
|
||||
$this->line->product_type=$type;
|
||||
$this->line->remise_percent=$remise_percent;
|
||||
$this->line->subprice= ($this->type==self::TYPE_CREDIT_NOTE?-abs($pu_ht):$pu_ht); // For credit note, unit price always negative, always positive otherwise
|
||||
$this->line->date_start=$date_start;
|
||||
$this->line->date_end=$date_end;
|
||||
$this->line->ventil=$ventil;
|
||||
$this->line->rang=$rang;
|
||||
$this->line->info_bits=$info_bits;
|
||||
$this->line->total_ht= (($this->type==self::TYPE_CREDIT_NOTE||$qty<0)?-abs($total_ht):$total_ht); // For credit note and if qty is negative, total is negative
|
||||
$this->line->total_tva= $total_tva;
|
||||
$this->line->total_localtax1=$total_localtax1;
|
||||
$this->line->total_localtax2=$total_localtax2;
|
||||
$this->line->total_ttc= (($this->type==self::TYPE_CREDIT_NOTE||$qty<0)?-abs($total_ttc):$total_ttc);
|
||||
$this->line->special_code=$this->special_code;
|
||||
$this->line->fk_parent_line=$this->fk_parent_line;
|
||||
$this->line->origin=$this->origin;
|
||||
$this->line->origin_id=$origin_id;
|
||||
$this->line->fk_unit=$fk_unit;
|
||||
|
||||
// Multicurrency
|
||||
$this->line->fk_multicurrency = $this->fk_multicurrency;
|
||||
$this->line->multicurrency_code = $this->multicurrency_code;
|
||||
$this->line->multicurrency_subprice = $pu_ht_devise;
|
||||
$this->line->multicurrency_total_ht = $multicurrency_total_ht;
|
||||
$this->line->multicurrency_total_tva = $multicurrency_total_tva;
|
||||
$this->line->multicurrency_total_ttc = $multicurrency_total_ttc;
|
||||
|
||||
if (is_array($array_options) && count($array_options)>0) {
|
||||
$this->line->array_options=$array_options;
|
||||
}
|
||||
|
||||
$result=$this->line->insert($notrigger);
|
||||
if ($result > 0)
|
||||
{
|
||||
// Reorder if child line
|
||||
if (! empty($fk_parent_line)) $this->line_order(true,'DESC');
|
||||
|
||||
// Mise a jour informations denormalisees au niveau de la facture meme
|
||||
$result=$this->update_price(1,'auto',0,$this->thirdparty); // The addline method is designed to add line from user input so total calculation with update_price must be done using 'auto' mode.
|
||||
if ($result > 0)
|
||||
{
|
||||
$this->db->commit();
|
||||
return $this->line->id;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->error=$this->db->error();
|
||||
$this->db->rollback();
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->error=$this->line->error;
|
||||
$this->errors=$this->line->errors;
|
||||
$this->db->rollback();
|
||||
return -2;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$product_type = $type;
|
||||
}
|
||||
|
||||
|
||||
$localtaxes_type=getLocalTaxesFromRate($txtva, 0, $mysoc, $this->thirdparty);
|
||||
|
||||
// Clean vat code
|
||||
$vat_src_code='';
|
||||
if (preg_match('/\((.*)\)/', $txtva, $reg))
|
||||
{
|
||||
$vat_src_code = $reg[1];
|
||||
$txtva = preg_replace('/\s*\(.*\)/', '', $txtva); // Remove code into vatrate.
|
||||
}
|
||||
|
||||
$remise_percent=price2num($remise_percent);
|
||||
$qty=price2num($qty);
|
||||
$pu=price2num($pu);
|
||||
$txtva=price2num($txtva);
|
||||
$txlocaltax1=price2num($txlocaltax1);
|
||||
$txlocaltax2=price2num($txlocaltax2);
|
||||
|
||||
if ($conf->multicurrency->enabled && $pu_ht_devise > 0) {
|
||||
$pu = 0;
|
||||
}
|
||||
|
||||
$tabprice = calcul_price_total($qty, $pu, $remise_percent, $txtva, $txlocaltax1, $txlocaltax2, 0, $price_base_type, $info_bits, $type, $this->thirdparty, $localtaxes_type, 100, $this->multicurrency_tx, $pu_ht_devise);
|
||||
$total_ht = $tabprice[0];
|
||||
$total_tva = $tabprice[1];
|
||||
$total_ttc = $tabprice[2];
|
||||
$total_localtax1 = $tabprice[9];
|
||||
$total_localtax2 = $tabprice[10];
|
||||
$pu_ht = $tabprice[3];
|
||||
|
||||
// MultiCurrency
|
||||
$multicurrency_total_ht = $tabprice[16];
|
||||
$multicurrency_total_tva = $tabprice[17];
|
||||
$multicurrency_total_ttc = $tabprice[18];
|
||||
$pu_ht_devise = $tabprice[19];
|
||||
|
||||
// Check parameters
|
||||
if ($type < 0) return -1;
|
||||
|
||||
if ($rang < 0)
|
||||
{
|
||||
$rangmax = $this->line_max();
|
||||
$rang = $rangmax + 1;
|
||||
}
|
||||
|
||||
// Insert line
|
||||
$this->line=new SupplierInvoiceLine($this->db);
|
||||
|
||||
$this->line->context = $this->context;
|
||||
|
||||
$this->line->fk_facture_fourn=$this->id;
|
||||
//$this->line->label=$label; // deprecated
|
||||
$this->line->desc=$desc;
|
||||
$this->line->qty= ($this->type==self::TYPE_CREDIT_NOTE?abs($qty):$qty); // For credit note, quantity is always positive and unit price negative
|
||||
$this->line->ref_supplier=$ref_supplier;
|
||||
|
||||
$this->line->vat_src_code=$vat_src_code;
|
||||
$this->line->tva_tx=$txtva;
|
||||
$this->line->localtax1_tx=($total_localtax1?$localtaxes_type[1]:0);
|
||||
$this->line->localtax2_tx=($total_localtax2?$localtaxes_type[3]:0);
|
||||
$this->line->localtax1_type = $localtaxes_type[0];
|
||||
$this->line->localtax2_type = $localtaxes_type[2];
|
||||
$this->line->fk_product=$fk_product;
|
||||
$this->line->product_type=$type;
|
||||
$this->line->remise_percent=$remise_percent;
|
||||
$this->line->subprice= ($this->type==self::TYPE_CREDIT_NOTE?-abs($pu_ht):$pu_ht); // For credit note, unit price always negative, always positive otherwise
|
||||
$this->line->date_start=$date_start;
|
||||
$this->line->date_end=$date_end;
|
||||
$this->line->ventil=$ventil;
|
||||
$this->line->rang=$rang;
|
||||
$this->line->info_bits=$info_bits;
|
||||
$this->line->total_ht= (($this->type==self::TYPE_CREDIT_NOTE||$qty<0)?-abs($total_ht):$total_ht); // For credit note and if qty is negative, total is negative
|
||||
$this->line->total_tva= $total_tva;
|
||||
$this->line->total_localtax1=$total_localtax1;
|
||||
$this->line->total_localtax2=$total_localtax2;
|
||||
$this->line->total_ttc= (($this->type==self::TYPE_CREDIT_NOTE||$qty<0)?-abs($total_ttc):$total_ttc);
|
||||
$this->line->special_code=$this->special_code;
|
||||
$this->line->fk_parent_line=$this->fk_parent_line;
|
||||
$this->line->origin=$this->origin;
|
||||
$this->line->origin_id=$origin_id;
|
||||
$this->line->fk_unit=$fk_unit;
|
||||
|
||||
// Multicurrency
|
||||
$this->line->fk_multicurrency = $this->fk_multicurrency;
|
||||
$this->line->multicurrency_code = $this->multicurrency_code;
|
||||
$this->line->multicurrency_subprice = $pu_ht_devise;
|
||||
$this->line->multicurrency_total_ht = $multicurrency_total_ht;
|
||||
$this->line->multicurrency_total_tva = $multicurrency_total_tva;
|
||||
$this->line->multicurrency_total_ttc = $multicurrency_total_ttc;
|
||||
|
||||
if (is_array($array_options) && count($array_options)>0) {
|
||||
$this->line->array_options=$array_options;
|
||||
}
|
||||
|
||||
$result=$this->line->insert($notrigger);
|
||||
if ($result > 0)
|
||||
{
|
||||
// Reorder if child line
|
||||
if (! empty($fk_parent_line)) $this->line_order(true,'DESC');
|
||||
|
||||
// Mise a jour informations denormalisees au niveau de la facture meme
|
||||
$result=$this->update_price(1,'auto',0,$this->thirdparty); // The addline method is designed to add line from user input so total calculation with update_price must be done using 'auto' mode.
|
||||
if ($result > 0)
|
||||
{
|
||||
$this->db->commit();
|
||||
return $this->line->id;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->error=$this->db->error();
|
||||
$this->db->rollback();
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->error=$this->line->error;
|
||||
$this->errors=$this->line->errors;
|
||||
$this->db->rollback();
|
||||
return -2;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -105,6 +105,9 @@ insert into llx_c_action_trigger (code,label,description,elementtype,rang) value
|
||||
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('HOLIDAY_APPROVE','Expense report approved','Executed when an expense report is approved','expensereport',203);
|
||||
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('PROJECT_VALIDATE','Project validation','Executed when a project is validated','project',141);
|
||||
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('PROJECT_DELETE','Project deleted','Executed when a project is deleted','project',143);
|
||||
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('TICKET_CREATE','Ticket created','Executed when a ticket is created','ticket',161);
|
||||
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('TICKET_MODIFY','Ticket modified','Executed when a ticket is modified','ticket',163);
|
||||
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('TICKET_DELETE','Ticket deleted','Executed when a ticket is deleted','ticket',164);
|
||||
-- actions not enabled by default (no constant created for that) when we enable module agenda
|
||||
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('PRODUCT_MODIFY','Product or service modified','Executed when a product or sevice is modified','product',41);
|
||||
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('MEMBER_MODIFY','Member modified','Executed when a member is modified','member',23);
|
||||
|
||||
@ -317,6 +317,7 @@ ALTER TABLE llx_accounting_bookkeeping MODIFY COLUMN multicurrency_amount double
|
||||
|
||||
|
||||
ALTER TABLE llx_paiementfourn ADD COLUMN model_pdf varchar(255);
|
||||
ALTER TABLE llx_paiementfourn ADD COLUMN fk_user_modif integer AFTER fk_user_author;
|
||||
|
||||
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('EXPENSE_REPORT_CREATE','Expense report created','Executed when an expense report is created','expensereport',201);
|
||||
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('EXPENSE_REPORT_VALIDATE','Expense report validated','Executed when an expense report is validated','expensereport',202);
|
||||
|
||||
@ -218,7 +218,9 @@ UPDATE llx_societe_rib set type = 'ban' where type = '' OR type IS NULL;
|
||||
-- VMYSQL4.3 ALTER TABLE llx_societe_rib MODIFY COLUMN type varchar(32) NOT NULL;
|
||||
-- VPGSQL8.2 ALTER TABLE llx_societe_rib ALTER COLUMN type SET NOT NULL;
|
||||
|
||||
|
||||
|
||||
ALTER TABLE llx_ticket_msg DROP FOREIGN KEY fk_ticket_msg_fk_track_id;
|
||||
|
||||
-- Module ticket
|
||||
CREATE TABLE llx_ticket
|
||||
(
|
||||
@ -265,17 +267,6 @@ CREATE TABLE llx_ticket_msg
|
||||
|
||||
ALTER TABLE llx_ticket_msg ADD CONSTRAINT fk_ticket_msg_fk_track_id FOREIGN KEY (fk_track_id) REFERENCES llx_ticket (track_id);
|
||||
|
||||
CREATE TABLE llx_ticket_logs
|
||||
(
|
||||
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||
entity integer DEFAULT 1,
|
||||
fk_track_id varchar(128),
|
||||
fk_user_create integer,
|
||||
datec datetime,
|
||||
message text
|
||||
)ENGINE=innodb;
|
||||
|
||||
ALTER TABLE llx_ticket_logs ADD CONSTRAINT fk_ticket_logs_fk_track_id FOREIGN KEY (fk_track_id) REFERENCES llx_ticket (track_id);
|
||||
|
||||
CREATE TABLE llx_ticket_extrafields
|
||||
(
|
||||
@ -568,3 +559,4 @@ ALTER TABLE llx_advtargetemailing ADD COLUMN type_element varchar(180) NOT NULL;
|
||||
UPDATE llx_advtargetemailing SET fk_element = fk_mailing, type_element='mailing';
|
||||
ALTER TABLE llx_advtargetemailing DROP COLUMN fk_mailing;
|
||||
|
||||
DROP TABLE llx_ticket_logs;
|
||||
|
||||
@ -150,6 +150,9 @@ UPDATE llx_c_payment_term SET decalage = nbjour, nbjour = 0 where decalage IS NU
|
||||
UPDATE llx_holiday SET ref = rowid WHERE ref IS NULL;
|
||||
|
||||
|
||||
-- DROP TABLE llx_emailcollector_emailcollectorfilter;
|
||||
-- DROP TABLE llx_emailcollector_emailcollectoraction;
|
||||
-- DROP TABLE llx_emailcollector_emailcollector;
|
||||
|
||||
CREATE TABLE llx_emailcollector_emailcollector(
|
||||
-- BEGIN MODULEBUILDER FIELDS
|
||||
|
||||
@ -27,6 +27,31 @@
|
||||
-- To set a field as default NULL: -- VPGSQL8.2 ALTER TABLE llx_table ALTER COLUMN name SET DEFAULT NULL;
|
||||
-- Note: fields with type BLOB/TEXT can't have default value.
|
||||
|
||||
|
||||
|
||||
-- Missing in 9.0
|
||||
|
||||
|
||||
|
||||
-- For 10.0
|
||||
|
||||
ALTER TABLE llx_facture DROP INDEX idx_facture_uk_facnumber;
|
||||
ALTER TABLE llx_facture CHANGE facnumber ref VARCHAR(30) NOT NULL;
|
||||
ALTER TABLE llx_facture ADD UNIQUE idx_facture_uk_ref (ref, entity);
|
||||
ALTER TABLE llx_facture ADD UNIQUE INDEX uk_facture_ref (ref, entity);
|
||||
|
||||
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('TICKET_CREATE','Ticket created','Executed when a ticket is created','ticket',161);
|
||||
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('TICKET_MODIFY','Ticket modified','Executed when a ticket is modified','ticket',163);
|
||||
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('TICKET_DELETE','Ticket deleted','Executed when a ticket is deleted','ticket',164);
|
||||
|
||||
create table llx_mailing_unsubscribe
|
||||
(
|
||||
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||
entity integer DEFAULT 1 NOT NULL, -- multi company id
|
||||
email varchar(255),
|
||||
unsubscribegroup varchar(128) DEFAULT '',
|
||||
ip varchar(128),
|
||||
date_creat datetime, -- creation date
|
||||
tms timestamp
|
||||
)ENGINE=innodb;
|
||||
|
||||
ALTER TABLE llx_mailing_unsubscribe ADD UNIQUE uk_mailing_unsubscribe(email, entity, unsubscribegroup);
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
--
|
||||
--
|
||||
-- Actions commerciales
|
||||
-- Table to store external URL links to documents
|
||||
-- ========================================================================
|
||||
|
||||
create table llx_links
|
||||
|
||||
20
htdocs/install/mysql/tables/llx_mailing_unsubscribe.key.sql
Normal file
20
htdocs/install/mysql/tables/llx_mailing_unsubscribe.key.sql
Normal file
@ -0,0 +1,20 @@
|
||||
-- ===================================================================
|
||||
-- Copyright (C) 2018 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
--
|
||||
-- This program is free software; you can redistribute it and/or modify
|
||||
-- it under the terms of the GNU General Public License as published by
|
||||
-- the Free Software Foundation; either version 3 of the License, or
|
||||
-- (at your option) any later version.
|
||||
--
|
||||
-- This program is distributed in the hope that it will be useful,
|
||||
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
-- GNU General Public License for more details.
|
||||
--
|
||||
-- You should have received a copy of the GNU General Public License
|
||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
--
|
||||
-- ===================================================================
|
||||
|
||||
|
||||
ALTER TABLE llx_mailing_unsubscribe ADD UNIQUE uk_mailing_unsubscribe(email, entity, unsubscribegroup);
|
||||
30
htdocs/install/mysql/tables/llx_mailing_unsubscribe.sql
Normal file
30
htdocs/install/mysql/tables/llx_mailing_unsubscribe.sql
Normal file
@ -0,0 +1,30 @@
|
||||
-- ========================================================================
|
||||
-- Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
-- Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
--
|
||||
-- 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
|
||||
-- the Free Software Foundation; either version 3 of the License, or
|
||||
-- (at your option) any later version.
|
||||
--
|
||||
-- This program is distributed in the hope that it will be useful,
|
||||
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
-- GNU General Public License for more details.
|
||||
--
|
||||
-- You should have received a copy of the GNU General Public License
|
||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
--
|
||||
-- ========================================================================
|
||||
|
||||
|
||||
create table llx_mailing_unsubscribe
|
||||
(
|
||||
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||
entity integer DEFAULT 1 NOT NULL, -- multi company id
|
||||
email varchar(255),
|
||||
unsubscribegroup varchar(128) DEFAULT '',
|
||||
ip varchar(128),
|
||||
date_creat datetime, -- creation date
|
||||
tms timestamp
|
||||
)ENGINE=innodb;
|
||||
@ -53,7 +53,7 @@ create table llx_socpeople
|
||||
whatsapp varchar(255), --
|
||||
|
||||
photo varchar(255),
|
||||
no_email smallint NOT NULL DEFAULT 0,
|
||||
no_email smallint NOT NULL DEFAULT 0, -- deprecated. Use table llx_mailing_unsubscribe instead
|
||||
priv smallint NOT NULL DEFAULT 0,
|
||||
fk_user_creat integer DEFAULT 0, -- user qui a creel'enregistrement
|
||||
fk_user_modif integer,
|
||||
|
||||
@ -1,17 +0,0 @@
|
||||
-- SQL definition for module ticket
|
||||
-- Copyright (C) 2013 Jean-François FERRY <hello@librethic.io>
|
||||
--
|
||||
-- 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
|
||||
-- the Free Software Foundation, either version 3 of the License, or
|
||||
-- (at your option) any later version.
|
||||
--
|
||||
-- This program is distributed in the hope that it will be useful,
|
||||
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
-- GNU General Public License for more details.
|
||||
--
|
||||
-- You should have received a copy of the GNU General Public License
|
||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
ALTER TABLE llx_ticket_logs ADD CONSTRAINT fk_ticket_logs_fk_track_id FOREIGN KEY (fk_track_id) REFERENCES llx_ticket (track_id);
|
||||
@ -1,25 +0,0 @@
|
||||
-- SQL definition for module ticket
|
||||
-- Copyright (C) 2013 Jean-François FERRY <hello@librethic.io>
|
||||
--
|
||||
-- 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
|
||||
-- the Free Software Foundation, either version 3 of the License, or
|
||||
-- (at your option) any later version.
|
||||
--
|
||||
-- This program is distributed in the hope that it will be useful,
|
||||
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
-- GNU General Public License for more details.
|
||||
--
|
||||
-- You should have received a copy of the GNU General Public License
|
||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
CREATE TABLE llx_ticket_logs
|
||||
(
|
||||
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||
entity integer DEFAULT 1,
|
||||
fk_track_id varchar(128),
|
||||
fk_user_create integer,
|
||||
datec datetime,
|
||||
message text
|
||||
)ENGINE=innodb;
|
||||
@ -57,6 +57,7 @@ $langs->loadLangs(array("admin", "install"));
|
||||
$login = GETPOST('login', 'alpha')?GETPOST('login', 'alpha'):(empty($argv[5])?'':$argv[5]);
|
||||
$pass = GETPOST('pass', 'alpha')?GETPOST('pass', 'alpha'):(empty($argv[6])?'':$argv[6]);
|
||||
$pass_verif = GETPOST('pass_verif', 'alpha')?GETPOST('pass_verif', 'alpha'):(empty($argv[7])?'':$argv[7]);
|
||||
$force_install_lockinstall = (int) (! empty($force_install_lockinstall)?$force_install_lockinstall:(GETPOST('installlock','aZ09')?GETPOST('installlock','aZ09'):(empty($argv[8])?'':$argv[8])));
|
||||
|
||||
$success=0;
|
||||
|
||||
|
||||
@ -446,7 +446,7 @@ if (! GETPOST('action','aZ09') || preg_match('/upgrade/i',GETPOST('action','aZ09
|
||||
$beforeversionarray=explode('.','9.0.9');
|
||||
if (versioncompare($versiontoarray,$afterversionarray) >= 0 && versioncompare($versiontoarray,$beforeversionarray) <= 0)
|
||||
{
|
||||
//migrate_rename_directories($db,$langs,$conf,'/contracts','/contract');
|
||||
migrate_user_photospath();
|
||||
}
|
||||
}
|
||||
|
||||
@ -2922,9 +2922,9 @@ function migrate_project_task_actors($db,$langs,$conf)
|
||||
* @param Conf $conf Object conf
|
||||
* @param string $table Table name
|
||||
* @param int $fk_source Id of element source
|
||||
* @param type $sourcetype Type of element source
|
||||
* @param string $sourcetype Type of element source
|
||||
* @param int $fk_target Id of element target
|
||||
* @param type $targettype Type of element target
|
||||
* @param string $targettype Type of element target
|
||||
* @return void
|
||||
*/
|
||||
function migrate_relationship_tables($db,$langs,$conf,$table,$fk_source,$sourcetype,$fk_target,$targettype)
|
||||
@ -4826,7 +4826,99 @@ function migrate_reload_menu($db,$langs,$conf,$versionto)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Migrate file from old path to new one for users
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function migrate_user_photospath()
|
||||
{
|
||||
global $conf, $db, $langs, $user;
|
||||
|
||||
print '<tr><td colspan="4">';
|
||||
|
||||
print '<b>'.$langs->trans('MigrationUserPhotoPath')."</b><br>\n";
|
||||
|
||||
include_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php';
|
||||
$fuser = new User($db);
|
||||
|
||||
if (! is_object($user)) $user = $fuser; // To avoid error during migration
|
||||
|
||||
$sql = "SELECT rowid as uid from ".MAIN_DB_PREFIX."user"; // Get list of all users
|
||||
$resql = $db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
while ($obj = $db->fetch_object($resql))
|
||||
{
|
||||
$fuser->fetch($obj->uid);
|
||||
//echo '<hr>'.$fuser->id.' -> '.$fuser->entity;
|
||||
$entity = (empty($fuser->entity) ? 1 : $fuser->entity);
|
||||
if ($entity > 1) {
|
||||
$dir = DOL_DATA_ROOT . '/' . $entity . '/users';
|
||||
} else {
|
||||
$dir = $conf->user->multidir_output[$entity]; // $conf->user->multidir_output[] for each entity is construct by the multicompany module
|
||||
}
|
||||
|
||||
if ($dir)
|
||||
{
|
||||
//print "Process user id ".$fuser->id."<br>\n";
|
||||
$origin = $dir .'/'. get_exdir($fuser->id,2,0,1,$fuser,'user'); // Use old behaviour to get x/y path
|
||||
$destin = $dir .'/'. $fuser->id;
|
||||
|
||||
$origin_osencoded=dol_osencode($origin);
|
||||
|
||||
dol_mkdir($destin);
|
||||
|
||||
//echo '<hr>'.$origin.' -> '.$destin;
|
||||
if (dol_is_dir($origin))
|
||||
{
|
||||
$handle=opendir($origin_osencoded);
|
||||
if (is_resource($handle))
|
||||
{
|
||||
while (($file = readdir($handle)) !== false)
|
||||
{
|
||||
if ($file == '.' || $file == '..') continue;
|
||||
|
||||
if (dol_is_dir($origin.'/'.$file)) // it is a dir (like 'thumbs')
|
||||
{
|
||||
$thumbs = opendir($origin_osencoded.'/'.$file);
|
||||
if (is_resource($thumbs))
|
||||
{
|
||||
dol_mkdir($destin.'/'.$file);
|
||||
while (($thumb = readdir($thumbs)) !== false)
|
||||
{
|
||||
if (! dol_is_file($destin.'/'.$file.'/'.$thumb))
|
||||
{
|
||||
if ($thumb == '.' || $thumb == '..') continue;
|
||||
|
||||
//print $origin.'/'.$file.'/'.$thumb.' -> '.$destin.'/'.$file.'/'.$thumb.'<br>'."\n";
|
||||
print '.';
|
||||
dol_copy($origin.'/'.$file.'/'.$thumb, $destin.'/'.$file.'/'.$thumb, 0, 0);
|
||||
//var_dump('aaa');exit;
|
||||
}
|
||||
}
|
||||
// dol_delete_dir($origin.'/'.$file);
|
||||
}
|
||||
}
|
||||
else // it is a file
|
||||
{
|
||||
if (! dol_is_file($destin.'/'.$file))
|
||||
{
|
||||
//print $origin.'/'.$file.' -> '.$destin.'/'.$file.'<br>'."\n";
|
||||
print '.';
|
||||
dol_copy($origin.'/'.$file, $destin.'/'.$file, 0, 0);
|
||||
//var_dump('eee');exit;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
|
||||
/* A faire egalement: Modif statut paye et fk_facture des factures payes completement
|
||||
|
||||
@ -193,7 +193,7 @@ FeatureDisabledInDemo=الميزة معلطة في العرض التجريبي
|
||||
FeatureAvailableOnlyOnStable=Feature only available on official stable versions
|
||||
BoxesDesc=Widgets are components showing some information that you can add to personalize some pages. You can choose between showing the widget or not by selecting target page and clicking 'Activate', or by clicking the trashcan to disable it.
|
||||
OnlyActiveElementsAreShown=فقط العناصر من <a href="%s">النماذج المفعلة </a> سوف تظهر.
|
||||
ModulesDesc=The modules/applications determine which features are available in the software. Some modules require permissions to be granted to users after activating the module. Click the on/off button to enable/disable a module/application.
|
||||
ModulesDesc=The modules/applications determine which features are available in the software. Some modules require permissions to be granted to users after activating the module. Click the on/off button (at end of module line) to enable/disable a module/application.
|
||||
ModulesMarketPlaceDesc=You can find more modules to download on external websites on the Internet...
|
||||
ModulesDeployDesc=If permissions on your file system allow it, you can use this tool to deploy an external module. The module will then be visible on the tab <strong>%s</strong>.
|
||||
ModulesMarketPlaces=Find external app/modules
|
||||
@ -305,7 +305,7 @@ ModuleFamilyTechnic=أدوات وحدات متعددة
|
||||
ModuleFamilyExperimental=نماذج تجريبية
|
||||
ModuleFamilyFinancial=الوحدات المالية (المحاسبة / الخزانة)
|
||||
ModuleFamilyECM=إدارة المحتوى في المؤسسة
|
||||
ModuleFamilyPortal=المواقع على شبكة الإنترنت وتطبيق مباشر الآخرين
|
||||
ModuleFamilyPortal=Websites and other frontal application
|
||||
ModuleFamilyInterface=واجهات مع الأنظمة الخارجية
|
||||
MenuHandlers=قائمة مناولي
|
||||
MenuAdmin=قائمة تحرير
|
||||
@ -463,9 +463,9 @@ ClickToShowDescription=Click to show description
|
||||
DependsOn=This module needs the module(s)
|
||||
RequiredBy=This module is required by module(s)
|
||||
TheKeyIsTheNameOfHtmlField=This is the name of the HTML field. Technical knowledge is required to read the content of the HTML page to get the key name of a field.
|
||||
PageUrlForDefaultValues=You must enter the relative url of the page. If you include parameters in URL, the default values will be effective if all parameters are set to same value. Examples:
|
||||
PageUrlForDefaultValuesCreate=<br>For form to create a new thirdparty, it is <strong>%s</strong>,<br>If you want default value only if url has some parameter, you can use <strong>%s</strong>
|
||||
PageUrlForDefaultValuesList=<br>For page that list third-parties, it is <strong>%s</strong>,<br>If you want default value only if url has some parameter, you can use <strong>%s</strong>
|
||||
PageUrlForDefaultValues=You must enter the relative path of the page in URL. If you include parameters in URL, the default values will be effective if all parameters are set to same value.
|
||||
PageUrlForDefaultValuesCreate=<br>Example:<br>For the form to create a new thirdparty, it is <strong>%s</strong>.<br>For URL of external modules installed into custom directory, do not include the "custom/", so use path like <strong>mymodule/mypage.php</strong> and not custom/mymodule/mypage.php.<br>If you want default value only if url has some parameter, you can use <strong>%s</strong>
|
||||
PageUrlForDefaultValuesList=<br>Example:<br>For the page that list third-parties, it is <strong>%s</strong>.<br>For URL of external modules installed into custom directory, do not include the "custom/" so use path like <strong>mymodule/mypagelist.php</strong> and not custom/mymodule/mypagelist.php.<br>If you want default value only if url has some parameter, you can use <strong>%s</strong>
|
||||
EnableDefaultValues=Enable usage of personalized default values
|
||||
EnableOverwriteTranslation=Enable usage of overwritten translation
|
||||
GoIntoTranslationMenuToChangeThis=A translation has been found for the key with this code. To change this value, you must edit it from Home-Setup-translation.
|
||||
@ -487,7 +487,7 @@ DAV_ALLOW_ECM_DIRTooltip=The root directory where all files are manually uploade
|
||||
Module0Name=مجموعات المستخدمين
|
||||
Module0Desc=Users / Employees and Groups management
|
||||
Module1Name=Third Parties
|
||||
Module1Desc=شركات الاتصالات وإدارة
|
||||
Module1Desc=Companies and contacts management (customers, prospects...)
|
||||
Module2Name=التجارية
|
||||
Module2Desc=الإدارة التجارية
|
||||
Module10Name=المحاسبة
|
||||
@ -501,7 +501,7 @@ Module23Desc=مراقبة استهلاك الطاقة
|
||||
Module25Name=طلبات الزبائن
|
||||
Module25Desc=طلبات الزبائن إدارة
|
||||
Module30Name=فواتير
|
||||
Module30Desc=ويلاحظ اعتماد الفواتير وإدارة العملاء. فواتير إدارة الموردين
|
||||
Module30Desc=Management of invoices and credit notes for customers. Management of invoices and credit notes for suppliers
|
||||
Module40Name=الموردين
|
||||
Module40Desc=Suppliers and purchase management (purchase orders and billing)
|
||||
Module42Name=Debug Logs
|
||||
@ -902,7 +902,7 @@ DictionaryVAT=أسعار الضريبة على القيمة المضافة أو
|
||||
DictionaryRevenueStamp=Amount of tax stamps
|
||||
DictionaryPaymentConditions=شروط الدفع
|
||||
DictionaryPaymentModes=وسائل الدفع
|
||||
DictionaryTypeContact=Contact address types
|
||||
DictionaryTypeContact=Contacts/addresses types
|
||||
DictionaryTypeOfContainer=Type of website pages/containers
|
||||
DictionaryEcotaxe=ضرائب بيئية (WEEE)
|
||||
DictionaryPaperFormat=تنسيقات ورقة
|
||||
@ -967,6 +967,7 @@ CalcLocaltax3Desc=تقارير الضرائب المحلية هي مجموعه l
|
||||
LabelUsedByDefault=العلامة التي يستخدمها التقصير إذا لم يمكن العثور على ترجمة للقانون
|
||||
LabelOnDocuments=علامة على وثائق
|
||||
LabelOrTranslationKey=Label or translation key
|
||||
ValueOfConstantKey=Value of constant
|
||||
NbOfDays=No. of days
|
||||
AtEndOfMonth=في نهاية الشهر
|
||||
CurrentNext=Current/Next
|
||||
@ -1053,7 +1054,7 @@ SetupDescription3=<a href="%s">%s -> %s</a><br>Basic parameters used to customiz
|
||||
SetupDescription4=<a href="%s">%s -> %s</a><br>Dolibarr ERP/CRM is a collection of many modules/applications, all more or less independent. The modules relevant to your needs must be enabled and configured. New items/options are added to menus with the activation of a module.
|
||||
SetupDescription5=Other Setup menu entries provides optional parameters.
|
||||
LogEvents=مراجعة الحسابات الأحداث الأمنية
|
||||
Audit=المراجعة
|
||||
Audit=Security events
|
||||
InfoDolibarr=About Dolibarr
|
||||
InfoBrowser=About Browser
|
||||
InfoOS=About OS
|
||||
@ -1065,7 +1066,7 @@ BrowserName=اسم المتصفح
|
||||
BrowserOS=متصفح OS
|
||||
ListOfSecurityEvents=قائمة الأحداث الأمنية Dolibarr
|
||||
SecurityEventsPurged=تطهير الاحداث الامنية
|
||||
LogEventDesc=هنا يمكنك تمكين قطع الأشجار لDolibarr الأحداث الأمنية. يمكن للمشرفين ثم انظر مضمونه عبر <b>نظام</b> القائمة <b>أدوات -- لمراجعة الحسابات.</b> محذرا من أن هذه الميزة يمكن أن تستهلك كمية كبيرة من البيانات في قاعدة البيانات.
|
||||
LogEventDesc=You can enable here the logging for security events. Administrators can then see its content via menu <b>%s - %s</b>. Warning, this feature can consume a large amount of data in database.
|
||||
AreaForAdminOnly=Setup parameters can be set by <b>administrator users</b> only.
|
||||
SystemInfoDesc=نظام المعلومات المتنوعة المعلومات التقنية تحصل في قراءة فقط وواضحة للمشرفين فقط.
|
||||
SystemAreaForAdminOnly=هذا المجال المتاح لمدير المستخدمين فقط. أيا من Dolibarr أذونات يمكن أن تقلل من هذا الحد.
|
||||
@ -1096,7 +1097,7 @@ MAIN_ROUNDING_RULE_TOT=خطوة للتقريب النطاق (للبلدان ال
|
||||
UnitPriceOfProduct=صافي سعر وحدة من المنتج
|
||||
TotalPriceAfterRounding=إجمالي السعر الصافي / ضريبة القيمة المضافة / ضريبة مدفوع) بعد التقريب
|
||||
ParameterActiveForNextInputOnly=معلمة فعالة للمساهمة المقبل فقط
|
||||
NoEventOrNoAuditSetup=لا أمن الحدث وقد سجلت حتى الآن. هذا طبيعي ويمكن مراجعة الحسابات اذا لم يتم تمكين "الإعداد -- الأمن -- مراجعة" الصفحة.
|
||||
NoEventOrNoAuditSetup=No security event has been recorded yet. This can be normal if audit has not been enabled on "Setup - Security - Events" page.
|
||||
NoEventFoundWithCriteria=No security event has been found for this search criteria.
|
||||
SeeLocalSendMailSetup=انظر الى إرسال البريد الإعداد المحلي
|
||||
BackupDesc=لتقديم دعم كامل للDolibarr ، يجب عليك :
|
||||
@ -1141,7 +1142,7 @@ ExtraFieldsLinesRec=Complementary attributes (templates invoices lines)
|
||||
ExtraFieldsSupplierOrdersLines=سمات التكميلية (خطوط النظام)
|
||||
ExtraFieldsSupplierInvoicesLines=سمات التكميلية (خطوط الفاتورة)
|
||||
ExtraFieldsThirdParties=سمات التكميلية (مرشحين عن)
|
||||
ExtraFieldsContacts=Complementary attributes (contact address)
|
||||
ExtraFieldsContacts=Complementary attributes (contacts/address)
|
||||
ExtraFieldsMember=سمات التكميلية (عضو)
|
||||
ExtraFieldsMemberType=سمات التكميلية (النوع الأعضاء)
|
||||
ExtraFieldsCustomerInvoices=سمات التكميلية (الفواتير)
|
||||
@ -1701,7 +1702,7 @@ ListOfNotificationsPerUser=List of notifications per user*
|
||||
ListOfNotificationsPerUserOrContact=List of notifications per user* or per contact**
|
||||
ListOfFixedNotifications=قائمة الإشعارات ثابت
|
||||
GoOntoUserCardToAddMore=Go to the tab "Notifications" of a user to add or remove notifications for users
|
||||
GoOntoContactCardToAddMore=Go on the tab "Notifications" of a third party to add or remove notifications for contact addresses
|
||||
GoOntoContactCardToAddMore=Go on the tab "Notifications" of a third party to add or remove notifications for contacts/addresses
|
||||
Threshold=عتبة
|
||||
BackupDumpWizard=المعالج لبناء قاعدة بيانات النسخ الاحتياطي ملف تفريغ
|
||||
SomethingMakeInstallFromWebNotPossible=تركيب وحدة خارجية غير ممكن من واجهة ويب للسبب التالي:
|
||||
@ -1833,11 +1834,16 @@ EmailCollectorConfirmCollectTitle=Email collect confirmation
|
||||
EmailCollectorConfirmCollect=Do you want to run the collect for this collector now ?
|
||||
NoNewEmailToProcess=No new email (matching filters) to process
|
||||
NothingProcessed=Nothing done
|
||||
XEmailsDoneYActionsDone=%s emails analyzed, %s emails successfuly processed (for %s record/actions done) by collector
|
||||
RecordEvent=Record event
|
||||
XEmailsDoneYActionsDone=%s emails qualified, %s emails successfuly processed (for %s record/actions done) by collector
|
||||
RecordEvent=Record email event
|
||||
CreateLeadAndThirdParty=Create lead (and thirdparty if necessary)
|
||||
CodeLastResult=Result code of last collect
|
||||
NbOfEmailsInInbox=Number of email in source directory
|
||||
LoadThirdPartyFromName=Load thirdparty from name (load only)
|
||||
LoadThirdPartyFromNameOrCreate=Load thirdparty from name (create if not found)
|
||||
WithDolTrackingID=Dolibarr Tracking ID found
|
||||
WithoutDolTrackingID=Dolibarr Tracking ID not found
|
||||
FormatZip=الرمز البريدي
|
||||
##### Resource ####
|
||||
ResourceSetup=Configuration du module Resource
|
||||
UseSearchToSelectResource=Use a search form to choose a resource (rather than a drop-down list).
|
||||
|
||||
@ -7,7 +7,7 @@ BankName=اسم المصرف
|
||||
FinancialAccount=الحساب
|
||||
BankAccount=الحساب المصرفي
|
||||
BankAccounts=الحسابات المصرفية
|
||||
BankAccountsAndGateways=Bank accounts | Gateways
|
||||
BankAccountsAndGateways=Bank | Gateways
|
||||
ShowAccount=عرض الحساب
|
||||
AccountRef=مرجع الحساب المالي
|
||||
AccountLabel=بطاقة الحساب المالي
|
||||
@ -46,7 +46,7 @@ BankAccountDomiciliation=عنوان الحساب
|
||||
BankAccountCountry=بلد حساب
|
||||
BankAccountOwner=اسم صاحب الحساب
|
||||
BankAccountOwnerAddress=عنوان مالك الحساب
|
||||
RIBControlError=فشل التحقق من سلامة القيم. وهذا يعني أن المعلومات الخاصة برقم الحساب هذا غير كاملة أو خاطئة (راجع البلد والأرقام و إيبان).
|
||||
RIBControlError=Integrity check of values fails. This means the information for this account number is incomplete or incorrect (check country, numbers and IBAN).
|
||||
CreateAccount=إنشاء حساب
|
||||
NewBankAccount=حساب جديد
|
||||
NewFinancialAccount=حساب مالي جديد
|
||||
@ -76,6 +76,7 @@ TransactionsToConciliate=قيود للتسويات
|
||||
Conciliable=يمكن أن يتم تسويتة
|
||||
Conciliate=التسوية
|
||||
Conciliation=تسوية
|
||||
SaveStatementOnly=Save statement only
|
||||
ReconciliationLate=التسوية في وقت متأخر
|
||||
IncludeClosedAccount=وتشمل حسابات مغلقة
|
||||
OnlyOpenedAccount=الحسابات المفتوحة فقط
|
||||
@ -104,7 +105,7 @@ SocialContributionPayment=مدفوعات الضرائب الاجتماعية /
|
||||
BankTransfer=حوالة مصرفية
|
||||
BankTransfers=حوالات المصرفية
|
||||
MenuBankInternalTransfer=حوالة داخلية
|
||||
TransferDesc=التحويل من حساب إلى آخر، سوف يقوم دوليبار بكتابة سجلين (مدين في حساب المصدر و دائن في حساب الهدف، نفس المبلغ (باستثناء العلامة)، سيتم استخدام البطاقة و التاريخ لهذه المعاملة)
|
||||
TransferDesc=Transfer from one account to another one, Dolibarr will write two records (a debit in source account and a credit in target account). The same amount (except sign), label and date will be used for this transaction)
|
||||
TransferFrom=من
|
||||
TransferTo=إلى
|
||||
TransferFromToDone=التحويل من <b>%s</b>إلى <b>%s</b>من <b>%s</b>%s قد تم تسجيلة.
|
||||
@ -116,7 +117,7 @@ ConfirmDeleteCheckReceipt=هل انت متأكد أنك تريد حذف هذا
|
||||
BankChecks=الشيكات المصرفية
|
||||
BankChecksToReceipt=شيكات في انتظار الإيداع
|
||||
ShowCheckReceipt=عرض إيصال إيداع شيكات
|
||||
NumberOfCheques=عدد الشيكات
|
||||
NumberOfCheques=No. of check
|
||||
DeleteTransaction=حذف المعاملة
|
||||
ConfirmDeleteTransaction=هل تريد بالتأكيد حذف هذه المعاملة؟
|
||||
ThisWillAlsoDeleteBankRecord=سيؤدي هذا أيضا إلى حذف القيد البنكي الذي تم إنشاؤه
|
||||
@ -135,8 +136,8 @@ BankTransactionLine=قيد البنك
|
||||
AllAccounts=All bank and cash accounts
|
||||
BackToAccount=عودة إلى الحساب
|
||||
ShowAllAccounts=عرض لجميع الحسابات
|
||||
FutureTransaction=المعاملة أجلة. لا يوجد فرصة للتسوية.
|
||||
SelectChequeTransactionAndGenerate=تحديد / تصفية الشيكات ليتم تضمينها في ايصال ايداع الشيكات وانقر على "إنشاء".
|
||||
FutureTransaction=Transaction in future. No way to reconcile.
|
||||
SelectChequeTransactionAndGenerate=Select/filter checks to include in the check deposit receipt and click on "Create".
|
||||
InputReceiptNumber=اختيار كشف الحساب البنكي ذات الصلة مع التسوية. استخدام قيمة رقمية للفرز: شهر سنة أو يوم شهر سنة
|
||||
EventualyAddCategory=في نهاية المطاف، حدد الفئة التي لتصنيف السجلات
|
||||
ToConciliate=للتسوية؟
|
||||
@ -153,7 +154,7 @@ RejectCheckDate=تاريخ إرجاع الشيك
|
||||
CheckRejected=تم إرجاع الشيك
|
||||
CheckRejectedAndInvoicesReopened=تم ارجاع الشيك وإعادة فتح الفواتير
|
||||
BankAccountModelModule=نماذج مستندات للحسابات البنكية
|
||||
DocumentModelSepaMandate=نموذج تفويض سيبا. مفيدة للبلدان الأوروبية في السوق الأوروبية المشتركة فقط.
|
||||
DocumentModelSepaMandate=Template of SEPA mandate. Useful for European countries in EEC only.
|
||||
DocumentModelBan=نموذج لطباعة صفحة تحتوي على معلومات BAN .
|
||||
NewVariousPayment=مدفوعات متنوعة جديدة
|
||||
VariousPayment=مدفوعات متنوعة
|
||||
@ -162,4 +163,6 @@ ShowVariousPayment=عرض الدفعات المتنوعة
|
||||
AddVariousPayment=إضافة دفعات متنوعة
|
||||
SEPAMandate=SEPA mandate
|
||||
YourSEPAMandate=تفويض سيبا الخاص بك
|
||||
FindYourSEPAMandate=هذا هو تفويض سيبا الخاصة بك لتخويل شركتنا لتقديم أمر الخصم المباشر إلى البنك الذي تتعامل معه. شكرا للعودة وقعت (فحص الوثيقة الموقعة) أو إرسالها عن طريق البريد إلى
|
||||
FindYourSEPAMandate=This is your SEPA mandate to authorize our company to make direct debit order to your bank. Return it signed (scan of the signed document) or send it by mail to
|
||||
BankAccountReleveModule=Module Bank statement
|
||||
AutoReportLastAccountStatement=Automatic report account stament
|
||||
|
||||
@ -25,10 +25,10 @@ InvoiceProFormaAsk=الفاتورة الأولية
|
||||
InvoiceProFormaDesc=<b> الفاتورة المبدئية </b> عبارة عن صورة فاتورة حقيقية ولكنها لا تحتوي على قيمة للمحاسبة.
|
||||
InvoiceReplacement=استبدال الفاتورة
|
||||
InvoiceReplacementAsk=فاتورة استبدال الفاتورة
|
||||
InvoiceReplacementDesc=<b> الفاتورة البديلة</b> يتم استخدامها لإلغاء واستبدال بالكامل الفاتورة التي لا تتضمن أية دفعات عليها. <br> <br> ملاحظة: لا يمكن استبدال سوى الفواتير التي لا تتضمن أية دفعات عليها. إذا لم يتم إغلاق الفاتورة التي استبدلتها بعد، فسيتم إغلاقها تلقائيا إلى "مهمل".
|
||||
InvoiceReplacementDesc=<b>Replacement invoice</b> is used to cancel and completely replace an invoice with no payment already received.<br><br>Note: Only invoices with no payment on it can be replaced. If the invoice you replace is not yet closed, it will be automatically closed to 'abandoned'.
|
||||
InvoiceAvoir=ملاحظة ائتمانية
|
||||
InvoiceAvoirAsk=ملاحظة ائتمانية لتصحيح الفاتورة
|
||||
InvoiceAvoirDesc=<b> الملاحظة الائتمانية</b> عبارة عن فاتورة سلبية تستخدم لحل حقيقة أن الفاتورة تحتوي على مبلغ يختلف عن المبلغ المدفوع فعلا (لأن العميل دفع مبالغ كبيرة عن طريق الخطأ، أو لن يدفعوا بشكل كامل حيث أنه اعاد بعض المنتجات على سبيل المثال).
|
||||
InvoiceAvoirDesc=The <b>credit note</b> is a negative invoice used to correct the fact that an invoice has an amount that differs from the amount really paid (eg customer paid too much by mistake, or will not pay completely since he returned some products).
|
||||
invoiceAvoirWithLines=إنشاء الائتمان ملاحظة مع خطوط من الفاتورة الأصلية
|
||||
invoiceAvoirWithPaymentRestAmount=إنشاء الائتمان ملاحظة مع المتبقية غير المسددة من الفاتورة الأصلية
|
||||
invoiceAvoirLineWithPaymentRestAmount=ملاحظة الائتمان للبقاء المبلغ غير المدفوع
|
||||
@ -66,12 +66,12 @@ paymentInInvoiceCurrency=in invoices currency
|
||||
PaidBack=تسديدها
|
||||
DeletePayment=حذف الدفعة
|
||||
ConfirmDeletePayment=هل انت متأكد انك ترغب في حذف هذه الدفعة؟
|
||||
ConfirmConvertToReduc=هل تريد تحويل هذا %s إلى خصم مطلق؟<br> سيتم حفظ المبلغ حتى بين جميع الخصومات، ويمكن استخدامها كخصم لفاتورة الحالية أو المستقبلية لهذا العميل.
|
||||
ConfirmConvertToReducSupplier=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 supplier.
|
||||
ConfirmConvertToReduc=Do you want to convert this %s into an absolute discount?<br>The amount will be saved among all discounts and could be used as a discount for a current or a future invoice for this customer.
|
||||
ConfirmConvertToReducSupplier=Do you want to convert this %s into an absolute discount?<br>The amount will be saved among all discounts and could be used as a discount for a current or a future invoice for this supplier.
|
||||
SupplierPayments=مدفوعات الموردين
|
||||
ReceivedPayments=المدفوعات المستلمة
|
||||
ReceivedCustomersPayments=المدفوعات المستلمة من العملاء
|
||||
PayedSuppliersPayments=المدفوعات التي دفعت للموردين
|
||||
PayedSuppliersPayments=Payments paid to suppliers
|
||||
ReceivedCustomersPaymentsToValid=تلقى مدفوعات عملاء للمصادقة
|
||||
PaymentsReportsForYear=تقارير المدفوعات لل%s
|
||||
PaymentsReports=تقارير المدفوعات
|
||||
@ -91,8 +91,8 @@ PaymentConditionsShort=شروط الدفع
|
||||
PaymentAmount=دفع مبلغ
|
||||
ValidatePayment=تحقق من الدفع
|
||||
PaymentHigherThanReminderToPay=دفع أعلى من دفع تذكرة
|
||||
HelpPaymentHigherThanReminderToPay=الاهتمام ، على دفع مبلغ واحد أو أكثر من فواتير أعلى من الراحة على الدفع. <br> تعديل الدخول ، تؤكد خلاف ذلك والتفكير في إنشاء الائتمان علما الزائدة وتلقى كل الفواتير الزائدة.
|
||||
HelpPaymentHigherThanReminderToPaySupplier=Attention, the payment amount of one or more bills is higher than the rest to pay. <br> Edit your entry, otherwise confirm and think about creating a credit note of the excess paid for each overpaid invoice.
|
||||
HelpPaymentHigherThanReminderToPay=Attention, the payment amount of one or more bills is higher than the outstanding amount to pay. <br> Edit your entry, otherwise confirm and consider creating a credit note for the excess received for each overpaid invoice.
|
||||
HelpPaymentHigherThanReminderToPaySupplier=Attention, the payment amount of one or more bills is higher than the outstanding amount to pay. <br> Edit your entry, otherwise confirm and consider creating a credit note for the excess paid for each overpaid invoice.
|
||||
ClassifyPaid=تصنيف 'مدفوع'
|
||||
ClassifyPaidPartially=تصنيف 'مدفوع جزئيا'
|
||||
ClassifyCanceled=تصنيف 'المهجورة'
|
||||
@ -131,7 +131,8 @@ BillStatusClosedUnpaid=مغلقة (غير مدفوعة الأجر)
|
||||
BillStatusClosedPaidPartially=دفعت (جزئيا)
|
||||
BillShortStatusDraft=مسودة
|
||||
BillShortStatusPaid=دفع
|
||||
BillShortStatusPaidBackOrConverted=Refund or converted
|
||||
BillShortStatusPaidBackOrConverted=Refunded or converted
|
||||
Refunded=Refunded
|
||||
BillShortStatusConverted=دفع
|
||||
BillShortStatusCanceled=المهجورة
|
||||
BillShortStatusValidated=صادق
|
||||
@ -141,16 +142,16 @@ BillShortStatusNotRefunded=Not refunded
|
||||
BillShortStatusClosedUnpaid=مغلقة
|
||||
BillShortStatusClosedPaidPartially=دفعت (جزئيا)
|
||||
PaymentStatusToValidShort=للمصادقة
|
||||
ErrorVATIntraNotConfigured=Intracommunautary رقم الضريبة على القيمة المضافة لم تحدد بعد
|
||||
ErrorVATIntraNotConfigured=Intra-Community VAT number not yet defined
|
||||
ErrorNoPaiementModeConfigured=لا يعرف طريقة الدفع الافتراضية. الذهاب الى الفاتورة وحدة لتحديد هذا الإعداد.
|
||||
ErrorCreateBankAccount=إنشاء حساب مصرفي ، ثم يذهب إلى إعداد فريق من الفاتورة وحدة لتحديد طرق الدفع
|
||||
ErrorBillNotFound=فاتورة %s لا يوجد
|
||||
ErrorInvoiceAlreadyReplaced=خطأ ، في محاولة لإثبات صحة فاتورة لتحل محل الفاتورة ٪ s. ولكن هذا قد تم الاستعاضة عن فاتورة ٪ s.
|
||||
ErrorInvoiceAlreadyReplaced=Error, you tried to validate an invoice to replace invoice %s. But this one has already been replaced by invoice %s.
|
||||
ErrorDiscountAlreadyUsed=خطأ الخصم المستخدمة بالفعل
|
||||
ErrorInvoiceAvoirMustBeNegative=خطأ ، والصحيح يجب أن يكون للفاتورة بمبلغ سلبي
|
||||
ErrorInvoiceOfThisTypeMustBePositive=خطأ ، وهذا النوع من فاتورة يجب أن يكون إيجابيا المبلغ
|
||||
ErrorCantCancelIfReplacementInvoiceNotValidated=خطأ ، لا يمكن إلغاء الفاتورة التي حلت محلها اخرى الفاتورة التي لا تزال في حالة مشروع
|
||||
ErrorThisPartOrAnotherIsAlreadyUsedSoDiscountSerieCantBeRemoved=This part or another is already used so discount serie cant be removed.
|
||||
ErrorThisPartOrAnotherIsAlreadyUsedSoDiscountSerieCantBeRemoved=This part or another is already used so discount series cannot be removed.
|
||||
BillFrom=من
|
||||
BillTo=مشروع قانون ل
|
||||
ActionsOnBill=الإجراءات على فاتورة
|
||||
@ -179,20 +180,20 @@ ConfirmClassifyPaidBill=Are you sure you want to change invoice <b>%s</b> to sta
|
||||
ConfirmCancelBill=Are you sure you want to cancel invoice <b>%s</b>?
|
||||
ConfirmCancelBillQuestion=Why do you want to classify this invoice 'abandoned'?
|
||||
ConfirmClassifyPaidPartially=Are you sure you want to change invoice <b>%s</b> to status paid?
|
||||
ConfirmClassifyPaidPartiallyQuestion=This invoice has not been paid completely. What are reasons for you to close this invoice?
|
||||
ConfirmClassifyPaidPartiallyReasonAvoir=تبقى بدون أجر <b>(%s%s) هو</b> الخصم الممنوح لأنه تم السداد قبل الأجل. I تسوية الضريبة على القيمة المضافة مع ملاحظة الائتمان.
|
||||
ConfirmClassifyPaidPartiallyQuestion=This invoice has not been paid completely. What is the reason/s for you closing this invoice?
|
||||
ConfirmClassifyPaidPartiallyReasonAvoir=Remaining unpaid <b>(%s %s)</b> is a discount granted because payment was made before term. I regularize the VAT with a credit note.
|
||||
ConfirmClassifyPaidPartiallyReasonDiscount=Remaining unpaid <b>(%s %s)</b> is a discount granted because payment was made before term.
|
||||
ConfirmClassifyPaidPartiallyReasonDiscountNoVat=تبقى بدون أجر <b>(%s%s) هو</b> الخصم الممنوح لأنه تم السداد قبل الأجل. أنا أقبل أن تفقد ضريبة القيمة المضافة على هذا الخصم.
|
||||
ConfirmClassifyPaidPartiallyReasonDiscountVat=تبقى بدون أجر <b>(%s%s) هو</b> الخصم الممنوح لأنه تم السداد قبل الأجل. I استرداد ضريبة القيمة المضافة على هذا الخصم دون مذكرة الائتمان.
|
||||
ConfirmClassifyPaidPartiallyReasonBadCustomer=العملاء سيئة
|
||||
ConfirmClassifyPaidPartiallyReasonProductReturned=المنتجات عاد جزئيا
|
||||
ConfirmClassifyPaidPartiallyReasonOther=التخلي عن المبلغ لسبب آخر
|
||||
ConfirmClassifyPaidPartiallyReasonDiscountNoVatDesc=هذا الخيار ممكن إذا الفاتورة تم تزويد مناسبة. (مثال «فقط الضرائب المقابلة إلى أن الأسعار قد دفعت فعلا تعطي الحقوق لخصم»)
|
||||
ConfirmClassifyPaidPartiallyReasonDiscountVatDesc=في بعض البلدان ، وهذا الخيار قد يكون ممكنا إلا إذا الفاتورة صحيحة وتتضمن المذكرة.
|
||||
ConfirmClassifyPaidPartiallyReasonDiscountNoVatDesc=This choice is possible if your invoice has been provided with suitable comments. (Example «Only the tax corresponding to the price that has been actually paid gives rights to deduction»)
|
||||
ConfirmClassifyPaidPartiallyReasonDiscountVatDesc=In some countries, this choice might be possible only if your invoice contains correct notes.
|
||||
ConfirmClassifyPaidPartiallyReasonAvoirDesc=استخدام هذا الخيار إذا كان كل ما لا يتناسب مع
|
||||
ConfirmClassifyPaidPartiallyReasonBadCustomerDesc=وهناك <b>سوء العميل</b> عميل التي ترفض سداد ديونه.
|
||||
ConfirmClassifyPaidPartiallyReasonBadCustomerDesc=A <b>bad customer</b> is a customer that refuses to pay his debt.
|
||||
ConfirmClassifyPaidPartiallyReasonProductReturnedDesc=ويستخدم هذا الاختيار عند الدفع ليس كاملا لأن بعض المنتجات أعيدت
|
||||
ConfirmClassifyPaidPartiallyReasonOtherDesc=استخدام هذا الخيار إذا كان كل ما لا يتناسب مع غيرها ، على سبيل المثال في الحالة التالية : <br> -- دفع ليست كاملة لأن بعض المنتجات شحنت العودة <br> -- أهم من المبلغ المطالب به لأن الخصم هو نسيان <br> في جميع الحالات ، والمبالغة في المبلغ المطالب به لا بد من تصحيحه في نظام المحاسبة عن طريق إنشاء الائتمان المذكرة.
|
||||
ConfirmClassifyPaidPartiallyReasonOtherDesc=Use this choice if all others are not suitable, for example in following situation:<br>- payment not complete because some products were shipped back<br>- amount claimed too important because a discount was forgotten<br>In all cases, amount over-claimed must be corrected in accountancy system by creating a credit note.
|
||||
ConfirmClassifyAbandonReasonOther=أخرى
|
||||
ConfirmClassifyAbandonReasonOtherDesc=هذا الخيار وسوف يستخدم في جميع الحالات الأخرى. على سبيل المثال لأنك من خطة لإقامة استبدال الفاتورة.
|
||||
ConfirmCustomerPayment=Do you confirm this payment input for <b>%s</b> %s?
|
||||
@ -200,9 +201,10 @@ ConfirmSupplierPayment=Do you confirm this payment input for <b>%s</b> %s?
|
||||
ConfirmValidatePayment=Are you sure you want to validate this payment? No change can be made once payment is validated.
|
||||
ValidateBill=التحقق من صحة الفواتير
|
||||
UnvalidateBill=Unvalidate فاتورة
|
||||
NumberOfBills=ملاحظة : من الفواتير
|
||||
NumberOfBillsByMonth=ملحوظة من الفواتير من قبل شهر
|
||||
NumberOfBills=No. of invoices
|
||||
NumberOfBillsByMonth=No. of invoices per month
|
||||
AmountOfBills=مبلغ الفواتير
|
||||
AmountOfBillsHT=Amount of invoices (net of tax)
|
||||
AmountOfBillsByMonthHT=كمية من الفواتير من قبل شهر (بعد خصم الضرائب)
|
||||
ShowSocialContribution=تظهر الضريبة الاجتماعية / المالية
|
||||
ShowBill=وتظهر الفاتورة
|
||||
@ -260,9 +262,9 @@ Repeatables=النماذج
|
||||
ChangeIntoRepeatableInvoice=تحويل إلى قالب فاتورة
|
||||
CreateRepeatableInvoice=إنشاء فاتورة قالب
|
||||
CreateFromRepeatableInvoice=إنشاء من قالب الفاتورة
|
||||
CustomersInvoicesAndInvoiceLines=فواتير العملاء والفواتير 'خطوط
|
||||
CustomersInvoicesAndInvoiceLines=Customer invoices and invoice details
|
||||
CustomersInvoicesAndPayments=العملاء والفواتير والمدفوعات
|
||||
ExportDataset_invoice_1=قائمة العملاء والفواتير والفواتير 'خطوط
|
||||
ExportDataset_invoice_1=Customer invoices and invoice details
|
||||
ExportDataset_invoice_2=العملاء والفواتير والمدفوعات
|
||||
ProformaBill=Proforma بيل :
|
||||
Reduction=تخفيض
|
||||
@ -302,9 +304,9 @@ DiscountAlreadyCounted=Discounts or credits already consumed
|
||||
CustomerDiscounts=Customer discounts
|
||||
SupplierDiscounts=Vendors discounts
|
||||
BillAddress=مشروع قانون معالجة
|
||||
HelpEscompte=هذا الخصم هو الخصم الممنوح للعميل لأن الدفع قبل البعيد.
|
||||
HelpAbandonBadCustomer=هذا المبلغ قد تم التخلي عنها (وذكر أن العملاء سيئة العملاء) ، ويعتبر أحد exceptionnal فضفاضة.
|
||||
HelpAbandonOther=هذا المبلغ قد تم التخلي عنها لأنها كانت خطأ (خطأ أو فاتورة العميل أي بعبارة أخرى على سبيل المثال)
|
||||
HelpEscompte=This discount is a discount granted to customer because payment was made before term.
|
||||
HelpAbandonBadCustomer=This amount has been abandoned (customer said to be a bad customer) and is considered as an exceptional loss.
|
||||
HelpAbandonOther=This amount has been abandoned since it was an error (wrong customer or invoice replaced by another for example)
|
||||
IdSocialContribution=اجتماعي / ضريبة مالية دفع معرف
|
||||
PaymentId=دفع معرف
|
||||
PaymentRef=Payment ref.
|
||||
@ -321,22 +323,22 @@ InvoiceNotChecked=لا فاتورة مختارة
|
||||
CloneInvoice=استنساخ الفاتورة
|
||||
ConfirmCloneInvoice=Are you sure you want to clone this invoice <b>%s</b>?
|
||||
DisabledBecauseReplacedInvoice=العمل والمعوقين بسبب الفاتورة قد استبدل
|
||||
DescTaxAndDividendsArea=This area presents a summary of all payments made for special expenses. Only record with payment during the fixed year are included here.
|
||||
NbOfPayments=ملاحظة : للمدفوعات
|
||||
DescTaxAndDividendsArea=تقدم هذا المجال ملخص لجميع المبالغ المدفوعة للنفقات الخاصة. يتم تضمين السجلات فقط مع دفع خلال السنة الثابتة هنا.
|
||||
NbOfPayments=No. of payments
|
||||
SplitDiscount=انقسام في الخصم
|
||||
ConfirmSplitDiscount=Are you sure you want to split this discount of <b>%s</b> %s into 2 lower discounts?
|
||||
TypeAmountOfEachNewDiscount=مقدار مساهمة كل من جزأين :
|
||||
TotalOfTwoDiscountMustEqualsOriginal=مجموعه جديدتين الخصم يجب أن تكون مساوية للخصم المبلغ الأصلي.
|
||||
ConfirmSplitDiscount=Are you sure you want to split this discount of <b>%s</b> %s into 2 smaller discounts?
|
||||
TypeAmountOfEachNewDiscount=Input amount for each of two parts:
|
||||
TotalOfTwoDiscountMustEqualsOriginal=Total of two new discounts must be equal to original discount amount.
|
||||
ConfirmRemoveDiscount=Are you sure you want to remove this discount?
|
||||
RelatedBill=الفاتورة ذات الصلة
|
||||
RelatedBills=الفواتير ذات الصلة
|
||||
RelatedCustomerInvoices=فواتير العملاء ذات صلة
|
||||
RelatedSupplierInvoices=فواتير الموردين ذات صلة
|
||||
LatestRelatedBill=أحدث فاتورة ذات الصلة
|
||||
WarningBillExist=تحذير، واحد أو أكثر من فاتورة موجودة بالفعل
|
||||
WarningBillExist=Warning, one or more invoices already exist
|
||||
MergingPDFTool=دمج أداة PDF
|
||||
AmountPaymentDistributedOnInvoice=Payment amount distributed on invoice
|
||||
PaymentOnDifferentThirdBills=Allow payments on different thirdparties bills but same parent company
|
||||
PaymentOnDifferentThirdBills=Allow payments on different third parties bills but same parent company
|
||||
PaymentNote=Payment note
|
||||
ListOfPreviousSituationInvoices=List of previous situation invoices
|
||||
ListOfNextSituationInvoices=List of next situation invoices
|
||||
@ -408,19 +410,19 @@ PaymentTypeCHQ=الشيكات
|
||||
PaymentTypeShortCHQ=الشيكات
|
||||
PaymentTypeTIP=TIP (Documents against Payment)
|
||||
PaymentTypeShortTIP=TIP Payment
|
||||
PaymentTypeVAD=على خط التسديد
|
||||
PaymentTypeShortVAD=على خط التسديد
|
||||
PaymentTypeVAD=Online payment
|
||||
PaymentTypeShortVAD=Online payment
|
||||
PaymentTypeTRA=Bank draft
|
||||
PaymentTypeShortTRA=مسودة
|
||||
PaymentTypeFAC=عامل
|
||||
PaymentTypeShortFAC=عامل
|
||||
BankDetails=التفاصيل المصرفية
|
||||
BankCode=رمز المصرف
|
||||
DeskCode=مدونة مكتبية
|
||||
DeskCode=Office code
|
||||
BankAccountNumber=رقم الحساب
|
||||
BankAccountNumberKey=مفتاح
|
||||
BankAccountNumberKey=Check digits
|
||||
Residence=Direct debit
|
||||
IBANNumber=عدد إيبان
|
||||
IBANNumber=IBAN complete account number
|
||||
IBAN=إيبان
|
||||
BIC=بيك / سويفت
|
||||
BICNumber=بيك / سويفت عدد
|
||||
@ -445,7 +447,7 @@ PaymentByTransferOnThisBankAccount=الدفع عن طريق التحويل عل
|
||||
VATIsNotUsedForInvoice=* عدم الفنية للتطبيق ضريبة القيمة المضافة 293B من المجموعة الاستشارية لاندونيسيا
|
||||
LawApplicationPart1=من خلال تطبيق القانون 80.335 من 12/05/80
|
||||
LawApplicationPart2=البضاعة تظل ملكا لل
|
||||
LawApplicationPart3=البائع إلى حين استكمال صرف
|
||||
LawApplicationPart3=the seller until full payment of
|
||||
LawApplicationPart4=ثمنها.
|
||||
LimitedLiabilityCompanyCapital=SARL برأس مال
|
||||
UseLine=تطبيق
|
||||
@ -463,7 +465,7 @@ Cheques=الشيكات
|
||||
DepositId=إيداع معرف
|
||||
NbCheque=عدد الشيكات
|
||||
CreditNoteConvertedIntoDiscount=This %s has been converted into %s
|
||||
UsBillingContactAsIncoiveRecipientIfExist=فواتير العملاء استخدام عنوان الاتصال بدلا من التصدي لطرف ثالث كما المتلقية للفواتير
|
||||
UsBillingContactAsIncoiveRecipientIfExist=Use contact/address with type 'billing contact' instead of third party address as recipient for invoices
|
||||
ShowUnpaidAll=وتظهر جميع الفواتير غير المسددة
|
||||
ShowUnpaidLateOnly=وتبين في وقت متأخر من الفواتير غير المدفوعة فقط
|
||||
PaymentInvoiceRef=دفع فاتورة %s
|
||||
@ -474,21 +476,22 @@ Reported=تأخر
|
||||
DisabledBecausePayments=غير ممكن لأن هناك بعض المدفوعات
|
||||
CantRemovePaymentWithOneInvoicePaid=تصنيف لا يمكن إزالة الدفع لأنه ليس هناك على الأقل على الفاتورة سيولي
|
||||
ExpectedToPay=من المتوقع الدفع
|
||||
CantRemoveConciliatedPayment=Can't remove conciliated payment
|
||||
CantRemoveConciliatedPayment=Can't remove reconciled payment
|
||||
PayedByThisPayment=سيولي هذا الدفع
|
||||
ClosePaidInvoicesAutomatically=Classify "Paid" all standard, down payment or replacement invoices entirely paid.
|
||||
ClosePaidInvoicesAutomatically=Classify "Paid" all standard, down payment or replacement invoices paid entirely.
|
||||
ClosePaidCreditNotesAutomatically=تصنيف "مدفوع" كل الملاحظات الائتمان تدفع بالكامل مرة أخرى.
|
||||
ClosePaidContributionsAutomatically=Classify "Paid" all social or fiscal contributions entirely paid.
|
||||
AllCompletelyPayedInvoiceWillBeClosed=كل فاتورة مع عدم وجود لا تزال لدفع ستغلق تلقائيا إلى "فياض" الوضع.
|
||||
ClosePaidContributionsAutomatically=Classify "Paid" all social or fiscal contributions paid entirely.
|
||||
AllCompletelyPayedInvoiceWillBeClosed=All invoice with no remainder to pay will be automatically closed with status "Paid".
|
||||
ToMakePayment=دفع
|
||||
ToMakePaymentBack=تسديد
|
||||
ListOfYourUnpaidInvoices=قائمة الفواتير غير المسددة
|
||||
NoteListOfYourUnpaidInvoices=ملاحظة: تحتوي هذه القائمة على الفواتير الوحيدة لأطراف ثالثة ترتبط لك كممثل بيع.
|
||||
RevenueStamp=طوابع الواردات
|
||||
YouMustCreateInvoiceFromThird=This option is only available when creating invoice from tab "customer" of third party
|
||||
YouMustCreateInvoiceFromSupplierThird=This option is only available when creating invoice from tab "supplier" of third party
|
||||
YouMustCreateInvoiceFromThird=This option is only available when creating invoices from tab "customer" of third party
|
||||
YouMustCreateInvoiceFromSupplierThird=This option is only available when creating invoices from tab "supplier" of third party
|
||||
YouMustCreateStandardInvoiceFirstDesc=You have to create a standard invoice first and convert it to "template" to create a new template invoice
|
||||
PDFCrabeDescription=نموذج فاتورة Crabe. نموذج الفاتورة كاملة (دعم الخيار الضريبة على القيمة المضافة ، والخصومات ، وشروط الدفع ، والشعار ، الخ..)
|
||||
PDFSpongeDescription=Invoice PDF template Sponge. A complete invoice template
|
||||
PDFCrevetteDescription=Invoice PDF template Crevette. A complete invoice template for situation invoices
|
||||
TerreNumRefModelDesc1=عودة عدد مع الشكل syymm NNNN عن الفواتير القياسية و٪ syymm-NNNN لتلاحظ الائتمان حيث هو YY العام٪، مم هو الشهر وnnnn هو تسلسل مع أي انقطاع وعدم العودة إلى 0
|
||||
MarsNumRefModelDesc1=Return number with format %syymm-nnnn for standard invoices, %syymm-nnnn for replacement invoices, %syymm-nnnn for down payment invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequence with no break and no return to 0
|
||||
@ -533,7 +536,7 @@ invoiceLineProgressError=Invoice line progress can't be greater than or equal to
|
||||
updatePriceNextInvoiceErrorUpdateline=Error : update price on invoice line : %s
|
||||
ToCreateARecurringInvoice=To create a recurring invoice for this contract, first create this draft invoice, then convert it into an invoice template and define the frequency for generation of future invoices.
|
||||
ToCreateARecurringInvoiceGene=To generate future invoices regularly and manually, just go on menu <strong>%s - %s - %s</strong>.
|
||||
ToCreateARecurringInvoiceGeneAuto=If you need to have such invoices generated automatically, ask you administrator to enable and setup module <strong>%s</strong>. Note that both method (manual and automatic) can be used together with no risk of duplication.
|
||||
ToCreateARecurringInvoiceGeneAuto=If you need to have such invoices generated automatically, ask your administrator to enable and setup module <strong>%s</strong>. Note that both method (manual and automatic) can be used together with no risk of duplication.
|
||||
DeleteRepeatableInvoice=Delete template invoice
|
||||
ConfirmDeleteRepeatableInvoice=Are your sure you want to delete the template invoice?
|
||||
CreateOneBillByThird=Create one invoice per third party (otherwise, one invoice per order)
|
||||
@ -546,3 +549,4 @@ AutoFillDateFromShort=Set start date
|
||||
AutoFillDateTo=Set end date for service line with next invoice date
|
||||
AutoFillDateToShort=Set end date
|
||||
MaxNumberOfGenerationReached=Max number of gen. reached
|
||||
BILL_DELETEInDolibarr=تم حذف الفاتورة
|
||||
|
||||
@ -1,14 +1,14 @@
|
||||
# Language file - Source file is en_US - cashdesk
|
||||
CashDeskMenu=نقطة بيع
|
||||
CashDesk=نقطة بيع
|
||||
CashDeskMenu=نقطة البيع
|
||||
CashDesk=نقطة البيع
|
||||
CashDeskBankCash=الحساب المصرفي (نقدا)
|
||||
CashDeskBankCB=الحساب المصرفي (بطاقة)
|
||||
CashDeskBankCheque=الحساب المصرفي (شيك)
|
||||
CashDeskWarehouse=مستودع
|
||||
CashdeskShowServices=بيع الخدمات
|
||||
CashDeskProducts=المنتجات
|
||||
CashDeskStock=الأوراق المالية
|
||||
CashDeskOn=في
|
||||
CashDeskStock=مخزون
|
||||
CashDeskOn=على
|
||||
CashDeskThirdParty=طرف ثالث
|
||||
ShoppingCart=عربة التسوق
|
||||
NewSell=بيع جديد
|
||||
@ -22,7 +22,7 @@ NoArticle=لا يوجد عناصر
|
||||
Identification=التعريف
|
||||
Article=عنصر
|
||||
Difference=فرق
|
||||
TotalTicket=مجموع التذكرة
|
||||
TotalTicket=إجمالي التذكرة
|
||||
NoVAT=ليس هناك ضريبة قيمة مضافة لهذا البيع
|
||||
Change=باقي المستلم
|
||||
BankToPay=حساب الدفع
|
||||
@ -30,5 +30,15 @@ ShowCompany=عرض الشركة
|
||||
ShowStock=عرض المستودع
|
||||
DeleteArticle=انقر لإزالة هذا العنصر
|
||||
FilterRefOrLabelOrBC=بحث (المرجع / الملصق)
|
||||
UserNeedPermissionToEditStockToUsePos=لقد طلبت أن ينخفض المخزون عند إنشاء الفاتورة، لذلك المستخدم التي يستخدم نقطة البيع يحتاج إلى امتلاك الصلاحيات لتعديل المخزون.
|
||||
UserNeedPermissionToEditStockToUsePos=You ask to decrease stock on invoice creation, so user that uses POS needs to have permission to edit stock.
|
||||
DolibarrReceiptPrinter=طابعة إيصال دوليبار
|
||||
PointOfSale=نقاط البيع
|
||||
PointOfSaleShort=POS
|
||||
CloseBill=Close Bill
|
||||
Floors=Floors
|
||||
Floor=Floor
|
||||
AddTable=Add table
|
||||
Place=Place
|
||||
TakeposConnectorNecesary='TakePOS Connector' required
|
||||
OrderPrinters=Order printers
|
||||
SearchProduct=Search product
|
||||
|
||||
@ -52,6 +52,7 @@ ActionAC_TEL=اتصال هاتفي
|
||||
ActionAC_FAX=إرسال فاكس
|
||||
ActionAC_PROP=إرسال اقتراح
|
||||
ActionAC_EMAIL=ارسال بريد الكتروني
|
||||
ActionAC_EMAIL_IN=Reception of Email
|
||||
ActionAC_RDV=اجتماعات
|
||||
ActionAC_INT=تدخل على الموقع
|
||||
ActionAC_FAC=ارسال الفواتير
|
||||
@ -72,8 +73,8 @@ StatusProsp=احتمال وضع
|
||||
DraftPropals=صياغة مقترحات تجارية
|
||||
NoLimit=لا حدود
|
||||
ToOfferALinkForOnlineSignature=Link for online signature
|
||||
WelcomeOnOnlineSignaturePage=Welcome on the page to accept commerical proposals from %s
|
||||
WelcomeOnOnlineSignaturePage=Welcome to the page to accept commercial proposals from %s
|
||||
ThisScreenAllowsYouToSignDocFrom=This screen allow you to accept and sign, or refuse, a quote/commercial proposal
|
||||
ThisIsInformationOnDocumentToSign=This is information on document to accept or refuse
|
||||
SignatureProposalRef=Signature of quote/commerical proposal %s
|
||||
SignatureProposalRef=Signature of quote/commercial proposal %s
|
||||
FeatureOnlineSignDisabled=Feature for online signing disabled or document generated before the feature was enabled
|
||||
|
||||
@ -116,7 +116,7 @@ CountryHM=واستمع وجزر ماكدونالد
|
||||
CountryVA=الكرسي الرسولي (دولة الفاتيكان)
|
||||
CountryHN=هندوراس
|
||||
CountryHK=هونج كونج
|
||||
CountryIS=Icelande
|
||||
CountryIS=Iceland
|
||||
CountryIN=الهند
|
||||
CountryID=اندونيسيا
|
||||
CountryIR=إيران
|
||||
@ -131,7 +131,7 @@ CountryKI=كيريباس
|
||||
CountryKP=كوريا الشمالية
|
||||
CountryKR=كوريا الجنوبية
|
||||
CountryKW=الكويت
|
||||
CountryKG=Kyrghyztan
|
||||
CountryKG=Kyrgyzstan
|
||||
CountryLA=لاوس
|
||||
CountryLV=لاتفيا
|
||||
CountryLB=لبنان
|
||||
@ -160,7 +160,7 @@ CountryMD=مولدافيا
|
||||
CountryMN=منغوليا
|
||||
CountryMS=مونتسرات
|
||||
CountryMZ=موزامبيق
|
||||
CountryMM=Birmania (ميانمار)
|
||||
CountryMM=Myanmar (Burma)
|
||||
CountryNA=ناميبيا
|
||||
CountryNR=ناورو
|
||||
CountryNP=نيبال
|
||||
@ -223,7 +223,7 @@ CountryTO=تونجا
|
||||
CountryTT=ترينيداد وتوباغو
|
||||
CountryTR=تركيا
|
||||
CountryTM=تركمانستان
|
||||
CountryTC=الأتراك وجزر Cailos
|
||||
CountryTC=Turks and Caicos Islands
|
||||
CountryTV=توفالو
|
||||
CountryUG=أوغندا
|
||||
CountryUA=أوكرانيا
|
||||
@ -277,7 +277,7 @@ CurrencySingMGA=Ariary
|
||||
CurrencyMUR=موريشيوس روبية
|
||||
CurrencySingMUR=موريشيوس روبية
|
||||
CurrencyNOK=النرويجية بالكرون
|
||||
CurrencySingNOK=الكرونة النرويجية
|
||||
CurrencySingNOK=Norwegian kronas
|
||||
CurrencyTND=دينار
|
||||
CurrencySingTND=الدينار التونسي
|
||||
CurrencyUSD=الدولار الأمريكي
|
||||
@ -306,6 +306,7 @@ DemandReasonTypeSRC_WOM=كلمة الفم
|
||||
DemandReasonTypeSRC_PARTNER=شريك
|
||||
DemandReasonTypeSRC_EMPLOYEE=الموظف
|
||||
DemandReasonTypeSRC_SPONSORING=رعاية
|
||||
DemandReasonTypeSRC_SRC_CUSTOMER=Incoming contact of a customer
|
||||
#### Paper formats ####
|
||||
PaperFormatEU4A0=شكل 4A0
|
||||
PaperFormatEU2A0=شكل 2A0
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
# Dolibarr language file - Source file is en_US - ecm
|
||||
ECMNbOfDocs=ملاحظة : الوثائق في الدليل
|
||||
ECMNbOfDocs=No. of documents in directory
|
||||
ECMSection=دليل
|
||||
ECMSectionManual=دليل دليل
|
||||
ECMSectionAuto=الدليل الآلي
|
||||
@ -34,6 +34,8 @@ ECMDocsByProjects=المستندات المرتبطة بالمشاريع
|
||||
ECMDocsByUsers=وثائق مرتبطة المستخدمين
|
||||
ECMDocsByInterventions=وثائق مرتبطة بالتدخلات
|
||||
ECMDocsByExpenseReports=Documents linked to expense reports
|
||||
ECMDocsByHolidays=Documents linked to holidays
|
||||
ECMDocsBySupplierProposals=Documents linked to supplier proposals
|
||||
ECMNoDirectoryYet=لا الدليل
|
||||
ShowECMSection=وتظهر الدليل
|
||||
DeleteSection=إزالة الدليل
|
||||
@ -46,6 +48,5 @@ ECMSelectASection=Select a directory in the tree...
|
||||
DirNotSynchronizedSyncFirst=This directory seems to be created or modified outside ECM module. You must click on "Resync" button first to synchronize disk and database to get content of this directory.
|
||||
ReSyncListOfDir=Resync list of directories
|
||||
HashOfFileContent=Hash of file content
|
||||
FileNotYetIndexedInDatabase=File not yet indexed into database (try to re-upload it)
|
||||
FileSharedViaALink=File shared via a link
|
||||
NoDirectoriesFound=No directories found
|
||||
FileNotYetIndexedInDatabase=File not yet indexed into database (try to re-upload it)
|
||||
|
||||
@ -174,7 +174,7 @@ ErrorGlobalVariableUpdater4=العميل SOAP فشلت مع الخطأ '٪ ق'
|
||||
ErrorGlobalVariableUpdater5=لا متغير عمومي مختارة
|
||||
ErrorFieldMustBeANumeric=يجب أن يكون <b>حقل٪ الصورة</b> قيمة رقمية
|
||||
ErrorMandatoryParametersNotProvided=معيار إلزامي (ق) لم تقدم
|
||||
ErrorOppStatusRequiredIfAmount=You set an estimated amount for this lead/lead. So you must also enter its status
|
||||
ErrorOppStatusRequiredIfAmount=You set an estimated amount for this lead. So you must also enter its status
|
||||
ErrorFailedToLoadModuleDescriptorForXXX=Failed to load module descriptor class for %s
|
||||
ErrorBadDefinitionOfMenuArrayInModuleDescriptor=سيئة تعريف القائمة صفيف في الوحدة واصف (القيمة سيئة لfk_menu مفتاح)
|
||||
ErrorSavingChanges=An error has occurred when saving the changes
|
||||
@ -212,7 +212,7 @@ ErrorProductBarCodeAlreadyExists=The product barcode %s already exists on anothe
|
||||
ErrorNoteAlsoThatSubProductCantBeFollowedByLot=Note also that using virtual product to have auto increase/decrease of subproducts is not possible when at least one subproduct (or subproduct of subproducts) needs a serial/lot number.
|
||||
ErrorDescRequiredForFreeProductLines=Description is mandatory for lines with free product
|
||||
ErrorAPageWithThisNameOrAliasAlreadyExists=The page/container <strong>%s</strong> has the same name or alternative alias that the one your try to use
|
||||
|
||||
ErrorDuringChartLoad=Error when loading chart of account. If few accounts were not loaded, you can still enter them manually.
|
||||
# Warnings
|
||||
WarningPasswordSetWithNoAccount=تم تعيين كلمة مرور لهذا العضو. ومع ذلك، تم إنشاء أي حساب المستخدم. لذلك يتم تخزين كلمة المرور هذه ولكن لا يمكن استخدامها للدخول إلى Dolibarr. ويمكن استخدامه من قبل وحدة / واجهة خارجية ولكن إذا كنت لا تحتاج إلى تعريف أي تسجيل دخول أو كلمة المرور لأحد أفراد، يمكنك تعطيل خيار "إدارة تسجيل دخول لكل عضو" من إعداد وحدة الأعضاء. إذا كنت بحاجة إلى إدارة تسجيل الدخول ولكن لا تحتاج إلى أي كلمة المرور، يمكنك الحفاظ على هذا الحقل فارغا لتجنب هذا التحذير. ملاحظة: يمكن أيضا أن تستخدم البريد الإلكتروني لتسجيل الدخول إذا تم ربط عضو إلى المستخدم.
|
||||
WarningMandatorySetupNotComplete=لا يتم تعريف معلمات الإعداد إلزامية حتى الآن
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user