diff --git a/htdocs/adherents/class/adherentstats.class.php b/htdocs/adherents/class/adherentstats.class.php
index 72db71d07bd..ed2fa05cf51 100644
--- a/htdocs/adherents/class/adherentstats.class.php
+++ b/htdocs/adherents/class/adherentstats.class.php
@@ -171,4 +171,82 @@ class AdherentStats extends Stats
return $this->_getAllByYear($sql);
}
+
+
+
+ /**
+ * Return count of member by status group by adh type, total and average
+ *
+ * @param int $numberYears Years to scan
+ * @return array Array with total of draft, pending, uptodate, expired, resiliated for each member tag
+ */
+ public function countMembersByTagAndStatus($numberYears = 2)
+ {
+ global $user;
+
+ $now = dol_now();
+ $endYear = date('Y');
+ $startYear = $endYear - $numberYears;
+
+ $sql = "SELECT c.rowid as fk_categorie, c.label as label";
+ $sql .= ", COUNT(".$this->db->ifsql("d.statut = ".Adherent::STATUS_DRAFT, "'members_draft'", 'NULL').") as members_draft";
+ $sql .= ", COUNT(".$this->db->ifsql("d.statut = ".Adherent::STATUS_VALIDATED." AND (d.datefin IS NULL AND t.subscription = '1')", "'members_pending'", 'NULL').") as members_pending";
+ $sql .= ", COUNT(".$this->db->ifsql("d.statut = ".Adherent::STATUS_VALIDATED." AND (d.datefin >= '".$this->db->idate($now)."' OR t.subscription = 0)", "'members_uptodate'", 'NULL').") as members_uptodate";
+ $sql .= ", COUNT(".$this->db->ifsql("d.statut = ".Adherent::STATUS_VALIDATED." AND (d.datefin < '".$this->db->idate($now)."' AND t.subscription = 1)", "'members_expired'", 'NULL').") as members_expired";
+ $sql .= ", COUNT(".$this->db->ifsql("d.statut = ".Adherent::STATUS_EXCLUDED, "'members_excluded'", 'NULL').") as members_excluded";
+ $sql .= ", COUNT(".$this->db->ifsql("d.statut = ".Adherent::STATUS_RESILIATED, "'members_resiliated'", 'NULL').") as members_resiliated";
+ $sql .= " FROM ".MAIN_DB_PREFIX."categorie as c";
+ $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."categorie_member as ct ON c.rowid = ct.fk_categorie";
+ $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."adherent as d ON d.rowid = ct.fk_member";
+ $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."adherent_type as t ON t.rowid = d.fk_adherent_type";
+ $sql .= " WHERE c.entity IN (".getEntity('member_type').")";
+ $sql .= " AND d.entity IN (" . getEntity('adherent') . ")";
+ $sql .= " AND t.entity IN (" . getEntity('adherent') . ")";
+ $sql .= " AND d.datefin > '".$this->db->idate(dol_get_first_day($startYear))."'";
+ $sql .= " AND c.fk_parent = 0";
+ $sql .= " GROUP BY c.rowid";
+
+ dol_syslog("box_members_by_type::select nb of members per type", LOG_DEBUG);
+ $result = $this->db->query($sql);
+
+ if ($result) {
+ $num = $this->db->num_rows($result);
+ $i = 0;
+ $MembersCountArray = [];
+ $totalstatus = array(
+ 'label' => 'Total',
+ 'members_draft' => 0,
+ 'members_pending' => 0,
+ 'members_uptodate' => 0,
+ 'members_expired' => 0,
+ 'members_excluded' => 0,
+ 'members_resiliated' => 0
+ );
+ while ($i < $num) {
+ $objp = $this->db->fetch_object($result);
+ $MembersCountArray[$objp->fk_categorie] = array(
+ 'label' => $objp->label,
+ 'members_draft' => (int) $objp->members_draft,
+ 'members_pending' => (int) $objp->members_pending,
+ 'members_uptodate' => (int) $objp->members_uptodate,
+ 'members_expired' => (int) $objp->members_expired,
+ 'members_excluded' => (int) $objp->members_excluded,
+ 'members_resiliated' => (int) $objp->members_resiliated
+ );
+ $totalrow = 0;
+ foreach ($MembersCountArray[$objp->fk_categorie] as $key=>$nb) {
+ if ($key!='label') {
+ $totalrow += $nb;
+ $totalstatus[$key] += $nb;
+ }
+ }
+ $MembersCountArray[$objp->fk_categorie]['total_adhtype'] = $totalrow;
+ $i++;
+ }
+ $this->db->free($result);
+ $MembersCountArray['total'] = $totalstatus;
+ $MembersCountArray['total']['all'] = array_sum($totalstatus);
+ }
+ return $MembersCountArray;
+ }
}
diff --git a/htdocs/adherents/list.php b/htdocs/adherents/list.php
index d06d91cbea6..2e04aba9167 100644
--- a/htdocs/adherents/list.php
+++ b/htdocs/adherents/list.php
@@ -30,9 +30,9 @@
// Load Dolibarr environment
require '../main.inc.php';
-require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent_type.class.php';
+require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
@@ -41,47 +41,51 @@ $langs->loadLangs(array("members", "companies"));
// Get parameters
-$action = GETPOST('action', 'aZ09');
+$action = GETPOST('action', 'aZ09');
$massaction = GETPOST('massaction', 'alpha');
$show_files = GETPOST('show_files', 'int');
-$confirm = GETPOST('confirm', 'alpha');
-$toselect = GETPOST('toselect', 'array');
+$confirm = GETPOST('confirm', 'alpha');
+$cancel = GETPOST('cancel', 'alpha');
+$toselect = GETPOST('toselect', 'array');
$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'memberslist'; // To manage different context of search
-$mode = GETPOST('mode', 'alpha');
-
+$backtopage = GETPOST('backtopage', 'alpha');
+$optioncss = GETPOST('optioncss', 'aZ');
+$mode = GETPOST('mode', 'alpha');
// Search fields
-$search = GETPOST("search", 'alpha');
-$search_ref = GETPOST("search_ref", 'alpha');
-$search_lastname = GETPOST("search_lastname", 'alpha');
-$search_firstname = GETPOST("search_firstname", 'alpha');
-$search_gender = GETPOST("search_gender", 'alpha');
-$search_civility = GETPOST("search_civility", 'alpha');
-$search_company = GETPOST('search_company', 'alphanohtml');
-$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 = GETPOST("search", 'alpha');
+$search_ref = GETPOST("search_ref", 'alpha');
+$search_lastname = GETPOST("search_lastname", 'alpha');
+$search_firstname = GETPOST("search_firstname", 'alpha');
+$search_gender = GETPOST("search_gender", 'alpha');
+$search_civility = GETPOST("search_civility", 'alpha');
+$search_company = GETPOST('search_company', 'alphanohtml');
+$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'); // county / departement / federal state
+$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');
-$search_filter = GETPOST("search_filter", 'alpha');
-$search_status = GETPOST("search_status", 'intcomma');
-$search_morphy = GETPOST("search_morphy", 'alpha');
+$search_type = GETPOST("search_type", 'alpha');
+$search_email = GETPOST("search_email", 'alpha');
+$search_categ = GETPOST("search_categ", 'int');
+$search_morphy = GETPOST("search_morphy", 'alpha');
$search_import_key = trim(GETPOST("search_import_key", 'alpha'));
-$catid = GETPOST("catid", 'int');
-$optioncss = GETPOST('optioncss', 'alpha');
-$socid = GETPOST('socid', 'int');
+
+$catid = GETPOST("catid", 'int');
+$socid = GETPOST('socid', 'int');
+
+$search_filter = GETPOST("search_filter", 'alpha');
+$search_status = GETPOST("search_status", 'intcomma'); // statut
$filter = GETPOST("filter", 'alpha');
if ($filter) {
$search_filter = $filter; // For backward compatibility
}
+
$statut = GETPOST("statut", 'alpha');
if ($statut != '') {
$search_status = $statut; // For backward compatibility
@@ -93,6 +97,7 @@ if ($search_status < -2) {
$search_status = '';
}
+// Pagination parameters
$limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit;
$sortfield = GETPOST('sortfield', 'aZ09comma');
$sortorder = GETPOST('sortorder', 'aZ09comma');
diff --git a/htdocs/admin/commande.php b/htdocs/admin/commande.php
index 79c42f6e2db..b366ea928ef 100644
--- a/htdocs/admin/commande.php
+++ b/htdocs/admin/commande.php
@@ -117,7 +117,7 @@ if ($action == 'updateMask') {
} elseif ($action == 'del') {
$ret = delDocumentModel($value, $type);
if ($ret > 0) {
- if ($conf->global->COMMANDE_ADDON_PDF == "$value") {
+ if (getDolGlobalString('COMMANDE_ADDON_PDF') == $value) {
dolibarr_del_const($db, 'COMMANDE_ADDON_PDF', $conf->entity);
}
}
@@ -461,7 +461,7 @@ foreach ($dirmodels as $reldir) {
// Default
print '
';
- if ($conf->global->COMMANDE_ADDON_PDF == $name) {
+ if (getDolGlobalString('COMMANDE_ADDON_PDF') == $name) {
print img_picto($langs->trans("Default"), 'on');
} else {
print 'scandir).'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').'';
diff --git a/htdocs/bookmarks/list.php b/htdocs/bookmarks/list.php
index 2adef615a70..3eae08bb60a 100644
--- a/htdocs/bookmarks/list.php
+++ b/htdocs/bookmarks/list.php
@@ -29,15 +29,18 @@ require_once DOL_DOCUMENT_ROOT.'/bookmarks/class/bookmark.class.php';
$langs->loadLangs(array('bookmarks', 'admin'));
// Get Parameters
-$action = GETPOST('action', 'aZ09');
+$id = GETPOST("id", 'int');
+
+$action = GETPOST('action', 'aZ09');
$massaction = GETPOST('massaction', 'alpha');
$show_files = GETPOST('show_files', 'int');
-$confirm = GETPOST('confirm', 'alpha');
-$toselect = GETPOST('toselect', 'array');
+$confirm = GETPOST('confirm', 'alpha');
+$cancel = GETPOST('cancel', 'alpha');
+$toselect = GETPOST('toselect', 'array');
$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'bookmarklist'; // To manage different context of search
-$id = GETPOST("id", 'int');
-$optioncss = GETPOST('optioncss', 'alpha');
-$mode = GETPOST('mode', 'aZ09');
+$backtopage = GETPOST('backtopage', 'alpha');
+$optioncss = GETPOST('optioncss', 'alpha');
+$mode = GETPOST('mode', 'aZ09');
// Load variable for pagination
$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
diff --git a/htdocs/comm/action/list.php b/htdocs/comm/action/list.php
index 8807ccd4764..a0176ca18b0 100644
--- a/htdocs/comm/action/list.php
+++ b/htdocs/comm/action/list.php
@@ -33,18 +33,22 @@ require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/agenda.lib.php';
-include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
+include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php';
+
// Load translation files required by the page
$langs->loadLangs(array("users", "companies", "agenda", "commercial", "other", "orders", "bills"));
-$action = GETPOST('action', 'aZ09');
+// Get Parameters
+$action = GETPOST('action', 'aZ09');
$massaction = GETPOST('massaction', 'alpha');
+$confirm = GETPOST('confirm', 'alpha');
+$cancel = GETPOST('cancel', 'alpha');
+$toselect = GETPOST('toselect', 'array');
$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'actioncommlist'; // To manage different context of search
-$optioncss = GETPOST('optioncss', 'alpha');
-$toselect = GETPOST('toselect', 'array');
-$confirm = GETPOST('confirm', 'alpha');
+$optioncss = GETPOST('optioncss', 'alpha');
+
$disabledefaultvalues = GETPOST('disabledefaultvalues', 'int');
@@ -70,6 +74,7 @@ if (GETPOST('search_actioncode', 'array')) {
$actioncode = GETPOST("search_actioncode", "alpha", 3) ?GETPOST("search_actioncode", "alpha", 3) : (GETPOST("search_actioncode") == '0' ? '0' : ((empty($conf->global->AGENDA_DEFAULT_FILTER_TYPE) || $disabledefaultvalues) ? '' : $conf->global->AGENDA_DEFAULT_FILTER_TYPE));
}
+// Search Fields
$search_id = GETPOST('search_id', 'alpha');
$search_title = GETPOST('search_title', 'alpha');
$search_note = GETPOST('search_note', 'alpha');
@@ -106,6 +111,7 @@ if (empty($filtert) && empty($conf->global->AGENDA_ALL_CALENDARS)) {
$filtert = $user->id;
}
+// Pagination parameters
$limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit;
$sortfield = GETPOST('sortfield', 'aZ09comma');
$sortorder = GETPOST('sortorder', 'aZ09comma');
diff --git a/htdocs/comm/card.php b/htdocs/comm/card.php
index e6162b45b52..9c848883332 100644
--- a/htdocs/comm/card.php
+++ b/htdocs/comm/card.php
@@ -1419,7 +1419,7 @@ if ($object->id > 0) {
$sql .= ', f.total_tva';
$sql .= ', f.total_ttc';
$sql .= ', f.entity';
- $sql .= ', f.datef as df, f.datec as dc, f.paye as paye, f.fk_statut as status';
+ $sql .= ', f.datef as df, f.date_lim_reglement as dl, f.datec as dc, f.paye as paye, f.fk_statut as status';
$sql .= ', s.nom, s.rowid as socid';
$sql .= ', SUM(pf.amount) as am';
$sql .= " FROM ".MAIN_DB_PREFIX."societe as s,".MAIN_DB_PREFIX."facture as f";
@@ -1493,7 +1493,12 @@ if ($object->id > 0) {
//print $formfile->getDocumentsLink($facturestatic->element, $filename, $filedir);
print ' | ';
if ($objp->df > 0) {
- print ''.dol_print_date($db->jdate($objp->df), 'day').' | ';
+ print ''.$langs->trans('DateInvoice').": ".dol_print_date($db->jdate($objp->df), 'day').' | ';
+ } else {
+ print '!!! | ';
+ }
+ if ($objp->dl > 0) {
+ print ''.$langs->trans('DateMaxPayment').": ".dol_print_date($db->jdate($objp->dl), 'day').' | ';
} else {
print '!!! | ';
}
diff --git a/htdocs/comm/mailing/list.php b/htdocs/comm/mailing/list.php
index 6916a2dfe5d..501de4c11cf 100644
--- a/htdocs/comm/mailing/list.php
+++ b/htdocs/comm/mailing/list.php
@@ -27,20 +27,24 @@ require '../../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/comm/mailing/class/mailing.class.php';
// Load translation files required by the page
-$langs->load("mails");
+$langs->load('mails');
-$sortfield = GETPOST('sortfield', 'aZ09comma');
-$sortorder = GETPOST('sortorder', 'aZ09comma');
-$limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit;
-$optioncss = GETPOST('optioncss', 'alpha');
+// Get Parameters
$massaction = GETPOST('massaction', 'alpha');
-$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
+$optioncss = GETPOST('optioncss', 'alpha');
+
+// Pagination
+$limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit;
+$sortfield = GETPOST('sortfield', 'aZ09comma');
+$sortorder = GETPOST('sortorder', 'aZ09comma');
+$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
if (empty($page) || $page == -1 || GETPOST('button_search', 'alpha') || GETPOST('button_removefilter', 'alpha') || (empty($toselect) && $massaction === '0')) {
$page = 0;
} // If $page is not defined, or '' or -1 or if we click on clear filters or if we select empty mass action
$offset = $limit * $page;
$pageprev = $page - 1;
$pagenext = $page + 1;
+
if (!$sortorder) {
$sortorder = "DESC";
}
@@ -48,10 +52,12 @@ if (!$sortfield) {
$sortfield = "m.date_creat";
}
+// Search Fields
$search_all = trim((GETPOST('search_all', 'alphanohtml') != '') ?GETPOST('search_all', 'alphanohtml') : GETPOST('sall', 'alphanohtml'));
$search_ref = GETPOST("search_ref", "alpha") ? GETPOST("search_ref", "alpha") : GETPOST("sref", "alpha");
$filteremail = GETPOST('filteremail', 'alpha');
+// Initialize objects
$object = new Mailing($db);
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
@@ -128,7 +134,9 @@ if (empty($reshook)) {
* View
*/
-llxHeader('', $langs->trans("Mailing"), 'EN:Module_EMailing|FR:Module_Mailing|ES:Módulo_Mailing');
+// Page Header
+$help_url = 'EN:Module_EMailing|FR:Module_Mailing|ES:Módulo_Mailing';
+llxHeader('', $langs->trans("Mailing"), $help_url);
$form = new Form($db);
diff --git a/htdocs/comm/propal/list.php b/htdocs/comm/propal/list.php
index cc5872abb25..cc507041ac6 100644
--- a/htdocs/comm/propal/list.php
+++ b/htdocs/comm/propal/list.php
@@ -62,21 +62,23 @@ if (isModEnabled("expedition")) {
$langs->loadLangs(array('sendings'));
}
+// Get Parameters
$socid = GETPOST('socid', 'int');
-$action = GETPOST('action', 'aZ09');
+$action = GETPOST('action', 'aZ09');
$massaction = GETPOST('massaction', 'alpha');
$show_files = GETPOST('show_files', 'int');
-$confirm = GETPOST('confirm', 'alpha');
-$toselect = GETPOST('toselect', 'array');
+$confirm = GETPOST('confirm', 'alpha');
+$cancel = GETPOST('cancel', 'alpha');
+$toselect = GETPOST('toselect', 'array');
$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'proposallist';
-$mode = GETPOST('mode', 'alpha');
+$mode = GETPOST('mode', 'alpha');
-$search_user = GETPOST('search_user', 'int');
-$search_sale = GETPOST('search_sale', 'int');
-$search_ref = GETPOST('sf_ref') ?GETPOST('sf_ref', 'alpha') : GETPOST('search_ref', 'alpha');
+// Search Fields
+$search_user = GETPOST('search_user', 'int');
+$search_sale = GETPOST('search_sale', 'int');
+$search_ref = GETPOST('sf_ref') ?GETPOST('sf_ref', 'alpha') : GETPOST('search_ref', 'alpha');
$search_refcustomer = GETPOST('search_refcustomer', 'alpha');
-
$search_refproject = GETPOST('search_refproject', 'alpha');
$search_project = GETPOST('search_project', 'alpha');
@@ -140,15 +142,15 @@ $search_date_signature_endyear = GETPOST('search_date_signature_endyear', 'int')
$search_date_signature_start = dol_mktime(0, 0, 0, $search_date_signature_startmonth, $search_date_signature_startday, $search_date_signature_startyear);
$search_date_signature_end = dol_mktime(23, 59, 59, $search_date_signature_endmonth, $search_date_signature_endday, $search_date_signature_endyear);
-
$search_status = GETPOST('search_status', 'alpha');
+
$optioncss = GETPOST('optioncss', 'alpha');
$object_statut = GETPOST('search_statut', 'alpha');
$sall = trim((GETPOST('search_all', 'alphanohtml') != '') ?GETPOST('search_all', 'alphanohtml') : GETPOST('sall', 'alphanohtml'));
$mesg = (GETPOST("msg") ? GETPOST("msg") : GETPOST("mesg"));
-
+// Pagination
$limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit;
$sortfield = GETPOST('sortfield', 'aZ09comma');
$sortorder = GETPOST('sortorder', 'aZ09comma');
@@ -263,6 +265,7 @@ foreach ($object->fields as $key => $val) {
$fieldstosearchall['t.'.$key] = $val['label'];
}
}*/
+
// Definition of array of fields for columns
/*$arrayfields = array();
foreach ($object->fields as $key => $val) {
@@ -278,9 +281,11 @@ foreach ($object->fields as $key => $val) {
);
}
}*/
+
// Extra fields
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_array_fields.tpl.php';
+// Permissions
$permissiontoread = $user->rights->propal->lire;
$permissiontoadd = $user->rights->propal->creer;
$permissiontodelete = $user->rights->propal->supprimer;
diff --git a/htdocs/commande/list_det.php b/htdocs/commande/list_det.php
index 2ef2d429900..d5b0336b95a 100644
--- a/htdocs/commande/list_det.php
+++ b/htdocs/commande/list_det.php
@@ -137,10 +137,10 @@ $offset = $limit * $page;
$pageprev = $page - 1;
$pagenext = $page + 1;
if (!$sortfield) {
- $sortfield = 'c.ref';
+ $sortfield = 'pr.ref';
}
if (!$sortorder) {
- $sortorder = 'DESC';
+ $sortorder = 'ASC';
}
$show_shippable_command = GETPOST('show_shippable_command', 'aZ09');
diff --git a/htdocs/compta/localtax/card.php b/htdocs/compta/localtax/card.php
index 8b6119db13a..ad80b6d1b6d 100644
--- a/htdocs/compta/localtax/card.php
+++ b/htdocs/compta/localtax/card.php
@@ -144,9 +144,12 @@ $form = new Form($db);
$title = $langs->trans("LT".$object->ltt)." - ".$langs->trans("Card");
$help_url = '';
-llxHeader('', $title, $helpurl);
+llxHeader('', $title, $help_url);
if ($action == 'create') {
+ $datev = dol_mktime(12, 0, 0, GETPOST("datevmonth"), GETPOST("datevday"), GETPOST("datevyear"));
+ $datep = dol_mktime(12, 0, 0, GETPOST("datepmonth"), GETPOST("datepday"), GETPOST("datepyear"));
+
print load_fiche_titre($langs->transcountry($lttype == 2 ? "newLT2Payment" : "newLT1Payment", $mysoc->country_code));
print '