Merge branch '14.0' into 14p16
This commit is contained in:
commit
4e212054a4
@ -591,7 +591,7 @@ if ($action == 'export_fileconfirm' && $user->rights->accounting->mouvements->ex
|
|||||||
|
|
||||||
if (!empty($accountancyexport->errors)) {
|
if (!empty($accountancyexport->errors)) {
|
||||||
setEventMessages('', $accountancyexport->errors, 'errors');
|
setEventMessages('', $accountancyexport->errors, 'errors');
|
||||||
} elseif (!$notifiedexportdate || !$notifiedvalidationdate) {
|
} elseif (!empty($notifiedexportdate) || !empty($notifiedvalidationdate)) {
|
||||||
// Specify as export : update field date_export or date_validated
|
// Specify as export : update field date_export or date_validated
|
||||||
$error = 0;
|
$error = 0;
|
||||||
$db->begin();
|
$db->begin();
|
||||||
@ -602,17 +602,17 @@ if ($action == 'export_fileconfirm' && $user->rights->accounting->mouvements->ex
|
|||||||
|
|
||||||
$sql = " UPDATE ".MAIN_DB_PREFIX."accounting_bookkeeping";
|
$sql = " UPDATE ".MAIN_DB_PREFIX."accounting_bookkeeping";
|
||||||
$sql .= " SET";
|
$sql .= " SET";
|
||||||
if (!$notifiedexportdate && !$notifiedvalidationdate) {
|
if (!empty($notifiedexportdate) && !empty($notifiedvalidationdate)) {
|
||||||
$sql .= " date_export = '".$db->idate($now)."'";
|
$sql .= " date_export = '".$db->idate($now)."'";
|
||||||
$sql .= ", date_validated = '".$db->idate($now)."'";
|
$sql .= ", date_validated = '".$db->idate($now)."'";
|
||||||
} elseif (!$notifiedexportdate) {
|
} elseif (!empty($notifiedexportdate)) {
|
||||||
$sql .= " date_export = '".$db->idate($now)."'";
|
$sql .= " date_export = '".$db->idate($now)."'";
|
||||||
} elseif (!$notifiedvalidationdate) {
|
} elseif (!empty($notifiedvalidationdate)) {
|
||||||
$sql .= " date_validated = '".$db->idate($now)."'";
|
$sql .= " date_validated = '".$db->idate($now)."'";
|
||||||
}
|
}
|
||||||
$sql .= " WHERE rowid = ".((int) $movement->id);
|
$sql .= " WHERE rowid = ".((int) $movement->id);
|
||||||
|
|
||||||
dol_syslog("/accountancy/bookeeping/list.php Function export_file Specify movements as exported sql=".$sql, LOG_DEBUG);
|
dol_syslog("/accountancy/bookkeeping/list.php Function export_file Specify movements as exported sql=".$sql, LOG_DEBUG);
|
||||||
$result = $db->query($sql);
|
$result = $db->query($sql);
|
||||||
if (!$result) {
|
if (!$result) {
|
||||||
$error++;
|
$error++;
|
||||||
|
|||||||
@ -471,7 +471,7 @@ $sql .= ' p.datec as date_creation, p.tms as date_update, p.date_cloture as date
|
|||||||
$sql .= ' p.note_public, p.note_private,';
|
$sql .= ' p.note_public, p.note_private,';
|
||||||
$sql .= ' p.fk_cond_reglement,p.fk_mode_reglement,p.fk_shipping_method,p.fk_input_reason,';
|
$sql .= ' p.fk_cond_reglement,p.fk_mode_reglement,p.fk_shipping_method,p.fk_input_reason,';
|
||||||
$sql .= " pr.rowid as project_id, pr.ref as project_ref, pr.title as project_label,";
|
$sql .= " pr.rowid as project_id, pr.ref as project_ref, pr.title as project_label,";
|
||||||
$sql .= ' u.login, u.lastname, u.firstname, u.email, u.statut, u.entity as user_entity, u.photo, u.office_phone, u.office_fax, u.user_mobile, u.job, u.gender';
|
$sql .= ' u.login, u.lastname, u.firstname, u.email as user_email, u.statut as user_statut, u.entity as user_entity, u.photo, u.office_phone, u.office_fax, u.user_mobile, u.job, u.gender';
|
||||||
if (!$user->rights->societe->client->voir && !$socid) {
|
if (!$user->rights->societe->client->voir && !$socid) {
|
||||||
$sql .= ", sc.fk_soc, sc.fk_user";
|
$sql .= ", sc.fk_soc, sc.fk_user";
|
||||||
}
|
}
|
||||||
@ -1708,8 +1708,8 @@ if ($resql) {
|
|||||||
$userstatic->login = $obj->login;
|
$userstatic->login = $obj->login;
|
||||||
$userstatic->lastname = $obj->lastname;
|
$userstatic->lastname = $obj->lastname;
|
||||||
$userstatic->firstname = $obj->firstname;
|
$userstatic->firstname = $obj->firstname;
|
||||||
$userstatic->email = $obj->email;
|
$userstatic->email = $obj->user_email;
|
||||||
$userstatic->statut = $obj->statut;
|
$userstatic->statut = $obj->user_statut;
|
||||||
$userstatic->entity = $obj->user_entity;
|
$userstatic->entity = $obj->user_entity;
|
||||||
$userstatic->photo = $obj->photo;
|
$userstatic->photo = $obj->photo;
|
||||||
$userstatic->office_phone = $obj->office_phone;
|
$userstatic->office_phone = $obj->office_phone;
|
||||||
|
|||||||
@ -426,7 +426,7 @@ $sql .= ' c.fk_multicurrency, c.multicurrency_code, c.multicurrency_tx, c.multic
|
|||||||
$sql .= ' c.date_valid, c.date_commande, c.note_public, c.note_private, c.date_livraison as date_delivery, c.fk_statut, c.facture as billed,';
|
$sql .= ' c.date_valid, c.date_commande, c.note_public, c.note_private, c.date_livraison as date_delivery, c.fk_statut, c.facture as billed,';
|
||||||
$sql .= ' c.date_creation as date_creation, c.tms as date_update, c.date_cloture as date_cloture,';
|
$sql .= ' c.date_creation as date_creation, c.tms as date_update, c.date_cloture as date_cloture,';
|
||||||
$sql .= ' p.rowid as project_id, p.ref as project_ref, p.title as project_label,';
|
$sql .= ' p.rowid as project_id, p.ref as project_ref, p.title as project_label,';
|
||||||
$sql .= ' u.login, u.lastname, u.firstname, u.email, u.statut, u.entity, u.photo, u.office_phone, u.office_fax, u.user_mobile, u.job, u.gender,';
|
$sql .= ' u.login, u.lastname, u.firstname, u.email as user_email, u.statut as user_statut, u.entity, u.photo, u.office_phone, u.office_fax, u.user_mobile, u.job, u.gender,';
|
||||||
$sql .= ' c.fk_cond_reglement,c.fk_mode_reglement,c.fk_shipping_method,';
|
$sql .= ' c.fk_cond_reglement,c.fk_mode_reglement,c.fk_shipping_method,';
|
||||||
$sql .= ' c.fk_input_reason';
|
$sql .= ' c.fk_input_reason';
|
||||||
if (($search_categ_cus > 0) || ($search_categ_cus == -2)) {
|
if (($search_categ_cus > 0) || ($search_categ_cus == -2)) {
|
||||||
@ -1682,8 +1682,8 @@ if ($resql) {
|
|||||||
$userstatic->login = $obj->login;
|
$userstatic->login = $obj->login;
|
||||||
$userstatic->lastname = $obj->lastname;
|
$userstatic->lastname = $obj->lastname;
|
||||||
$userstatic->firstname = $obj->firstname;
|
$userstatic->firstname = $obj->firstname;
|
||||||
$userstatic->email = $obj->email;
|
$userstatic->email = $obj->user_email;
|
||||||
$userstatic->statut = $obj->statut;
|
$userstatic->statut = $obj->user_statut;
|
||||||
$userstatic->entity = $obj->entity;
|
$userstatic->entity = $obj->entity;
|
||||||
$userstatic->photo = $obj->photo;
|
$userstatic->photo = $obj->photo;
|
||||||
$userstatic->office_phone = $obj->office_phone;
|
$userstatic->office_phone = $obj->office_phone;
|
||||||
|
|||||||
@ -497,7 +497,7 @@ $sql .= ' typent.code as typent_code,';
|
|||||||
$sql .= ' state.code_departement as state_code, state.nom as state_name,';
|
$sql .= ' state.code_departement as state_code, state.nom as state_name,';
|
||||||
$sql .= ' country.code as country_code,';
|
$sql .= ' country.code as country_code,';
|
||||||
$sql .= ' p.rowid as project_id, p.ref as project_ref, p.title as project_label,';
|
$sql .= ' p.rowid as project_id, p.ref as project_ref, p.title as project_label,';
|
||||||
$sql .= ' u.login, u.lastname, u.firstname, u.email, u.statut, u.entity, u.photo, u.office_phone, u.office_fax, u.user_mobile, u.job, u.gender';
|
$sql .= ' u.login, u.lastname, u.firstname, u.email as user_email, u.statut as user_statut, u.entity, u.photo, u.office_phone, u.office_fax, u.user_mobile, u.job, u.gender';
|
||||||
// We need dynamount_payed to be able to sort on status (value is surely wrong because we can count several lines several times due to other left join or link with contacts. But what we need is just 0 or > 0)
|
// We need dynamount_payed to be able to sort on status (value is surely wrong because we can count several lines several times due to other left join or link with contacts. But what we need is just 0 or > 0)
|
||||||
// TODO Better solution to be able to sort on already payed or remain to pay is to store amount_payed in a denormalized field.
|
// TODO Better solution to be able to sort on already payed or remain to pay is to store amount_payed in a denormalized field.
|
||||||
if (!$sall) {
|
if (!$sall) {
|
||||||
@ -1915,8 +1915,8 @@ if ($resql) {
|
|||||||
$userstatic->login = $obj->login;
|
$userstatic->login = $obj->login;
|
||||||
$userstatic->lastname = $obj->lastname;
|
$userstatic->lastname = $obj->lastname;
|
||||||
$userstatic->firstname = $obj->firstname;
|
$userstatic->firstname = $obj->firstname;
|
||||||
$userstatic->email = $obj->email;
|
$userstatic->email = $obj->user_email;
|
||||||
$userstatic->statut = $obj->statut;
|
$userstatic->statut = $obj->user_statut;
|
||||||
$userstatic->entity = $obj->entity;
|
$userstatic->entity = $obj->entity;
|
||||||
$userstatic->photo = $obj->photo;
|
$userstatic->photo = $obj->photo;
|
||||||
$userstatic->office_phone = $obj->office_phone;
|
$userstatic->office_phone = $obj->office_phone;
|
||||||
|
|||||||
@ -99,6 +99,8 @@ if (GETPOST('roworder', 'alpha', 3) && GETPOST('table_element_line', 'aZ09', 3)
|
|||||||
$perm = 1;
|
$perm = 1;
|
||||||
} elseif ($table_element_line == 'ecm_files' && $fk_element == 'fk_ticket' && !empty($user->rights->ticket->write)) {
|
} elseif ($table_element_line == 'ecm_files' && $fk_element == 'fk_ticket' && !empty($user->rights->ticket->write)) {
|
||||||
$perm = 1;
|
$perm = 1;
|
||||||
|
} elseif ($table_element_line == 'projet_task' && $fk_element == 'fk_projet' && $user->rights->projet->creer) {
|
||||||
|
$perm = 1;
|
||||||
} else {
|
} else {
|
||||||
$tmparray = explode('_', $table_element_line);
|
$tmparray = explode('_', $table_element_line);
|
||||||
$tmpmodule = $tmparray[0]; $tmpobject = preg_replace('/line$/', '', $tmparray[1]);
|
$tmpmodule = $tmparray[0]; $tmpobject = preg_replace('/line$/', '', $tmparray[1]);
|
||||||
@ -111,7 +113,7 @@ if (GETPOST('roworder', 'alpha', 3) && GETPOST('table_element_line', 'aZ09', 3)
|
|||||||
// We should not be here. If we are not allowed to reorder rows, feature should not be visible on script.
|
// We should not be here. If we are not allowed to reorder rows, feature should not be visible on script.
|
||||||
// If we are here, it is a hack attempt, so we report a warning.
|
// If we are here, it is a hack attempt, so we report a warning.
|
||||||
print 'Bad permission to modify position of lines for object in table '.$table_element_line;
|
print 'Bad permission to modify position of lines for object in table '.$table_element_line;
|
||||||
dol_syslog('Bad permission to modify position of lines for object in table '.$table_element_line.', fk_element '.$fk_element, LOG_WARNING);
|
dol_syslog('Bad permission to modify position of lines for object in table='.$table_element_line.', fk_element='.$fk_element, LOG_WARNING);
|
||||||
accessforbidden('Bad permission to modify position of lines for object in table '.$table_element_line);
|
accessforbidden('Bad permission to modify position of lines for object in table '.$table_element_line);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -977,6 +977,7 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Computed progress
|
||||||
if (count($arrayfields) > 0 && !empty($arrayfields['t.progress_calculated']['checked'])) {
|
if (count($arrayfields) > 0 && !empty($arrayfields['t.progress_calculated']['checked'])) {
|
||||||
print '<td class="nowrap liste_total right">';
|
print '<td class="nowrap liste_total right">';
|
||||||
if ($total_projectlinesa_planned) {
|
if ($total_projectlinesa_planned) {
|
||||||
@ -984,6 +985,8 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t
|
|||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Declared progress
|
||||||
if (count($arrayfields) > 0 && !empty($arrayfields['t.progress']['checked'])) {
|
if (count($arrayfields) > 0 && !empty($arrayfields['t.progress']['checked'])) {
|
||||||
print '<td class="nowrap liste_total right">';
|
print '<td class="nowrap liste_total right">';
|
||||||
if ($total_projectlinesa_planned) {
|
if ($total_projectlinesa_planned) {
|
||||||
|
|||||||
@ -101,8 +101,11 @@ class InterfaceEventOrganization extends DolibarrTriggers
|
|||||||
$defaultref = '';
|
$defaultref = '';
|
||||||
}
|
}
|
||||||
$task->ref = $defaultref;
|
$task->ref = $defaultref;
|
||||||
$task->date_start = $object->date_start;
|
|
||||||
$task->date_end = $object->date_end;
|
// TODO Can set offset for start date or endline from setup of task to create when creating event
|
||||||
|
$task->date_start = null;
|
||||||
|
$task->date_end = null;
|
||||||
|
|
||||||
$result = $task->create($user);
|
$result = $task->create($user);
|
||||||
if ($result < 0) {
|
if ($result < 0) {
|
||||||
$this->errors=array_merge($this->errors, $task->errors);
|
$this->errors=array_merge($this->errors, $task->errors);
|
||||||
|
|||||||
@ -956,7 +956,7 @@ class EmailCollector extends CommonObject
|
|||||||
|
|
||||||
dol_syslog("EmailCollector::doCollectOneCollector start for id=".$this->id, LOG_DEBUG);
|
dol_syslog("EmailCollector::doCollectOneCollector start for id=".$this->id, LOG_DEBUG);
|
||||||
|
|
||||||
$langs->loadLangs(array("project", "companies", "mails", "errors", "ticket", "agenda"));
|
$langs->loadLangs(array("project", "companies", "mails", "errors", "ticket", "agenda", "commercial"));
|
||||||
|
|
||||||
$error = 0;
|
$error = 0;
|
||||||
$this->output = '';
|
$this->output = '';
|
||||||
|
|||||||
@ -189,7 +189,7 @@ if ($fourn_id > 0) {
|
|||||||
$sql .= " AND p.rowid = pf.fk_product AND pf.fk_soc = ".((int) $fourn_id);
|
$sql .= " AND p.rowid = pf.fk_product AND pf.fk_soc = ".((int) $fourn_id);
|
||||||
}
|
}
|
||||||
// Insert categ filter
|
// Insert categ filter
|
||||||
if ($search_categ) {
|
if ($search_categ > 0) {
|
||||||
$sql .= " AND cp.fk_categorie = ".((int) $search_categ);
|
$sql .= " AND cp.fk_categorie = ".((int) $search_categ);
|
||||||
}
|
}
|
||||||
$sql .= " GROUP BY p.rowid, p.ref, p.label, p.barcode, p.price, p.price_ttc, p.price_base_type, p.entity,";
|
$sql .= " GROUP BY p.rowid, p.ref, p.label, p.barcode, p.price, p.price_ttc, p.price_base_type, p.entity,";
|
||||||
|
|||||||
@ -813,7 +813,7 @@ class Project extends CommonObject
|
|||||||
'propal'=>'fk_projet', 'commande'=>'fk_projet', 'facture'=>'fk_projet',
|
'propal'=>'fk_projet', 'commande'=>'fk_projet', 'facture'=>'fk_projet',
|
||||||
'supplier_proposal'=>'fk_projet', 'commande_fournisseur'=>'fk_projet', 'facture_fourn'=>'fk_projet',
|
'supplier_proposal'=>'fk_projet', 'commande_fournisseur'=>'fk_projet', 'facture_fourn'=>'fk_projet',
|
||||||
'expensereport_det'=>'fk_projet', 'contrat'=>'fk_projet', 'fichinter'=>'fk_projet', 'don'=>'fk_projet',
|
'expensereport_det'=>'fk_projet', 'contrat'=>'fk_projet', 'fichinter'=>'fk_projet', 'don'=>'fk_projet',
|
||||||
'actioncomm'=>'fk_project', 'mrp_mo'=>'fk_project'
|
'actioncomm'=>'fk_project', 'mrp_mo'=>'fk_project', 'entrepot'=>'fk_project'
|
||||||
);
|
);
|
||||||
foreach ($listoftables as $key => $value) {
|
foreach ($listoftables as $key => $value) {
|
||||||
$sql = "UPDATE ".MAIN_DB_PREFIX.$key." SET ".$value." = NULL where ".$value." = ".((int) $this->id);
|
$sql = "UPDATE ".MAIN_DB_PREFIX.$key." SET ".$value." = NULL where ".$value." = ".((int) $this->id);
|
||||||
|
|||||||
@ -173,16 +173,16 @@ class Task extends CommonObject
|
|||||||
$sql .= ", planned_workload";
|
$sql .= ", planned_workload";
|
||||||
$sql .= ", progress";
|
$sql .= ", progress";
|
||||||
$sql .= ") VALUES (";
|
$sql .= ") VALUES (";
|
||||||
$sql .= $conf->entity;
|
$sql .= ((int) $conf->entity);
|
||||||
$sql .= ", ".$this->fk_project;
|
$sql .= ", ".((int) $this->fk_project);
|
||||||
$sql .= ", ".(!empty($this->ref) ? "'".$this->db->escape($this->ref)."'" : 'null');
|
$sql .= ", ".(!empty($this->ref) ? "'".$this->db->escape($this->ref)."'" : 'null');
|
||||||
$sql .= ", ".$this->fk_task_parent;
|
$sql .= ", ".((int) $this->fk_task_parent);
|
||||||
$sql .= ", '".$this->db->escape($this->label)."'";
|
$sql .= ", '".$this->db->escape($this->label)."'";
|
||||||
$sql .= ", '".$this->db->escape($this->description)."'";
|
$sql .= ", '".$this->db->escape($this->description)."'";
|
||||||
$sql .= ", '".$this->db->idate($now)."'";
|
$sql .= ", '".$this->db->idate($now)."'";
|
||||||
$sql .= ", ".$user->id;
|
$sql .= ", ".((int) $user->id);
|
||||||
$sql .= ", ".($this->date_start != '' ? "'".$this->db->idate($this->date_start)."'" : 'null');
|
$sql .= ", ".($this->date_start ? "'".$this->db->idate($this->date_start)."'" : 'null');
|
||||||
$sql .= ", ".($this->date_end != '' ? "'".$this->db->idate($this->date_end)."'" : 'null');
|
$sql .= ", ".($this->date_end ? "'".$this->db->idate($this->date_end)."'" : 'null');
|
||||||
$sql .= ", ".(($this->planned_workload != '' && $this->planned_workload >= 0) ? $this->planned_workload : 'null');
|
$sql .= ", ".(($this->planned_workload != '' && $this->planned_workload >= 0) ? $this->planned_workload : 'null');
|
||||||
$sql .= ", ".(($this->progress != '' && $this->progress >= 0) ? $this->progress : 'null');
|
$sql .= ", ".(($this->progress != '' && $this->progress >= 0) ? $this->progress : 'null');
|
||||||
$sql .= ")";
|
$sql .= ")";
|
||||||
|
|||||||
@ -89,6 +89,7 @@ if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/projectnameonly/', $c
|
|||||||
$title = ($object->ref ? $object->ref.' '.$object->name.' - ' : '').$langs->trans("Gantt");
|
$title = ($object->ref ? $object->ref.' '.$object->name.' - ' : '').$langs->trans("Gantt");
|
||||||
}
|
}
|
||||||
$help_url = "EN:Module_Projects|FR:Module_Projets|ES:Módulo_Proyectos";
|
$help_url = "EN:Module_Projects|FR:Module_Projets|ES:Módulo_Proyectos";
|
||||||
|
|
||||||
llxHeader("", $title, $help_url, '', 0, 0, $arrayofjs, $arrayofcss);
|
llxHeader("", $title, $help_url, '', 0, 0, $arrayofjs, $arrayofcss);
|
||||||
|
|
||||||
if (($id > 0 && is_numeric($id)) || !empty($ref)) {
|
if (($id > 0 && is_numeric($id)) || !empty($ref)) {
|
||||||
@ -136,6 +137,7 @@ if (($id > 0 && is_numeric($id)) || !empty($ref)) {
|
|||||||
print '<table class="border tableforfield centpercent">';
|
print '<table class="border tableforfield centpercent">';
|
||||||
|
|
||||||
// Usage
|
// Usage
|
||||||
|
if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS) || !empty($conf->eventorganization->enabled)) {
|
||||||
print '<tr><td class="tdtop">';
|
print '<tr><td class="tdtop">';
|
||||||
print $langs->trans("Usage");
|
print $langs->trans("Usage");
|
||||||
print '</td>';
|
print '</td>';
|
||||||
@ -152,13 +154,19 @@ if (($id > 0 && is_numeric($id)) || !empty($ref)) {
|
|||||||
print $form->textwithpicto($langs->trans("ProjectFollowTasks"), $htmltext);
|
print $form->textwithpicto($langs->trans("ProjectFollowTasks"), $htmltext);
|
||||||
print '<br>';
|
print '<br>';
|
||||||
}
|
}
|
||||||
if (!empty($conf->global->PROJECT_BILL_TIME_SPENT)) {
|
if (empty($conf->global->PROJECT_HIDE_TASKS) && !empty($conf->global->PROJECT_BILL_TIME_SPENT)) {
|
||||||
print '<input type="checkbox" disabled name="usage_bill_time"'.(GETPOSTISSET('usage_bill_time') ? (GETPOST('usage_bill_time', 'alpha') != '' ? ' checked="checked"' : '') : ($object->usage_bill_time ? ' checked="checked"' : '')).'"> ';
|
print '<input type="checkbox" disabled name="usage_bill_time"'.(GETPOSTISSET('usage_bill_time') ? (GETPOST('usage_bill_time', 'alpha') != '' ? ' checked="checked"' : '') : ($object->usage_bill_time ? ' checked="checked"' : '')).'"> ';
|
||||||
$htmltext = $langs->trans("ProjectBillTimeDescription");
|
$htmltext = $langs->trans("ProjectBillTimeDescription");
|
||||||
print $form->textwithpicto($langs->trans("BillTime"), $htmltext);
|
print $form->textwithpicto($langs->trans("BillTime"), $htmltext);
|
||||||
print '<br>';
|
print '<br>';
|
||||||
}
|
}
|
||||||
|
if (!empty($conf->eventorganization->enabled)) {
|
||||||
|
print '<input type="checkbox" disabled name="usage_organize_event"'.(GETPOSTISSET('usage_organize_event') ? (GETPOST('usage_organize_event', 'alpha') != '' ? ' checked="checked"' : '') : ($object->usage_organize_event ? ' checked="checked"' : '')).'"> ';
|
||||||
|
$htmltext = $langs->trans("EventOrganizationDescriptionLong");
|
||||||
|
print $form->textwithpicto($langs->trans("ManageOrganizeEvent"), $htmltext);
|
||||||
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
}
|
||||||
|
|
||||||
// Visibility
|
// Visibility
|
||||||
print '<tr><td class="titlefield">'.$langs->trans("Visibility").'</td><td>';
|
print '<tr><td class="titlefield">'.$langs->trans("Visibility").'</td><td>';
|
||||||
|
|||||||
@ -459,7 +459,7 @@ if ($id > 0 || !empty($ref)) {
|
|||||||
print '<div class="fichehalfleft">';
|
print '<div class="fichehalfleft">';
|
||||||
print '<div class="underbanner clearboth"></div>';
|
print '<div class="underbanner clearboth"></div>';
|
||||||
|
|
||||||
print '<table class="border tableforfield" width="100%">';
|
print '<table class="border tableforfield centpercent">';
|
||||||
|
|
||||||
// Usage
|
// Usage
|
||||||
if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS) || !empty($conf->eventorganization->enabled)) {
|
if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS) || !empty($conf->eventorganization->enabled)) {
|
||||||
@ -532,7 +532,7 @@ if ($id > 0 || !empty($ref)) {
|
|||||||
print '<div class="ficheaddleft">';
|
print '<div class="ficheaddleft">';
|
||||||
print '<div class="underbanner clearboth"></div>';
|
print '<div class="underbanner clearboth"></div>';
|
||||||
|
|
||||||
print '<table class="border tableforfield" width="100%">';
|
print '<table class="border tableforfield centpercent">';
|
||||||
|
|
||||||
// Description
|
// Description
|
||||||
print '<td class="titlefield tdtop">'.$langs->trans("Description").'</td><td>';
|
print '<td class="titlefield tdtop">'.$langs->trans("Description").'</td><td>';
|
||||||
@ -541,7 +541,7 @@ if ($id > 0 || !empty($ref)) {
|
|||||||
|
|
||||||
// Categories
|
// Categories
|
||||||
if ($conf->categorie->enabled) {
|
if ($conf->categorie->enabled) {
|
||||||
print '<tr><td valign="middle">'.$langs->trans("Categories").'</td><td>';
|
print '<tr><td class="valignmiddle">'.$langs->trans("Categories").'</td><td>';
|
||||||
print $form->showCategories($object->id, Categorie::TYPE_PROJECT, 1);
|
print $form->showCategories($object->id, Categorie::TYPE_PROJECT, 1);
|
||||||
print "</td></tr>";
|
print "</td></tr>";
|
||||||
}
|
}
|
||||||
|
|||||||
@ -914,7 +914,7 @@ if ($action == 'create') {
|
|||||||
$ent = "entrepot_".$reg[1].'_'.$reg[2];
|
$ent = "entrepot_".$reg[1].'_'.$reg[2];
|
||||||
$pu = "pu_".$reg[1].'_'.$reg[2]; // This is unit price including discount
|
$pu = "pu_".$reg[1].'_'.$reg[2]; // This is unit price including discount
|
||||||
$fk_commandefourndet = "fk_commandefourndet_".$reg[1].'_'.$reg[2];
|
$fk_commandefourndet = "fk_commandefourndet_".$reg[1].'_'.$reg[2];
|
||||||
$dispatchLines[$numAsked] = array('prod' => GETPOST($prod, 'int'), 'qty' =>GETPOST($qty), 'ent' =>GETPOST($ent, 'int'), 'pu' =>GETPOST($pu), 'comment' =>GETPOST('comment'), 'fk_commandefourndet' => GETPOST($fk_commandefourndet, 'int'));
|
$dispatchLines[$numAsked] = array('prod' => GETPOST($prod, 'int'), 'qty' => price2num(GETPOST($qty), 'MS'), 'ent' => GETPOST($ent, 'int'), 'pu' => price2num(GETPOST($pu), 'MU'), 'comment' => GETPOST('comment'), 'fk_commandefourndet' => GETPOST($fk_commandefourndet, 'int'));
|
||||||
}
|
}
|
||||||
|
|
||||||
// with batch module enabled
|
// with batch module enabled
|
||||||
@ -929,13 +929,13 @@ if ($action == 'create') {
|
|||||||
$ent = 'entrepot_'.$reg[1].'_'.$reg[2];
|
$ent = 'entrepot_'.$reg[1].'_'.$reg[2];
|
||||||
$pu = 'pu_'.$reg[1].'_'.$reg[2];
|
$pu = 'pu_'.$reg[1].'_'.$reg[2];
|
||||||
$lot = 'lot_number_'.$reg[1].'_'.$reg[2];
|
$lot = 'lot_number_'.$reg[1].'_'.$reg[2];
|
||||||
$dDLUO = dol_mktime(12, 0, 0, $_POST['dluo_'.$reg[1].'_'.$reg[2].'month'], $_POST['dluo_'.$reg[1].'_'.$reg[2].'day'], $_POST['dluo_'.$reg[1].'_'.$reg[2].'year']);
|
$dDLUO = dol_mktime(12, 0, 0, GETPOST('dluo_'.$reg[1].'_'.$reg[2].'month', 'int'), GETPOST('dluo_'.$reg[1].'_'.$reg[2].'day', 'int'), GETPOST('dluo_'.$reg[1].'_'.$reg[2].'year', 'int'));
|
||||||
$dDLC = dol_mktime(12, 0, 0, $_POST['dlc_'.$reg[1].'_'.$reg[2].'month'], $_POST['dlc_'.$reg[1].'_'.$reg[2].'day'], $_POST['dlc_'.$reg[1].'_'.$reg[2].'year']);
|
$dDLC = dol_mktime(12, 0, 0, GETPOST('dlc_'.$reg[1].'_'.$reg[2].'month', 'int'), GETPOST('dlc_'.$reg[1].'_'.$reg[2].'day', 'int'), GETPOST('dlc_'.$reg[1].'_'.$reg[2].'year', 'int'));
|
||||||
$fk_commandefourndet = 'fk_commandefourndet_'.$reg[1].'_'.$reg[2];
|
$fk_commandefourndet = 'fk_commandefourndet_'.$reg[1].'_'.$reg[2];
|
||||||
$dispatchLines[$numAsked] = array('prod' => GETPOST($prod, 'int'), 'qty' =>GETPOST($qty), 'ent' =>GETPOST($ent, 'int'), 'pu' =>GETPOST($pu), 'comment' =>GETPOST('comment'), 'fk_commandefourndet' => GETPOST($fk_commandefourndet, 'int'), 'DLC'=> $dDLC, 'DLUO'=> $dDLUO, 'lot'=> GETPOST($lot, 'alpha'));
|
$dispatchLines[$numAsked] = array('prod' => GETPOST($prod, 'int'), 'qty' => price2num(GETPOST($qty), 'MS'), 'ent' =>GETPOST($ent, 'int'), 'pu' => price2num(GETPOST($pu), 'MU'), 'comment' =>GETPOST('comment'), 'fk_commandefourndet' => GETPOST($fk_commandefourndet, 'int'), 'DLC'=> $dDLC, 'DLUO'=> $dDLUO, 'lot'=> GETPOST($lot, 'alpha'));
|
||||||
}
|
}
|
||||||
|
|
||||||
// If create form is coming from same page post was sent but an error occured
|
// If create form is coming from same page, it means that post was sent but an error occured
|
||||||
if (preg_match('/^productid([0-9]+)$/i', $key, $reg)) {
|
if (preg_match('/^productid([0-9]+)$/i', $key, $reg)) {
|
||||||
$numAsked++;
|
$numAsked++;
|
||||||
|
|
||||||
@ -951,7 +951,7 @@ if ($action == 'create') {
|
|||||||
$dDLUO = dol_mktime(12, 0, 0, GETPOST('dluo'.$reg[1].'month', 'int'), GETPOST('dluo'.$reg[1].'day', 'int'), GETPOST('dluo'.$reg[1].'year', 'int'));
|
$dDLUO = dol_mktime(12, 0, 0, GETPOST('dluo'.$reg[1].'month', 'int'), GETPOST('dluo'.$reg[1].'day', 'int'), GETPOST('dluo'.$reg[1].'year', 'int'));
|
||||||
$dDLC = dol_mktime(12, 0, 0, GETPOST('dlc'.$reg[1].'month', 'int'), GETPOST('dlc'.$reg[1].'day', 'int'), GETPOST('dlc'.$reg[1].'year', 'int'));
|
$dDLC = dol_mktime(12, 0, 0, GETPOST('dlc'.$reg[1].'month', 'int'), GETPOST('dlc'.$reg[1].'day', 'int'), GETPOST('dlc'.$reg[1].'year', 'int'));
|
||||||
$fk_commandefourndet = 'fk_commandefournisseurdet'.$reg[1];
|
$fk_commandefourndet = 'fk_commandefournisseurdet'.$reg[1];
|
||||||
$dispatchLines[$numAsked] = array('prod' => GETPOST($prod, 'int'), 'qty' =>GETPOST($qty), 'ent' =>GETPOST($ent, 'int'), 'pu' =>GETPOST($pu), 'comment' =>GETPOST($comment), 'fk_commandefourndet' => GETPOST($fk_commandefourndet, 'int'), 'DLC'=> $dDLC, 'DLUO'=> $dDLUO, 'lot'=> GETPOST($lot, 'alpha'));
|
$dispatchLines[$numAsked] = array('prod' => GETPOST($prod, 'int'), 'qty' => price2num(GETPOST($qty), 'MS'), 'ent' =>GETPOST($ent, 'int'), 'pu' => price2num(GETPOST($pu), 'MU'), 'comment' =>GETPOST($comment), 'fk_commandefourndet' => GETPOST($fk_commandefourndet, 'int'), 'DLC'=> $dDLC, 'DLUO'=> $dDLUO, 'lot'=> GETPOST($lot, 'alpha'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -329,7 +329,7 @@ print '<button type="button" class="calcbutton" onclick="addreceived('.($numpad
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
print '<button type="button" class="calcbutton2" onclick="Validate(\''.$paycode.'\');">'.(!empty($payIcon) ? '<span class="fa fa-2x fa-'.$payIcon.' iconwithlabel"></span><span class="hideonsmartphone"><br>'. $langs->trans("PaymentTypeShort".$arrayOfValidPaymentModes[0]->code) : $langs->trans("PaymentTypeShort".$arrayOfValidPaymentModes[0]->code)).'</span></button>';
|
print '<button type="button" class="calcbutton2" onclick="Validate(\''.dol_escape_js($paycode).'\');">'.(!empty($payIcon) ? '<span class="fa fa-2x fa-'.$payIcon.' iconwithlabel"></span><span class="hideonsmartphone"><br>'. $langs->trans("PaymentTypeShort".$arrayOfValidPaymentModes[0]->code) : $langs->trans("PaymentTypeShort".$arrayOfValidPaymentModes[0]->code)).'</span></button>';
|
||||||
} else {
|
} else {
|
||||||
print '<button type="button" class="calcbutton2">'.$langs->trans("NoPaimementModesDefined").'</button>';
|
print '<button type="button" class="calcbutton2">'.$langs->trans("NoPaimementModesDefined").'</button>';
|
||||||
}
|
}
|
||||||
@ -355,7 +355,7 @@ print '<button type="button" class="calcbutton" onclick="addreceived('.($numpad
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
print '<button type="button" class="calcbutton2" onclick="Validate(\''.$paycode.'\');">'.(!empty($payIcon) ? '<span class="fa fa-2x fa-'.$payIcon.' iconwithlabel"></span><br> '. $langs->trans("PaymentTypeShort".$arrayOfValidPaymentModes[1]->code) : $langs->trans("PaymentTypeShort".$arrayOfValidPaymentModes[1]->code)).'</button>';
|
print '<button type="button" class="calcbutton2" onclick="Validate(\''.dol_escape_js($paycode).'\');">'.(!empty($payIcon) ? '<span class="fa fa-2x fa-'.$payIcon.' iconwithlabel"></span><br> '. $langs->trans("PaymentTypeShort".$arrayOfValidPaymentModes[1]->code) : $langs->trans("PaymentTypeShort".$arrayOfValidPaymentModes[1]->code)).'</button>';
|
||||||
} else {
|
} else {
|
||||||
$button = array_pop($action_buttons);
|
$button = array_pop($action_buttons);
|
||||||
print '<button type="button" class="calcbutton2" onclick="'.$button["function"].'"><span '.$button["span"].'>'.$button["text"].'</span></button>';
|
print '<button type="button" class="calcbutton2" onclick="'.$button["function"].'"><span '.$button["span"].'>'.$button["text"].'</span></button>';
|
||||||
@ -382,7 +382,7 @@ print '<button type="button" class="calcbutton" onclick="addreceived('.($numpad
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
print '<button type="button" class="calcbutton2" onclick="Validate(\''.$paycode.'\');">'.(!empty($payIcon) ? '<span class="fa fa-2x fa-'.$payIcon.' iconwithlabel"></span>'.(!empty($conf->global->TAKEPOS_NUMPAD_FORCE_PAYMENT_ICONS_LABELS) ? '<br> '. $langs->trans("PaymentTypeShort".$arrayOfValidPaymentModes[2]->code) : '') : $langs->trans("PaymentTypeShort".$arrayOfValidPaymentModes[2]->code)).'</button>';
|
print '<button type="button" class="calcbutton2" onclick="Validate(\''.dol_escape_js($paycode).'\');">'.(!empty($payIcon) ? '<span class="fa fa-2x fa-'.$payIcon.' iconwithlabel"></span><br>'. $langs->trans("PaymentTypeShort".$arrayOfValidPaymentModes[2]->code) : $langs->trans("PaymentTypeShort".$arrayOfValidPaymentModes[2]->code)).'</button>';
|
||||||
} else {
|
} else {
|
||||||
$button = array_pop($action_buttons);
|
$button = array_pop($action_buttons);
|
||||||
print '<button type="button" class="calcbutton2" onclick="'.$button["function"].'"><span '.$button["span"].'>'.$button["text"].'</span></button>';
|
print '<button type="button" class="calcbutton2" onclick="'.$button["function"].'"><span '.$button["span"].'>'.$button["text"].'</span></button>';
|
||||||
@ -394,7 +394,23 @@ print '<button type="button" class="calcbutton" onclick="addreceived('.($numpad
|
|||||||
|
|
||||||
$i = 3;
|
$i = 3;
|
||||||
while ($i < count($arrayOfValidPaymentModes)) {
|
while ($i < count($arrayOfValidPaymentModes)) {
|
||||||
print '<button type="button" class="calcbutton2" onclick="Validate(\''.$langs->trans($arrayOfValidPaymentModes[$i]->code).'\');">'.$langs->trans("PaymentTypeShort".$arrayOfValidPaymentModes[$i]->code).'</button>';
|
$paycode = $arrayOfValidPaymentModes[$i]->code;
|
||||||
|
$payIcon = '';
|
||||||
|
if ($paycode == 'LIQ') {
|
||||||
|
if (!isset($conf->global->TAKEPOS_NUMPAD_USE_PAYMENT_ICON) || !empty($conf->global->TAKEPOS_NUMPAD_USE_PAYMENT_ICON)) {
|
||||||
|
$payIcon = 'coins';
|
||||||
|
}
|
||||||
|
} elseif ($paycode == 'CB') {
|
||||||
|
if (!isset($conf->global->TAKEPOS_NUMPAD_USE_PAYMENT_ICON) || !empty($conf->global->TAKEPOS_NUMPAD_USE_PAYMENT_ICON)) {
|
||||||
|
$payIcon = 'credit-card';
|
||||||
|
}
|
||||||
|
} elseif ($paycode == 'CHQ') {
|
||||||
|
if (!isset($conf->global->TAKEPOS_NUMPAD_USE_PAYMENT_ICON) || !empty($conf->global->TAKEPOS_NUMPAD_USE_PAYMENT_ICON)) {
|
||||||
|
$payIcon = 'money-check';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
print '<button type="button" class="calcbutton2" onclick="Validate(\''.dol_escape_js($paycode).'\');">'.(!empty($payIcon) ? '<span class="fa fa-2x fa-'.$payIcon.' iconwithlabel"></span><br>'. $langs->trans("PaymentTypeShort".$arrayOfValidPaymentModes[$i]->code) : $langs->trans("PaymentTypeShort".$arrayOfValidPaymentModes[$i]->code)).'</button>';
|
||||||
$i = $i + 1;
|
$i = $i + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user