Merge remote-tracking branch 'uptream/develop' into 8.0-a9
This commit is contained in:
commit
9ce6ab915c
@ -328,7 +328,7 @@ script:
|
||||
php upgrade2.php 6.0.0 7.0.0 MAIN_MODULE_WEBSITE,MAIN_MODULE_SUPPLIERPROPOSAL > $TRAVIS_BUILD_DIR/upgrade600700-2.log
|
||||
php step5.php 6.0.0 7.0.0 > $TRAVIS_BUILD_DIR/upgrade600700-3.log
|
||||
php upgrade.php 7.0.0 8.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade700800.log
|
||||
php upgrade2.php 7.0.0 8.0.0 > $TRAVIS_BUILD_DIR/upgrade700800-2.log
|
||||
php upgrade2.php 7.0.0 8.0.0 MAIN_MODULE_TICKETSUP > $TRAVIS_BUILD_DIR/upgrade700800-2.log
|
||||
php step5.php 7.0.0 8.0.0 > $TRAVIS_BUILD_DIR/upgrade700800-3.log
|
||||
cd -
|
||||
set +e
|
||||
|
||||
@ -356,6 +356,12 @@ source_file = htdocs/langs/en_US/supplier_proposal.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.ticketsup]
|
||||
file_filter = htdocs/langs/<lang>/ticketsup.lang
|
||||
source_file = htdocs/langs/en_US/ticketsup.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.trips]
|
||||
file_filter = htdocs/langs/<lang>/trips.lang
|
||||
source_file = htdocs/langs/en_US/trips.lang
|
||||
|
||||
@ -153,13 +153,13 @@ else if ($action == "add") {
|
||||
$book->label_operation= $label_operation;
|
||||
$book->debit = $debit;
|
||||
$book->credit = $credit;
|
||||
$book->doc_date = GETPOST('doc_date');
|
||||
$book->doc_type = GETPOST('doc_type');
|
||||
$book->doc_date = GETPOST('doc_date','alpha');
|
||||
$book->doc_type = GETPOST('doc_type','alpha');
|
||||
$book->piece_num = $piece_num;
|
||||
$book->doc_ref = GETPOST('doc_ref');
|
||||
$book->code_journal = GETPOST('code_journal');
|
||||
$book->fk_doc = GETPOST('fk_doc');
|
||||
$book->fk_docdet = GETPOST('fk_docdet');
|
||||
$book->doc_ref = GETPOST('doc_ref','alpha');
|
||||
$book->code_journal = GETPOST('code_journal','alpha');
|
||||
$book->fk_doc = GETPOST('fk_doc','alpha');
|
||||
$book->fk_docdet = GETPOST('fk_docdet','alpha');
|
||||
|
||||
if (floatval($debit) != 0.0) {
|
||||
$book->montant = $debit;
|
||||
@ -210,7 +210,7 @@ else if ($action == "confirm_create") {
|
||||
|
||||
$book = new BookKeeping($db);
|
||||
|
||||
if (! GETPOST('code_journal') || GETPOST('code_journal') == '-1') {
|
||||
if (! GETPOST('code_journal','alpha') || GETPOST('code_journal','alpha') == '-1') {
|
||||
setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv("Journal")), null, 'errors');
|
||||
$action='create';
|
||||
$error++;
|
||||
@ -226,11 +226,11 @@ else if ($action == "confirm_create") {
|
||||
$book->label_compte = '';
|
||||
$book->debit = 0;
|
||||
$book->credit = 0;
|
||||
$book->doc_date = $date_start = dol_mktime(0, 0, 0, GETPOST('doc_datemonth'), GETPOST('doc_dateday'), GETPOST('doc_dateyear'));
|
||||
$book->doc_type = GETPOST('doc_type');
|
||||
$book->piece_num = GETPOST('next_num_mvt');
|
||||
$book->doc_ref = GETPOST('doc_ref');
|
||||
$book->code_journal = GETPOST('code_journal');
|
||||
$book->doc_date = $date_start = dol_mktime(0, 0, 0, GETPOST('doc_datemonth','int'), GETPOST('doc_dateday','int'), GETPOST('doc_dateyear','int'));
|
||||
$book->doc_type = GETPOST('doc_type','alpha');
|
||||
$book->piece_num = GETPOST('next_num_mvt','alpha');
|
||||
$book->doc_ref = GETPOST('doc_ref','alpha');
|
||||
$book->code_journal = GETPOST('code_journal','alpha');
|
||||
$book->fk_doc = 0;
|
||||
$book->fk_docdet = 0;
|
||||
$book->montant = 0;
|
||||
@ -265,8 +265,8 @@ if ($action == 'setdate') {
|
||||
}
|
||||
|
||||
if ($action == 'setjournal') {
|
||||
$journaldoc = trim(GETPOST('code_journal'));
|
||||
$result = $object->updateByMvt($piece_num,'code_journal',$journaldoc,$mode);
|
||||
$journaldoc = trim(GETPOST('code_journal','alpha'));
|
||||
$result = $object->updateByMvt($piece_num, 'code_journal', $journaldoc, $mode);
|
||||
if ($result < 0) {
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
} else {
|
||||
@ -279,7 +279,7 @@ if ($action == 'setjournal') {
|
||||
}
|
||||
|
||||
if ($action == 'setdocref') {
|
||||
$refdoc = trim(GETPOST('doc_ref'));
|
||||
$refdoc = trim(GETPOST('doc_ref','alpha'));
|
||||
$result = $object->updateByMvt($piece_num,'doc_ref',$refdoc,$mode);
|
||||
if ($result < 0) {
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
@ -476,11 +476,11 @@ if ($action == 'create')
|
||||
print '<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">';
|
||||
print '<input type="hidden" name="action" value="setdocref">';
|
||||
print '<input type="hidden" name="mode" value="'.$mode.'">';
|
||||
print '<input type="text" size="20" name="doc_ref" value="'.$book->doc_ref.'">';
|
||||
print '<input type="text" size="20" name="doc_ref" value="'.dol_escape_htmltag($book->doc_ref).'">';
|
||||
print '<input type="submit" class="button" value="' . $langs->trans('Modify') . '">';
|
||||
print '</form>';
|
||||
} else {
|
||||
print $book->doc_ref ;
|
||||
print $book->doc_ref ;
|
||||
}
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
@ -694,7 +694,7 @@ if ($num > 0)
|
||||
}
|
||||
|
||||
// Action column
|
||||
print '<td align="center">';
|
||||
print '<td align="center" class="nowraponall">';
|
||||
print '<a href="'.DOL_URL_ROOT.'/accountancy/bookkeeping/card.php?piece_num=' . $line->piece_num . $param . '&page=' . $page . ($sortfield ? '&sortfield='.$sortfield : '') . ($sortorder ? '&sortorder='.$sortorder : '') . '">' . img_edit() . '</a> ';
|
||||
print '<a href="' . $_SERVER['PHP_SELF'] . '?action=delmouv&mvt_num=' . $line->piece_num . $param . '&page=' . $page . ($sortfield ? '&sortfield='.$sortfield : '') . ($sortorder ? '&sortorder='.$sortorder : '') . '">' . img_delete() . '</a>';
|
||||
print '</td>';
|
||||
|
||||
@ -501,7 +501,7 @@ class BookKeeping extends CommonObject
|
||||
}
|
||||
|
||||
if (! $error) {
|
||||
$this->id = $this->db->last_insert_id(MAIN_DB_PREFIX . $this->table_element);
|
||||
$this->id = $this->db->last_insert_id(MAIN_DB_PREFIX . $this->table_element . $mode);
|
||||
|
||||
if (! $notrigger) {
|
||||
// Uncomment this and change MYOBJECT to your own tag if you
|
||||
@ -1101,7 +1101,7 @@ class BookKeeping extends CommonObject
|
||||
$this->db->begin();
|
||||
|
||||
$sql = "UPDATE " . MAIN_DB_PREFIX . $this->table_element . $mode . " as ab";
|
||||
$sql .= ' SET ab.' . $field . '=' . (is_numeric($value)?$value:"'".$value."'");
|
||||
$sql .= ' SET ab.' . $field . '=' . (is_numeric($value)?$value:"'".$this->db->escape($value)."'");
|
||||
$sql .= ' WHERE ab.piece_num=' . $piece_num ;
|
||||
$resql = $this->db->query($sql);
|
||||
|
||||
@ -1184,7 +1184,7 @@ class BookKeeping extends CommonObject
|
||||
// first check if line not yet in bookkeeping
|
||||
$sql = "DELETE";
|
||||
$sql .= " FROM " . MAIN_DB_PREFIX . $this->table_element;
|
||||
$sql .= " WHERE import_key = '" . $importkey . "'";
|
||||
$sql .= " WHERE import_key = '" . $this->db->escape($importkey) . "'";
|
||||
|
||||
$resql = $this->db->query($sql);
|
||||
|
||||
@ -1222,7 +1222,7 @@ class BookKeeping extends CommonObject
|
||||
$sql.= " FROM " . MAIN_DB_PREFIX . $this->table_element.$mode;
|
||||
$sql.= " WHERE 1 = 1";
|
||||
if (! empty($delyear)) $sql.= " AND YEAR(doc_date) = " . $delyear; // FIXME Must use between
|
||||
if (! empty($journal)) $sql.= " AND code_journal = '".$journal."'";
|
||||
if (! empty($journal)) $sql.= " AND code_journal = '".$this->db->escape($journal)."'";
|
||||
$sql .= " AND entity IN (" . getEntity('accountancy') . ")";
|
||||
$resql = $this->db->query($sql);
|
||||
|
||||
@ -1254,7 +1254,7 @@ class BookKeeping extends CommonObject
|
||||
// first check if line not yet in bookkeeping
|
||||
$sql = "DELETE";
|
||||
$sql .= " FROM " . MAIN_DB_PREFIX . $this->table_element;
|
||||
$sql .= " WHERE piece_num = " . $piecenum;
|
||||
$sql .= " WHERE piece_num = " . (int) $piecenum;
|
||||
$sql .= " AND entity IN (" . getEntity('accountancy') . ")";
|
||||
|
||||
$resql = $this->db->query($sql);
|
||||
|
||||
@ -298,38 +298,38 @@ if (empty($reshook))
|
||||
$object->oldcopy = clone $object;
|
||||
|
||||
// Change values
|
||||
$object->civility_id = trim($_POST["civility_id"]);
|
||||
$object->firstname = trim($_POST["firstname"]);
|
||||
$object->lastname = trim($_POST["lastname"]);
|
||||
$object->login = trim($_POST["login"]);
|
||||
$object->pass = trim($_POST["pass"]);
|
||||
$object->civility_id = trim(GETPOST("civility_id",'alpha'));
|
||||
$object->firstname = trim(GETPOST("firstname",'alpha'));
|
||||
$object->lastname = trim(GETPOST("lastname",'alpha'));
|
||||
$object->login = trim(GETPOST("login",'alpha'));
|
||||
$object->pass = trim(GETPOST("pass",'alpha'));
|
||||
|
||||
$object->societe = trim($_POST["societe"]);
|
||||
$object->company = trim($_POST["societe"]);
|
||||
$object->societe = trim(GETPOST("societe",'alpha'));
|
||||
$object->company = trim(GETPOST("societe",'alpha'));
|
||||
|
||||
$object->address = trim($_POST["address"]);
|
||||
$object->zip = trim($_POST["zipcode"]);
|
||||
$object->town = trim($_POST["town"]);
|
||||
$object->state_id = $_POST["state_id"];
|
||||
$object->country_id = $_POST["country_id"];
|
||||
$object->address = trim(GETPOST("address",'alpha'));
|
||||
$object->zip = trim(GETPOST("zipcode",'alpha'));
|
||||
$object->town = trim(GETPOST("town",'alpha'));
|
||||
$object->state_id = GETPOST("state_id",'int');
|
||||
$object->country_id = GETPOST("country_id",'int');
|
||||
|
||||
$object->phone = trim($_POST["phone"]);
|
||||
$object->phone_perso = trim($_POST["phone_perso"]);
|
||||
$object->phone_mobile= trim($_POST["phone_mobile"]);
|
||||
$object->email = trim($_POST["member_email"]);
|
||||
$object->skype = trim($_POST["skype"]);
|
||||
$object->phone = trim(GETPOST("phone",'alpha'));
|
||||
$object->phone_perso = trim(GETPOST("phone_perso",'alpha'));
|
||||
$object->phone_mobile= trim(GETPOST("phone_mobile",'alpha'));
|
||||
$object->email = trim(GETPOST("member_email",'alpha'));
|
||||
$object->skype = trim(GETPOST("skype",'alpha'));
|
||||
$object->birth = $birthdate;
|
||||
|
||||
$object->typeid = $_POST["typeid"];
|
||||
//$object->note = trim($_POST["comment"]);
|
||||
$object->morphy = $_POST["morphy"];
|
||||
$object->typeid = GETPOST("typeid",'int');
|
||||
//$object->note = trim(GETPOST("comment","alpha"));
|
||||
$object->morphy = GETPOST("morphy",'alpha');
|
||||
|
||||
if (GETPOST('deletephoto')) $object->photo='';
|
||||
if (GETPOST('deletephoto','alpha')) $object->photo='';
|
||||
elseif (! empty($_FILES['photo']['name'])) $object->photo = dol_sanitizeFileName($_FILES['photo']['name']);
|
||||
|
||||
// Get status and public property
|
||||
$object->statut = $_POST["statut"];
|
||||
$object->public = $_POST["public"];
|
||||
$object->statut = GETPOST("statut",'alpha');
|
||||
$object->public = GETPOST("public",'alpha');
|
||||
|
||||
// Fill array 'array_options' with data from add form
|
||||
$ret = $extrafields->setOptionalsFromPost($extralabels,$object);
|
||||
@ -445,32 +445,32 @@ if (empty($reshook))
|
||||
$datesubscription=dol_mktime(12, 0, 0, $_POST["remonth"], $_POST["reday"], $_POST["reyear"]);
|
||||
}
|
||||
|
||||
$typeid=$_POST["typeid"];
|
||||
$civility_id=$_POST["civility_id"];
|
||||
$lastname=$_POST["lastname"];
|
||||
$firstname=$_POST["firstname"];
|
||||
$societe=$_POST["societe"];
|
||||
$address=$_POST["address"];
|
||||
$zip=$_POST["zipcode"];
|
||||
$town=$_POST["town"];
|
||||
$state_id=$_POST["state_id"];
|
||||
$country_id=$_POST["country_id"];
|
||||
$typeid=GETPOST("typeid",'int');
|
||||
$civility_id=GETPOST("civility_id",'int');
|
||||
$lastname=GETPOST("lastname",'alpha');
|
||||
$firstname=GETPOST("firstname",'alpha');
|
||||
$societe=GETPOST("societe",'alpha');
|
||||
$address=GETPOST("address",'alpha');
|
||||
$zip=GETPOST("zipcode",'alpha');
|
||||
$town=GETPOST("town",'alpha');
|
||||
$state_id=GETPOST("state_id",'int');
|
||||
$country_id=GETPOST("country_id",'int');
|
||||
|
||||
$phone=$_POST["phone"];
|
||||
$phone_perso=$_POST["phone_perso"];
|
||||
$phone_mobile=$_POST["phone_mobile"];
|
||||
$skype=$_POST["member_skype"];
|
||||
$email=$_POST["member_email"];
|
||||
$login=$_POST["member_login"];
|
||||
$pass=$_POST["password"];
|
||||
$photo=$_POST["photo"];
|
||||
//$comment=$_POST["comment"];
|
||||
$morphy=$_POST["morphy"];
|
||||
$subscription=$_POST["subscription"];
|
||||
$public=$_POST["public"];
|
||||
$phone=GETPOST("phone",'alpha');
|
||||
$phone_perso=GETPOST("phone_perso",'alpha');
|
||||
$phone_mobile=GETPOST("phone_mobile",'alpha');
|
||||
$skype=GETPOST("member_skype",'alpha');
|
||||
$email=GETPOST("member_email",'alpha');
|
||||
$login=GETPOST("member_login",'alpha');
|
||||
$pass=GETPOST("password",'alpha');
|
||||
$photo=GETPOST("photo",'alpha');
|
||||
//$comment=GETPOST("comment",'none');
|
||||
$morphy=GETPOST("morphy",'alpha');
|
||||
$subscription=GETPOST("subscription",'alpha');
|
||||
$public=GETPOST("public",'alpha');
|
||||
|
||||
$userid=$_POST["userid"];
|
||||
$socid=$_POST["socid"];
|
||||
$userid=GETPOST("userid",'int');
|
||||
$socid=GETPOST("socid",'int');
|
||||
|
||||
$object->civility_id = $civility_id;
|
||||
$object->firstname = $firstname;
|
||||
@ -1093,14 +1093,14 @@ else
|
||||
$morphys["phy"] = $langs->trans("Physical");
|
||||
$morphys["mor"] = $langs->trans("Morale");
|
||||
print '<tr><td><span class="fieldrequired">'.$langs->trans("Nature").'</span></td><td>';
|
||||
print $form->selectarray("morphy", $morphys, isset($_POST["morphy"])?$_POST["morphy"]:$object->morphy);
|
||||
print $form->selectarray("morphy", $morphys, (GETPOSTISSET("morphy")?GETPOST("morphy",'alpha'):$object->morphy));
|
||||
print "</td></tr>";
|
||||
|
||||
// Type
|
||||
print '<tr><td class="fieldrequired">'.$langs->trans("Type").'</td><td>';
|
||||
if ($user->rights->adherent->creer)
|
||||
{
|
||||
print $form->selectarray("typeid", $adht->liste_array(), (isset($_POST["typeid"])?$_POST["typeid"]:$object->typeid));
|
||||
print $form->selectarray("typeid", $adht->liste_array(), (GETPOSTISSET("typeid")?GETPOST("typeid",'int'):$object->typeid));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -439,8 +439,8 @@ class Adherent extends CommonObject
|
||||
$sql.= ", note_public = ".($this->note_public?"'".$this->db->escape($this->note_public)."'":"null");
|
||||
$sql.= ", photo = ".($this->photo?"'".$this->db->escape($this->photo)."'":"null");
|
||||
$sql.= ", public = '".$this->db->escape($this->public)."'";
|
||||
$sql.= ", statut = ".$this->statut;
|
||||
$sql.= ", fk_adherent_type = ".$this->typeid;
|
||||
$sql.= ", statut = ".$this->db->escape($this->statut);
|
||||
$sql.= ", fk_adherent_type = ".$this->db->escape($this->typeid);
|
||||
$sql.= ", morphy = '".$this->db->escape($this->morphy)."'";
|
||||
$sql.= ", birth = ".($this->birth?"'".$this->db->idate($this->birth)."'":"null");
|
||||
if ($this->datefin) $sql.= ", datefin = '".$this->db->idate($this->datefin)."'"; // Must be modified only when deleting a subscription
|
||||
|
||||
@ -265,7 +265,7 @@ class AdherentType extends CommonObject
|
||||
{
|
||||
$sql = "SELECT d.rowid, d.libelle as label, d.statut, d.subscription, d.mail_valid, d.note, d.vote";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."adherent_type as d";
|
||||
$sql .= " WHERE d.rowid = ".$rowid;
|
||||
$sql .= " WHERE d.rowid = ".(int) $rowid;
|
||||
|
||||
dol_syslog("Adherent_type::fetch", LOG_DEBUG);
|
||||
|
||||
|
||||
@ -42,23 +42,23 @@ $toselect = GETPOST('toselect', 'array');
|
||||
// Security check
|
||||
$result=restrictedArea($user,'adherent');
|
||||
|
||||
$filter=GETPOST("filter");
|
||||
$statut=GETPOST("statut");
|
||||
$search=GETPOST("search");
|
||||
$search_ref=GETPOST("search_ref");
|
||||
$search_lastname=GETPOST("search_lastname");
|
||||
$search_firstname=GETPOST("search_firstname");
|
||||
$search_login=GETPOST("search_login");
|
||||
$search_address=GETPOST("search_address");
|
||||
$search_zip=GETPOST("search_zip");
|
||||
$search_town=GETPOST("search_town");
|
||||
$search_state=GETPOST("search_state");
|
||||
$search_country=GETPOST("search_country");
|
||||
$search_phone=GETPOST("search_phone");
|
||||
$search_phone_perso=GETPOST("search_phone_perso");
|
||||
$search_phone_mobile=GETPOST("search_phone_mobile");
|
||||
$search_type=GETPOST("search_type");
|
||||
$search_email=GETPOST("search_email");
|
||||
$filter=GETPOST("filter",'alpha');
|
||||
$statut=GETPOST("statut",'alpha');
|
||||
$search=GETPOST("search",'alpha');
|
||||
$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_address=GETPOST("search_address",'alpha');
|
||||
$search_zip=GETPOST("search_zip",'alpha');
|
||||
$search_town=GETPOST("search_town",'alpha');
|
||||
$search_state=GETPOST("search_state",'alpha');
|
||||
$search_country=GETPOST("search_country",'alpha');
|
||||
$search_phone=GETPOST("search_phone",'alpha');
|
||||
$search_phone_perso=GETPOST("search_phone_perso",'alpha');
|
||||
$search_phone_mobile=GETPOST("search_phone_mobile",'alpha');
|
||||
$search_type=GETPOST("search_type",'alpha');
|
||||
$search_email=GETPOST("search_email",'alpha');
|
||||
$search_categ = GETPOST("search_categ",'int');
|
||||
$catid = GETPOST("catid",'int');
|
||||
$optioncss = GETPOST('optioncss','alpha');
|
||||
@ -288,7 +288,7 @@ if ($num == 1 && ! empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) &&
|
||||
llxHeader('',$langs->trans("Member"),'EN:Module_Foundations|FR:Module_Adhérents|ES:Módulo_Miembros');
|
||||
|
||||
$titre=$langs->trans("MembersList");
|
||||
if (isset($_GET["statut"]))
|
||||
if (GETPOSTISSET("statut"))
|
||||
{
|
||||
if ($statut == '-1,1') { $titre=$langs->trans("MembersListQualified"); }
|
||||
if ($statut == '-1') { $titre=$langs->trans("MembersListToValid"); }
|
||||
|
||||
@ -5,6 +5,7 @@
|
||||
* Copyright (C) 2010-2014 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2011-2017 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||
* Copyright (C) 2017 Rui Strecht <rui.strecht@aliartalentos.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
|
||||
@ -78,6 +79,7 @@ if ( ($action == 'update' && ! GETPOST("cancel",'alpha'))
|
||||
dolibarr_set_const($db, "MAIN_INFO_SOCIETE_TOWN", GETPOST("town",'nohtml'),'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_SOCIETE_ZIP", GETPOST("zipcode",'alpha'),'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_SOCIETE_STATE", GETPOST("state_id",'alpha'),'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_SOCIETE_REGION", GETPOST("region_code",'alpha'),'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_MONNAIE", GETPOST("currency",'alpha'),'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_SOCIETE_TEL", GETPOST("tel",'alpha'),'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_SOCIETE_FAX", GETPOST("fax",'alpha'),'chaine',0,'',$conf->entity);
|
||||
@ -339,18 +341,18 @@ if ($action == 'edit' || $action == 'updateedit')
|
||||
|
||||
print '<tr class="oddeven"><td class="fieldrequired"><label for="selectcountry_id">'.$langs->trans("Country").'</label></td><td class="maxwidthonsmartphone">';
|
||||
//if (empty($country_selected)) $country_selected=substr($langs->defaultlang,-2); // By default, country of localization
|
||||
print $form->select_country($mysoc->country_id,'country_id');
|
||||
print $form->select_country($mysoc->country_id, 'country_id');
|
||||
if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1);
|
||||
print '</td></tr>'."\n";
|
||||
|
||||
|
||||
print '<tr class="oddeven"><td><label for="state_id">'.$langs->trans("State").'</label></td><td class="maxwidthonsmartphone">';
|
||||
$formcompany->select_departement($conf->global->MAIN_INFO_SOCIETE_STATE,$mysoc->country_code,'state_id');
|
||||
$formcompany->select_departement($conf->global->MAIN_INFO_SOCIETE_STATE, $mysoc->country_code, 'state_id');
|
||||
print '</td></tr>'."\n";
|
||||
|
||||
|
||||
print '<tr class="oddeven"><td><label for="currency">'.$langs->trans("CompanyCurrency").'</label></td><td>';
|
||||
print $form->selectCurrency($conf->currency,"currency");
|
||||
print $form->selectCurrency($conf->currency, "currency");
|
||||
print '</td></tr>'."\n";
|
||||
|
||||
|
||||
@ -726,8 +728,9 @@ else
|
||||
print '</td></tr>';
|
||||
|
||||
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("State").'</td><td>';
|
||||
if (! empty($conf->global->MAIN_INFO_SOCIETE_STATE)) print getState($conf->global->MAIN_INFO_SOCIETE_STATE);
|
||||
if (! empty($conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT)) print '<tr class="oddeven"><td>'.$langs->trans("Region-State").'</td><td>';
|
||||
else print '<tr class="oddeven"><td>'.$langs->trans("State").'</td><td>';
|
||||
if (! empty($conf->global->MAIN_INFO_SOCIETE_STATE)) print getState($conf->global->MAIN_INFO_SOCIETE_STATE,$conf->global->MAIN_SHOW_STATE_CODE,0,$conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT);
|
||||
else print ' ';
|
||||
print '</td></tr>';
|
||||
|
||||
|
||||
@ -141,7 +141,7 @@ else
|
||||
print '<input type="hidden" name="action" value="update">';
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td>'.$langs->trans("CompanyIds").'</td><td>'.$langs->trans("Value").'</td></tr>';
|
||||
print '<tr class="liste_titre"><td class="titlefield">'.$langs->trans("CompanyIds").'</td><td>'.$langs->trans("Value").'</td></tr>';
|
||||
|
||||
print '<tr class="oddeven"><td><label for="intra_vat">'.$langs->trans("VATIntra").'</label></td><td>';
|
||||
print '<input name="tva" id="intra_vat" class="minwidth200" value="' . (! empty($conf->global->MAIN_INFO_TVAINTRA) ? $conf->global->MAIN_INFO_TVAINTRA : '') . '">';
|
||||
@ -169,28 +169,29 @@ else
|
||||
|
||||
print '</table>';
|
||||
|
||||
print "<br>\n";
|
||||
print '<br>';
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
|
||||
// Cas des parametres TAX_MODE_SELL/BUY_SERVICE/PRODUCT
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td colspan="2">'.$langs->trans('OptionVatMode').'</td><td>'.$langs->trans('Description').'</td>';
|
||||
print '<td class="titlefield">'.$langs->trans('OptionVatMode').'</td><td>'.$langs->trans('Description').'</td>';
|
||||
print "</tr>\n";
|
||||
print '<tr class="oddeven"><td width="200"><input type="radio" name="tax_mode" value="0"'.($tax_mode != 1 ? ' checked' : '').'> '.$langs->trans('OptionVATDefault').'</td>';
|
||||
print '<td colspan="2">'.nl2br($langs->trans('OptionVatDefaultDesc'));
|
||||
print '<td>'.nl2br($langs->trans('OptionVatDefaultDesc'));
|
||||
print "</td></tr>\n";
|
||||
print '<tr class="oddeven"><td width="200"><input type="radio" name="tax_mode" value="1"'.($tax_mode == 1 ? ' checked' : '').'> '.$langs->trans('OptionVATDebitOption').'</td>';
|
||||
print '<td colspan="2">'.nl2br($langs->trans('OptionVatDebitOptionDesc'))."</td></tr>\n";
|
||||
print '<td>'.nl2br($langs->trans('OptionVatDebitOptionDesc'))."</td></tr>\n";
|
||||
|
||||
print "</table>\n";
|
||||
|
||||
print '<br>';
|
||||
print load_fiche_titre($langs->trans("SummaryOfVatExigibilityUsedByDefault"),'','');
|
||||
print ' -> '.$langs->trans("SummaryOfVatExigibilityUsedByDefault");
|
||||
//print ' ('.$langs->trans("CanBeChangedWhenMakingInvoice").')';
|
||||
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td> </td><td>'.$langs->trans("Buy").'</td><td>'.$langs->trans("Sell").'</td></tr>';
|
||||
print '<tr class="liste_titre"><td class="titlefield"> </td><td>'.$langs->trans("Buy").'</td><td>'.$langs->trans("Sell").'</td></tr>';
|
||||
|
||||
// Products
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("Product").'</td>';
|
||||
@ -235,12 +236,18 @@ else
|
||||
|
||||
print "<br>\n";
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Others params
|
||||
*/
|
||||
|
||||
print load_fiche_titre($langs->trans("OtherOptions"),'','');
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td colspan="3">' . $langs->trans('OtherOptions') . '</td>';
|
||||
print '<td class="titlefield">' . $langs->trans('Parameters') . '</td>';
|
||||
print '<td><td>';
|
||||
print "</tr>\n";
|
||||
|
||||
foreach ($list as $key)
|
||||
|
||||
@ -18,14 +18,15 @@
|
||||
|
||||
/**
|
||||
* \file admin/ticketsup.php
|
||||
* \ingroup ticketsup
|
||||
* \brief This file is a module setup page
|
||||
* \ingroup ticketsup
|
||||
* \brief This file is a module setup page
|
||||
*/
|
||||
|
||||
require '../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT . "/core/lib/admin.lib.php";
|
||||
require_once DOL_DOCUMENT_ROOT."/ticketsup/class/ticketsup.class.php";
|
||||
require_once DOL_DOCUMENT_ROOT."/core/lib/ticketsup.lib.php";
|
||||
|
||||
// Translations
|
||||
$langs->load("ticketsup");
|
||||
|
||||
@ -214,9 +215,12 @@ if ($action == 'setvarother') {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* View
|
||||
*/
|
||||
|
||||
$dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']);
|
||||
|
||||
$form = new Form($db);
|
||||
@ -226,28 +230,22 @@ $page_name = "TicketsupSetup";
|
||||
llxHeader('', $langs->trans($page_name), $help_url);
|
||||
|
||||
// Subheader
|
||||
$linkback = '<a href="' . DOL_URL_ROOT . '/admin/modules.php">'
|
||||
. $langs->trans("BackToModuleList") . '</a>';
|
||||
print load_fiche_titre($langs->trans($page_name), $linkback);
|
||||
$linkback = '<a href="' . DOL_URL_ROOT . '/admin/modules.php">' . $langs->trans("BackToModuleList") . '</a>';
|
||||
|
||||
print load_fiche_titre($langs->trans($page_name), $linkback, 'title_setup');
|
||||
|
||||
// Configuration header
|
||||
$head = ticketsupAdminPrepareHead();
|
||||
dol_fiche_head(
|
||||
$head,
|
||||
'settings',
|
||||
$langs->trans("Module110120Name"),
|
||||
0,
|
||||
"ticketsup@ticketsup"
|
||||
);
|
||||
|
||||
print '<div class="info"><p>' . $langs->trans("TicketsupSetupDictionaries") . ' : <a href="' . dol_buildpath('/admin/dict.php', 1) . '" >' . dol_buildpath('/admin/dict.php', 2) . '</a></p></div>';
|
||||
dol_fiche_head($head, 'settings', $langs->trans("Module56000Name"), -1, "ticketsup");
|
||||
|
||||
print '<p>' . $langs->trans("TicketsupPublicAccess") . ' : <a href="' . dol_buildpath('/ticketsup/public/index.php', 1) . '" target="_blank" >' . dol_buildpath('/ticketsup/public/index.php', 2) . '</a></p>';
|
||||
print $langs->trans("TicketsupSetupDictionaries") . ' : <a href="' . dol_buildpath('/admin/dict.php', 1) . '" >' . dol_buildpath('/admin/dict.php', 2) . '</a><br>';
|
||||
|
||||
//print '<p>'. $langs->trans("TicketsupSetupPage").'</p>';
|
||||
print $langs->trans("TicketsupPublicAccess") . ' : <a href="' . dol_buildpath('/ticketsup/public/index.php', 1) . '" target="_blank" >' . dol_buildpath('/ticketsup/public/index.php', 2) . '</a>';
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
|
||||
/*
|
||||
* Projects Numbering model
|
||||
*/
|
||||
@ -546,7 +544,7 @@ if (empty($conf->global->FCKEDITOR_ENABLE_MAIL)) {
|
||||
// Email d'envoi des notifications
|
||||
print '<tr class="pair"><td>' . $langs->trans("TicketEmailNotificationFrom") . '</td>';
|
||||
print '<td align="left">';
|
||||
print '<input type="text" name="TICKETS_NOTIFICATION_EMAIL_FROM" value="' . $conf->global->TICKETS_NOTIFICATION_EMAIL_FROM . '" size="20" ></td>';
|
||||
print '<input type="text" name="TICKETS_NOTIFICATION_EMAIL_FROM" value="' . $conf->global->TICKETS_NOTIFICATION_EMAIL_FROM . '" size="20" ></td>';
|
||||
print '<td align="center">';
|
||||
print $form->textwithpicto('', $langs->trans("TicketEmailNotificationFromHelp"), 1, 'help');
|
||||
print '</td>';
|
||||
|
||||
@ -26,7 +26,7 @@ require_once DOL_DOCUMENT_ROOT."/core/lib/ticketsup.lib.php";
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/class/extrafields.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/admin.lib.php';
|
||||
|
||||
$langs->load("ticketsup@ticketsup");
|
||||
$langs->load("ticketsup");
|
||||
$langs->load("admin");
|
||||
|
||||
$extrafields = new ExtraFields($db);
|
||||
@ -47,14 +47,14 @@ if (!$user->admin) {
|
||||
accessforbidden();
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
*/
|
||||
if (versioncompare(versiondolibarrarray(), array(3, 5, 0)) > 0) {
|
||||
include DOL_DOCUMENT_ROOT . '/core/actions_extrafields.inc.php';
|
||||
} elseif (versioncompare(versiondolibarrarray(), array(3, 4, 0)) > 0) {
|
||||
include DOL_DOCUMENT_ROOT . '/core/admin_extrafields.inc.php';
|
||||
}
|
||||
|
||||
include DOL_DOCUMENT_ROOT . '/core/actions_extrafields.inc.php';
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* View
|
||||
@ -67,17 +67,11 @@ $page_name = "TicketsupSetup";
|
||||
llxHeader('', $langs->trans($page_name), $help_url);
|
||||
|
||||
$linkback = '<a href="' . DOL_URL_ROOT . '/admin/modules.php">' . $langs->trans("BackToModuleList") . '</a>';
|
||||
print load_fiche_titre($langs->trans("TicketsupSetup"), $linkback, 'setup');
|
||||
print load_fiche_titre($langs->trans("TicketsupSetup"), $linkback, 'title_setup');
|
||||
|
||||
$head = ticketsupAdminPrepareHead();
|
||||
|
||||
dol_fiche_head(
|
||||
$head,
|
||||
'attributes',
|
||||
$langs->trans("Module110120Name"),
|
||||
0,
|
||||
"ticketsup@ticketsup"
|
||||
);
|
||||
dol_fiche_head($head, 'attributes', $langs->trans("Module56000Name"), -1, "ticketsup");
|
||||
|
||||
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php';
|
||||
|
||||
|
||||
@ -35,7 +35,7 @@ if (! $user->rights->bookmark->lire) {
|
||||
restrictedArea($user, 'bookmarks');
|
||||
}
|
||||
|
||||
$id=GETPOST("id");
|
||||
$id=GETPOST("id",'int');
|
||||
$action=GETPOST("action","alpha");
|
||||
$title=GETPOST("title","alpha");
|
||||
$url=GETPOST("url","alpha");
|
||||
|
||||
@ -164,6 +164,7 @@ class ActionComm extends CommonObject
|
||||
|
||||
// Properties for links to other objects
|
||||
var $fk_element; // Id of record
|
||||
var $elementid; // Id of record alternative for API
|
||||
var $elementtype; // Type of record. This if property ->element of object linked to.
|
||||
|
||||
// Ical
|
||||
@ -550,7 +551,7 @@ class ActionComm extends CommonObject
|
||||
$sql.= " a.fk_user_author, a.fk_user_mod,";
|
||||
$sql.= " a.fk_user_action, a.fk_user_done,";
|
||||
$sql.= " a.fk_contact, a.percent as percentage,";
|
||||
$sql.= " a.fk_element, a.elementtype,";
|
||||
$sql.= " a.fk_element as elementid, a.elementtype,";
|
||||
$sql.= " a.priority, a.fulldayevent, a.location, a.punctual, a.transparency,";
|
||||
$sql.= " c.id as type_id, c.code as type_code, c.libelle as type_label, c.color as type_color, c.picto as type_picto,";
|
||||
$sql.= " s.nom as socname,";
|
||||
@ -624,7 +625,8 @@ class ActionComm extends CommonObject
|
||||
$this->societe->id = $obj->fk_soc; // deprecated
|
||||
$this->contact->id = $obj->fk_contact; // deprecated
|
||||
|
||||
$this->fk_element = $obj->fk_element;
|
||||
$this->fk_element = $obj->elementid;
|
||||
$this->elementid = $obj->elementid;
|
||||
$this->elementtype = $obj->elementtype;
|
||||
|
||||
$this->fetchResources();
|
||||
|
||||
@ -80,6 +80,8 @@ class AgendaEvents extends DolibarrApi
|
||||
throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login);
|
||||
}
|
||||
|
||||
$result = $this->actioncomm->fetch_optionals();
|
||||
|
||||
$this->actioncomm->fetchObjectLinked();
|
||||
return $this->_cleanObjectDatas($this->actioncomm);
|
||||
}
|
||||
@ -319,7 +321,6 @@ class AgendaEvents extends DolibarrApi
|
||||
|
||||
unset($object->usermod);
|
||||
unset($object->libelle);
|
||||
unset($object->array_options);
|
||||
unset($object->context);
|
||||
unset($object->canvas);
|
||||
unset($object->contact);
|
||||
|
||||
@ -56,15 +56,7 @@ if (!empty($conf->variants->enabled)) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/variants/class/ProductCombination.class.php';
|
||||
}
|
||||
|
||||
$langs->load('orders');
|
||||
$langs->load('sendings');
|
||||
$langs->load('companies');
|
||||
$langs->load('bills');
|
||||
$langs->load('propal');
|
||||
$langs->load('deliveries');
|
||||
$langs->load('sendings');
|
||||
$langs->load('products');
|
||||
$langs->load('other');
|
||||
$langs->loadLangs(array('orders','sendings','companies','bills','propal','deliveries','products','other'));
|
||||
if (!empty($conf->incoterm->enabled)) $langs->load('incoterm');
|
||||
if (! empty($conf->margin->enabled)) $langs->load('margins');
|
||||
if (! empty($conf->productbatch->enabled)) $langs->load("productbatch");
|
||||
|
||||
@ -3135,6 +3135,12 @@ class Commande extends CommonOrder
|
||||
// End call triggers
|
||||
}
|
||||
|
||||
if ($this->nb_expedition() != 0)
|
||||
{
|
||||
$this->errors[] = $langs->trans('SomeShipmentExists');
|
||||
$error++;
|
||||
}
|
||||
|
||||
if (! $error)
|
||||
{
|
||||
// Delete order details
|
||||
|
||||
@ -89,8 +89,8 @@ $arrayfields=array(
|
||||
'accountype'=>array('label'=>$langs->trans("Type"), 'checked'=>1),
|
||||
'b.label'=>array('label'=>$langs->trans("Label"), 'checked'=>1),
|
||||
'b.number'=>array('label'=>$langs->trans("AccountIdShort"), 'checked'=>1),
|
||||
'b.account_number'=>array('label'=>$langs->trans("AccountAccounting"), 'checked'=>$conf->accountancy->enabled),
|
||||
'b.fk_accountancy_journal'=>array('label'=>$langs->trans("AccountancyJournal"), 'checked'=>$conf->accountancy->enabled),
|
||||
'b.account_number'=>array('label'=>$langs->trans("AccountAccounting"), 'checked'=>(! empty($conf->accounting->enabled) || ! empty($conf->accounting->enabled))),
|
||||
'b.fk_accountancy_journal'=>array('label'=>$langs->trans("AccountancyJournal"), 'checked'=>(! empty($conf->accounting->enabled) || ! empty($conf->accounting->enabled))),
|
||||
'toreconcile'=>array('label'=>$langs->trans("TransactionsToConciliate"), 'checked'=>1),
|
||||
'b.currency_code'=>array('label'=>$langs->trans("Currency"), 'checked'=>0),
|
||||
'b.datec'=>array('label'=>$langs->trans("DateCreation"), 'checked'=>0, 'position'=>500),
|
||||
|
||||
@ -553,7 +553,7 @@ if (empty($reshook))
|
||||
|| (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->facture->invoice_advance->unvalidate)))
|
||||
)
|
||||
{
|
||||
$idwarehouse = GETPOST('idwarehouse');
|
||||
$idwarehouse = GETPOST('idwarehouse','int');
|
||||
|
||||
$object->fetch($id);
|
||||
$object->fetch_thirdparty();
|
||||
@ -640,8 +640,8 @@ if (empty($reshook))
|
||||
else if ($action == 'confirm_paid_partially' && $confirm == 'yes' && $user->rights->facture->paiement)
|
||||
{
|
||||
$object->fetch($id);
|
||||
$close_code = $_POST["close_code"];
|
||||
$close_note = $_POST["close_note"];
|
||||
$close_code = GETPOST("close_code",'none');
|
||||
$close_note = GETPOST("close_note",'none');
|
||||
if ($close_code) {
|
||||
$result = $object->set_paid($user, $close_code, $close_note);
|
||||
if ($result<0) setEventMessages($object->error, $object->errors, 'errors');
|
||||
@ -651,8 +651,8 @@ if (empty($reshook))
|
||||
} // Classify "abandoned"
|
||||
else if ($action == 'confirm_canceled' && $confirm == 'yes') {
|
||||
$object->fetch($id);
|
||||
$close_code = $_POST["close_code"];
|
||||
$close_note = $_POST["close_note"];
|
||||
$close_code = GETPOST("close_code",'none');
|
||||
$close_note = GETPOST("close_note",'none');
|
||||
if ($close_code) {
|
||||
$result = $object->set_canceled($user, $close_code, $close_note);
|
||||
if ($result<0) setEventMessages($object->error, $object->errors, 'errors');
|
||||
@ -1419,6 +1419,7 @@ if (empty($reshook))
|
||||
}
|
||||
}
|
||||
|
||||
// Situation invoices
|
||||
if (GETPOST('type') == Facture::TYPE_SITUATION && (!empty($_POST['situations'])))
|
||||
{
|
||||
$datefacture = dol_mktime(12, 0, 0, $_POST['remonth'], $_POST['reday'], $_POST['reyear']);
|
||||
@ -1455,16 +1456,16 @@ if (empty($reshook))
|
||||
$object->fetch_thirdparty();
|
||||
$object->date = $datefacture;
|
||||
$object->date_pointoftax = $date_pointoftax;
|
||||
$object->note_public = trim($_POST['note_public']);
|
||||
$object->note = trim($_POST['note']);
|
||||
$object->ref_client = $_POST['ref_client'];
|
||||
$object->ref_int = $_POST['ref_int'];
|
||||
$object->modelpdf = $_POST['model'];
|
||||
$object->fk_project = $_POST['projectid'];
|
||||
$object->cond_reglement_id = $_POST['cond_reglement_id'];
|
||||
$object->mode_reglement_id = $_POST['mode_reglement_id'];
|
||||
$object->remise_absolue = $_POST['remise_absolue'];
|
||||
$object->remise_percent = $_POST['remise_percent'];
|
||||
$object->note_public = trim(GETPOST('note_public','none'));
|
||||
$object->note = trim(GETPOST('note','none'));
|
||||
$object->ref_client = GETPOST('ref_client','alpha');
|
||||
$object->ref_int = GETPOST('ref_int','alpha');
|
||||
$object->modelpdf = GETPOST('model','alpha');
|
||||
$object->fk_project = GETPOST('projectid','int');
|
||||
$object->cond_reglement_id = GETPOST('cond_reglement_id','int');
|
||||
$object->mode_reglement_id = GETPOST('mode_reglement_id','int');
|
||||
$object->remise_absolue = GETPOST('remise_absolue','int');
|
||||
$object->remise_percent = GETPOST('remise_percent','int');
|
||||
|
||||
// Proprietes particulieres a facture de remplacement
|
||||
|
||||
@ -1533,14 +1534,14 @@ if (empty($reshook))
|
||||
|
||||
// Set if we used free entry or predefined product
|
||||
$predef='';
|
||||
$product_desc=(GETPOST('dp_desc')?GETPOST('dp_desc'):'');
|
||||
$product_desc=(GETPOST('dp_desc','none')?GETPOST('dp_desc','none'):'');
|
||||
$price_ht = GETPOST('price_ht');
|
||||
$price_ht_devise = GETPOST('multicurrency_price_ht');
|
||||
$prod_entry_mode = GETPOST('prod_entry_mode','alpha');
|
||||
if ($prod_entry_mode == 'free')
|
||||
{
|
||||
$idprod=0;
|
||||
$tva_tx = (GETPOST('tva_tx') ? GETPOST('tva_tx') : 0);
|
||||
$tva_tx = (GETPOST('tva_tx','alpha') ? GETPOST('tva_tx','alpha') : 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -439,7 +439,7 @@ class FactureRec extends CommonInvoice
|
||||
|
||||
$sql = 'SELECT l.rowid, l.fk_product, l.product_type, l.label as custom_label, l.description, l.product_type, l.price, l.qty, l.vat_src_code, l.tva_tx, ';
|
||||
$sql.= ' l.localtax1_tx, l.localtax2_tx, l.localtax1_type, l.localtax2_type, l.remise, l.remise_percent, l.subprice,';
|
||||
$sql.= ' l.info_bits, l.total_ht, l.total_tva, l.total_ttc,';
|
||||
$sql.= ' l.info_bits, l.date_start_fill, l.date_end_fill, l.total_ht, l.total_tva, l.total_ttc,';
|
||||
//$sql.= ' l.situation_percent, l.fk_prev_id,';
|
||||
//$sql.= ' l.localtax1_tx, l.localtax2_tx, l.localtax1_type, l.localtax2_type, l.remise_percent, l.fk_remise_except, l.subprice,';
|
||||
$sql.= ' l.rang, l.special_code,';
|
||||
@ -487,6 +487,8 @@ class FactureRec extends CommonInvoice
|
||||
$line->remise_percent = $objp->remise_percent;
|
||||
$line->fk_remise_except = $objp->fk_remise_except;
|
||||
$line->fk_product = $objp->fk_product;
|
||||
$line->date_start_fill = $objp->date_start_fill;
|
||||
$line->date_end_fill = $objp->date_end_fill;
|
||||
$line->info_bits = $objp->info_bits;
|
||||
$line->total_ht = $objp->total_ht;
|
||||
$line->total_tva = $objp->total_tva;
|
||||
@ -602,15 +604,17 @@ class FactureRec extends CommonInvoice
|
||||
* @param string $label Label of the line
|
||||
* @param string $fk_unit Unit
|
||||
* @param double $pu_ht_devise Unit price in currency
|
||||
* @param int $date_start_fill 1=Flag to fill start date when generating invoice
|
||||
* @param int $date_end_fill 1=Flag to fill end date when generating invoice
|
||||
* @return int <0 if KO, Id of line if OK
|
||||
*/
|
||||
function addline($desc, $pu_ht, $qty, $txtva, $txlocaltax1=0, $txlocaltax2=0, $fk_product=0, $remise_percent=0, $price_base_type='HT', $info_bits=0, $fk_remise_except='', $pu_ttc=0, $type=0, $rang=-1, $special_code=0, $label='', $fk_unit=null, $pu_ht_devise=0)
|
||||
function addline($desc, $pu_ht, $qty, $txtva, $txlocaltax1=0, $txlocaltax2=0, $fk_product=0, $remise_percent=0, $price_base_type='HT', $info_bits=0, $fk_remise_except='', $pu_ttc=0, $type=0, $rang=-1, $special_code=0, $label='', $fk_unit=null, $pu_ht_devise=0, $date_start_fill=0, $date_end_fill=0)
|
||||
{
|
||||
global $mysoc;
|
||||
|
||||
$facid=$this->id;
|
||||
|
||||
dol_syslog(get_class($this)."::addline facid=$facid,desc=$desc,pu_ht=$pu_ht,qty=$qty,txtva=$txtva,txlocaltax1=$txlocaltax1,txlocaltax2=$txlocaltax2,fk_product=$fk_product,remise_percent=$remise_percent,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,pu_ht_devise=$pu_ht_devise", LOG_DEBUG);
|
||||
dol_syslog(get_class($this)."::addline facid=$facid,desc=$desc,pu_ht=$pu_ht,qty=$qty,txtva=$txtva,txlocaltax1=$txlocaltax1,txlocaltax2=$txlocaltax2,fk_product=$fk_product,remise_percent=$remise_percent,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,pu_ht_devise=$pu_ht_devise,date_start_fill=$date_start_fill,date_end_fill=$date_end_fill", LOG_DEBUG);
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php';
|
||||
|
||||
// Check parameters
|
||||
@ -700,6 +704,8 @@ class FactureRec extends CommonInvoice
|
||||
$sql.= ", total_localtax1";
|
||||
$sql.= ", total_localtax2";
|
||||
$sql.= ", total_ttc";
|
||||
$sql.= ", date_start_fill";
|
||||
$sql.= ", date_end_fill";
|
||||
$sql.= ", info_bits";
|
||||
$sql.= ", rang";
|
||||
$sql.= ", special_code";
|
||||
@ -727,6 +733,8 @@ class FactureRec extends CommonInvoice
|
||||
$sql.= ", ".price2num($total_localtax1);
|
||||
$sql.= ", ".price2num($total_localtax2);
|
||||
$sql.= ", ".price2num($total_ttc);
|
||||
$sql.= ", ".(int) $date_start_fill;
|
||||
$sql.= ", ".(int) $date_end_fill;
|
||||
$sql.= ", ".$info_bits;
|
||||
$sql.= ", ".$rang;
|
||||
$sql.= ", ".$special_code;
|
||||
@ -778,9 +786,11 @@ class FactureRec extends CommonInvoice
|
||||
* @param string $fk_unit Unit
|
||||
* @param double $pu_ht_devise Unit price in currency
|
||||
* @param int $notrigger disable line update trigger
|
||||
* @param int $date_start_fill 1=Flag to fill start date when generating invoice
|
||||
* @param int $date_end_fill 1=Flag to fill end date when generating invoice
|
||||
* @return int <0 if KO, Id of line if OK
|
||||
*/
|
||||
function updateline($rowid, $desc, $pu_ht, $qty, $txtva, $txlocaltax1=0, $txlocaltax2=0, $fk_product=0, $remise_percent=0, $price_base_type='HT', $info_bits=0, $fk_remise_except='', $pu_ttc=0, $type=0, $rang=-1, $special_code=0, $label='', $fk_unit=null, $pu_ht_devise = 0, $notrigger=0)
|
||||
function updateline($rowid, $desc, $pu_ht, $qty, $txtva, $txlocaltax1=0, $txlocaltax2=0, $fk_product=0, $remise_percent=0, $price_base_type='HT', $info_bits=0, $fk_remise_except='', $pu_ttc=0, $type=0, $rang=-1, $special_code=0, $label='', $fk_unit=null, $pu_ht_devise = 0, $notrigger=0, $date_start_fill=0, $date_end_fill=0)
|
||||
{
|
||||
global $mysoc;
|
||||
|
||||
@ -883,6 +893,8 @@ class FactureRec extends CommonInvoice
|
||||
$sql.= ", total_localtax1='".price2num($total_localtax1)."'";
|
||||
$sql.= ", total_localtax2='".price2num($total_localtax2)."'";
|
||||
$sql.= ", total_ttc='".price2num($total_ttc)."'";
|
||||
$sql.= ", date_start_fill=".((int) $date_start_fill);
|
||||
$sql.= ", date_end_fill=".((int) $date_end_fill);
|
||||
$sql.= ", info_bits=".$info_bits;
|
||||
$sql.= ", rang=".$rang;
|
||||
$sql.= ", special_code=".$special_code;
|
||||
@ -948,7 +960,7 @@ class FactureRec extends CommonInvoice
|
||||
* Create all recurrents invoices (for all entities if multicompany is used).
|
||||
* A result may also be provided into this->output.
|
||||
*
|
||||
* WARNING: This method change context $conf->entity to be in correct context for each recurring invoice found.
|
||||
* WARNING: This method change temporarly context $conf->entity to be in correct context for each recurring invoice found.
|
||||
*
|
||||
* @return int 0 if OK, < 0 if KO (this function is used also by cron so only 0 is OK)
|
||||
*/
|
||||
@ -1561,6 +1573,10 @@ class FactureLigneRec extends CommonInvoiceLine
|
||||
public $element='facturedetrec';
|
||||
public $table_element='facturedet_rec';
|
||||
|
||||
var $date_start_fill;
|
||||
var $date_end_fill;
|
||||
|
||||
|
||||
/**
|
||||
* Delete line in database
|
||||
*
|
||||
@ -1615,7 +1631,7 @@ class FactureLigneRec extends CommonInvoiceLine
|
||||
{
|
||||
$sql = 'SELECT l.rowid, l.fk_facture ,l.fk_product, l.product_type, l.label as custom_label, l.description, l.product_type, l.price, l.qty, l.vat_src_code, l.tva_tx,';
|
||||
$sql.= ' l.localtax1_tx, l.localtax2_tx, l.localtax1_type, l.localtax2_type, l.remise, l.remise_percent, l.subprice,';
|
||||
$sql.= ' l.info_bits, l.total_ht, l.total_tva, l.total_ttc,';
|
||||
$sql.= ' l.date_start_fill, l.date_end_fill, l.info_bits, l.total_ht, l.total_tva, l.total_ttc,';
|
||||
$sql.= ' l.rang, l.special_code,';
|
||||
$sql.= ' l.fk_unit, l.fk_contract_line,';
|
||||
$sql.= ' p.ref as product_ref, p.fk_product_type as fk_product_type, p.label as product_label, p.description as product_desc';
|
||||
@ -1655,6 +1671,8 @@ class FactureLigneRec extends CommonInvoiceLine
|
||||
$this->remise_percent = $objp->remise_percent;
|
||||
$this->fk_remise_except = $objp->fk_remise_except;
|
||||
$this->fk_product = $objp->fk_product;
|
||||
$this->date_start_fill = $objp->date_start_fill;
|
||||
$this->date_end_fill = $objp->date_end_fill;
|
||||
$this->info_bits = $objp->info_bits;
|
||||
$this->total_ht = $objp->total_ht;
|
||||
$this->total_tva = $objp->total_tva;
|
||||
@ -1711,6 +1729,9 @@ class FactureLigneRec extends CommonInvoiceLine
|
||||
$sql.= ", product_type=".$this->product_type;
|
||||
$sql.= ", remise_percent='".price2num($this->remise_percent)."'";
|
||||
$sql.= ", subprice='".price2num($this->subprice)."'";
|
||||
$sql.= ", info_bits='".price2num($this->info_bits)."'";
|
||||
$sql.= ", date_start_fill=".(int) $this->date_start_fill;
|
||||
$sql.= ", date_end_fill=".(int) $this->date_end_fill;
|
||||
$sql.= ", total_ht='".price2num($this->total_ht)."'";
|
||||
$sql.= ", total_tva='".price2num($this->total_tva)."'";
|
||||
$sql.= ", total_localtax1='".price2num($this->total_localtax1)."'";
|
||||
|
||||
@ -287,6 +287,10 @@ class Facture extends CommonInvoice
|
||||
|
||||
$this->db->begin();
|
||||
|
||||
$originaldatewhen=null;
|
||||
$nextdatewhen=null;
|
||||
$previousdaynextdatewhen=null;
|
||||
|
||||
// Create invoice from a template invoice
|
||||
if ($this->fac_rec > 0)
|
||||
{
|
||||
@ -297,7 +301,10 @@ class Facture extends CommonInvoice
|
||||
$result=$_facrec->fetch($this->fac_rec);
|
||||
$result=$_facrec->fetchObjectLinked(); // This load $_facrec->linkedObjectsIds
|
||||
|
||||
// Define some dates
|
||||
$originaldatewhen = $_facrec->date_when;
|
||||
$nextdatewhen=dol_time_plus_duree($originaldatewhen, $_facrec->frequency, $_facrec->unit_frequency);
|
||||
$previousdaynextdatewhen=dol_time_plus_duree($nextdatewhen, -1, 'd');
|
||||
|
||||
$this->socid = $_facrec->socid; // Invoice created on same thirdparty than template
|
||||
$this->entity = $_facrec->entity; // Invoice created in same entity than template
|
||||
@ -374,7 +381,8 @@ class Facture extends CommonInvoice
|
||||
$substitutionarray['__INVOICE_NEXT_YEAR__'] = dol_print_date(dol_time_plus_duree($this->date, 1, 'y'), '%Y');
|
||||
// Only for tempalte invoice
|
||||
$substitutionarray['__INVOICE_DATE_NEXT_INVOICE_BEFORE_GEN__'] = dol_print_date($originaldatewhen, 'dayhour');
|
||||
$substitutionarray['__INVOICE_DATE_NEXT_INVOICE_AFTER_GEN__'] = dol_print_date(dol_time_plus_duree($originaldatewhen, $_facrec->frequency, $_facrec->unit_frequency), 'dayhour');
|
||||
$substitutionarray['__INVOICE_DATE_NEXT_INVOICE_AFTER_GEN__'] = dol_print_date($nextdatewhen, 'dayhour');
|
||||
$substitutionarray['__INVOICE_PREVIOUS_DATE_NEXT_INVOICE_AFTER_GEN__'] = dol_print_date($previousdaynextdatewhen, 'dayhour');
|
||||
|
||||
//var_dump($substitutionarray);exit;
|
||||
|
||||
@ -494,6 +502,7 @@ class Facture extends CommonInvoice
|
||||
}
|
||||
}
|
||||
|
||||
// Propagate contacts
|
||||
if (! $error && $this->id && ! empty($conf->global->MAIN_PROPAGATE_CONTACTS_FROM_ORIGIN) && ! empty($this->origin) && ! empty($this->origin_id)) // Get contact from origin object
|
||||
{
|
||||
$originforcontact = $this->origin;
|
||||
@ -531,11 +540,10 @@ class Facture extends CommonInvoice
|
||||
else dol_print_error($resqlcontact);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Insert lines of invoices into database
|
||||
* Insert lines of invoices, if not from template invoice, into database
|
||||
*/
|
||||
if (count($this->lines) && is_object($this->lines[0])) // If this->lines is array of InvoiceLines (preferred mode)
|
||||
if (! $error && empty($this->fac_rec) && count($this->lines) && is_object($this->lines[0])) // If this->lines is array of InvoiceLines (preferred mode)
|
||||
{
|
||||
$fk_parent_line = 0;
|
||||
|
||||
@ -545,9 +553,18 @@ class Facture extends CommonInvoice
|
||||
$newinvoiceline=$this->lines[$i];
|
||||
$newinvoiceline->fk_facture=$this->id;
|
||||
|
||||
// TODO This seems not used. Here we put origin 'facture' but after, we put an id of object !
|
||||
$newinvoiceline->origin = $this->element;
|
||||
$newinvoiceline->origin_id = $this->lines[$i]->id;
|
||||
$newinvoiceline->origin = $this->lines[$i]->element;
|
||||
$newinvoiceline->origin_id = $this->lines[$i]->id;
|
||||
|
||||
// Auto set date of service ?
|
||||
if ($this->lines[$i]->date_start_fill == 1 && $originaldatewhen) // $originaldatewhen is defined when generating from recurring invoice only
|
||||
{
|
||||
$newinvoiceline->date_start = $originaldatewhen;
|
||||
}
|
||||
if ($this->lines[$i]->date_end_fill == 1 && $previousdaynextdatewhen) // $previousdaynextdatewhen is defined when generating from recurring invoice only
|
||||
{
|
||||
$newinvoiceline->date_end = $previousdaynextdatewhen;
|
||||
}
|
||||
|
||||
if ($result >= 0)
|
||||
{
|
||||
@ -581,7 +598,7 @@ class Facture extends CommonInvoice
|
||||
}
|
||||
}
|
||||
}
|
||||
else // If this->lines is an array of invoice line arrays
|
||||
elseif (! $error && empty($this->fac_rec)) // If this->lines is an array of invoice line arrays
|
||||
{
|
||||
$fk_parent_line = 0;
|
||||
|
||||
@ -689,7 +706,9 @@ class Facture extends CommonInvoice
|
||||
$localtax2_tx,
|
||||
$_facrec->lines[$i]->fk_product,
|
||||
$_facrec->lines[$i]->remise_percent,
|
||||
'','',0,
|
||||
($_facrec->lines[$i]->date_start_fill == 1 && $originaldatewhen)?$originaldatewhen:'',
|
||||
($_facrec->lines[$i]->date_end_fill == 1 && $previousdaynextdatewhen)?$previousdaynextdatewhen:'',
|
||||
0,
|
||||
$tva_npr,
|
||||
'',
|
||||
'HT',
|
||||
@ -2522,8 +2541,8 @@ class Facture extends CommonInvoice
|
||||
* @param double $txlocaltax2 Local tax 2 rate (deprecated, use instead txtva with code inside)
|
||||
* @param int $fk_product Id of predefined product/service
|
||||
* @param double $remise_percent Percent of discount on line
|
||||
* @param int $date_start Date start of service
|
||||
* @param int $date_end Date end of service
|
||||
* @param int $date_start Date start of service
|
||||
* @param int $date_end Date end of service
|
||||
* @param int $ventil Code of dispatching into accountancy
|
||||
* @param int $info_bits Bits de type de lignes
|
||||
* @param int $fk_remise_except Id discount used
|
||||
|
||||
@ -66,22 +66,8 @@ if ($action == "create" || $action == "add") $objecttype = '';
|
||||
$result = restrictedArea($user, 'facture', $id, $objecttype);
|
||||
$projectid = GETPOST('projectid','int');
|
||||
|
||||
$search_ref=GETPOST('search_ref');
|
||||
$search_societe=GETPOST('search_societe');
|
||||
$search_montant_ht=GETPOST('search_montant_ht');
|
||||
$search_montant_vat=GETPOST('search_montant_vat');
|
||||
$search_montant_ttc=GETPOST('search_montant_ttc');
|
||||
$search_payment_mode=GETPOST('search_payment_mode');
|
||||
$search_payment_term=GETPOST('search_payment_term');
|
||||
$day=GETPOST('day');
|
||||
$year=GETPOST('year');
|
||||
$month=GETPOST('month');
|
||||
$day_date_when=GETPOST('day_date_when');
|
||||
$year_date_when=GETPOST('year_date_when');
|
||||
$month_date_when=GETPOST('month_date_when');
|
||||
$search_recurring=GETPOST('search_recurring','int');
|
||||
$search_frequency=GETPOST('search_frequency','alpha');
|
||||
$search_unit_frequency=GETPOST('search_unit_frequency','alpha');
|
||||
|
||||
$limit = GETPOST('limit')?GETPOST('limit','int'):$conf->liste_limit;
|
||||
$sortfield = GETPOST("sortfield",'alpha');
|
||||
@ -144,28 +130,6 @@ if (empty($reshook))
|
||||
|
||||
include DOL_DOCUMENT_ROOT.'/core/actions_lineupdown.inc.php'; // Must be include, not include_once
|
||||
|
||||
// Do we click on purge search criteria ?
|
||||
if (GETPOST('button_removefilter_x','alpha') || GETPOST('button_removefilter.x','alpha') || GETPOST('button_removefilter','alpha')) // All test are required to be compatible with all browsers
|
||||
{
|
||||
$search_ref='';
|
||||
$search_societe='';
|
||||
$search_montant_ht='';
|
||||
$search_montant_vat='';
|
||||
$search_montant_ttc='';
|
||||
$search_montant_mode='';
|
||||
$search_montant_term='';
|
||||
$day='';
|
||||
$year='';
|
||||
$month='';
|
||||
$day_date_when='';
|
||||
$year_date_when='';
|
||||
$month_date_when='';
|
||||
$search_recurring='';
|
||||
$search_frequency='';
|
||||
$search_unit_frequency='';
|
||||
$search_array_options=array();
|
||||
}
|
||||
|
||||
// Mass actions
|
||||
/*$objectclass='MyObject';
|
||||
$objectlabel='MyObject';
|
||||
@ -686,6 +650,9 @@ if (empty($reshook))
|
||||
$fk_unit= GETPOST('units', 'alpha');
|
||||
}
|
||||
|
||||
$date_start_fill = GETPOST('date_start_fill','int');
|
||||
$date_end_fill = GETPOST('date_end_fill','int');
|
||||
|
||||
// Margin
|
||||
$fournprice = price2num(GETPOST('fournprice' . $predef) ? GETPOST('fournprice' . $predef) : '');
|
||||
$buyingprice = price2num(GETPOST('buying_price' . $predef) != '' ? GETPOST('buying_price' . $predef) : ''); // If buying_price is '0', we must keep this value
|
||||
@ -706,7 +673,7 @@ if (empty($reshook))
|
||||
else
|
||||
{
|
||||
// Insert line
|
||||
$result = $object->addline($desc, $pu_ht, $qty, $tva_tx,$localtax1_tx, $localtax2_tx, $idprod, $remise_percent, $price_base_type, $info_bits, '', $pu_ttc, $type, - 1, $special_code, $label, $fk_unit);
|
||||
$result = $object->addline($desc, $pu_ht, $qty, $tva_tx,$localtax1_tx, $localtax2_tx, $idprod, $remise_percent, $price_base_type, $info_bits, '', $pu_ttc, $type, - 1, $special_code, $label, $fk_unit, 0, $date_start_fill, $date_end_fill);
|
||||
|
||||
if ($result > 0)
|
||||
{
|
||||
@ -762,6 +729,9 @@ if (empty($reshook))
|
||||
unset($_POST['date_endmonth']);
|
||||
unset($_POST['date_endyear']);
|
||||
|
||||
unset($_POST['date_start_fill']);
|
||||
unset($_POST['date_end_fill']);
|
||||
|
||||
unset($_POST['situations']);
|
||||
unset($_POST['progress']);
|
||||
}
|
||||
@ -883,6 +853,9 @@ if (empty($reshook))
|
||||
$error ++;
|
||||
}
|
||||
|
||||
$date_start_fill = GETPOST('date_start_fill','int');
|
||||
$date_end_fill = GETPOST('date_end_fill','int');
|
||||
|
||||
// Update line
|
||||
if (! $error)
|
||||
{
|
||||
@ -905,7 +878,10 @@ if (empty($reshook))
|
||||
$special_code,
|
||||
$label,
|
||||
GETPOST('units'),
|
||||
$pu_ht_devise
|
||||
$pu_ht_devise,
|
||||
0,
|
||||
$date_start_fill,
|
||||
$date_end_fill
|
||||
);
|
||||
|
||||
if ($result >= 0)
|
||||
|
||||
@ -63,18 +63,18 @@ if (! empty($conf->comptabilite->enabled)) $result=restrictedArea($user,'compta'
|
||||
if (! empty($conf->accounting->enabled)) $result=restrictedArea($user,'accounting','','','comptarapport');
|
||||
|
||||
// Date range
|
||||
$year=GETPOST("year");
|
||||
$month=GETPOST("month");
|
||||
$search_societe = GETPOST("search_societe");
|
||||
$search_zip = GETPOST("search_zip");
|
||||
$search_town = GETPOST("search_town");
|
||||
$search_country = GETPOST("search_country");
|
||||
$date_startyear = GETPOST("date_startyear");
|
||||
$date_startmonth = GETPOST("date_startmonth");
|
||||
$date_startday = GETPOST("date_startday");
|
||||
$date_endyear = GETPOST("date_endyear");
|
||||
$date_endmonth = GETPOST("date_endmonth");
|
||||
$date_endday = GETPOST("date_endday");
|
||||
$year=GETPOST("year",'int');
|
||||
$month=GETPOST("month",'int');
|
||||
$search_societe = GETPOST("search_societe",'alpha');
|
||||
$search_zip = GETPOST("search_zip",'alpha');
|
||||
$search_town = GETPOST("search_town",'alpha');
|
||||
$search_country = GETPOST("search_country",'alpha');
|
||||
$date_startyear = GETPOST("date_startyear",'alpha');
|
||||
$date_startmonth = GETPOST("date_startmonth",'alpha');
|
||||
$date_startday = GETPOST("date_startday",'alpha');
|
||||
$date_endyear = GETPOST("date_endyear",'alpha');
|
||||
$date_endmonth = GETPOST("date_endmonth",'alpha');
|
||||
$date_endday = GETPOST("date_endday",'alpha');
|
||||
if (empty($year))
|
||||
{
|
||||
$year_current = strftime("%Y",dol_now());
|
||||
@ -85,8 +85,8 @@ if (empty($year))
|
||||
$month_current = strftime("%m",dol_now());
|
||||
$year_start = $year;
|
||||
}
|
||||
$date_start=dol_mktime(0,0,0,$_REQUEST["date_startmonth"],$_REQUEST["date_startday"],$_REQUEST["date_startyear"]);
|
||||
$date_end=dol_mktime(23,59,59,$_REQUEST["date_endmonth"],$_REQUEST["date_endday"],$_REQUEST["date_endyear"]);
|
||||
$date_start=dol_mktime(0,0,0,GETPOST("date_startmonth"),GETPOST("date_startday"),GETPOST("date_startyear"));
|
||||
$date_end=dol_mktime(23,59,59,GETPOST("date_endmonth"),GETPOST("date_endday"),GETPOST("date_endyear"));
|
||||
// Quarter
|
||||
if (empty($date_start) || empty($date_end)) // We define date_start and date_end
|
||||
{
|
||||
|
||||
@ -447,7 +447,7 @@ else
|
||||
$ratiopaymentinvoice=1;
|
||||
if ($modetax == 0)
|
||||
{
|
||||
if (isset($fields['payment_amount']) && $fields['ftotal_ttc']) $ratiopaymentinvoice=($fields['payment_amount']/$fields['ftotal_ttc']);
|
||||
if (isset($fields['payment_amount']) && price2num($fields['ftotal_ttc'])) $ratiopaymentinvoice=($fields['payment_amount']/$fields['ftotal_ttc']);
|
||||
print '<td class="nowrap" align="right">';
|
||||
//print $fields['totalht']."-".$fields['payment_amount']."-".$fields['ftotal_ttc'];
|
||||
if ($fields['payment_amount'] && $fields['ftotal_ttc'])
|
||||
|
||||
@ -1078,9 +1078,10 @@ class Contact extends CommonObject
|
||||
* @param int $maxlen Max length of
|
||||
* @param string $moreparam Add more param into URL
|
||||
* @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking
|
||||
* @param int $notooltip 1=Disable tooltip
|
||||
* @return string String with URL
|
||||
*/
|
||||
function getNomUrl($withpicto=0, $option='', $maxlen=0, $moreparam='', $save_lastsearch_value=-1)
|
||||
function getNomUrl($withpicto=0, $option='', $maxlen=0, $moreparam='', $save_lastsearch_value=-1, $notooltip=0)
|
||||
{
|
||||
global $conf, $langs, $hookmanager;
|
||||
|
||||
@ -1112,13 +1113,16 @@ class Contact extends CommonObject
|
||||
|
||||
$linkstart = '<a href="'.$url.'"';
|
||||
$linkclose="";
|
||||
if (! empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER))
|
||||
{
|
||||
$label=$langs->trans("ShowContact");
|
||||
$linkclose.=' alt="'.dol_escape_htmltag($label, 1).'"';
|
||||
}
|
||||
$linkclose.= ' title="'.dol_escape_htmltag($label, 1).'"';
|
||||
$linkclose.= ' class="classfortooltip">';
|
||||
if (empty($notooltip)) {
|
||||
if (! empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER))
|
||||
{
|
||||
$label=$langs->trans("ShowContact");
|
||||
$linkclose.=' alt="'.dol_escape_htmltag($label, 1).'"';
|
||||
}
|
||||
$linkclose.= ' title="'.dol_escape_htmltag($label, 1).'"';
|
||||
$linkclose.= ' class="classfortooltip"';
|
||||
}
|
||||
$linkclose.='>';
|
||||
|
||||
if (! is_object($hookmanager))
|
||||
{
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
* Copyright (C) 2010-2017 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2013 Christophe Battarel <christophe.battarel@altairis.fr>
|
||||
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2014-2016 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2014-2018 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2014-2016 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||
*
|
||||
@ -2143,7 +2143,7 @@ else
|
||||
print '<div class="inline-block divButAction"><a class="butAction" href="' . $_SERVER['PHP_SELF'] . '?id=' . $object->id . '&socid=' . $object->socid . '&action=clone&object=' . $object->element . '">' . $langs->trans("ToClone") . '</a></div>';
|
||||
}
|
||||
|
||||
if ($object->nbofservicesclosed > 0)
|
||||
if ($object->nbofservicesclosed > 0 || $object->nbofserviceswait > 0)
|
||||
{
|
||||
print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=activate">'.$langs->trans("ActivateAllContracts").'</a></div>';
|
||||
}
|
||||
|
||||
@ -18,9 +18,9 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file ticketsup/core/boxes/ticketsup_latest.php
|
||||
* \ingroup ticketsup
|
||||
* \brief This box shows latest UNREAD tickets
|
||||
* \file core/boxes/box_last_modified_ticketsup.php
|
||||
* \ingroup ticketsup
|
||||
* \brief This box shows latest modified tickets
|
||||
*/
|
||||
require_once DOL_DOCUMENT_ROOT . "/core/boxes/modules_boxes.php";
|
||||
|
||||
@ -31,7 +31,7 @@ class box_last_modified_ticketsup extends ModeleBoxes
|
||||
{
|
||||
|
||||
public $boxcode = "box_last_modified_ticketsup";
|
||||
public $boximg = "ticketsup@ticketsup";
|
||||
public $boximg = "ticketsup";
|
||||
public $boxlabel;
|
||||
public $depends = array("ticketsup");
|
||||
public $db;
|
||||
|
||||
@ -18,9 +18,9 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file ticketsup/core/boxes/ticketsup_latest.php
|
||||
* \ingroup ticketsup
|
||||
* \brief This box shows latest tickets
|
||||
* \file core/boxes/box_ticketsup_latest.php
|
||||
* \ingroup ticketsup
|
||||
* \brief This box shows latest created tickets
|
||||
*/
|
||||
require_once DOL_DOCUMENT_ROOT . "/core/boxes/modules_boxes.php";
|
||||
|
||||
@ -31,7 +31,7 @@ class box_last_ticketsup extends ModeleBoxes
|
||||
{
|
||||
|
||||
public $boxcode = "box_last_ticketsup";
|
||||
public $boximg = "ticketsup@ticketsup";
|
||||
public $boximg = "ticketsup";
|
||||
public $boxlabel;
|
||||
public $depends = array("ticketsup");
|
||||
public $db;
|
||||
|
||||
@ -349,6 +349,8 @@ class CMailFile
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/includes/swiftmailer/lexer/lib/Doctrine/Common/Lexer/AbstractLexer.php';
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/includes/swiftmailer/egulias/email-validator/EmailValidator/Exception/InvalidEmail.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/includes/swiftmailer/egulias/email-validator/EmailValidator/Exception/NoDomainPart.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/includes/swiftmailer/egulias/email-validator/EmailValidator/EmailParser.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/includes/swiftmailer/egulias/email-validator/EmailValidator/EmailLexer.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/includes/swiftmailer/egulias/email-validator/EmailValidator/EmailValidator.php';
|
||||
@ -384,12 +386,30 @@ class CMailFile
|
||||
|
||||
// Set the From address with an associative array
|
||||
//$this->message->setFrom(array('john@doe.com' => 'John Doe'));
|
||||
if (! empty($from)) $this->message->setFrom($this->getArrayAddress($from));
|
||||
if (! empty($from)) {
|
||||
try {
|
||||
$this->message->setFrom($this->getArrayAddress($from));
|
||||
} catch (Exception $e) {
|
||||
$this->errors[] = $e->getMessage();
|
||||
}
|
||||
}
|
||||
|
||||
// Set the To addresses with an associative array
|
||||
if (! empty($to)) $this->message->setTo($this->getArrayAddress($to));
|
||||
if (! empty($to)) {
|
||||
try {
|
||||
$this->message->setTo($this->getArrayAddress($to));
|
||||
} catch (Exception $e) {
|
||||
$this->errors[] = $e->getMessage();
|
||||
}
|
||||
}
|
||||
|
||||
if (! empty($replyto)) $this->message->SetReplyTo($this->getArrayAddress($replyto));
|
||||
if (! empty($replyto)) {
|
||||
try {
|
||||
$this->message->SetReplyTo($this->getArrayAddress($replyto));
|
||||
} catch (Exception $e) {
|
||||
$this->errors[] = $e->getMessage();
|
||||
}
|
||||
}
|
||||
|
||||
$this->message->setCharSet($conf->file->character_set_client);
|
||||
|
||||
|
||||
@ -13,6 +13,7 @@
|
||||
* Copyright (C) 2016 Bahfir abbes <dolipar@dolipar.org>
|
||||
* Copyright (C) 2017 ATM Consulting <support@atm-consulting.fr>
|
||||
* Copyright (C) 2017 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||
* Copyright (C) 2017 Rui Strecht <rui.strecht@aliartalentos.com>
|
||||
* Copyright (C) 2018 Frederic France <frederic.france@netlogic.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@ -197,7 +198,32 @@ abstract class CommonObject
|
||||
* @var string
|
||||
* @see getFullAddress(), isInEEC(), country
|
||||
*/
|
||||
public $country_code;
|
||||
public $country_code;
|
||||
/**
|
||||
* @var string
|
||||
* @see getFullAddress()
|
||||
*/
|
||||
public $state;
|
||||
/**
|
||||
* @var int
|
||||
* @see getFullAddress(), state
|
||||
*/
|
||||
public $state_id;
|
||||
/**
|
||||
* @var string
|
||||
* @see getFullAddress(), state
|
||||
*/
|
||||
public $state_code;
|
||||
/**
|
||||
* @var string
|
||||
* @see getFullAddress(), region
|
||||
*/
|
||||
public $region;
|
||||
/**
|
||||
* @var string
|
||||
* @see getFullAddress(), region
|
||||
*/
|
||||
public $region_code;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
@ -422,9 +448,10 @@ abstract class CommonObject
|
||||
*
|
||||
* @param int $withcountry 1=Add country into address string
|
||||
* @param string $sep Separator to use to build string
|
||||
* @param int $withregion 1=Add region into address string
|
||||
* @return string Full address string
|
||||
*/
|
||||
function getFullAddress($withcountry=0,$sep="\n")
|
||||
function getFullAddress($withcountry=0,$sep="\n",$withregion=0)
|
||||
{
|
||||
if ($withcountry && $this->country_id && (empty($this->country_code) || empty($this->country)))
|
||||
{
|
||||
@ -434,6 +461,16 @@ abstract class CommonObject
|
||||
$this->country =$tmparray['label'];
|
||||
}
|
||||
|
||||
if ($withregion && $this->state_id && (empty($this->state_code) || empty($this->state) || empty($this->region) || empty($this->region_cpde)))
|
||||
{
|
||||
require_once DOL_DOCUMENT_ROOT .'/core/lib/company.lib.php';
|
||||
$tmparray=getState($this->state_id,'all',0,1);
|
||||
$this->state_code =$tmparray['code'];
|
||||
$this->state =$tmparray['label'];
|
||||
$this->region_code =$tmparray['region_code'];
|
||||
$this->region =$tmparray['region'];
|
||||
}
|
||||
|
||||
return dol_format_address($this, $withcountry, $sep);
|
||||
}
|
||||
|
||||
@ -471,7 +508,7 @@ abstract class CommonObject
|
||||
$out='<!-- BEGIN part to show address block -->';
|
||||
|
||||
$outdone=0;
|
||||
$coords = $this->getFullAddress(1,', ');
|
||||
$coords = $this->getFullAddress(1,', ',$conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT);
|
||||
if ($coords)
|
||||
{
|
||||
if (! empty($conf->use_javascript_ajax))
|
||||
@ -489,7 +526,12 @@ abstract class CommonObject
|
||||
if (! in_array($this->country_code,$countriesusingstate) && empty($conf->global->MAIN_FORCE_STATE_INTO_ADDRESS) // If MAIN_FORCE_STATE_INTO_ADDRESS is on, state is already returned previously with getFullAddress
|
||||
&& empty($conf->global->SOCIETE_DISABLE_STATE) && $this->state)
|
||||
{
|
||||
$out.=($outdone?' - ':'').$this->state;
|
||||
if (!empty($conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT) && $conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT == 1 && $this->region) {
|
||||
$out.=($outdone?' - ':'').$this->region.' - '.$this->state;
|
||||
}
|
||||
else {
|
||||
$out.=($outdone?' - ':'').$this->state;
|
||||
}
|
||||
$outdone++;
|
||||
}
|
||||
|
||||
@ -5527,7 +5569,7 @@ abstract class CommonObject
|
||||
$label = $val['label'];
|
||||
$type = $val['type'];
|
||||
$size = $val['css'];
|
||||
|
||||
|
||||
// Convert var to be able to share same code than showOutputField of extrafields
|
||||
if (preg_match('/varchar\((\d+)\)/', $type, $reg))
|
||||
{
|
||||
@ -6481,19 +6523,21 @@ abstract class CommonObject
|
||||
/**
|
||||
* Load object in memory from the database
|
||||
*
|
||||
* @param int $id Id object
|
||||
* @param string $ref Ref
|
||||
* @return int <0 if KO, 0 if not found, >0 if OK
|
||||
* @param int $id Id object
|
||||
* @param string $ref Ref
|
||||
* @param string $morewhere More SQL filters (' AND ...')
|
||||
* @return int <0 if KO, 0 if not found, >0 if OK
|
||||
*/
|
||||
public function fetchCommon($id, $ref = null)
|
||||
public function fetchCommon($id, $ref = null, $morewhere = '')
|
||||
{
|
||||
if (empty($id) && empty($ref)) return false;
|
||||
|
||||
$sql = 'SELECT '.$this->get_field_list();
|
||||
$sql.= ' FROM '.MAIN_DB_PREFIX.$this->table_element;
|
||||
|
||||
if(!empty($id)) $sql.= ' WHERE rowid = '.$id;
|
||||
if (!empty($id)) $sql.= ' WHERE rowid = '.$id;
|
||||
else $sql.= " WHERE ref = ".$this->quote($ref, $this->fields['ref']);
|
||||
if ($morewhere) $sql.=$morewhere;
|
||||
|
||||
$res = $this->db->query($sql);
|
||||
if ($res)
|
||||
@ -6675,6 +6719,9 @@ abstract class CommonObject
|
||||
// TODO...
|
||||
}
|
||||
|
||||
|
||||
/* Part for comments */
|
||||
|
||||
/**
|
||||
* Load comments linked with current task
|
||||
* @return boolean 1 if ok
|
||||
|
||||
@ -81,9 +81,10 @@ class Form
|
||||
* @param string $moreparam More param to add on a href URL.
|
||||
* @param int $fieldrequired 1 if we want to show field as mandatory using the "fieldrequired" CSS.
|
||||
* @param int $notabletag 1=Do not output table tags but output a ':', 2=Do not output table tags and no ':', 3=Do not output table tags but output a ' '
|
||||
* @param string $paramid Key of parameter for id ('id', 'socid')
|
||||
* @return string HTML edit field
|
||||
*/
|
||||
function editfieldkey($text, $htmlname, $preselected, $object, $perm, $typeofdata='string', $moreparam='', $fieldrequired=0, $notabletag=0)
|
||||
function editfieldkey($text, $htmlname, $preselected, $object, $perm, $typeofdata='string', $moreparam='', $fieldrequired=0, $notabletag=0, $paramid='id')
|
||||
{
|
||||
global $conf,$langs;
|
||||
|
||||
@ -117,7 +118,7 @@ class Form
|
||||
if (! empty($notabletag)) $ret.=' ';
|
||||
if (empty($notabletag) && GETPOST('action','aZ09') != 'edit'.$htmlname && $perm) $ret.='</td>';
|
||||
if (empty($notabletag) && GETPOST('action','aZ09') != 'edit'.$htmlname && $perm) $ret.='<td align="right">';
|
||||
if ($htmlname && GETPOST('action','aZ09') != 'edit'.$htmlname && $perm) $ret.='<a href="'.$_SERVER["PHP_SELF"].'?action=edit'.$htmlname.'&id='.$object->id.$moreparam.'">'.img_edit($langs->trans('Edit'), ($notabletag ? 0 : 1)).'</a>';
|
||||
if ($htmlname && GETPOST('action','aZ09') != 'edit'.$htmlname && $perm) $ret.='<a href="'.$_SERVER["PHP_SELF"].'?action=edit'.$htmlname.'&'.$paramid.'='.$object->id.$moreparam.'">'.img_edit($langs->trans('Edit'), ($notabletag ? 0 : 1)).'</a>';
|
||||
if (! empty($notabletag) && $notabletag == 1) $ret.=' : ';
|
||||
if (! empty($notabletag) && $notabletag == 3) $ret.=' ';
|
||||
if (empty($notabletag) && GETPOST('action','aZ09') != 'edit'.$htmlname && $perm) $ret.='</td>';
|
||||
@ -139,12 +140,13 @@ class Form
|
||||
* @param string $editvalue When in edit mode, use this value as $value instead of value (for example, you can provide here a formated price instead of value). Use '' to use same than $value
|
||||
* @param object $extObject External object
|
||||
* @param mixed $custommsg String or Array of custom messages : eg array('success' => 'MyMessage', 'error' => 'MyMessage')
|
||||
* @param string $moreparam More param to add on a href URL
|
||||
* @param string $moreparam More param to add on the form action href URL
|
||||
* @param int $notabletag Do no output table tags
|
||||
* @param string $formatfunc Call a specific function to output field
|
||||
* @param string $paramid Key of parameter for id ('id', 'socid')
|
||||
* @return string HTML edit field
|
||||
*/
|
||||
function editfieldval($text, $htmlname, $value, $object, $perm, $typeofdata='string', $editvalue='', $extObject=null, $custommsg=null, $moreparam='', $notabletag=0, $formatfunc='')
|
||||
function editfieldval($text, $htmlname, $value, $object, $perm, $typeofdata='string', $editvalue='', $extObject=null, $custommsg=null, $moreparam='', $notabletag=0, $formatfunc='', $paramid='id')
|
||||
{
|
||||
global $conf,$langs,$db;
|
||||
|
||||
@ -166,7 +168,7 @@ class Form
|
||||
$ret.='<form method="post" action="'.$_SERVER["PHP_SELF"].($moreparam?'?'.$moreparam:'').'">';
|
||||
$ret.='<input type="hidden" name="action" value="set'.$htmlname.'">';
|
||||
$ret.='<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
$ret.='<input type="hidden" name="id" value="'.$object->id.'">';
|
||||
$ret.='<input type="hidden" name="'.$paramid.'" value="'.$object->id.'">';
|
||||
if (empty($notabletag)) $ret.='<table class="nobordernopadding" cellpadding="0" cellspacing="0">';
|
||||
if (empty($notabletag)) $ret.='<tr><td>';
|
||||
if (preg_match('/^(string|email)/',$typeofdata))
|
||||
@ -4778,7 +4780,7 @@ class Form
|
||||
* @param string $addplusone Add a link "+1 hour". Value must be name of another select_date field.
|
||||
* @param datetime $adddateof Add a link "Date of invoice" using the following date.
|
||||
* @return string|null Nothing or string if nooutput is 1
|
||||
* @see form_date
|
||||
* @see form_date, select_month, select_year, select_dayofweek
|
||||
*/
|
||||
function select_date($set_time='', $prefix='re', $h=0, $m=0, $empty=0, $form_name="", $d=1, $addnowlink=0, $nooutput=0, $disabled=0, $fullday='', $addplusone='', $adddateof='')
|
||||
{
|
||||
|
||||
@ -222,8 +222,8 @@ class FormCompany
|
||||
$sql .= " ".MAIN_DB_PREFIX ."c_departements as d, ".MAIN_DB_PREFIX."c_regions as r,".MAIN_DB_PREFIX."c_country as c";
|
||||
$sql .= " WHERE d.fk_region=r.code_region and r.fk_pays=c.rowid";
|
||||
$sql .= " AND d.active = 1 AND r.active = 1 AND c.active = 1";
|
||||
if ($country_codeid && is_numeric($country_codeid)) $sql .= " AND c.rowid = '".$country_codeid."'";
|
||||
if ($country_codeid && ! is_numeric($country_codeid)) $sql .= " AND c.code = '".$country_codeid."'";
|
||||
if ($country_codeid && is_numeric($country_codeid)) $sql .= " AND c.rowid = '".$this->db->escape($country_codeid)."'";
|
||||
if ($country_codeid && ! is_numeric($country_codeid)) $sql .= " AND c.code = '".$this->db->escape($country_codeid)."'";
|
||||
$sql .= " ORDER BY c.code, d.code_departement";
|
||||
|
||||
dol_syslog(get_class($this)."::select_departement", LOG_DEBUG);
|
||||
@ -265,16 +265,26 @@ class FormCompany
|
||||
{
|
||||
$out.= '<option value="'.$obj->rowid.'">';
|
||||
}
|
||||
|
||||
// Si traduction existe, on l'utilise, sinon on prend le libelle par defaut
|
||||
if(!empty($conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT) && $conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT == 2) {
|
||||
$out.= $obj->region_name . ' - ' . $obj->code . ' - ' . ($langs->trans($obj->code)!=$obj->code?$langs->trans($obj->code):($obj->name!='-'?$obj->name:''));
|
||||
}
|
||||
else if(!empty($conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT) && $conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT == 1) {
|
||||
$out.= $obj->region_name . ' - ' . ($langs->trans($obj->code)!=$obj->code?$langs->trans($obj->code):($obj->name!='-'?$obj->name:''));
|
||||
if(!empty($conf->global->MAIN_SHOW_STATE_CODE) &&
|
||||
($conf->global->MAIN_SHOW_STATE_CODE == 1 || $conf->global->MAIN_SHOW_STATE_CODE == 2 || $conf->global->MAIN_SHOW_STATE_CODE === 'all')) {
|
||||
if(!empty($conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT) && $conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT == 1) {
|
||||
$out.= $obj->region_name . ' - ' . $obj->code . ' - ' . ($langs->trans($obj->code)!=$obj->code?$langs->trans($obj->code):($obj->name!='-'?$obj->name:''));
|
||||
}
|
||||
else {
|
||||
$out.= $obj->code . ' - ' . ($langs->trans($obj->code)!=$obj->code?$langs->trans($obj->code):($obj->name!='-'?$obj->name:''));
|
||||
}
|
||||
}
|
||||
else {
|
||||
$out.= $obj->code . ' - ' . ($langs->trans($obj->code)!=$obj->code?$langs->trans($obj->code):($obj->name!='-'?$obj->name:''));
|
||||
if(!empty($conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT) && $conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT == 1) {
|
||||
$out.= $obj->region_name . ' - ' . ($langs->trans($obj->code)!=$obj->code?$langs->trans($obj->code):($obj->name!='-'?$obj->name:''));
|
||||
}
|
||||
else {
|
||||
$out.= ($langs->trans($obj->code)!=$obj->code?$langs->trans($obj->code):($obj->name!='-'?$obj->name:''));
|
||||
}
|
||||
}
|
||||
|
||||
$out.= '</option>';
|
||||
}
|
||||
$i++;
|
||||
|
||||
@ -616,7 +616,7 @@ class FormFile
|
||||
$out.= '<tr class="liste_titre">';
|
||||
|
||||
$addcolumforpicto=($delallowed || $printer || $morepicto);
|
||||
$out.= '<th align="center" colspan="'.(3+($addcolumforpicto?'2':'1')).'" class="formdoc liste_titre maxwidthonsmartphone">';
|
||||
$out.= '<th align="center" colspan="'.(3+($addcolumforpicto?1:0)).'" class="formdoc liste_titre maxwidthonsmartphone">';
|
||||
|
||||
// Model
|
||||
if (! empty($modellist))
|
||||
@ -755,7 +755,7 @@ class FormFile
|
||||
$out.= ($param?'&'.$param:'');
|
||||
//$out.= '&modulepart='.$modulepart; // TODO obsolete ?
|
||||
//$out.= '&urlsource='.urlencode($urlsource); // TODO obsolete ?
|
||||
$out.= '">'.img_picto($langs->trans("Delete"), 'delete.png').'</a>';
|
||||
$out.= '">'.img_picto($langs->trans("Delete"), 'delete').'</a>';
|
||||
}
|
||||
if ($printer)
|
||||
{
|
||||
@ -778,7 +778,7 @@ class FormFile
|
||||
$res = $hookmanager->executeHooks('formBuilddocLineOptions',$parameters,$file);
|
||||
if (empty($res))
|
||||
{
|
||||
$out .= $hookmanager->resPrint; // Complete line
|
||||
$out.= $hookmanager->resPrint; // Complete line
|
||||
$out.= '</tr>';
|
||||
}
|
||||
else $out = $hookmanager->resPrint; // Replace line
|
||||
@ -811,7 +811,7 @@ class FormFile
|
||||
|
||||
if (count($file_list) == 0 && count($link_list) == 0 && $headershown)
|
||||
{
|
||||
$out.='<tr class="oddeven"><td colspan="3" class="opacitymedium">'.$langs->trans("None").'</td></tr>'."\n";
|
||||
$out.='<tr><td colspan="'.(3+($addcolumforpicto?1:0)).'" class="opacitymedium">'.$langs->trans("None").'</td></tr>'."\n";
|
||||
}
|
||||
|
||||
}
|
||||
@ -861,7 +861,7 @@ class FormFile
|
||||
preg_match('/\/([0-9]+)\/[^\/]+\/'.preg_quote($modulesubdir).'$/', $filedir, $regs);
|
||||
$entity = ((! empty($regs[1]) && $regs[1] > 1) ? $regs[1] : $conf->entity);
|
||||
}
|
||||
|
||||
|
||||
$filterforfilesearch = preg_quote(basename($modulesubdir),'/').'[^\-]+';
|
||||
|
||||
$file_list=dol_dir_list($filedir, 'files', 0, $filterforfilesearch, '\.meta$|\.png$'); // Get list of files starting with name of ref (but not followed by "-" to discard uploaded files)
|
||||
@ -1233,7 +1233,7 @@ class FormFile
|
||||
if ($permtoeditline)
|
||||
{
|
||||
// Link to resize
|
||||
print '<a href="'.DOL_URL_ROOT.'/core/photos_resize.php?modulepart='.urlencode($newmodulepart).'&id='.$object->id.'&file='.urlencode($relativepath.$fileinfo['filename'].'.'.strtolower($fileinfo['extension'])).'" title="'.dol_escape_htmltag($langs->trans("Resize")).'">'.img_picto($langs->trans("Resize"),DOL_URL_ROOT.'/theme/common/transform-crop-and-resize','class="paddingrightonly"',1).'</a>';
|
||||
print '<a href="'.DOL_URL_ROOT.'/core/photos_resize.php?modulepart='.urlencode($newmodulepart).'&id='.$object->id.'&file='.urlencode($relativepath.$fileinfo['filename'].'.'.strtolower($fileinfo['extension'])).'" title="'.dol_escape_htmltag($langs->trans("Resize")).'">'.img_picto($langs->trans("Resize"),'resize','class="paddingrightonly"').'</a>';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -205,8 +205,16 @@ function limitChars(textarea, limit, infodiv)
|
||||
try
|
||||
{
|
||||
$classname=ucfirst($classfile);
|
||||
$sms = new $classname($this->db);
|
||||
$resultsender = $sms->SmsSenderList();
|
||||
if (class_exists($classname))
|
||||
{
|
||||
$sms = new $classname($this->db);
|
||||
$resultsender = $sms->SmsSenderList();
|
||||
}
|
||||
else
|
||||
{
|
||||
$sms = new stdClass();
|
||||
$sms->error='The SMS manager '.$classfile.' defined into SMS setup MAIN_SMS_SENDMODE is not found';
|
||||
}
|
||||
}
|
||||
catch(Exception $e)
|
||||
{
|
||||
|
||||
@ -122,7 +122,7 @@ class FormTicketsup
|
||||
|
||||
$langs->load("other");
|
||||
$langs->load("mails");
|
||||
$langs->load("ticketsup@ticketsup");
|
||||
$langs->load("ticketsup");
|
||||
|
||||
$form = new Form($this->db);
|
||||
$formcompany = new FormCompany($this->db);
|
||||
@ -148,18 +148,19 @@ class FormTicketsup
|
||||
}
|
||||
print '<input type="hidden" name="fk_user_create" value="' . $this->fk_user_create . '">';
|
||||
|
||||
print '<div class="tabBar tabBarWithBottom">';
|
||||
print '<table class="border" width="' . $width . '">';
|
||||
|
||||
|
||||
if ($this->withref) {
|
||||
// Ref
|
||||
$defaultref = $ticketstat->getDefaultRef();
|
||||
print '<tr><td><span class="fieldrequired">' . $langs->trans("Ref") . '</span></td><td><input size="18" type="text" name="ref" value="' . (GETPOST("ref", 'alpha') ? GETPOST("ref", 'alpha') : $defaultref) . '"></td></tr>';
|
||||
print '<tr><td class="titlefield"><span class="fieldrequired">' . $langs->trans("Ref") . '</span></td><td><input size="18" type="text" name="ref" value="' . (GETPOST("ref", 'alpha') ? GETPOST("ref", 'alpha') : $defaultref) . '"></td></tr>';
|
||||
}
|
||||
|
||||
// FK_USER_CREATE
|
||||
if ($this->withusercreate > 0 && $this->fk_user_create) {
|
||||
print '<tr><td width="35%">' . $langs->trans("CreatedBy") . '</td><td>';
|
||||
print '<tr><td class="titlefield">' . $langs->trans("CreatedBy") . '</td><td>';
|
||||
$langs->load("users");
|
||||
$fuser = new User($this->db);
|
||||
|
||||
@ -177,7 +178,7 @@ class FormTicketsup
|
||||
// altairis: force company and contact id for external user
|
||||
if (empty($user->socid)) {
|
||||
// Company
|
||||
print '<tr><td>' . $langs->trans("Customer") . '</td><td>';
|
||||
print '<tr><td class="titlefield">' . $langs->trans("Customer") . '</td><td>';
|
||||
$events = array();
|
||||
$events[] = array('method' => 'getContacts', 'url' => dol_buildpath('/core/ajax/contacts.php', 1), 'htmlname' => 'contactid', 'params' => array('add-customer-contact' => 'disabled'));
|
||||
print $form->select_company($this->withfromsocid, 'socid', '', 1, 1, '', $events);
|
||||
@ -194,7 +195,7 @@ class FormTicketsup
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
function runJsCodeForEvent'.$htmlname.'(obj) {
|
||||
console.log("Run runJsCodeForEvent'.$htmlname.'");
|
||||
var id = $("#'.$htmlname.'").val();
|
||||
@ -244,7 +245,7 @@ class FormTicketsup
|
||||
$formcompany->selectTypeContact($ticketstatic, '', 'type', 'external');
|
||||
print '</td></tr>';
|
||||
} else {
|
||||
print '<tr><td><input type="hidden" name="socid" value="' . $user->socid . '"/></td>';
|
||||
print '<tr><td class="titlefield"><input type="hidden" name="socid" value="' . $user->socid . '"/></td>';
|
||||
print '<td><input type="hidden" name="contactid" value="' . $user->contactid . '"/></td>';
|
||||
print '<td><input type="hidden" name="type" value="Z"/></td></tr>';
|
||||
}
|
||||
@ -252,8 +253,8 @@ class FormTicketsup
|
||||
|
||||
// TITLE
|
||||
if ($this->withemail) {
|
||||
print '<tr><td width="35%"><label for="email"><span class="fieldrequired">' . $langs->trans("Email") . '</span></label></td><td>';
|
||||
print '<input class="text" size="40" id="email" name="email" value="' . (GETPOST('email', 'alpha') ? GETPOST('email', 'alpha') : $subject) . '" />';
|
||||
print '<tr><td class="titlefield"><label for="email"><span class="fieldrequired">' . $langs->trans("Email") . '</span></label></td><td>';
|
||||
print '<input class="text minwidth200" id="email" name="email" value="' . (GETPOST('email', 'alpha') ? GETPOST('email', 'alpha') : $subject) . '" />';
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
@ -281,7 +282,7 @@ class FormTicketsup
|
||||
}
|
||||
|
||||
// Type
|
||||
print '<tr><td><span class="fieldrequired"><label for="selecttype_code">' . $langs->trans("TicketTypeRequest") . '</span></label></td><td>';
|
||||
print '<tr><td class="titlefield"><span class="fieldrequired"><label for="selecttype_code">' . $langs->trans("TicketTypeRequest") . '</span></label></td><td>';
|
||||
print $this->selectTypesTickets((GETPOST('type_code') ? GETPOST('type_code') : $this->type_code), 'type_code', '', '2');
|
||||
print '</td></tr>';
|
||||
|
||||
@ -392,6 +393,7 @@ class FormTicketsup
|
||||
}
|
||||
|
||||
print '</table>';
|
||||
print '</div>';
|
||||
|
||||
print '<center>';
|
||||
print '<input class="button" type="submit" name="add_ticket" value="' . $langs->trans(($this->withthreadid > 0 ? "SendResponse" : "NewTicket")) . '" />';
|
||||
@ -416,9 +418,10 @@ class FormTicketsup
|
||||
* @param int $empty 1=peut etre vide, 0 sinon
|
||||
* @param int $noadmininfo 0=Add admin info, 1=Disable admin info
|
||||
* @param int $maxlength Max length of label
|
||||
* @param string $morecss More CSS
|
||||
* @return void
|
||||
*/
|
||||
public function selectTypesTickets($selected = '', $htmlname = 'tickettype', $filtertype = '', $format = 0, $empty = 0, $noadmininfo = 0, $maxlength = 0)
|
||||
public function selectTypesTickets($selected = '', $htmlname = 'tickettype', $filtertype = '', $format = 0, $empty = 0, $noadmininfo = 0, $maxlength = 0, $morecss='')
|
||||
{
|
||||
global $langs, $user;
|
||||
|
||||
@ -434,7 +437,7 @@ class FormTicketsup
|
||||
|
||||
$ticketstat->loadCacheTypesTickets();
|
||||
|
||||
print '<select id="select' . $htmlname . '" class="flat select_tickettype" name="' . $htmlname . '">';
|
||||
print '<select id="select' . $htmlname . '" class="flat select_tickettype'.($morecss?' '.$morecss:'').'" name="' . $htmlname . '">';
|
||||
if ($empty) {
|
||||
print '<option value=""> </option>';
|
||||
}
|
||||
@ -499,8 +502,10 @@ class FormTicketsup
|
||||
}
|
||||
print '</select>';
|
||||
if ($user->admin && !$noadmininfo) {
|
||||
print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionnarySetup"), 1);
|
||||
print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
|
||||
}
|
||||
|
||||
print ajax_combobox('select'.$htmlname);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -511,11 +516,12 @@ class FormTicketsup
|
||||
* @param string $filtertype To filter on field type in llx_c_ticketsup_category (array('code'=>xx,'label'=>zz))
|
||||
* @param int $format 0=id+libelle, 1=code+code, 2=code+libelle, 3=id+code
|
||||
* @param int $empty 1=peut etre vide, 0 sinon
|
||||
* @param int $noadmininfo 0=Add admin info, 1=Disable admin info
|
||||
* @param int $noadmininfo 0=Add admin info, 1=Disable admin info
|
||||
* @param int $maxlength Max length of label
|
||||
* @return void
|
||||
* @param string $morecss More CSS
|
||||
* @return void
|
||||
*/
|
||||
public function selectCategoriesTickets($selected = '', $htmlname = 'ticketcategory', $filtertype = '', $format = 0, $empty = 0, $noadmininfo = 0, $maxlength = 0)
|
||||
public function selectCategoriesTickets($selected = '', $htmlname = 'ticketcategory', $filtertype = '', $format = 0, $empty = 0, $noadmininfo = 0, $maxlength = 0, $morecss='')
|
||||
{
|
||||
global $langs, $user;
|
||||
|
||||
@ -531,7 +537,7 @@ class FormTicketsup
|
||||
|
||||
$ticketstat->loadCacheCategoriesTickets();
|
||||
|
||||
print '<select id="select' . $htmlname . '" class="flat select_ticketcategory" name="' . $htmlname . '">';
|
||||
print '<select id="select' . $htmlname . '" class="flat select_ticketcategory'.($morecss?' '.$morecss:'').'" name="' . $htmlname . '">';
|
||||
if ($empty) {
|
||||
print '<option value=""> </option>';
|
||||
}
|
||||
@ -597,8 +603,10 @@ class FormTicketsup
|
||||
}
|
||||
print '</select>';
|
||||
if ($user->admin && !$noadmininfo) {
|
||||
print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionnarySetup"), 1);
|
||||
print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
|
||||
}
|
||||
|
||||
print ajax_combobox('select'.$htmlname);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -609,11 +617,12 @@ class FormTicketsup
|
||||
* @param string $filtertype To filter on field type in llx_c_ticketsup_severity (array('code'=>xx,'label'=>zz))
|
||||
* @param int $format 0=id+libelle, 1=code+code, 2=code+libelle, 3=id+code
|
||||
* @param int $empty 1=peut etre vide, 0 sinon
|
||||
* @param int $noadmininfo 0=Add admin info, 1=Disable admin info
|
||||
* @param int $noadmininfo 0=Add admin info, 1=Disable admin info
|
||||
* @param int $maxlength Max length of label
|
||||
* @return void
|
||||
* @param string $morecss More CSS
|
||||
* @return void
|
||||
*/
|
||||
public function selectSeveritiesTickets($selected = '', $htmlname = 'ticketseverity', $filtertype = '', $format = 0, $empty = 0, $noadmininfo = 0, $maxlength = 0)
|
||||
public function selectSeveritiesTickets($selected = '', $htmlname = 'ticketseverity', $filtertype = '', $format = 0, $empty = 0, $noadmininfo = 0, $maxlength = 0, $morecss='')
|
||||
{
|
||||
global $langs, $user;
|
||||
|
||||
@ -629,7 +638,7 @@ class FormTicketsup
|
||||
|
||||
$ticketstat->loadCacheSeveritiesTickets();
|
||||
|
||||
print '<select id="select' . $htmlname . '" class="flat select_ticketseverity" name="' . $htmlname . '">';
|
||||
print '<select id="select' . $htmlname . '" class="flat select_ticketseverity'.($morecss?' '.$morecss:'').'" name="' . $htmlname . '">';
|
||||
if ($empty) {
|
||||
print '<option value=""> </option>';
|
||||
}
|
||||
@ -694,8 +703,10 @@ class FormTicketsup
|
||||
}
|
||||
print '</select>';
|
||||
if ($user->admin && !$noadmininfo) {
|
||||
print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionnarySetup"), 1);
|
||||
print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
|
||||
}
|
||||
|
||||
print ajax_combobox('select'.$htmlname);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -895,7 +895,7 @@ class Translate
|
||||
|
||||
$sql = "SELECT ".$fieldlabel." as label";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX.$tablename;
|
||||
$sql.= " WHERE ".$fieldkey." = '".($keyforselect?$keyforselect:$key)."'";
|
||||
$sql.= " WHERE ".$fieldkey." = '".$db->escape($keyforselect?$keyforselect:$key)."'";
|
||||
if ($filteronentity) $sql.= " AND entity IN (" . getEntity($tablename). ')';
|
||||
dol_syslog(get_class($this).'::getLabelFromKey', LOG_DEBUG);
|
||||
$resql = $db->query($sql);
|
||||
@ -977,7 +977,7 @@ class Translate
|
||||
$sql = "SELECT code_iso, label, unicode";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."c_currencies";
|
||||
$sql.= " WHERE active = 1";
|
||||
if (! empty($currency_code)) $sql.=" AND code_iso = '".$currency_code."'";
|
||||
if (! empty($currency_code)) $sql.=" AND code_iso = '".$db->escape($currency_code)."'";
|
||||
//$sql.= " ORDER BY code_iso ASC"; // Not required, a sort is done later
|
||||
|
||||
dol_syslog(get_class($this).'::loadCacheCurrencies', LOG_DEBUG);
|
||||
|
||||
@ -1031,7 +1031,8 @@ function unActivateModule($value, $requiredby=1)
|
||||
|
||||
|
||||
/**
|
||||
* Add external modules to list of dictionaries
|
||||
* Add external modules to list of dictionaries.
|
||||
* Addition is done into var $taborder, $tabname, etc... that are passed with pointers.
|
||||
*
|
||||
* @param array $taborder Taborder
|
||||
* @param array $tabname Tabname
|
||||
@ -1097,23 +1098,20 @@ function complete_dictionary_with_modules(&$taborder,&$tabname,&$tablib,&$tabsql
|
||||
if ($modulequalified)
|
||||
{
|
||||
// Load languages files of module
|
||||
if (isset($objMod->langfiles) && is_array($objMod->langfiles))
|
||||
{
|
||||
foreach($objMod->langfiles as $langfile)
|
||||
{
|
||||
$langs->load($langfile);
|
||||
}
|
||||
}
|
||||
if (isset($objMod->langfiles) && is_array($objMod->langfiles)) {
|
||||
foreach ($objMod->langfiles as $langfile) {
|
||||
$langs->load($langfile);
|
||||
}
|
||||
}
|
||||
|
||||
// Complete arrays
|
||||
//&$tabname,&$tablib,&$tabsql,&$tabsqlsort,&$tabfield,&$tabfieldvalue,&$tabfieldinsert,&$tabrowid,&$tabcond
|
||||
// Complete the arrays &$tabname,&$tablib,&$tabsql,&$tabsqlsort,&$tabfield,&$tabfieldvalue,&$tabfieldinsert,&$tabrowid,&$tabcond
|
||||
if (empty($objMod->dictionaries) && ! empty($objMod->dictionnaries)) $objMod->dictionaries=$objMod->dictionnaries; // For backward compatibility
|
||||
|
||||
if (! empty($objMod->dictionaries))
|
||||
{
|
||||
//var_dump($objMod->dictionaries['tabname']);
|
||||
$nbtabname=$nbtablib=$nbtabsql=$nbtabsqlsort=$nbtabfield=$nbtabfieldvalue=$nbtabfieldinsert=$nbtabrowid=$nbtabcond=$nbtabfieldcheck=$nbtabhelp=0;
|
||||
foreach($objMod->dictionaries['tabname'] as $val) { $nbtabname++; $taborder[] = max($taborder)+1; $tabname[] = $val; }
|
||||
foreach($objMod->dictionaries['tabname'] as $val) { $nbtabname++; $taborder[] = max($taborder)+1; $tabname[] = $val; } // Position
|
||||
foreach($objMod->dictionaries['tablib'] as $val) { $nbtablib++; $tablib[] = $val; }
|
||||
foreach($objMod->dictionaries['tabsql'] as $val) { $nbtabsql++; $tabsql[] = $val; }
|
||||
foreach($objMod->dictionaries['tabsqlsort'] as $val) { $nbtabsqlsort++; $tabsqlsort[] = $val; }
|
||||
@ -1130,6 +1128,10 @@ function complete_dictionary_with_modules(&$taborder,&$tabname,&$tablib,&$tabsql
|
||||
print 'Error in descriptor of module '.$const_name.'. Array ->dictionaries has not same number of record for key "tabname", "tablib", "tabsql" and "tabsqlsort"';
|
||||
//print "$const_name: $nbtabname=$nbtablib=$nbtabsql=$nbtabsqlsort=$nbtabfield=$nbtabfieldvalue=$nbtabfieldinsert=$nbtabrowid=$nbtabcond=$nbtabfieldcheck=$nbtabhelp\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
$taborder[] = 0; // Add an empty line
|
||||
}
|
||||
}
|
||||
|
||||
$j++;
|
||||
|
||||
@ -9,6 +9,7 @@
|
||||
* Copyright (C) 2013 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||
* Copyright (C) 2015 Frederic France <frederic.france@free.fr>
|
||||
* Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||
* Copyright (C) 2017 Rui Strecht <rui.strecht@aliartalentos.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
|
||||
@ -178,6 +179,8 @@ function societe_prepare_head(Societe $object)
|
||||
// Bank accounts
|
||||
if (empty($conf->global->SOCIETE_DISABLE_BANKACCOUNT))
|
||||
{
|
||||
$nbBankAccount=0;
|
||||
$foundonexternalonlinesystem=0;
|
||||
$langs->load("banks");
|
||||
|
||||
$title = $langs->trans("BankAccounts");
|
||||
@ -185,11 +188,16 @@ function societe_prepare_head(Societe $object)
|
||||
{
|
||||
$langs->load("stripe");
|
||||
$title = $langs->trans("BankAccountsAndGateways");
|
||||
|
||||
$servicestatus = 0;
|
||||
if (! empty($conf->global->STRIPE_LIVE) && ! GETPOST('forcesandbox','alpha')) $servicestatus = 1;
|
||||
|
||||
include_once DOL_DOCUMENT_ROOT.'/societe/class/societeaccount.class.php';
|
||||
$societeaccount = new SocieteAccount($db);
|
||||
$stripecu = $societeaccount->getCustomerAccount($object->id, 'stripe', $servicestatus); // Get thirdparty cu_...
|
||||
if ($stripecu) $foundonexternalonlinesystem++;
|
||||
}
|
||||
|
||||
$nbBankAccount=0;
|
||||
$head[$h][0] = DOL_URL_ROOT .'/societe/paymentmodes.php?socid='.$object->id;
|
||||
$head[$h][1] = $title;
|
||||
$sql = "SELECT COUNT(n.rowid) as nb";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."societe_rib as n";
|
||||
$sql.= " WHERE fk_soc = ".$object->id;
|
||||
@ -208,7 +216,13 @@ function societe_prepare_head(Societe $object)
|
||||
else {
|
||||
dol_print_error($db);
|
||||
}
|
||||
if ($nbBankAccount > 0) $head[$h][1].= ' <span class="badge">'.$nbBankAccount.'</span>';
|
||||
|
||||
//if (! empty($conf->stripe->enabled) && $nbBankAccount > 0) $nbBankAccount = '...'; // No way to know exact number
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT .'/societe/paymentmodes.php?socid='.$object->id;
|
||||
$head[$h][1] = $title;
|
||||
if ($foundonexternalonlinesystem) $head[$h][1].= ' <span class="badge">...</span>';
|
||||
elseif ($nbBankAccount > 0) $head[$h][1].= ' <span class="badge">'.$nbBankAccount.'</span>';
|
||||
$head[$h][2] = 'rib';
|
||||
$h++;
|
||||
}
|
||||
@ -460,22 +474,29 @@ function getCountry($searchkey, $withcode='', $dbtouse=0, $outputlangs='', $entc
|
||||
/**
|
||||
* Return state translated from an id. Return value is always utf8 encoded and without entities.
|
||||
*
|
||||
* @param int $id id of state (province/departement)
|
||||
* @param int $id id of state (province/departement)
|
||||
* @param int $withcode '0'=Return label,
|
||||
* '1'=Return string code + label,
|
||||
* '2'=Return code,
|
||||
* 'all'=return array('id'=>,'code'=>,'label'=>)
|
||||
* @param DoliDB $dbtouse Database handler (using in global way may fail because of conflicts with some autoload features)
|
||||
* @return string String with state code or state name (Return value is always utf8 encoded and without entities)
|
||||
* @param int $withregion '0'=Ignores region,
|
||||
* '1'=Add region name/code/id as needed to output,
|
||||
* @param Translate $outputlangs Langs object for output translation, not fully implemented yet
|
||||
* @param int $entconv 0=Return value without entities and not converted to output charset, 1=Ready for html output
|
||||
* @return mixed String with state code or state name or Array('id','code','label')/Array('id','code','label','region_code','region')
|
||||
*/
|
||||
function getState($id,$withcode='',$dbtouse=0)
|
||||
function getState($id,$withcode='',$dbtouse=0,$withregion=0,$outputlangs='',$entconv=1)
|
||||
{
|
||||
global $db,$langs;
|
||||
|
||||
if (! is_object($dbtouse)) $dbtouse=$db;
|
||||
|
||||
$sql = "SELECT rowid, code_departement as code, nom as label FROM ".MAIN_DB_PREFIX."c_departements";
|
||||
$sql.= " WHERE rowid=".$id;
|
||||
$sql = "SELECT d.rowid as id, d.code_departement as code, d.nom as name, d.active, c.label as country, c.code as country_code, r.code_region as region_code, r.nom as region_name FROM";
|
||||
$sql .= " ".MAIN_DB_PREFIX ."c_departements as d, ".MAIN_DB_PREFIX."c_regions as r,".MAIN_DB_PREFIX."c_country as c";
|
||||
$sql .= " WHERE d.fk_region=r.code_region and r.fk_pays=c.rowid and d.rowid=".$id;
|
||||
$sql .= " AND d.active = 1 AND r.active = 1 AND c.active = 1";
|
||||
$sql .= " ORDER BY c.code, d.code_departement";
|
||||
|
||||
dol_syslog("Company.lib::getState", LOG_DEBUG);
|
||||
$resql=$dbtouse->query($sql);
|
||||
@ -484,11 +505,46 @@ function getState($id,$withcode='',$dbtouse=0)
|
||||
$obj = $dbtouse->fetch_object($resql);
|
||||
if ($obj)
|
||||
{
|
||||
$label=$obj->label;
|
||||
if ($withcode == '1') return $label=$obj->code?"$obj->code":"$obj->code - $label";
|
||||
else if ($withcode == '2') return $label=$obj->code;
|
||||
else if ($withcode == 'all') return array('id'=>$obj->rowid,'code'=>$obj->code,'label'=>$label);
|
||||
else return $label;
|
||||
$label=((! empty($obj->name) && $obj->name!='-')?$obj->name:'');
|
||||
if (is_object($outputlangs))
|
||||
{
|
||||
$outputlangs->load("dict");
|
||||
if ($entconv) $label=($obj->code && ($outputlangs->trans("State".$obj->code)!="State".$obj->code))?$outputlangs->trans("State".$obj->code):$label;
|
||||
else $label=($obj->code && ($outputlangs->transnoentitiesnoconv("State".$obj->code)!="State".$obj->code))?$outputlangs->transnoentitiesnoconv("State".$obj->code):$label;
|
||||
}
|
||||
|
||||
if ($withcode == 1) {
|
||||
if ($withregion == 1) {
|
||||
return $label = $obj->region_name . ' - ' . $obj->code . ' - ' . ($langs->trans($obj->code)!=$obj->code?$langs->trans($obj->code):($obj->name!='-'?$obj->name:''));
|
||||
}
|
||||
else {
|
||||
return $label = $obj->code . ' - ' . ($langs->trans($obj->code)!=$obj->code?$langs->trans($obj->code):($obj->name!='-'?$obj->name:''));
|
||||
}
|
||||
}
|
||||
else if ($withcode == 2) {
|
||||
if ($withregion == 1) {
|
||||
return $label = $obj->region_name . ' - ' . ($langs->trans($obj->code)!=$obj->code?$langs->trans($obj->code):($obj->name!='-'?$obj->name:''));
|
||||
}
|
||||
else {
|
||||
return $label = ($langs->trans($obj->code)!=$obj->code?$langs->trans($obj->code):($obj->name!='-'?$obj->name:''));
|
||||
}
|
||||
}
|
||||
else if ($withcode === 'all') {
|
||||
if ($withregion == 1) {
|
||||
return array('id'=>$obj->id,'code'=>$obj->code,'label'=>$label,'region_code'=>$obj->region_code,'region'=>$obj->region_name);
|
||||
}
|
||||
else {
|
||||
return array('id'=>$obj->id,'code'=>$obj->code,'label'=>$label);
|
||||
}
|
||||
}
|
||||
else {
|
||||
if ($withregion == 1) {
|
||||
return $label = $obj->region_name . ' - ' . $label;
|
||||
}
|
||||
else {
|
||||
return $label;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -3052,18 +3052,26 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
|
||||
}
|
||||
else
|
||||
{
|
||||
$pictowithoutext = preg_replace('/(\.png|\.gif|\.svg)$/', '', $picto);
|
||||
|
||||
//if (in_array($picto, array('switch_off', 'switch_on', 'off', 'on')))
|
||||
if (in_array($picto, array('switch_off', 'switch_on', 'off', 'on')))
|
||||
if (in_array($pictowithoutext, array('delete', 'edit', 'off', 'on', 'resize', 'switch_off', 'switch_on')))
|
||||
{
|
||||
$fakey = $picto; $facolor=''; $fasize='';
|
||||
if ($picto == 'switch_off') { $fakey = 'fa-toggle-off'; $facolor='#999'; $fasize='2em'; }
|
||||
if ($picto == 'switch_on') { $fakey = 'fa-toggle-on'; $facolor='#227722'; $fasize='2em'; }
|
||||
if ($picto == 'off') { $fakey = 'fa-square-o'; $fasize='1.3em'; }
|
||||
if ($picto == 'on') { $fakey = 'fa-check-square-o'; $fasize='1.3em'; }
|
||||
$enabledisablehtml='';
|
||||
$enabledisablehtml.='<span class="fa '.$fakey.' valignmiddle'.($morecss?' '.$morecss:'').'" style="'.($fasize?('font-size: '.$fasize.';'):'').($facolor?(' color: '.$facolor.';'):'').'" alt="'.dol_escape_htmltag($titlealt).'" title="'.dol_escape_htmltag($titlealt).'"'.($moreatt?' '.$moreatt:'').'">';
|
||||
$fakey = $pictowithoutext; $facolor=''; $fasize='';
|
||||
if ($pictowithoutext == 'switch_off') { $fakey = 'fa-toggle-off'; $facolor='#999'; $fasize='2em'; }
|
||||
elseif ($pictowithoutext == 'switch_on') { $fakey = 'fa-toggle-on'; $facolor='#227722'; $fasize='2em'; }
|
||||
elseif ($pictowithoutext == 'off') { $fakey = 'fa-square-o'; $fasize='1.3em'; }
|
||||
elseif ($pictowithoutext == 'on') { $fakey = 'fa-check-square-o'; $fasize='1.3em'; }
|
||||
elseif ($pictowithoutext == 'delete') { $fakey = 'fa-trash'; $facolor='#444'; }
|
||||
elseif ($pictowithoutext == 'edit') { $fakey = 'fa-pencil'; $facolor='#444'; }
|
||||
elseif ($pictowithoutext == 'resize') { $fakey = 'fa-crop'; $facolor='#444'; }
|
||||
else { $fakey = 'fa-'.$pictowithoutext; $facolor='#999'; }
|
||||
|
||||
if (preg_match('/class="([^"]+)"/', $moreatt, $reg)) { $morecss.=($morecss?' ':'').$reg[1]; }
|
||||
$enabledisablehtml ='<span class="fa '.$fakey.' marginleftonly valignmiddle'.($morecss?' '.$morecss:'').'" style="'.($fasize?('font-size: '.$fasize.';'):'').($facolor?(' color: '.$facolor.';'):'').'" alt="'.dol_escape_htmltag($titlealt).'" title="'.dol_escape_htmltag($titlealt).'"'.($moreatt?' '.$moreatt:'').'">';
|
||||
if (! empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) $enabledisablehtml.=$titlealt;
|
||||
$enabledisablehtml.='</span>';
|
||||
|
||||
return $enabledisablehtml;
|
||||
}
|
||||
|
||||
@ -3306,6 +3314,7 @@ function img_delete($titlealt = 'default', $other = 'class="pictodelete"')
|
||||
if ($titlealt == 'default') $titlealt = $langs->trans('Delete');
|
||||
|
||||
return img_picto($titlealt, 'delete.png', $other);
|
||||
//return '<span class="fa fa-trash fa-2x fa-fw" style="font-size: 1.7em;" title="'.$titlealt.'"></span>';
|
||||
}
|
||||
|
||||
/**
|
||||
@ -3525,6 +3534,24 @@ function img_allow($allow, $titlealt = 'default')
|
||||
return '-';
|
||||
}
|
||||
|
||||
/**
|
||||
* Return image of a credit card according to its brand name
|
||||
*
|
||||
* @param string $brand Brand name of credit card
|
||||
* @return string Return img tag
|
||||
*/
|
||||
function img_credit_card($brand)
|
||||
{
|
||||
if ($brand == 'Visa') {$brand='cc-visa';}
|
||||
elseif ($brand == 'MasterCard') {$brand='cc-mastercard';}
|
||||
elseif ($brand == 'American Express') {$brand='cc-amex';}
|
||||
elseif ($brand == 'Discover') {$brand='cc-discover';}
|
||||
elseif ($brand == 'JCB') {$brand='cc-jcb';}
|
||||
elseif ($brand == 'Diners Club') {$brand='cc-diners-club';}
|
||||
elseif (! in_array($brand, array('cc-visa','cc-mastercard','cc-amex','cc-discover','cc-jcb','cc-diners-club'))) {$brand='credit-card';}
|
||||
|
||||
return '<span class="fa fa-'.$brand.' fa-2x fa-fw"></span>';
|
||||
}
|
||||
|
||||
/**
|
||||
* Show MIME img of a file
|
||||
@ -6149,12 +6176,19 @@ function setEventMessage($mesgs, $style='mesgs')
|
||||
*/
|
||||
function setEventMessages($mesg, $mesgs, $style='mesgs')
|
||||
{
|
||||
if (! in_array((string) $style, array('mesgs','warnings','errors'))) dol_print_error('','Bad parameter style='.$style.' for setEventMessages');
|
||||
if (empty($mesgs)) setEventMessage($mesg, $style);
|
||||
if (empty($mesg) && empty($mesgs))
|
||||
{
|
||||
dol_syslog("Try to add a message in stack with empty message", LOG_WARNING);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (! empty($mesg) && ! in_array($mesg, $mesgs)) setEventMessage($mesg, $style); // Add message string if not already into array
|
||||
setEventMessage($mesgs, $style);
|
||||
if (! in_array((string) $style, array('mesgs','warnings','errors'))) dol_print_error('','Bad parameter style='.$style.' for setEventMessages');
|
||||
if (empty($mesgs)) setEventMessage($mesg, $style);
|
||||
else
|
||||
{
|
||||
if (! empty($mesg) && ! in_array($mesg, $mesgs)) setEventMessage($mesg, $style); // Add message string if not already into array
|
||||
setEventMessage($mesgs, $style);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -1451,7 +1451,7 @@ function dol_set_user_param($db, $conf, &$user, $tab)
|
||||
foreach ($tab as $key => $value)
|
||||
{
|
||||
if ($i > 0) $sql.=',';
|
||||
$sql.="'".$key."'";
|
||||
$sql.="'".$this->db->escape($key)."'";
|
||||
$i++;
|
||||
}
|
||||
$sql.= ")";
|
||||
@ -1472,7 +1472,7 @@ function dol_set_user_param($db, $conf, &$user, $tab)
|
||||
{
|
||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."user_param(fk_user,entity,param,value)";
|
||||
$sql.= " VALUES (".$user->id.",".$conf->entity.",";
|
||||
$sql.= " '".$key."','".$db->escape($value)."')";
|
||||
$sql.= " '".$this->db->escape($key)."','".$db->escape($value)."')";
|
||||
|
||||
dol_syslog("functions2.lib::dol_set_user_param", LOG_DEBUG);
|
||||
$result=$db->query($sql);
|
||||
|
||||
@ -31,7 +31,7 @@ function ticketsupAdminPrepareHead()
|
||||
{
|
||||
global $langs, $conf;
|
||||
|
||||
$langs->load("ticketsup@ticketsup");
|
||||
$langs->load("ticketsup");
|
||||
|
||||
$h = 0;
|
||||
$head = array();
|
||||
@ -75,16 +75,19 @@ function ticketsup_prepare_head($object)
|
||||
$head[$h][2] = 'tabTicketsup';
|
||||
$h++;
|
||||
|
||||
if (empty($user->socid)) {
|
||||
$head[$h][0] = DOL_URL_ROOT.'/ticketsup/contacts.php?track_id=' . $object->track_id;
|
||||
$head[$h][1] = $langs->trans('Contacts');
|
||||
$head[$h][2] = 'tabTicketContacts';
|
||||
$h++;
|
||||
|
||||
if (empty($conf->global->MAIN_DISABLE_CONTACTS_TAB) && empty($user->socid))
|
||||
{
|
||||
$nbContact = count($object->liste_contact(-1,'internal')) + count($object->liste_contact(-1,'external'));
|
||||
$head[$h][0] = DOL_URL_ROOT.'/ticketsup/contact.php?track_id='.$object->track_id;
|
||||
$head[$h][1] = $langs->trans('ContactsAddresses');
|
||||
if ($nbContact > 0) $head[$h][1].= ' <span class="badge">'.$nbContact.'</span>';
|
||||
$head[$h][2] = 'contact';
|
||||
$h++;
|
||||
}
|
||||
|
||||
complete_head_from_modules($conf, $langs, $object, $head, $h, 'ticketsup');
|
||||
|
||||
|
||||
// Attached files
|
||||
include_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php';
|
||||
$upload_dir = $conf->ticketsup->dir_output . "/" . $object->track_id;
|
||||
|
||||
@ -1330,7 +1330,7 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
$carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$labelbeforecontactname." ".$outputlangs->convToOutputCharset($object->user->getFullName($outputlangs))."\n";
|
||||
}
|
||||
|
||||
$carac_emetteur .= pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty);
|
||||
$carac_emetteur .= pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty, '', 0, 'source', $object);
|
||||
|
||||
// Show sender
|
||||
$posy=42+$top_shift;
|
||||
|
||||
@ -583,7 +583,7 @@ class pdf_strato extends ModelePDFContract
|
||||
$carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->transnoentities("Name").": ".$outputlangs->convToOutputCharset($object->user->getFullName($outputlangs))."\n";
|
||||
}
|
||||
|
||||
$carac_emetteur .= pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty);
|
||||
$carac_emetteur .= pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty, '', 0, 'source', $object);
|
||||
|
||||
// Show sender
|
||||
$posy=42;
|
||||
|
||||
@ -542,7 +542,7 @@ class pdf_merou extends ModelePdfExpedition
|
||||
$pdf->SetTextColor(0,0,0);
|
||||
|
||||
// Sender properties
|
||||
$carac_emetteur = pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty);
|
||||
$carac_emetteur = pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty, '', 0, 'source', $object);
|
||||
|
||||
$pdf->SetFont('','', $default_font_size - 3);
|
||||
$pdf->SetXY($blSocX,$blSocY+4);
|
||||
|
||||
@ -935,7 +935,7 @@ class pdf_rouget extends ModelePdfExpedition
|
||||
$carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->transnoentities("Name").": ".$outputlangs->convToOutputCharset($object->user->getFullName($outputlangs))."\n";
|
||||
}
|
||||
|
||||
$carac_emetteur .= pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty);
|
||||
$carac_emetteur .= pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty, '', 0, 'source', $object);
|
||||
|
||||
// Show sender
|
||||
$posy=!empty($conf->global->MAIN_PDF_USE_ISO_LOCATION) ? 40 : 42;
|
||||
|
||||
@ -1692,7 +1692,7 @@ class pdf_crabe extends ModelePDFFactures
|
||||
if ($showaddress)
|
||||
{
|
||||
// Sender properties
|
||||
$carac_emetteur = pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty);
|
||||
$carac_emetteur = pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty, '', 0, 'source', $object);
|
||||
|
||||
// Show sender
|
||||
$posy=!empty($conf->global->MAIN_PDF_USE_ISO_LOCATION) ? 40 : 42;
|
||||
|
||||
@ -584,7 +584,7 @@ class pdf_soleil extends ModelePDFFicheinter
|
||||
$carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->transnoentities("Name").": ".$outputlangs->convToOutputCharset($object->user->getFullName($outputlangs))."\n";
|
||||
}
|
||||
|
||||
$carac_emetteur .= pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty);
|
||||
$carac_emetteur .= pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty, '', 0, 'source', $object);
|
||||
|
||||
// Show sender
|
||||
$posy=42;
|
||||
|
||||
@ -799,7 +799,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder
|
||||
if ($showaddress)
|
||||
{
|
||||
// Sender properties
|
||||
$carac_emetteur = pdf_build_address($outputlangs,$this->emetteur);
|
||||
$carac_emetteur = pdf_build_address($outputlangs,$this->emetteur, $object->thirdparty, '', 0, 'source', $object);
|
||||
|
||||
// Show sender
|
||||
$posy=42;
|
||||
|
||||
@ -100,7 +100,7 @@ class mailing_advthirdparties extends MailingTargets
|
||||
'source_url' => $this->url($obj->id,'thirdparty'),
|
||||
'source_id' => $obj->id,
|
||||
'source_type' => 'thirdparty'
|
||||
);
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@ -289,11 +289,11 @@ class mailing_advthirdparties extends MailingTargets
|
||||
if ($type=='thirdparty') {
|
||||
$companystatic=new Societe($this->db);
|
||||
$companystatic->fetch($id);
|
||||
return $companystatic->getNomUrl(0);
|
||||
return $companystatic->getNomUrl(0, '', 0, 1);
|
||||
} elseif ($type=='contact') {
|
||||
$contactstatic=new Contact($this->db);
|
||||
$contactstatic->fetch($id);
|
||||
return $contactstatic->getNomUrl(0);
|
||||
return $contactstatic->getNomUrl(0, '', 0, '', -1, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -71,73 +71,88 @@ class modAccounting extends DolibarrModules
|
||||
$this->langfiles = array("accountancy","compta");
|
||||
|
||||
// Constants
|
||||
// List of particular constants to add when module is enabled (key, 'chaine', value, desc, visible, 'current' or 'allentities', deleteonunactive)
|
||||
// Example: $this->const=array(0=>array('MYMODULE_MYNEWCONST1','chaine','myvalue','This is a constant to add',1),
|
||||
// 1=>array('MYMODULE_MYNEWCONST2','chaine','myvalue','This is another constant to add',0, 'current', 1)
|
||||
// );
|
||||
$this->const = array();
|
||||
$this->const[1] = array(
|
||||
"MAIN_COMPANY_CODE_ALWAYS_REQUIRED",
|
||||
"chaine",
|
||||
"1",
|
||||
"With this constants on, third party code is always required whatever is numbering module behaviour"
|
||||
"With this constants on, third party code is always required whatever is numbering module behaviour", 0, 'current', 0
|
||||
);
|
||||
$this->const[2] = array(
|
||||
"MAIN_BANK_ACCOUNTANCY_CODE_ALWAYS_REQUIRED",
|
||||
"chaine",
|
||||
"1",
|
||||
"With this constants on, bank account number is always required"
|
||||
"With this constants on, bank account number is always required", 0, 'current', 1
|
||||
);
|
||||
$this->const[3] = array(
|
||||
"ACCOUNTING_ACCOUNT_SUSPENSE",
|
||||
"chaine",
|
||||
"471"
|
||||
"471",
|
||||
"", 0, 'current', 0
|
||||
);
|
||||
$this->const[4] = array(
|
||||
"ACCOUNTING_ACCOUNT_TRANSFER_CASH",
|
||||
"chaine",
|
||||
"58"
|
||||
"58",
|
||||
"", 0, 'current', 0
|
||||
);
|
||||
$this->const[5] = array(
|
||||
"CHARTOFACCOUNTS",
|
||||
"chaine",
|
||||
"2"
|
||||
"2",
|
||||
"", 0, 'current', 0
|
||||
);
|
||||
$this->const[6] = array(
|
||||
"ACCOUNTING_EXPORT_MODELCSV",
|
||||
"chaine",
|
||||
"1"
|
||||
"1",
|
||||
"", 0, 'current', 0
|
||||
);
|
||||
$this->const[7] = array(
|
||||
"ACCOUNTING_LENGTH_GACCOUNT",
|
||||
"chaine",
|
||||
""
|
||||
"",
|
||||
"", 0, 'current', 0
|
||||
);
|
||||
$this->const[8] = array(
|
||||
"ACCOUNTING_LENGTH_AACCOUNT",
|
||||
"chaine",
|
||||
""
|
||||
"",
|
||||
"", 0, 'current', 0
|
||||
);
|
||||
$this->const[9] = array(
|
||||
"ACCOUNTING_LIST_SORT_VENTILATION_TODO",
|
||||
"yesno",
|
||||
"1"
|
||||
"1",
|
||||
"", 0, 'current', 0
|
||||
);
|
||||
$this->const[10] = array(
|
||||
"ACCOUNTING_LIST_SORT_VENTILATION_DONE",
|
||||
"yesno",
|
||||
"1"
|
||||
"1",
|
||||
"", 0, 'current', 0
|
||||
);
|
||||
$this->const[11] = array (
|
||||
"ACCOUNTING_EXPORT_DATE",
|
||||
"chaine",
|
||||
"%d%m%Y"
|
||||
"%d%m%Y",
|
||||
"", 0, 'current', 0
|
||||
);
|
||||
$this->const[12] = array(
|
||||
"ACCOUNTING_EXPORT_SEPARATORCSV",
|
||||
"string",
|
||||
","
|
||||
",",
|
||||
"", 0, 'current', 0
|
||||
);
|
||||
$this->const[13] = array(
|
||||
"ACCOUNTING_EXPORT_FORMAT",
|
||||
"chaine",
|
||||
"csv"
|
||||
"csv",
|
||||
"", 0, 'current', 0
|
||||
);
|
||||
|
||||
// Tabs
|
||||
|
||||
@ -125,21 +125,6 @@ class modApi extends DolibarrModules
|
||||
$conf->api->enabled=0;
|
||||
}
|
||||
$this->dictionaries=array();
|
||||
/* Example:
|
||||
if (! isset($conf->api->enabled)) $conf->api->enabled=0; // This is to avoid warnings
|
||||
$this->dictionaries=array(
|
||||
'langs'=>'mylangfile@api',
|
||||
'tabname'=>array(MAIN_DB_PREFIX."table1",MAIN_DB_PREFIX."table2",MAIN_DB_PREFIX."table3"), // List of tables we want to see into dictonnary editor
|
||||
'tablib'=>array("Table1","Table2","Table3"), // Label of tables
|
||||
'tabsql'=>array('SELECT f.rowid as rowid, f.code, f.label, f.active FROM '.MAIN_DB_PREFIX.'table1 as f','SELECT f.rowid as rowid, f.code, f.label, f.active FROM '.MAIN_DB_PREFIX.'table2 as f','SELECT f.rowid as rowid, f.code, f.label, f.active FROM '.MAIN_DB_PREFIX.'table3 as f'), // Request to select fields
|
||||
'tabsqlsort'=>array("label ASC","label ASC","label ASC"), // Sort order
|
||||
'tabfield'=>array("code,label","code,label","code,label"), // List of fields (result of select to show dictionary)
|
||||
'tabfieldvalue'=>array("code,label","code,label","code,label"), // List of fields (list of fields to edit a record)
|
||||
'tabfieldinsert'=>array("code,label","code,label","code,label"), // List of fields (list of fields for insert)
|
||||
'tabrowid'=>array("rowid","rowid","rowid"), // Name of columns with primary key (try to always name it 'rowid')
|
||||
'tabcond'=>array($conf->api->enabled,$conf->api->enabled,$conf->api->enabled) // Condition to show each dictionary
|
||||
);
|
||||
*/
|
||||
|
||||
// Boxes
|
||||
// Add here list of php file(s) stored in core/boxes that contains class to show a box.
|
||||
|
||||
@ -74,7 +74,7 @@ class modTicketsup extends DolibarrModules
|
||||
// use this->picto='pictovalue'
|
||||
// If file is in module/img directory under name object_pictovalue.png
|
||||
// use this->picto='pictovalue@module'
|
||||
$this->picto = 'ticketsup@ticketsup'; // mypicto@ticketsup
|
||||
$this->picto = 'ticketsup'; // mypicto@ticketsup
|
||||
// Defined all module parts (triggers, login, substitutions, menus, css, etc...)
|
||||
// for default path (eg: /ticketsup/core/xxxxx) (0=disable, 1=enable)
|
||||
// for specific path of parts (eg: /ticketsup/core/modules/barcode)
|
||||
@ -135,7 +135,7 @@ class modTicketsup extends DolibarrModules
|
||||
$conf->ticketsup->enabled=0;
|
||||
}
|
||||
$this->dictionaries = array(
|
||||
'langs' => 'ticketsup@ticketsup',
|
||||
'langs' => 'ticketsup',
|
||||
'tabname' => array(MAIN_DB_PREFIX . "c_ticketsup_type", MAIN_DB_PREFIX . "c_ticketsup_category", MAIN_DB_PREFIX . "c_ticketsup_severity"),
|
||||
'tablib' => array("TicketsupDictType", "TicketsupDictCategory", "TicketsupDictSeverity"),
|
||||
'tabsql' => array('SELECT f.rowid as rowid, f.code, f.pos, f.label, f.active, f.use_default FROM ' . MAIN_DB_PREFIX . 'c_ticketsup_type as f', 'SELECT f.rowid as rowid, f.code, f.pos, f.label, f.active, f.use_default FROM ' . MAIN_DB_PREFIX . 'c_ticketsup_category as f', 'SELECT f.rowid as rowid, f.code, f.pos, f.label, f.active, f.use_default FROM ' . MAIN_DB_PREFIX . 'c_ticketsup_severity as f'),
|
||||
@ -153,17 +153,16 @@ class modTicketsup extends DolibarrModules
|
||||
$r = 0;
|
||||
// Example:
|
||||
|
||||
$this->boxes[$r][1] = "box_last_ticketsup@ticketsup";
|
||||
$this->boxes[$r][1] = "box_last_ticketsup";
|
||||
$r++;
|
||||
|
||||
$this->boxes[$r][1] = "box_last_modified_ticketsup@ticketsup";
|
||||
$this->boxes[$r][1] = "box_last_modified_ticketsup";
|
||||
$r++;
|
||||
|
||||
// Permissions
|
||||
$this->rights = array(); // Permission array used by this module
|
||||
$r = 0;
|
||||
|
||||
$r++;
|
||||
$r=0;
|
||||
$this->rights[$r][0] = 56001; // id de la permission
|
||||
$this->rights[$r][1] = "Read ticket"; // libelle de la permission
|
||||
$this->rights[$r][2] = 'r'; // type de la permission (deprecie a ce jour)
|
||||
@ -209,9 +208,9 @@ class modTicketsup extends DolibarrModules
|
||||
'mainmenu' => 'ticketsup',
|
||||
'leftmenu' => '1', // Use 1 if you also want to add left menu entries using this descriptor.
|
||||
'url' => '/ticketsup/index.php',
|
||||
'langs' => 'ticketsup@ticketsup', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
|
||||
'langs' => 'ticketsup', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
|
||||
'position' => 100,
|
||||
'enabled' => '1', // Define condition to show or hide menu entry. Use '$conf->ticketsup->enabled' if entry must be visible if module is enabled.
|
||||
'enabled' => '$conf->ticketsup->enabled', // Define condition to show or hide menu entry. Use '$conf->ticketsup->enabled' if entry must be visible if module is enabled.
|
||||
'perms' => '$user->rights->ticketsup->read', // Use 'perms'=>'$user->rights->ticketsup->level1->level2' if you want your menu with a permission rules
|
||||
'target' => '',
|
||||
'user' => 2); // 0=Menu for internal users, 1=external users, 2=both
|
||||
@ -223,9 +222,9 @@ class modTicketsup extends DolibarrModules
|
||||
'mainmenu' => 'ticketsup',
|
||||
'leftmenu' => 'ticketsup',
|
||||
'url' => '/ticketsup/index.php',
|
||||
'langs' => 'ticketsup@ticketsup',
|
||||
'langs' => 'ticketsup',
|
||||
'position' => 101,
|
||||
'enabled' => 1,
|
||||
'enabled' => '$conf->ticketsup->enabled',
|
||||
'perms' => '$user->rights->ticketsup->read',
|
||||
'target' => '',
|
||||
'user' => 2);
|
||||
@ -236,9 +235,9 @@ class modTicketsup extends DolibarrModules
|
||||
'titre' => 'NewTicket',
|
||||
'mainmenu' => 'ticketsup',
|
||||
'url' => '/ticketsup/new.php?action=create_ticket',
|
||||
'langs' => 'ticketsup@ticketsup',
|
||||
'langs' => 'ticketsup',
|
||||
'position' => 102,
|
||||
'enabled' => 1,
|
||||
'enabled' => '$conf->ticketsup->enabled',
|
||||
'perms' => '$user->rights->ticketsup->write',
|
||||
'target' => '',
|
||||
'user' => 2);
|
||||
@ -250,9 +249,9 @@ class modTicketsup extends DolibarrModules
|
||||
'mainmenu' => 'ticketsup',
|
||||
'leftmenu' => 'ticketsuplist',
|
||||
'url' => '/ticketsup/list.php',
|
||||
'langs' => 'ticketsup@ticketsup',
|
||||
'langs' => 'ticketsup',
|
||||
'position' => 103,
|
||||
'enabled' => 1,
|
||||
'enabled' => '$conf->ticketsup->enabled',
|
||||
'perms' => '$user->rights->ticketsup->read',
|
||||
'target' => '',
|
||||
'user' => 2);
|
||||
@ -264,9 +263,9 @@ class modTicketsup extends DolibarrModules
|
||||
'mainmenu' => 'ticketsup',
|
||||
'leftmenu' => 'ticketsuplist',
|
||||
'url' => '/ticketsup/list.php?search_fk_status=non_closed',
|
||||
'langs' => 'ticketsup@ticketsup',
|
||||
'langs' => 'ticketsup',
|
||||
'position' => 104,
|
||||
'enabled' => 1,
|
||||
'enabled' => '$conf->ticketsup->enabled',
|
||||
'perms' => '$user->rights->ticketsup->read',
|
||||
'target' => '',
|
||||
'user' => 2);
|
||||
@ -278,9 +277,9 @@ class modTicketsup extends DolibarrModules
|
||||
'mainmenu' => 'ticketsup',
|
||||
'leftmenu' => 'ticketsupmy',
|
||||
'url' => '/ticketsup/list.php?mode=my_assign',
|
||||
'langs' => 'ticketsup@ticketsup',
|
||||
'langs' => 'ticketsup',
|
||||
'position' => 105,
|
||||
'enabled' => 1,
|
||||
'enabled' => '$conf->ticketsup->enabled',
|
||||
'perms' => '$user->rights->ticketsup->read',
|
||||
'target' => '',
|
||||
'user' => 0);
|
||||
@ -291,9 +290,9 @@ class modTicketsup extends DolibarrModules
|
||||
'titre' => 'MenuTicketsupMyAssignNonClosed',
|
||||
'mainmenu' => 'ticketsup',
|
||||
'url' => '/ticketsup/list.php?mode=my_assign&search_fk_status=non_closed',
|
||||
'langs' => 'ticketsup@ticketsup',
|
||||
'langs' => 'ticketsup',
|
||||
'position' => 106,
|
||||
'enabled' => 1,
|
||||
'enabled' => '$conf->ticketsup->enabled',
|
||||
'perms' => '$user->rights->ticketsup->read',
|
||||
'target' => '',
|
||||
'user' => 0);
|
||||
@ -301,13 +300,12 @@ class modTicketsup extends DolibarrModules
|
||||
}
|
||||
|
||||
/**
|
||||
* Function called when module is enabled.
|
||||
* The init function add constants, boxes, permissions and menus
|
||||
* (defined in constructor) into Dolibarr database.
|
||||
* It also creates data directories
|
||||
* Function called when module is enabled.
|
||||
* The init function add constants, boxes, permissions and menus (defined in constructor) into Dolibarr database.
|
||||
* It also creates data directories
|
||||
*
|
||||
* @param string $options Options when enabling module ('', 'noboxes')
|
||||
* @return int 1 if OK, 0 if KO
|
||||
* @param string $options Options when enabling module ('', 'noboxes')
|
||||
* @return int 1 if OK, 0 if KO
|
||||
*/
|
||||
public function init($options = '')
|
||||
{
|
||||
@ -317,40 +315,10 @@ class modTicketsup extends DolibarrModules
|
||||
array("sql" => "insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (110121, 'ticketsup', 'internal', 'CONTRIBUTOR', 'Intervenant', 1);", "ignoreerror" => 1),
|
||||
array("sql" => "insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (110122, 'ticketsup', 'external', 'SUPPORTCLI', 'Contact client suivi incident', 1);", "ignoreerror" => 1),
|
||||
array("sql" => "insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (110123, 'ticketsup', 'external', 'CONTRIBUTOR', 'Intervenant', 1);", "ignoreerror" => 1),
|
||||
array("sql" => "insert into llx_c_action_trigger (rowid,code,label,description,elementtype,rang) values ('','TICKETMESSAGE_SENTBYMAIL','Envoi message de réponse par mail','Executed when a response is made on a ticket','ticketsup','');", "ignoreerror" => 1),
|
||||
|
||||
array("sql" => "insert into llx_c_action_trigger (rowid,code,label,description,elementtype,rang) values ('','TICKETMESSAGE_SENTBYMAIL','Send email for ticket','Executed when a response is made on a ticket','ticketsup','');", "ignoreerror" => 1),
|
||||
);
|
||||
|
||||
$result = $this->loadTables();
|
||||
|
||||
return $this->_init($sql, $options);
|
||||
}
|
||||
|
||||
/**
|
||||
* Function called when module is disabled.
|
||||
* Remove from database constants, boxes and permissions from Dolibarr database.
|
||||
* Data directories are not deleted
|
||||
*
|
||||
* @param string $options Options when enabling module ('', 'noboxes')
|
||||
* @return int 1 if OK, 0 if KO
|
||||
*/
|
||||
public function remove($options = '')
|
||||
{
|
||||
$sql = array();
|
||||
|
||||
return $this->_remove($sql, $options);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create tables, keys and data required by module
|
||||
* Files llx_table1.sql, llx_table1.key.sql llx_data.sql with create table, create keys
|
||||
* and create data commands must be stored in directory /ticketsup/sql/
|
||||
* This function is called by this->init
|
||||
*
|
||||
* @return int <=0 if KO, >0 if OK
|
||||
*/
|
||||
private function loadTables()
|
||||
{
|
||||
return $this->_load_tables('/ticketsup/sql/');
|
||||
}
|
||||
}
|
||||
|
||||
@ -49,7 +49,7 @@ abstract class ModeleNumRefTicketsup
|
||||
public function info()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("ticketsup@ticketsup");
|
||||
$langs->load("ticketsup");
|
||||
return $langs->trans("NoDescription");
|
||||
}
|
||||
|
||||
@ -61,7 +61,7 @@ abstract class ModeleNumRefTicketsup
|
||||
public function getExample()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("ticketsup@ticketsup");
|
||||
$langs->load("ticketsup");
|
||||
return $langs->trans("NoExample");
|
||||
}
|
||||
|
||||
|
||||
@ -1515,7 +1515,7 @@ class pdf_azur extends ModelePDFPropales
|
||||
$carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$labelbeforecontactname." ".$outputlangs->convToOutputCharset($object->user->getFullName($outputlangs))."\n";
|
||||
}
|
||||
|
||||
$carac_emetteur .= pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty);
|
||||
$carac_emetteur .= pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty, '', 0, 'source', $object);
|
||||
|
||||
// Show sender
|
||||
$posy=42+$top_shift;
|
||||
|
||||
@ -1086,7 +1086,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
||||
if ($showaddress)
|
||||
{
|
||||
// Sender properties
|
||||
$carac_emetteur = pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty);
|
||||
$carac_emetteur = pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty, '', 0, 'source', $object);
|
||||
|
||||
// Show sender
|
||||
$posy=42;
|
||||
|
||||
@ -1211,7 +1211,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
||||
if ($showaddress)
|
||||
{
|
||||
// Sender properties
|
||||
$carac_emetteur = pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty);
|
||||
$carac_emetteur = pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty, '', 0, 'source', $object);
|
||||
|
||||
// Show sender
|
||||
$posy=42;
|
||||
|
||||
@ -1306,7 +1306,7 @@ class pdf_aurore extends ModelePDFSupplierProposal
|
||||
$carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$labelbeforecontactname.": ".$outputlangs->convToOutputCharset($object->user->getFullName($outputlangs))."\n";
|
||||
}
|
||||
|
||||
$carac_emetteur .= pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty);
|
||||
$carac_emetteur .= pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty, '', 0, 'source', $object);
|
||||
|
||||
// Show sender
|
||||
$posy=42;
|
||||
|
||||
@ -43,7 +43,7 @@ class mod_ticketsup_universal extends ModeleNumRefTicketsup
|
||||
{
|
||||
global $conf, $langs;
|
||||
|
||||
$langs->load("ticketsup@ticketsup");
|
||||
$langs->load("ticketsup");
|
||||
$langs->load("admin");
|
||||
|
||||
$form = new Form($this->db);
|
||||
|
||||
@ -283,6 +283,18 @@ else {
|
||||
if (! empty($conf->global->FCKEDITOR_ENABLE_DETAILS_FULL)) $toolbarname='dolibarr_notes';
|
||||
$doleditor=new DolEditor('dp_desc',GETPOST('dp_desc'),'',100,$toolbarname,'',false,true,$enabled,$nbrows,'98%');
|
||||
$doleditor->Create();
|
||||
|
||||
// Show autofill date for recuring invoices
|
||||
if (! empty($conf->service->enabled) && $object->element == 'facturerec')
|
||||
{
|
||||
echo '<div class="divlinefordates"><br>';
|
||||
echo $langs->trans('AutoFillDateFrom').' ';
|
||||
echo $form->selectyesno('date_start_fill', $line->date_start_fill, 1);
|
||||
echo ' - ';
|
||||
echo $langs->trans('AutoFillDateTo').' ';
|
||||
echo $form->selectyesno('date_end_fill', $line->date_end_fill, 1);
|
||||
echo '</div>';
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
|
||||
@ -594,8 +606,17 @@ jQuery(document).ready(function() {
|
||||
if (editor) { editor.focus(); }
|
||||
}
|
||||
}
|
||||
if (jQuery('#select_type').val() == '0') jQuery('#trlinefordates').hide();
|
||||
else jQuery('#trlinefordates').show();
|
||||
console.log("Hide/show date according to product type");
|
||||
if (jQuery('#select_type').val() == '0')
|
||||
{
|
||||
jQuery('#trlinefordates').hide();
|
||||
jQuery('.divlinefordates').hide();
|
||||
}
|
||||
else
|
||||
{
|
||||
jQuery('#trlinefordates').show();
|
||||
jQuery('.divlinefordates').show();
|
||||
}
|
||||
});
|
||||
|
||||
$("#prod_entry_mode_predef").on( "click", function() {
|
||||
@ -799,7 +820,7 @@ function setforfree() {
|
||||
jQuery("#units, #title_units").show();
|
||||
}
|
||||
function setforpredef() {
|
||||
console.log("Call setforpredef. We hide some fields");
|
||||
console.log("Call setforpredef. We hide some fields and show dates");
|
||||
jQuery("#select_type").val(-1);
|
||||
|
||||
jQuery("#prod_entry_mode_free").prop('checked',false).change();
|
||||
@ -820,6 +841,9 @@ function setforpredef() {
|
||||
jQuery(".np_marginRate").hide(); // May no exists
|
||||
jQuery(".np_markRate").hide(); // May no exists
|
||||
jQuery("#units, #title_units").hide();
|
||||
|
||||
jQuery('#trlinefordates').show();
|
||||
jQuery('.divlinefordates').show();
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
@ -62,7 +62,10 @@ if (!empty($conf->multicurrency->enabled)) $colspan+=2;
|
||||
$coldisplay=-1; // We remove first td
|
||||
?>
|
||||
<tr <?php echo $bc[$var]; ?>>
|
||||
<td<?php echo (! empty($conf->global->MAIN_VIEW_LINE_NUMBER) ? ' colspan="2"' : ''); ?>><?php $coldisplay+=(! empty($conf->global->MAIN_VIEW_LINE_NUMBER))?2:1; ?>
|
||||
<?php if (! empty($conf->global->MAIN_VIEW_LINE_NUMBER)) { ?>
|
||||
<td class="linecolnum" align="center"><?php $coldisplay++; ?><?php echo ($i+1); ?></td>
|
||||
<?php } ?>
|
||||
<td>
|
||||
<div id="line_<?php echo $line->id; ?>"></div>
|
||||
|
||||
<input type="hidden" name="lineid" value="<?php echo $line->id; ?>">
|
||||
@ -83,7 +86,7 @@ $coldisplay=-1; // We remove first td
|
||||
echo ' - '.nl2br($line->product_label);
|
||||
?>
|
||||
|
||||
<br>
|
||||
<br><br>
|
||||
|
||||
<?php } ?>
|
||||
|
||||
@ -110,6 +113,18 @@ $coldisplay=-1; // We remove first td
|
||||
} else {
|
||||
print '<textarea id="product_desc" class="flat" name="product_desc" readonly style="width: 200px; height:80px;">' . $line->description . '</textarea>';
|
||||
}
|
||||
|
||||
// Show autofill date for recuring invoices
|
||||
if (! empty($conf->service->enabled) && $line->product_type == 1 && $line->element == 'facturedetrec')
|
||||
{
|
||||
echo '<br>';
|
||||
echo $langs->trans('AutoFillDateFrom').' ';
|
||||
echo $form->selectyesno('date_start_fill', $line->date_start_fill, 1);
|
||||
echo ' - ';
|
||||
echo $langs->trans('AutoFillDateTo').' ';
|
||||
echo $form->selectyesno('date_end_fill', $line->date_end_fill, 1);
|
||||
}
|
||||
|
||||
?>
|
||||
</td>
|
||||
|
||||
@ -117,7 +132,7 @@ $coldisplay=-1; // We remove first td
|
||||
if ($object->element == 'supplier_proposal' || $object->element == 'order_supplier' || $object->element == 'invoice_supplier') // We must have same test in printObjectLines
|
||||
{
|
||||
?>
|
||||
<td align="right"><input id="fourn_ref" name="fourn_ref" class="flat" value="<?php echo $line->ref_fourn; ?>" size="12"></td>
|
||||
<td align="right"><input id="fourn_ref" name="fourn_ref" class="flat minwidth75" value="<?php echo $line->ref_fourn; ?>"></td>
|
||||
<?php
|
||||
}
|
||||
|
||||
@ -237,6 +252,9 @@ $coldisplay=-1; // We remove first td
|
||||
|
||||
<?php if (! empty($conf->service->enabled) && $line->product_type == 1 && $dateSelector) { ?>
|
||||
<tr id="service_duration_area" <?php echo $bc[$var]; ?>>
|
||||
<?php if (! empty($conf->global->MAIN_VIEW_LINE_NUMBER)) { ?>
|
||||
<td class="linecolnum" align="center"><?php $coldisplay++; ?></td>
|
||||
<?php } ?>
|
||||
<td colspan="<?php echo 7+$colspan ?>"><?php echo $langs->trans('ServiceLimitedDuration').' '.$langs->trans('From').' '; ?>
|
||||
<?php
|
||||
$hourmin=(isset($conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE)?$conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE:'');
|
||||
@ -264,7 +282,8 @@ $coldisplay=-1; // We remove first td
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
<?php }
|
||||
?>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
@ -121,20 +121,9 @@ if (empty($outputalsopricetotalwithtax)) $outputalsopricetotalwithtax=0;
|
||||
if ($line->fk_product > 0)
|
||||
{
|
||||
echo $form->textwithtooltip($text,$description,3,'','',$i,0,(!empty($line->fk_parent_line)?img_picto('', 'rightarrow'):''));
|
||||
|
||||
// Show range
|
||||
echo get_date_range($line->date_start, $line->date_end, $format);
|
||||
|
||||
// Add description in form
|
||||
if (! empty($conf->global->PRODUIT_DESC_IN_FORM))
|
||||
{
|
||||
print (! empty($line->description) && $line->description!=$line->product_label)?'<br>'.dol_htmlentitiesbr($line->description):'';
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
if ($type==1) $text = img_object($langs->trans('Service'),'service');
|
||||
else $text = img_object($langs->trans('Product'),'product');
|
||||
|
||||
@ -145,9 +134,24 @@ if (empty($outputalsopricetotalwithtax)) $outputalsopricetotalwithtax=0;
|
||||
if (! empty($line->fk_parent_line)) echo img_picto('', 'rightarrow');
|
||||
echo $text.' '.dol_htmlentitiesbr($line->description);
|
||||
}
|
||||
}
|
||||
|
||||
// Show range
|
||||
echo get_date_range($line->date_start,$line->date_end, $format);
|
||||
// Show date range
|
||||
if ($line->element == 'facturedetrec') {
|
||||
if ($line->date_start_fill || $line->date_end_fill) echo '<br><br><div class="nowraponall">';
|
||||
if ($line->date_start_fill) echo $langs->trans('AutoFillDateFromShort').': '.yn($line->date_start_fill);
|
||||
if ($line->date_start_fill && $line->date_end_fill) echo ' - ';
|
||||
if ($line->date_end_fill) echo $langs->trans('AutoFillDateToShort').': '.yn($line->date_end_fill);
|
||||
if ($line->date_start_fill || $line->date_end_fill) echo '</div>';
|
||||
}
|
||||
else {
|
||||
echo get_date_range($line->date_start, $line->date_end, $format);
|
||||
}
|
||||
|
||||
// Add description in form
|
||||
if ($line->fk_product > 0 && ! empty($conf->global->PRODUIT_DESC_IN_FORM))
|
||||
{
|
||||
print (! empty($line->description) && $line->description!=$line->product_label)?'<br>'.dol_htmlentitiesbr($line->description):'';
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
@ -20,16 +20,11 @@
|
||||
/**
|
||||
* \file htdocs/core/triggers/interface_50_modTicketsup_TicketEmail.class.php
|
||||
* \ingroup core
|
||||
* \brief Fichier
|
||||
* \remarks Son propre fichier d'actions peut etre cree par recopie de celui-ci:
|
||||
* - Le nom du fichier doit etre: interface_99_modMymodule_Mytrigger.class.php
|
||||
* ou: interface_99_all_Mytrigger.class.php
|
||||
* - Le fichier doit rester stocke dans core/triggers
|
||||
* - Le nom de la classe doit etre InterfaceMytrigger
|
||||
* - Le nom de la propriete name doit etre Mytrigger
|
||||
* \brief File of trigger for ticket module
|
||||
*/
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/triggers/dolibarrtriggers.class.php';
|
||||
|
||||
|
||||
/**
|
||||
* Class of triggers for ticketsup module
|
||||
*/
|
||||
@ -50,7 +45,7 @@ class InterfaceTicketEmail extends DolibarrTriggers
|
||||
$this->family = "ticketsup";
|
||||
$this->description = "Triggers of the module ticketsup";
|
||||
$this->version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' or version
|
||||
$this->picto = 'ticketsup@ticketsup';
|
||||
$this->picto = 'ticketsup';
|
||||
}
|
||||
|
||||
/**
|
||||
@ -110,12 +105,12 @@ class InterfaceTicketEmail extends DolibarrTriggers
|
||||
public function runTrigger($action, $object, User $user, Translate $langs, Conf $conf)
|
||||
{
|
||||
$ok = 0;
|
||||
|
||||
|
||||
switch ($action) {
|
||||
case 'TICKET_ASSIGNED':
|
||||
dol_syslog("Trigger '" . $this->name . "' for action '$action' launched by " . __FILE__ . ". id=" . $object->id);
|
||||
|
||||
if ($object->fk_user_assign != $user->id) {
|
||||
|
||||
if ($object->fk_user_assign > 0 && $object->fk_user_assign != $user->id) {
|
||||
$userstat = new User($this->db);
|
||||
$res = $userstat->fetch($object->fk_user_assign);
|
||||
if ($res) {
|
||||
@ -132,11 +127,11 @@ class InterfaceTicketEmail extends DolibarrTriggers
|
||||
$message .= '<li>' . $langs->trans($key) . ' : ' . $value . '</li>';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$message .= '</ul>';
|
||||
$message .= '<p>' . $langs->trans('Message') . ' : <br>' . $object->message . '</p>';
|
||||
$message .= '<p><a href="' . dol_buildpath('/ticketsup/card.php', 2) . '?track_id=' . $object->track_id . '">' . $langs->trans('SeeThisTicketIntomanagementInterface') . '</a></p>';
|
||||
|
||||
|
||||
$sendto = $userstat->email;
|
||||
$from = dolGetFirstLastname($user->firstname, $user->lastname) . '<' . $user->email . '>';
|
||||
|
||||
@ -166,20 +161,20 @@ class InterfaceTicketEmail extends DolibarrTriggers
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
|
||||
|
||||
case 'TICKET_CREATE':
|
||||
dol_syslog("Trigger '" . $this->name . "' for action '$action' launched by " . __FILE__ . ". id=" . $object->id);
|
||||
|
||||
|
||||
// Init to avoid errors
|
||||
$filepath = array();
|
||||
$filename = array();
|
||||
$mimetype = array();
|
||||
|
||||
$langs->load('ticketsup@ticketsup');
|
||||
|
||||
|
||||
$langs->load('ticketsup');
|
||||
|
||||
$object->fetch('', $object->track_id);
|
||||
|
||||
|
||||
/* Send email to admin */
|
||||
$sendto = $conf->global->TICKETS_NOTIFICATION_EMAIL_TO;
|
||||
$subject = '['.$conf->global->MAIN_INFO_SOCIETE_NOM.'] '.$langs->transnoentities('TicketNewEmailSubjectAdmin');
|
||||
@ -196,15 +191,15 @@ class InterfaceTicketEmail extends DolibarrTriggers
|
||||
}
|
||||
}
|
||||
$message_admin.='</ul>';
|
||||
|
||||
|
||||
if ($object->fk_soc > 0) {
|
||||
$object->fetch_thirdparty();
|
||||
$message_admin.='<p>'.$langs->trans('Company'). ' : '.$object->thirdparty->name.'</p>';
|
||||
}
|
||||
|
||||
|
||||
$message_admin.='<p>'.$langs->trans('Message').' : <br>'.$object->message.'</p>';
|
||||
$message_admin.='<p><a href="'.dol_buildpath('/ticketsup/card.php', 2).'?track_id='.$object->track_id.'">'.$langs->trans('SeeThisTicketIntomanagementInterface').'</a></p>';
|
||||
|
||||
|
||||
$from = $conf->global->MAIN_INFO_SOCIETE_NOM.'<'.$conf->global->TICKETS_NOTIFICATION_EMAIL_FROM.'>';
|
||||
$replyto = $from;
|
||||
|
||||
@ -233,7 +228,7 @@ class InterfaceTicketEmail extends DolibarrTriggers
|
||||
} else {
|
||||
$sendto = $user->email;
|
||||
}
|
||||
|
||||
|
||||
if ($sendto && $object->notify_tiers_at_create) {
|
||||
$subject = '['.$conf->global->MAIN_INFO_SOCIETE_NOM.'] '.$langs->transnoentities('TicketNewEmailSubjectCustomer');
|
||||
$message_customer= $langs->transnoentities('TicketNewEmailBodyCustomer', $object->track_id)."\n\n";
|
||||
@ -254,11 +249,11 @@ class InterfaceTicketEmail extends DolibarrTriggers
|
||||
$url_public_ticket = ($conf->global->TICKETS_URL_PUBLIC_INTERFACE?$conf->global->TICKETS_URL_PUBLIC_INTERFACE.'/':dol_buildpath('/ticketsup/public/view.php', 2)).'?track_id='.$object->track_id;
|
||||
$message_customer.='<p>' . $langs->trans('TicketNewEmailBodyInfosTrackUrlCustomer') . ' : <a href="'.$url_public_ticket.'">'.$url_public_ticket.'</a></p>';
|
||||
$message_customer.='<p>'.$langs->trans('TicketEmailPleaseDoNotReplyToThisEmail').'</p>';
|
||||
|
||||
|
||||
|
||||
|
||||
$from = $conf->global->MAIN_INFO_SOCIETE_NOM.'<'.$conf->global->TICKETS_NOTIFICATION_EMAIL_FROM.'>';
|
||||
$replyto = $from;
|
||||
|
||||
|
||||
// Init to avoid errors
|
||||
$filepath = array();
|
||||
$filename = array();
|
||||
@ -282,26 +277,26 @@ class InterfaceTicketEmail extends DolibarrTriggers
|
||||
}
|
||||
}
|
||||
$ok = 1;
|
||||
|
||||
|
||||
break;
|
||||
|
||||
|
||||
case 'TICKET_DELETE':
|
||||
dol_syslog("Trigger '" . $this->name . "' for action '$action' launched by " . __FILE__ . ". id=" . $object->id);
|
||||
break;
|
||||
|
||||
|
||||
case 'TICKET_MODIFY':
|
||||
dol_syslog("Trigger '" . $this->name . "' for action '$action' launched by " . __FILE__ . ". id=" . $object->id);
|
||||
break;
|
||||
|
||||
|
||||
case 'TICKET_MARK_READ':
|
||||
dol_syslog("Trigger '" . $this->name . "' for action '$action' launched by " . __FILE__ . ". id=" . $object->id);
|
||||
break;
|
||||
|
||||
case 'TICKET_CLOSED':
|
||||
|
||||
case 'TICKET_CLOSE':
|
||||
dol_syslog("Trigger '" . $this->name . "' for action '$action' launched by " . __FILE__ . ". id=" . $object->id);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
|
||||
return $ok;
|
||||
}
|
||||
|
||||
171
htdocs/core/triggers/interface_80_modStripe_Stripe.class.php
Normal file
171
htdocs/core/triggers/interface_80_modStripe_Stripe.class.php
Normal file
@ -0,0 +1,171 @@
|
||||
<?php
|
||||
/*
|
||||
* Copyright (C) 2018 ptibogxiv <support@ptibogxiv.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/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/core/triggers/interface_50_modStripe_Stripe.class.php
|
||||
* \ingroup core
|
||||
* \brief Fichier
|
||||
* \remarks Son propre fichier d'actions peut etre cree par recopie de celui-ci:
|
||||
* - Le nom du fichier doit etre: interface_99_modMymodule_Mytrigger.class.php
|
||||
* ou: interface_99_all_Mytrigger.class.php
|
||||
* - Le fichier doit rester stocke dans core/triggers
|
||||
* - Le nom de la classe doit etre InterfaceMytrigger
|
||||
* - Le nom de la propriete name doit etre Mytrigger
|
||||
*/
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/triggers/dolibarrtriggers.class.php';
|
||||
dol_include_once('/stripe/class/stripe.class.php');
|
||||
$path=dirname(__FILE__).'/';
|
||||
/**
|
||||
* Class of triggers for stripe module
|
||||
*/
|
||||
class InterfaceStripe
|
||||
{
|
||||
public $db;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param DoliDB $db Database handler
|
||||
*/
|
||||
public function __construct($db)
|
||||
{
|
||||
$this->db = $db;
|
||||
|
||||
$this->name = preg_replace('/^Interface/i', '', get_class($this));
|
||||
$this->family = 'Stripeconnect';
|
||||
$this->description = "Triggers of the module Stripeconnect";
|
||||
$this->version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' or version
|
||||
$this->picto = 'stripe@stripe';
|
||||
}
|
||||
|
||||
/**
|
||||
* Trigger name
|
||||
*
|
||||
* @return string Name of trigger file
|
||||
*/
|
||||
public function getName()
|
||||
{
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Trigger description
|
||||
*
|
||||
* @return string Description of trigger file
|
||||
*/
|
||||
public function getDesc()
|
||||
{
|
||||
return $this->description;
|
||||
}
|
||||
|
||||
/**
|
||||
* Trigger version
|
||||
*
|
||||
* @return string Version of trigger file
|
||||
*/
|
||||
public function getVersion()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("admin");
|
||||
|
||||
if ($this->version == 'development') {
|
||||
return $langs->trans("Development");
|
||||
} elseif ($this->version == 'experimental') {
|
||||
return $langs->trans("Experimental");
|
||||
} elseif ($this->version == 'dolibarr') {
|
||||
return DOL_VERSION;
|
||||
} elseif ($this->version) {
|
||||
return $this->version;
|
||||
} else {
|
||||
return $langs->trans("Unknown");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Function called when a Dolibarrr business event is done.
|
||||
* All functions "runTrigger" are triggered if file
|
||||
* is inside directory core/triggers
|
||||
*
|
||||
* @param string $action Event action code
|
||||
* @param CommonObject $object Object
|
||||
* @param User $user Object user
|
||||
* @param Translate $langs Object langs
|
||||
* @param Conf $conf Object conf
|
||||
* @return int <0 if KO, 0 if no triggered ran, >0 if OK
|
||||
*/
|
||||
public function runTrigger($action, $object, User $user, Translate $langs, Conf $conf)
|
||||
{
|
||||
// Put here code you want to execute when a Dolibarr business events occurs.
|
||||
// Data and type of action are stored into $object and $action
|
||||
global $langs, $db, $conf;
|
||||
$langs->load("members");
|
||||
$langs->load("users");
|
||||
$langs->load("mails");
|
||||
$langs->load('other');
|
||||
|
||||
$ok = 0;
|
||||
$stripe = new Stripe($db);
|
||||
if (empty($conf->stripe->enabled)) return 0;
|
||||
|
||||
if (empty($conf->global->STRIPE_LIVE) || GETPOST('forcesandbox', 'alpha'))
|
||||
{
|
||||
$service = 'StripeTest';
|
||||
}
|
||||
else
|
||||
{
|
||||
$service = 'StripeLive';
|
||||
}
|
||||
|
||||
if ($action == 'COMPANY_MODIFY') {
|
||||
dol_syslog("Trigger '" . $this->name . "' for action '$action' launched by " . __FILE__ . ". id=" . $object->id);
|
||||
if ($stripe->getStripeAccount($service) && $object->client != 0) {
|
||||
$cu = $stripe->customerStripe($object, $stripe->getStripeAccount($service));
|
||||
if ($cu) {
|
||||
if ($conf->entity == '1') {
|
||||
$customer = \Stripe\Customer::retrieve("$cu->id");
|
||||
} else {
|
||||
$customer = \Stripe\Customer::retrieve("$cu->id", array(
|
||||
"stripe_account" => $stripe->getStripeAccount($service)
|
||||
));
|
||||
}
|
||||
if (! empty($object->email)) {
|
||||
$customer->email = "$object->email";
|
||||
}
|
||||
$customer->description = "$object->name";
|
||||
$customer->save();
|
||||
}
|
||||
}
|
||||
} elseif ($action == 'COMPANY_DELETE') {
|
||||
dol_syslog("Trigger '" . $this->name . "' for action '$action' launched by " . __FILE__ . ". id=" . $object->id);
|
||||
$cu = $stripe->customerStripe($object, $stripe->getStripeAccount($service));
|
||||
if ($cu) {
|
||||
if ($conf->entity == 1) {
|
||||
$customer = \Stripe\Customer::retrieve("$cu->id");
|
||||
} else {
|
||||
$customer = \Stripe\Customer::retrieve("$cu->id", array(
|
||||
"stripe_account" => $stripe->getStripeAccount($service)
|
||||
));
|
||||
}
|
||||
$customer->delete();
|
||||
}
|
||||
}
|
||||
|
||||
return $ok;
|
||||
}
|
||||
}
|
||||
@ -1,5 +1,4 @@
|
||||
-- ===================================================================
|
||||
-- Copyright (C) 2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
-- 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
|
||||
@ -14,7 +13,8 @@
|
||||
-- You should have received a copy of the GNU General Public License
|
||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
--
|
||||
-- ===================================================================
|
||||
--
|
||||
-- Contenu de la table llx_c_ticketsup_category
|
||||
--
|
||||
|
||||
|
||||
ALTER TABLE llx_website_account_extrafields ADD INDEX idx_website_account_extrafields (fk_object);
|
||||
INSERT INTO llx_c_ticketsup_category (code, pos, label, active, use_default, description) VALUES('OTHER', '10', 'Other', 1, 1, NULL);
|
||||
@ -1,9 +1,23 @@
|
||||
|
||||
-- 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/>.
|
||||
--
|
||||
--
|
||||
-- Contenu de la table llx_c_ticketsup_severity
|
||||
--
|
||||
|
||||
INSERT INTO llx_c_ticketsup_severity (rowid, code, pos, label, color, active, use_default, description) VALUES(1, 'LOW', '10', 'Bas', '', 1, 0, NULL);
|
||||
INSERT INTO llx_c_ticketsup_severity (rowid, code, pos, label, color, active, use_default, description) VALUES(2, 'NORMAL', '20', 'Normal', '', 1, 1, NULL);
|
||||
INSERT INTO llx_c_ticketsup_severity (rowid, code, pos, label, color, active, use_default, description) VALUES(3, 'LOWHIGH', '30', 'Important', '', 1, 0, NULL);
|
||||
INSERT INTO llx_c_ticketsup_severity (rowid, code, pos, label, color, active, use_default, description) VALUES(4, 'HIGH', '40', 'Critique / bloquant', '', 1, 0, NULL);
|
||||
INSERT INTO llx_c_ticketsup_severity (code, pos, label, color, active, use_default, description) VALUES('LOW', '10', 'Low', '', 1, 0, NULL);
|
||||
INSERT INTO llx_c_ticketsup_severity (code, pos, label, color, active, use_default, description) VALUES('NORMAL', '20', 'Normal', '', 1, 1, NULL);
|
||||
INSERT INTO llx_c_ticketsup_severity (code, pos, label, color, active, use_default, description) VALUES('HIGH', '30', 'High', '', 1, 0, NULL);
|
||||
INSERT INTO llx_c_ticketsup_severity (code, pos, label, color, active, use_default, description) VALUES('BLOCKING', '40', 'Critical / blocking', '', 1, 0, NULL);
|
||||
|
||||
@ -1,8 +1,24 @@
|
||||
|
||||
-- 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/>.
|
||||
--
|
||||
--
|
||||
-- Contenu de la table llx_c_ticketsup_type
|
||||
--
|
||||
INSERT INTO llx_c_ticketsup_type (rowid, code, pos, label, active, use_default, description) VALUES(1, 'COM', '10', 'Question commerciale', 1, 1, NULL);
|
||||
INSERT INTO llx_c_ticketsup_type (rowid, code, pos, label, active, use_default, description) VALUES(2, 'INCIDENT', '20', 'Demande d''assistance', 1, 0, NULL);
|
||||
INSERT INTO llx_c_ticketsup_type (rowid, code, pos, label, active, use_default, description) VALUES(3, 'PROJET', '30', 'Suivi projet', 1, 0, NULL);
|
||||
INSERT INTO llx_c_ticketsup_type (rowid, code, pos, label, active, use_default, description) VALUES(4, 'OTHER', '40', 'Autre', 1, 0, NULL);
|
||||
|
||||
INSERT INTO llx_c_ticketsup_type (code, pos, label, active, use_default, description) VALUES('COM', '10', 'Commercial question', 1, 1, NULL);
|
||||
INSERT INTO llx_c_ticketsup_type (code, pos, label, active, use_default, description) VALUES('ISSUE', '20', 'Issue or problem' , 1, 0, NULL);
|
||||
INSERT INTO llx_c_ticketsup_type (code, pos, label, active, use_default, description) VALUES('REQUEST', '25', 'Change or enhancement request', 1, 0, NULL);
|
||||
INSERT INTO llx_c_ticketsup_type (code, pos, label, active, use_default, description) VALUES('PROJECT', '30', 'Project', 0, 0, NULL);
|
||||
INSERT INTO llx_c_ticketsup_type (code, pos, label, active, use_default, description) VALUES('OTHER', '40', 'Other', 1, 0, NULL);
|
||||
|
||||
@ -1,17 +0,0 @@
|
||||
|
||||
--
|
||||
-- Contenu de la table llx_c_ticketsup_type
|
||||
--
|
||||
INSERT INTO llx_c_ticketsup_type (rowid, code, pos, label, active, use_default, description) VALUES(1, 'COM', '10', 'Question commerciale', 1, 1, NULL);
|
||||
INSERT INTO llx_c_ticketsup_type (rowid, code, pos, label, active, use_default, description) VALUES(2, 'INCIDENT', '20', 'Demande d''assistance', 1, 0, NULL);
|
||||
INSERT INTO llx_c_ticketsup_type (rowid, code, pos, label, active, use_default, description) VALUES(3, 'PROJET', '30', 'Suivi projet', 1, 0, NULL);
|
||||
INSERT INTO llx_c_ticketsup_type (rowid, code, pos, label, active, use_default, description) VALUES(4, 'OTHER', '40', 'Autre', 1, 0, NULL);
|
||||
|
||||
--
|
||||
-- Contenu de la table llx_c_ticketsup_severity
|
||||
--
|
||||
|
||||
INSERT INTO llx_c_ticketsup_severity (rowid, code, pos, label, color, active, use_default, description) VALUES(1, 'LOW', '10', 'Bas', '', 1, 0, NULL);
|
||||
INSERT INTO llx_c_ticketsup_severity (rowid, code, pos, label, color, active, use_default, description) VALUES(2, 'NORMAL', '20', 'Normal', '', 1, 1, NULL);
|
||||
INSERT INTO llx_c_ticketsup_severity (rowid, code, pos, label, color, active, use_default, description) VALUES(3, 'LOWHIGH', '30', 'Important', '', 1, 0, NULL);
|
||||
INSERT INTO llx_c_ticketsup_severity (rowid, code, pos, label, color, active, use_default, description) VALUES(4, 'HIGH', '40', 'Critique / bloquant', '', 1, 0, NULL);
|
||||
@ -119,6 +119,10 @@ ALTER TABLE llx_societe_rib ADD COLUMN starting_date date;
|
||||
ALTER TABLE llx_societe_rib ADD COLUMN total_amount_of_all_payments double(24,8);
|
||||
ALTER TABLE llx_societe_rib ADD COLUMN stripe_card_ref varchar(128);
|
||||
ALTER TABLE llx_societe_rib ADD COLUMN status integer NOT NULL DEFAULT 1;
|
||||
|
||||
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;
|
||||
|
||||
CREATE TABLE llx_ticketsup
|
||||
(
|
||||
@ -143,9 +147,11 @@ CREATE TABLE llx_ticketsup
|
||||
datec datetime,
|
||||
date_read datetime,
|
||||
date_close datetime,
|
||||
notify_tiers_at_create tinyint,
|
||||
tms timestamp
|
||||
)ENGINE=innodb;
|
||||
|
||||
ALTER TABLE llx_ticketsup ADD COLUMN notify_tiers_at_create integer;
|
||||
ALTER TABLE llx_ticketsup ADD UNIQUE uk_ticketsup_rowid_track_id (rowid, track_id);
|
||||
ALTER TABLE llx_ticketsup ADD INDEX id_ticketsup_track_id (track_id);
|
||||
|
||||
@ -183,24 +189,13 @@ CREATE TABLE llx_ticketsup_extrafields
|
||||
import_key varchar(14)
|
||||
)ENGINE=innodb;
|
||||
|
||||
ALTER TABLE llx_c_ticketsup_category ADD INDEX idx_code (code);
|
||||
|
||||
CREATE TABLE llx_c_ticketsup_category
|
||||
(
|
||||
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||
code varchar(32) NOT NULL,
|
||||
pos varchar(32) NOT NULL,
|
||||
label varchar(128) NOT NULL,
|
||||
active integer DEFAULT 1,
|
||||
use_default integer DEFAULT 1,
|
||||
description varchar(255)
|
||||
)ENGINE=innodb;
|
||||
|
||||
ALTER TABLE llx_c_ticketsup_severity ADD INDEX idx_code (code);
|
||||
|
||||
CREATE TABLE llx_c_ticketsup_severity
|
||||
|
||||
-- Create dictionaries tables for ticket
|
||||
create table llx_c_ticketsup_severity
|
||||
(
|
||||
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||
entity integer DEFAULT 1,
|
||||
code varchar(32) NOT NULL,
|
||||
pos varchar(32) NOT NULL,
|
||||
label varchar(128) NOT NULL,
|
||||
@ -210,11 +205,10 @@ CREATE TABLE llx_c_ticketsup_severity
|
||||
description varchar(255)
|
||||
)ENGINE=innodb;
|
||||
|
||||
ALTER TABLE llx_c_ticketsup_type ADD INDEX idx_code (code);
|
||||
|
||||
CREATE TABLE llx_c_ticketsup_type
|
||||
create table llx_c_ticketsup_type
|
||||
(
|
||||
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||
entity integer DEFAULT 1,
|
||||
code varchar(32) NOT NULL,
|
||||
pos varchar(32) NOT NULL,
|
||||
label varchar(128) NOT NULL,
|
||||
@ -223,3 +217,88 @@ CREATE TABLE llx_c_ticketsup_type
|
||||
description varchar(255)
|
||||
)ENGINE=innodb;
|
||||
|
||||
create table llx_c_ticketsup_category
|
||||
(
|
||||
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||
entity integer DEFAULT 1,
|
||||
code varchar(32) NOT NULL,
|
||||
pos varchar(32) NOT NULL,
|
||||
label varchar(128) NOT NULL,
|
||||
active integer DEFAULT 1,
|
||||
use_default integer DEFAULT 1,
|
||||
description varchar(255)
|
||||
)ENGINE=innodb;
|
||||
|
||||
ALTER TABLE llx_c_ticketsup_category ADD UNIQUE INDEX uk_code (code, entity);
|
||||
ALTER TABLE llx_c_ticketsup_severity ADD UNIQUE INDEX uk_code (code, entity);
|
||||
ALTER TABLE llx_c_ticketsup_type ADD UNIQUE INDEX uk_code (code, entity);
|
||||
|
||||
|
||||
|
||||
-- Load data
|
||||
INSERT INTO llx_c_ticketsup_severity (code, pos, label, color, active, use_default, description) VALUES('LOW', '10', 'Low', '', 1, 0, NULL);
|
||||
INSERT INTO llx_c_ticketsup_severity (code, pos, label, color, active, use_default, description) VALUES('NORMAL', '20', 'Normal', '', 1, 1, NULL);
|
||||
INSERT INTO llx_c_ticketsup_severity (code, pos, label, color, active, use_default, description) VALUES('HIGH', '30', 'High', '', 1, 0, NULL);
|
||||
INSERT INTO llx_c_ticketsup_severity (code, pos, label, color, active, use_default, description) VALUES('BLOCKING', '40', 'Critical / blocking', '', 1, 0, NULL);
|
||||
|
||||
INSERT INTO llx_c_ticketsup_type (code, pos, label, active, use_default, description) VALUES('COM', '10', 'Commercial question', 1, 1, NULL);
|
||||
INSERT INTO llx_c_ticketsup_type (code, pos, label, active, use_default, description) VALUES('ISSUE', '20', 'Issue or problem' , 1, 0, NULL);
|
||||
INSERT INTO llx_c_ticketsup_type (code, pos, label, active, use_default, description) VALUES('REQUEST', '25', 'Change or enhancement request', 1, 0, NULL);
|
||||
INSERT INTO llx_c_ticketsup_type (code, pos, label, active, use_default, description) VALUES('PROJECT', '30', 'Project', 0, 0, NULL);
|
||||
INSERT INTO llx_c_ticketsup_type (code, pos, label, active, use_default, description) VALUES('OTHER', '40', 'Other', 1, 0, NULL);
|
||||
|
||||
INSERT INTO llx_c_ticketsup_category (code, pos, label, active, use_default, description) VALUES('OTHER', '10', 'Other', 1, 1, NULL);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
ALTER TABLE llx_facturedet_rec ADD COLUMN date_start_fill integer DEFAULT 0;
|
||||
ALTER TABLE llx_facturedet_rec ADD COLUMN date_end_fill integer DEFAULT 0;
|
||||
|
||||
|
||||
|
||||
CREATE TABLE llx_societe_account(
|
||||
-- BEGIN MODULEBUILDER FIELDS
|
||||
rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL,
|
||||
entity integer DEFAULT 1,
|
||||
key_account varchar(128),
|
||||
login varchar(128) NOT NULL,
|
||||
pass_encoding varchar(24),
|
||||
pass_crypted varchar(128),
|
||||
pass_temp varchar(128), -- temporary password when asked for forget password
|
||||
fk_soc integer,
|
||||
site varchar(128),
|
||||
fk_website integer,
|
||||
note_private text,
|
||||
date_last_login datetime,
|
||||
date_previous_login datetime,
|
||||
date_creation datetime NOT NULL,
|
||||
tms timestamp NOT NULL,
|
||||
fk_user_creat integer NOT NULL,
|
||||
fk_user_modif integer,
|
||||
import_key varchar(14),
|
||||
status integer
|
||||
-- END MODULEBUILDER FIELDS
|
||||
) ENGINE=innodb;
|
||||
|
||||
-- VMYSQL4.3 ALTER TABLE llx_societe_account MODIFY COLUMN pass_encoding varchar(24) NULL;
|
||||
|
||||
ALTER TABLE llx_societe_account ADD COLUMN key_account varchar(128);
|
||||
|
||||
ALTER TABLE llx_societe_account ADD INDEX idx_societe_account_rowid (rowid);
|
||||
ALTER TABLE llx_societe_account ADD INDEX idx_societe_account_login (login);
|
||||
ALTER TABLE llx_societe_account ADD INDEX idx_societe_account_status (status);
|
||||
ALTER TABLE llx_societe_account ADD INDEX idx_societe_account_fk_website (fk_website);
|
||||
ALTER TABLE llx_societe_account ADD INDEX idx_societe_account_fk_soc (fk_soc);
|
||||
|
||||
ALTER TABLE llx_societe_account ADD UNIQUE INDEX uk_societe_account_login_website_soc(entity, fk_soc, login, site, fk_website);
|
||||
ALTER TABLE llx_societe_account ADD UNIQUE INDEX uk_societe_account_key_account_soc(entity, fk_soc, key_account, site, fk_website);
|
||||
|
||||
ALTER TABLE llx_societe_account ADD CONSTRAINT llx_societe_account_fk_website FOREIGN KEY (fk_website) REFERENCES llx_website(rowid);
|
||||
ALTER TABLE llx_societe_account ADD CONSTRAINT llx_societe_account_fk_societe FOREIGN KEY (fk_soc) REFERENCES llx_societe(rowid);
|
||||
|
||||
|
||||
ALTER TABLE llx_societe_rib MODIFY COLUMN max_total_amount_of_all_payments double(24,8);
|
||||
ALTER TABLE llx_societe_rib MODIFY COLUMN total_amount_of_all_payments double(24,8);
|
||||
|
||||
|
||||
@ -15,4 +15,4 @@
|
||||
--
|
||||
--
|
||||
|
||||
ALTER TABLE llx_c_ticketsup_category ADD INDEX idx_code (code);
|
||||
ALTER TABLE llx_c_ticketsup_category ADD UNIQUE INDEX uk_code (code, entity);
|
||||
|
||||
@ -18,6 +18,7 @@
|
||||
create table llx_c_ticketsup_category
|
||||
(
|
||||
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||
entity integer DEFAULT 1,
|
||||
code varchar(32) NOT NULL,
|
||||
pos varchar(32) NOT NULL,
|
||||
label varchar(128) NOT NULL,
|
||||
|
||||
@ -15,4 +15,4 @@
|
||||
--
|
||||
--
|
||||
|
||||
ALTER TABLE llx_c_ticketsup_severity ADD INDEX idx_code (code);
|
||||
ALTER TABLE llx_c_ticketsup_severity ADD UNIQUE INDEX uk_code (code, entity);
|
||||
|
||||
@ -18,6 +18,7 @@
|
||||
create table llx_c_ticketsup_severity
|
||||
(
|
||||
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||
entity integer DEFAULT 1,
|
||||
code varchar(32) NOT NULL,
|
||||
pos varchar(32) NOT NULL,
|
||||
label varchar(128) NOT NULL,
|
||||
|
||||
@ -15,4 +15,4 @@
|
||||
--
|
||||
--
|
||||
|
||||
ALTER TABLE llx_c_ticketsup_type ADD INDEX idx_code (code);
|
||||
ALTER TABLE llx_c_ticketsup_type ADD UNIQUE INDEX uk_code (code, entity);
|
||||
|
||||
@ -18,6 +18,7 @@
|
||||
create table llx_c_ticketsup_type
|
||||
(
|
||||
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||
entity integer DEFAULT 1,
|
||||
code varchar(32) NOT NULL,
|
||||
pos varchar(32) NOT NULL,
|
||||
label varchar(128) NOT NULL,
|
||||
|
||||
@ -45,6 +45,8 @@ create table llx_facturedet_rec
|
||||
total_localtax1 double(24,8) DEFAULT 0, -- Total LocalTax1 for total quantity of line
|
||||
total_localtax2 double(24,8) DEFAULT 0, -- total LocalTax2 for total quantity of line
|
||||
total_ttc double(24,8), -- Total TTC de la ligne toute quantity et incluant remise ligne et globale
|
||||
date_start_fill integer DEFAULT 0, -- 1=autofill the date_start of invoice with __INVOICE_DATE_NEXT_INVOICE_BEFORE_GEN__
|
||||
date_end_fill integer DEFAULT 0, -- 1=autofill the date_start of invoice with __INVOICE_PREVIOUS_DATE_NEXT_INVOICE_AFTER_GEN__
|
||||
info_bits integer DEFAULT 0, -- TVA NPR ou non
|
||||
special_code integer UNSIGNED DEFAULT 0, -- code pour les lignes speciales
|
||||
rang integer DEFAULT 0, -- ordre d'affichage
|
||||
|
||||
@ -15,14 +15,16 @@
|
||||
|
||||
|
||||
-- BEGIN MODULEBUILDER INDEXES
|
||||
ALTER TABLE llx_website_account ADD INDEX idx_website_account_rowid (rowid);
|
||||
ALTER TABLE llx_website_account ADD INDEX idx_website_account_login (login);
|
||||
ALTER TABLE llx_website_account ADD INDEX idx_website_account_status (status);
|
||||
ALTER TABLE llx_website_account ADD INDEX idx_website_account_fk_website (fk_website);
|
||||
ALTER TABLE llx_website_account ADD INDEX idx_website_account_fk_soc (fk_soc);
|
||||
ALTER TABLE llx_societe_account ADD INDEX idx_societe_account_rowid (rowid);
|
||||
ALTER TABLE llx_societe_account ADD INDEX idx_societe_account_login (login);
|
||||
ALTER TABLE llx_societe_account ADD INDEX idx_societe_account_status (status);
|
||||
ALTER TABLE llx_societe_account ADD INDEX idx_societe_account_fk_website (fk_website);
|
||||
ALTER TABLE llx_societe_account ADD INDEX idx_societe_account_fk_soc (fk_soc);
|
||||
-- END MODULEBUILDER INDEXES
|
||||
|
||||
ALTER TABLE llx_website_account ADD UNIQUE INDEX uk_website_account_login_website_soc(login, fk_website, fk_soc);
|
||||
ALTER TABLE llx_societe_account ADD UNIQUE INDEX uk_societe_account_login_website_soc(entity, fk_soc, login, site, fk_website);
|
||||
ALTER TABLE llx_societe_account ADD UNIQUE INDEX uk_societe_account_key_account_soc(entity, fk_soc, key_account, site, fk_website);
|
||||
|
||||
ALTER TABLE llx_website_account ADD CONSTRAINT llx_website_account_fk_website FOREIGN KEY (fk_website) REFERENCES llx_website(rowid);
|
||||
ALTER TABLE llx_societe_account ADD CONSTRAINT llx_societe_account_fk_website FOREIGN KEY (fk_website) REFERENCES llx_website(rowid);
|
||||
ALTER TABLE llx_societe_account ADD CONSTRAINT llx_societe_account_fk_societe FOREIGN KEY (fk_soc) REFERENCES llx_societe(rowid);
|
||||
|
||||
@ -12,20 +12,24 @@
|
||||
--
|
||||
-- You should have received a copy of the GNU General Public License
|
||||
-- along with this program. If not, see http://www.gnu.org/licenses/.
|
||||
--
|
||||
-- Table to store accounts of thirdparties on websites
|
||||
|
||||
|
||||
CREATE TABLE llx_website_account(
|
||||
CREATE TABLE llx_societe_account(
|
||||
-- BEGIN MODULEBUILDER FIELDS
|
||||
rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL,
|
||||
login varchar(64) NOT NULL,
|
||||
pass_encoding varchar(24) NOT NULL,
|
||||
pass_crypted varchar(128),
|
||||
pass_temp varchar(128), -- temporary password when asked for forget password
|
||||
fk_soc integer,
|
||||
fk_website integer NOT NULL,
|
||||
rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL,
|
||||
entity integer DEFAULT 1,
|
||||
key_account varchar(128),
|
||||
login varchar(128) NOT NULL,
|
||||
pass_encoding varchar(24),
|
||||
pass_crypted varchar(128),
|
||||
pass_temp varchar(128), -- temporary password when asked for forget password
|
||||
fk_soc integer,
|
||||
site varchar(128), -- name of external web site
|
||||
fk_website integer, -- id of local web site
|
||||
note_private text,
|
||||
date_last_login datetime,
|
||||
date_previous_login datetime,
|
||||
date_last_login datetime,
|
||||
date_previous_login datetime,
|
||||
date_creation datetime NOT NULL,
|
||||
tms timestamp NOT NULL,
|
||||
fk_user_creat integer NOT NULL,
|
||||
@ -33,4 +37,4 @@ CREATE TABLE llx_website_account(
|
||||
import_key varchar(14),
|
||||
status integer
|
||||
-- END MODULEBUILDER FIELDS
|
||||
) ENGINE=innodb;
|
||||
) ENGINE=innodb;
|
||||
@ -23,7 +23,7 @@
|
||||
create table llx_societe_rib
|
||||
(
|
||||
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||
type varchar(32) DEFAULT 'ban', -- 'ban' or 'paypal' or 'card' or 'stripe'
|
||||
type varchar(32) DEFAULT 'ban' NOT NULL, -- 'ban' or 'paypal' or 'card' or 'stripe'
|
||||
label varchar(30),
|
||||
fk_soc integer NOT NULL,
|
||||
datec datetime,
|
||||
|
||||
@ -18,7 +18,7 @@ CREATE TABLE llx_ticketsup
|
||||
(
|
||||
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||
entity integer DEFAULT 1,
|
||||
ref varchar(128) NOT NULL,
|
||||
ref varchar(128) NOT NULL,
|
||||
track_id varchar(128) NOT NULL,
|
||||
fk_soc integer DEFAULT 0,
|
||||
fk_project integer DEFAULT 0,
|
||||
@ -37,5 +37,6 @@ CREATE TABLE llx_ticketsup
|
||||
datec datetime,
|
||||
date_read datetime,
|
||||
date_close datetime,
|
||||
notify_tiers_at_create tinyint,
|
||||
tms timestamp
|
||||
)ENGINE=innodb;
|
||||
|
||||
@ -1,23 +0,0 @@
|
||||
-- Copyright (C) 2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
--
|
||||
-- This program is free software; you can redistribute it and/or modify
|
||||
-- it under the terms of the GNU General Public License as published by
|
||||
-- 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_website_account_extrafields
|
||||
(
|
||||
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||
tms timestamp,
|
||||
fk_object integer NOT NULL,
|
||||
import_key varchar(14) -- import key
|
||||
) ENGINE=innodb;
|
||||
|
||||
@ -1,3 +0,0 @@
|
||||
Module62000Name=شروط التجارة الدولية
|
||||
Module62000Desc=إضافة ميزات لإدارة شروط التجارة الدولية
|
||||
IncotermLabel=شروط التجارة الدولية
|
||||
@ -1,3 +0,0 @@
|
||||
Module62000Name=Инкотерм
|
||||
Module62000Desc=Добяване на свойства за управление на Инкотерм
|
||||
IncotermLabel=Инкотермс
|
||||
@ -1,3 +0,0 @@
|
||||
Module62000Name=Incoterm
|
||||
Module62000Desc=Add features to manage Incoterm
|
||||
IncotermLabel=Incoterms
|
||||
@ -1,3 +0,0 @@
|
||||
Module62000Name=Incoterm
|
||||
Module62000Desc=Add features to manage Incoterm
|
||||
IncotermLabel=Incoterms
|
||||
@ -1,3 +0,0 @@
|
||||
Module62000Name=Incoterm
|
||||
Module62000Desc=Afegir funcions per gestionar Incoterm
|
||||
IncotermLabel=Incoterms
|
||||
@ -1,3 +0,0 @@
|
||||
Module62000Name=Incoterm
|
||||
Module62000Desc=Přidat funkce pro správu Incotermu
|
||||
IncotermLabel=Incoterms
|
||||
@ -1,3 +0,0 @@
|
||||
Module62000Name=Incoterm
|
||||
Module62000Desc=Add features to manage Incoterm
|
||||
IncotermLabel=Incoterms
|
||||
@ -1,3 +0,0 @@
|
||||
Module62000Name=Incoterm
|
||||
Module62000Desc=Funktion hinzufügen um Incoterms zu verwalten
|
||||
IncotermLabel=Incoterms
|
||||
@ -1,3 +0,0 @@
|
||||
Module62000Name=Διεθνείς Εμπορικός Όρος
|
||||
Module62000Desc=Προσθέστε δυνατότητες για τη διαχείριση του Διεθνή Εμπορικού Όρου
|
||||
IncotermLabel=Διεθνείς Εμπορικοί Όροι
|
||||
@ -621,6 +621,8 @@ Module59000Name=Margins
|
||||
Module59000Desc=Module to manage margins
|
||||
Module60000Name=Commissions
|
||||
Module60000Desc=Module to manage commissions
|
||||
Module62000Name=Incoterm
|
||||
Module62000Desc=Add features to manage Incoterm
|
||||
Module63000Name=Resources
|
||||
Module63000Desc=Manage resources (printers, cars, room, ...) you can then share into events
|
||||
Permission11=Read customer invoices
|
||||
|
||||
@ -528,3 +528,7 @@ BillCreated=%s bill(s) created
|
||||
StatusOfGeneratedDocuments=Status of document generation
|
||||
DoNotGenerateDoc=Do not generate document file
|
||||
AutogenerateDoc=Auto generate document file
|
||||
AutoFillDateFrom=Set start date for service line with invoice date
|
||||
AutoFillDateFromShort=Set start date
|
||||
AutoFillDateTo=Set end date for service line with next invoice date
|
||||
AutoFillDateToShort=Set end date
|
||||
|
||||
@ -16,7 +16,7 @@ MembersCategoriesArea=Members tags/categories area
|
||||
ContactsCategoriesArea=Contacts tags/categories area
|
||||
AccountsCategoriesArea=Accounts tags/categories area
|
||||
ProjectsCategoriesArea=Projects tags/categories area
|
||||
SubCats=Subcategories
|
||||
SubCats=Sub-categories
|
||||
CatList=List of tags/categories
|
||||
NewCategory=New tag/category
|
||||
ModifCat=Modify tag/category
|
||||
|
||||
@ -31,7 +31,7 @@ Credit=Credit
|
||||
Piece=Accounting Doc.
|
||||
AmountHTVATRealReceived=Net collected
|
||||
AmountHTVATRealPaid=Net paid
|
||||
VATToPay=VAT sells
|
||||
VATToPay=Tax sales
|
||||
VATReceived=Tax received
|
||||
VATToCollect=Tax purchases
|
||||
VATSummary=Tax Balance
|
||||
|
||||
@ -1,3 +0,0 @@
|
||||
Module62000Name=Incoterm
|
||||
Module62000Desc=Add features to manage Incoterm
|
||||
IncotermLabel=Incoterms
|
||||
@ -50,4 +50,6 @@ ConfigLoan=Configuration of the module loan
|
||||
LOAN_ACCOUNTING_ACCOUNT_CAPITAL=Accounting account capital by default
|
||||
LOAN_ACCOUNTING_ACCOUNT_INTEREST=Accounting account interest by default
|
||||
LOAN_ACCOUNTING_ACCOUNT_INSURANCE=Accounting account insurance by default
|
||||
CreateCalcSchedule=Créer / Modifier échéancier de pret
|
||||
FinancialCommitment=Financial commitment
|
||||
CreateCalcSchedule=Edit financial commitment
|
||||
InterestAmount=Interest amount
|
||||
|
||||
@ -864,6 +864,7 @@ Project=Project
|
||||
Projects=Projects
|
||||
Rights=Permissions
|
||||
LineNb=Line nb
|
||||
IncotermLabel=Incoterms
|
||||
# Week day
|
||||
Monday=Monday
|
||||
Tuesday=Tuesday
|
||||
@ -931,4 +932,7 @@ PayedBy=Payed by
|
||||
PayedTo=Payed to
|
||||
Monthly=Monthly
|
||||
Quarterly=Quarterly
|
||||
Annual=Annual
|
||||
Annual=Annual
|
||||
Local=Local
|
||||
Remote=Remote
|
||||
LocalAndRemote=Local and Remote
|
||||
@ -93,4 +93,5 @@ AddLanguageFile=Add language file
|
||||
YouCanUseTranslationKey=You can use here a key that is the translation key found into language file (see tab "Languages")
|
||||
DropTableIfEmpty=(Delete table if empty)
|
||||
TableDoesNotExists=The table %s does not exists
|
||||
TableDropped=Table %s deleted
|
||||
TableDropped=Table %s deleted
|
||||
InitStructureFromExistingTable=Build the structure array string of an existing table
|
||||
@ -49,4 +49,15 @@ OAUTH_STRIPE_LIVE_ID=Stripe Connect Client ID (ca_...)
|
||||
BankAccountForBankTransfer=Bank account for fund payouts
|
||||
StripeAccount=Stripe account
|
||||
StripeChargeList=List of Stripe charges
|
||||
StripeCustomer=Stripe customer id
|
||||
StripeCustomerId=Stripe customer id
|
||||
StripePaymentModes=Stripe payment modes
|
||||
LocalID=Local ID
|
||||
StripeID=Stripe ID
|
||||
NameOnCard=Name on card
|
||||
CardNumber=Card Number
|
||||
ExpiryDate=Expiry Date
|
||||
CVN=CVN
|
||||
DeleteACard=Delete Card record
|
||||
ConfirmDeleteCard=Are you sure you want to delete this Card record?
|
||||
CreateCustomerOnStripe=Create customer on Stripe
|
||||
CreateCardOnStripe=Create card on Stripe
|
||||
|
||||
@ -18,18 +18,18 @@
|
||||
# Generic
|
||||
#
|
||||
|
||||
Module110120Name = Tickets
|
||||
Module110120Desc = Ticket system for incident management
|
||||
Module56000Name=Tickets
|
||||
Module56000Desc=Ticket system for issue or request management
|
||||
|
||||
Permission110121=See tickets
|
||||
Permission110122=Modify tickets
|
||||
Permission110123=Delete tickets
|
||||
Permission110124=Manage tickets
|
||||
Permission110125=See tickets of all thirdparties (not effective for external users, always be limited to the thirdparty they depend on)
|
||||
Permission56001=See tickets
|
||||
Permission56002=Modify tickets
|
||||
Permission56003=Delete tickets
|
||||
Permission56004=Manage tickets
|
||||
Permission56005=See tickets of all thirdparties (not effective for external users, always be limited to the thirdparty they depend on)
|
||||
|
||||
TicketsupDictType=Tickets type
|
||||
TicketsupDictCategory=Tickets categories
|
||||
TicketsupDictSeverity=Severity classifications
|
||||
TicketsupDictSeverity=Tickets severity
|
||||
TicketTypeShortBUGSOFT=Dysfonctionnement logiciel
|
||||
TicketTypeShortBUGHARD=Dysfonctionnement matériel
|
||||
TicketTypeShortCOM=Commercial question
|
||||
@ -39,8 +39,8 @@ TicketTypeShortOTHER=Other
|
||||
|
||||
TicketSeverityShortLOW=Low
|
||||
TicketSeverityShortNORMAL=Normal
|
||||
TicketSeverityShortLOWHIGH=Important
|
||||
TicketSeverityShortHIGH=Critical
|
||||
TicketSeverityShortHIGH=High
|
||||
TicketSeverityShortBLOCKING=Critical/Blocking
|
||||
|
||||
ErrorBadEmailAddress=Field '%s' incorrect
|
||||
MenuTicketsupMyAssign=My tickets
|
||||
@ -70,22 +70,22 @@ Category=Category
|
||||
Severity=Severity
|
||||
|
||||
# Email templates
|
||||
MailToSendTicketsupMessage = To send email from ticket message
|
||||
MailToSendTicketsupMessage=To send email from ticket message
|
||||
|
||||
#
|
||||
# Admin page
|
||||
#
|
||||
TicketsupSetup = Ticket module setup
|
||||
TicketSupSettings = Settings
|
||||
TicketsupSetupPage =
|
||||
TicketsupPublicAccess = A public interface requiring no identification is available at the following url
|
||||
TicketsupSetupDictionaries = The type of application categories and severity level are configurable from dictionaries
|
||||
TicketsupSetup=Ticket module setup
|
||||
TicketSupSettings=Settings
|
||||
TicketsupSetupPage=
|
||||
TicketsupPublicAccess=A public interface requiring no identification is available at the following url
|
||||
TicketsupSetupDictionaries=The type of application categories and severity level are configurable from dictionaries
|
||||
TicketParamModule=Module variable setup
|
||||
TicketParamMail=Email setup
|
||||
TicketEmailNotificationFrom = Notification email from
|
||||
TicketEmailNotificationFromHelp = Used into ticket message answer by example
|
||||
TicketEmailNotificationTo = Notifications email to
|
||||
TicketEmailNotificationToHelp = Send email notifications to this address.
|
||||
TicketEmailNotificationFrom=Notification email from
|
||||
TicketEmailNotificationFromHelp=Used into ticket message answer by example
|
||||
TicketEmailNotificationTo=Notifications email to
|
||||
TicketEmailNotificationToHelp=Send email notifications to this address.
|
||||
TicketNewEmailBodyLabel=Text message sent after creating a ticket (public interface)
|
||||
TicketNewEmailBodyHelp=The text specified here will be inserted into the email confirming the creation of a new ticket from the public interface. Information on the consultation of the ticket are automatically added.
|
||||
TicketParamPublicInterface=Public interface setup
|
||||
@ -128,9 +128,9 @@ TicketNotNotifyTiersAtCreate=Do not notify the company to the creation
|
||||
#
|
||||
# About page
|
||||
#
|
||||
About = About
|
||||
TicketSupAbout = About ticket module
|
||||
TicketSupAboutModule = The development of this module has been initiated by the company Libr&thic.
|
||||
About=About
|
||||
TicketSupAbout=About ticket module
|
||||
TicketSupAboutModule=The development of this module has been initiated by the company Libr&thic.
|
||||
TicketSupAboutModuleHelp=You can get help by using the contact form on the website <a href="http://librethic.io">librethic.io</a>
|
||||
TicketSupAboutModuleImprove=Feel free to suggest improvements! Please visit <a href="https://code.librethic.io/Dolibarr/modules/ticketsup">the project page</a> on Doliforge website to report bugs and add tasks.
|
||||
TicketSupAboutModuleThanks=Thanks to <a href="http://sayatnowa.com">nwa</a> who creates icons for this module./
|
||||
@ -180,7 +180,7 @@ TicketMessageSuccessfullyAdded=Message successfully added
|
||||
TicketMessagesList=Message list
|
||||
NoMsgForThisTicket=No message for this ticket
|
||||
Properties=Classification
|
||||
LastNewTickets=Last %s tickets newest (not read)
|
||||
LatestNewTickets=Last %s tickets newest (not read)
|
||||
TicketSeverity=Severity
|
||||
ShowTicket=See ticket
|
||||
RelatedTickets=Related tickets
|
||||
@ -291,11 +291,11 @@ TicketNotificationNumberEmailSent=Notification email sent : %s
|
||||
#
|
||||
# Boxes
|
||||
#
|
||||
BoxLastTicketsup=Last tickets
|
||||
BoxLastTicketsupDescription=Last %s tickets saved
|
||||
BoxLastTicketsup=Latest created tickets
|
||||
BoxLastTicketsupDescription=Latest %s created tickets
|
||||
BoxLastTicketsupContent=
|
||||
BoxLastTicketsupNoRecordedTickets=No recent unread tickets
|
||||
BoxLastModifiedTicketsup=Last modified tickets
|
||||
BoxLastModifiedTicketsupDescription=Last %s tickets modified
|
||||
BoxLastModifiedTicketsup=Latest modified tickets
|
||||
BoxLastModifiedTicketsupDescription=Latest %s modified tickets
|
||||
BoxLastModifiedTicketsupContent=
|
||||
BoxLastModifiedTicketsupNoRecordedTickets=No recent modified tickets
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user