Merge remote-tracking branch 'Upstream/develop' into develop
This commit is contained in:
commit
9da597d56e
17
ChangeLog
17
ChangeLog
@ -31,7 +31,7 @@ For users:
|
||||
shown on main product card.
|
||||
- New: Add event FICHINTER_CLASSIFY_BILLED into list of possible events to
|
||||
create an automatic event into agenda.
|
||||
- New: Add new type of event (when type of events are used, not by default)
|
||||
- New: Add new type of event (when type of events are used, not by default).
|
||||
- New: Add country into table of thirdparties type. This will allow to provide
|
||||
a list of thirdparty types specific to a country (like argentina that
|
||||
need type A or B).
|
||||
@ -42,19 +42,20 @@ For users:
|
||||
Differentiate text and img.
|
||||
Use label into quick search form.
|
||||
Use accesskey on form search.
|
||||
- New: Intervention documents are now available in ECM module
|
||||
- New: Add attachments on user card + in ECM module
|
||||
- New: Intervention documents are now available in ECM module.
|
||||
- New: Add attachments on user card + in ECM module.
|
||||
- New: Can add __PROJECT_REF__ and __TIHRPARTY_NAME__ into email topic or content template.
|
||||
- New: [ task #1204 ] add Numering contrat module free (like leopard in product module)
|
||||
- New: [ task #712 ] Add warning when creating invoice from proposal or order, when there is already one invoice
|
||||
- New: Enable supplier price log table
|
||||
- New: [ task #1204 ] add a External reference to contract
|
||||
- New: [ task #1204 ] add Numering contrat module free (like leopard in product module).
|
||||
- New: [ task #712 ] Add warning when creating invoice from proposal or order, when there is already one invoice.
|
||||
- New: Enable supplier price log table.
|
||||
- New: [ task #1204 ] add a External reference to contract.
|
||||
- New: [ task #1218 ] Can drag and drop an event from calendar to change its day.
|
||||
- New: Optimize size of image static resources.
|
||||
- New: Add hourly and daily amount on user card. Add weekly working hours and salary on user card.
|
||||
- New: Content of predefined email come firstly from table llx_c_email_template, then translation key.
|
||||
- New: Add option MAIN_GENERATE_INVOICES_WITH_PICTURE to show picture
|
||||
onto PDF like MAIN_GENERATE_PROPOSALS_WITH_PICTURE dir for proposals.
|
||||
- New: Add more search field in list of cheque deposits.
|
||||
- Upgrade phpexcel lib to 1.7.8
|
||||
- Fix: [ bug #1487 ] PAYMENT_DELETE trigger does not intercept trigger action
|
||||
- Fix: [ bug #1470, #1472, #1473] User trigger problem
|
||||
@ -73,6 +74,7 @@ For users:
|
||||
- Fix: [ bug #1506, #1507 ] ECM trigger error problem
|
||||
- Fix: [ bug #1469 ] Triggers CONTACT_MODIFY and CONTACT_DELETE duplicates error message
|
||||
- Fix: [ bug #1537 ] Difference between societe.nom and adherent.societe.
|
||||
- New: Add dunning into accountancy report
|
||||
|
||||
New experimental module:
|
||||
- New: Module Accounting Expert to manage accountancy
|
||||
@ -138,6 +140,7 @@ For users:
|
||||
- Fix: Must unaccent strings into SEPA file.
|
||||
- Fix: Extrafield feature select from table should try to translate multiple column when not needed
|
||||
- Fix: cents for indian ruppes are calle paisa and paise.
|
||||
- Fix: Invoices payments may be older than invoices.
|
||||
|
||||
***** ChangeLog for 3.6 compared to 3.5.* *****
|
||||
For users:
|
||||
|
||||
3
htdocs/.gitignore
vendored
3
htdocs/.gitignore
vendored
@ -2,7 +2,8 @@
|
||||
/custom*
|
||||
/extensions*
|
||||
/nltechno*
|
||||
/anco*
|
||||
/ancot*
|
||||
/teclib*
|
||||
/bootstrap*
|
||||
/google*
|
||||
/multicompany*
|
||||
|
||||
@ -137,11 +137,11 @@ else {
|
||||
|
||||
print $formventilation->select_bookkeeping_importkey('importkey', GETPOST('importkey'));
|
||||
|
||||
print '<div class="inline-block divButAction"><input type="submit" class="butAction" value="' . $langs->trans("DelBookKeeping") . '" /></div>';
|
||||
print '<div class="inline-block divButAction"><input type="submit" class="butAction" value="' . $langs->trans("DelBookKeeping") . '" />';
|
||||
|
||||
print '</form>';
|
||||
|
||||
print '<a href="./card.php?action=create" class="butAction">' . $langs->trans("NewAccountingMvt") . '</a>';
|
||||
print '<a href="./card.php?action=create" class="butAction">' . $langs->trans("NewAccountingMvt") . '</a></div>';
|
||||
|
||||
print '<form name="add" action="' . $_SERVER["PHP_SELF"] . '" method="POST">';
|
||||
print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
|
||||
|
||||
@ -132,7 +132,7 @@ if ($result) {
|
||||
$cptfour = (! empty($conf->global->COMPTA_ACCOUNT_SUPPLIER) ? $conf->global->COMPTA_ACCOUNT_SUPPLIER : $langs->trans("CodeNotDef"));
|
||||
$cptcli = (! empty($conf->global->COMPTA_ACCOUNT_CUSTOMER) ? $conf->global->COMPTA_ACCOUNT_CUSTOMER : $langs->trans("CodeNotDef"));
|
||||
$cpttva = (! empty($conf->global->ACCOUNTING_ACCOUNT_SUSPENSE) ? $conf->global->ACCOUNTING_ACCOUNT_SUSPENSE : $langs->trans("CodeNotDef"));
|
||||
$cptsociale = (! empty($conf->global->ACCOUNTING_ACCOUNT_SUSPENSE) ? $conf->global->ACCOUNTING_ACCOUNT_SUSPENSE : $langs->trans("CodeNotDef"));
|
||||
$accountancy_account_salary = (! empty($conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT) ? $conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT : $langs->trans("CodeNotDef"));
|
||||
|
||||
$tabpay = array ();
|
||||
$tabbq = array ();
|
||||
@ -173,21 +173,26 @@ if ($result) {
|
||||
|
||||
$tabtype[$obj->rowid] = $links[$key]['type'];
|
||||
|
||||
if ($links[$key]['type'] == 'payment') {
|
||||
if ($links[$key]['type'] == 'payment')
|
||||
{
|
||||
$paymentstatic->id = $links[$key]['url_id'];
|
||||
$tabpay[$obj->rowid]["lib"] .= ' ' . $paymentstatic->getNomUrl(2);
|
||||
} else if ($links[$key]['type'] == 'payment_supplier') {
|
||||
}
|
||||
else if ($links[$key]['type'] == 'payment_supplier')
|
||||
{
|
||||
$paymentsupplierstatic->id = $links[$key]['url_id'];
|
||||
$paymentsupplierstatic->ref = $links[$key]['url_id'];
|
||||
$tabpay[$obj->rowid]["lib"] .= ' ' . $paymentsupplierstatic->getNomUrl(2);
|
||||
} else if ($links[$key]['type'] == 'company') {
|
||||
|
||||
}
|
||||
else if ($links[$key]['type'] == 'company')
|
||||
{
|
||||
$societestatic->id = $links[$key]['url_id'];
|
||||
$societestatic->nom = $links[$key]['label'];
|
||||
$tabpay[$obj->rowid]["soclib"] = $societestatic->getNomUrl(1, '', 30);
|
||||
$tabtp[$obj->rowid][$compta_soc] += $obj->amount;
|
||||
} else if ($links[$key]['type'] == 'sc') {
|
||||
|
||||
}
|
||||
else if ($links[$key]['type'] == 'sc')
|
||||
{
|
||||
$chargestatic->id = $links[$key]['url_id'];
|
||||
$chargestatic->ref = $links[$key]['url_id'];
|
||||
|
||||
@ -196,7 +201,9 @@ if ($result) {
|
||||
if ($reg[1] == 'socialcontribution')
|
||||
$reg[1] = 'SocialContribution';
|
||||
$chargestatic->lib = $langs->trans($reg[1]);
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
$chargestatic->lib = $links[$key]['label'];
|
||||
}
|
||||
$chargestatic->ref = $chargestatic->lib;
|
||||
@ -211,29 +218,33 @@ if ($result) {
|
||||
|
||||
dol_syslog("accountancy/journal/bankjournal.php:: sqlmid=" . $sqlmid, LOG_DEBUG);
|
||||
$resultmid = $db->query($sqlmid);
|
||||
if ($resultmid) {
|
||||
if ($resultmid)
|
||||
{
|
||||
$objmid = $db->fetch_object($resultmid);
|
||||
$tabtp[$obj->rowid][$objmid->accountancy_code] += $obj->amount;
|
||||
}
|
||||
} else if ($links[$key]['type'] == 'payment_vat') {
|
||||
|
||||
}
|
||||
else if ($links[$key]['type'] == 'payment_vat')
|
||||
{
|
||||
$paymentvatstatic->id = $links[$key]['url_id'];
|
||||
$paymentvatstatic->ref = $links[$key]['url_id'];
|
||||
$tabpay[$obj->rowid]["lib"] .= ' ' . $paymentvatstatic->getNomUrl(2);
|
||||
$tabtp[$obj->rowid][$cpttva] += $obj->amount;
|
||||
} else if ($links[$key]['type'] == 'payment_salary') {
|
||||
|
||||
}
|
||||
else if ($links[$key]['type'] == 'payment_salary')
|
||||
{
|
||||
$paymentsalstatic->id = $links[$key]['url_id'];
|
||||
$paymentsalstatic->ref = $links[$key]['url_id'];
|
||||
$tabpay[$obj->rowid]["lib"] .= ' ' . $paymentsalstatic->getNomUrl(2);
|
||||
$tabtp[$obj->rowid][$cptsociale] += $obj->amount;
|
||||
} else if ($links[$key]['type'] == 'banktransfert') {
|
||||
|
||||
$tabtp[$obj->rowid][$accountancy_account_salary] += $obj->amount;
|
||||
}
|
||||
else if ($links[$key]['type'] == 'banktransfert')
|
||||
{
|
||||
$tabpay[$obj->rowid]["lib"] .= ' ' . $paymentvatstatic->getNomUrl(2);
|
||||
$tabtp[$obj->rowid][$cpttva] += $obj->amount;
|
||||
}
|
||||
/*else {
|
||||
$tabtp [$obj->rowid] [$cptsociale] += $obj->amount;
|
||||
$tabtp [$obj->rowid] [$accountancy_account_salary] += $obj->amount;
|
||||
}*/
|
||||
}
|
||||
$tabbq[$obj->rowid][$compta_bank] += $obj->amount;
|
||||
@ -477,14 +488,14 @@ if ($action == 'export_csv') {
|
||||
|
||||
llxHeader('', $langs->trans("BankJournal"));
|
||||
|
||||
$nom = $langs->trans("BankJournal");
|
||||
$nomlink = '';
|
||||
$namereport = $langs->trans("BankJournal");
|
||||
$namelink = '';
|
||||
$periodlink = '';
|
||||
$exportlink = '';
|
||||
$builddate = time();
|
||||
$description = $langs->trans("DescBankJournal") . '<br>';
|
||||
$period = $form->select_date($date_start, 'date_start', 0, 0, 0, '', 1, 0, 1) . ' - ' . $form->select_date($date_end, 'date_end', 0, 0, 0, '', 1, 0, 1);
|
||||
report_header($nom, $nomlink, $period, $periodlink, $description, $builddate, $exportlink, array('action' => ''));
|
||||
report_header($namereport, $namelink, $period, $periodlink, $description, $builddate, $exportlink, array('action' => ''));
|
||||
|
||||
print '<input type="button" class="button" style="float: right;" value="Export CSV" onclick="launch_export();" />';
|
||||
|
||||
|
||||
@ -66,6 +66,7 @@ $origin = GETPOST('origin', 'alpha');
|
||||
$originid = GETPOST('originid', 'int');
|
||||
$confirm = GETPOST('confirm', 'alpha');
|
||||
$lineid = GETPOST('lineid', 'int');
|
||||
$contactid = GETPOST('contactid','int');
|
||||
|
||||
// PDF
|
||||
$hidedetails = (GETPOST('hidedetails', 'int') ? GETPOST('hidedetails', 'int') : (! empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS) ? 1 : 0));
|
||||
@ -76,8 +77,7 @@ $hideref = (GETPOST('hideref', 'int') ? GETPOST('hideref', 'int') : (! empty($co
|
||||
$NBLINES = 4;
|
||||
|
||||
// Security check
|
||||
if (! empty($user->societe_id))
|
||||
$socid = $user->societe_id;
|
||||
if (! empty($user->societe_id)) $socid = $user->societe_id;
|
||||
$result = restrictedArea($user, 'propal', $id);
|
||||
|
||||
$object = new Propal($db);
|
||||
@ -261,7 +261,7 @@ else if ($action == 'add' && $user->rights->propal->creer) {
|
||||
$object->remise_percent = GETPOST('remise_percent');
|
||||
$object->remise_absolue = GETPOST('remise_absolue');
|
||||
$object->socid = GETPOST('socid');
|
||||
$object->contactid = GETPOST('contactidp');
|
||||
$object->contactid = GETPOST('contactid');
|
||||
$object->fk_project = GETPOST('projectid');
|
||||
$object->modelpdf = GETPOST('model');
|
||||
$object->author = $user->id; // deprecated
|
||||
@ -285,7 +285,7 @@ else if ($action == 'add' && $user->rights->propal->creer) {
|
||||
$object->cond_reglement_id = GETPOST('cond_reglement_id');
|
||||
$object->mode_reglement_id = GETPOST('mode_reglement_id');
|
||||
$object->fk_account = GETPOST('fk_account', 'int');
|
||||
$object->contactid = GETPOST('contactidp');
|
||||
$object->contactid = GETPOST('contactid');
|
||||
$object->fk_project = GETPOST('projectid');
|
||||
$object->modelpdf = GETPOST('model');
|
||||
$object->author = $user->id; // deprecated
|
||||
@ -450,9 +450,9 @@ else if ($action == 'add' && $user->rights->propal->creer) {
|
||||
if ($id > 0)
|
||||
{
|
||||
// Insertion contact par defaut si defini
|
||||
if (GETPOST('contactidp') > 0)
|
||||
if (GETPOST('contactid') > 0)
|
||||
{
|
||||
$result = $object->add_contact(GETPOST('contactidp'), 'CUSTOMER', 'external');
|
||||
$result = $object->add_contact(GETPOST('contactid'), 'CUSTOMER', 'external');
|
||||
if ($result < 0)
|
||||
{
|
||||
$error++;
|
||||
@ -1256,7 +1256,8 @@ $companystatic = new Societe($db);
|
||||
$now = dol_now();
|
||||
|
||||
// Add new proposal
|
||||
if ($action == 'create') {
|
||||
if ($action == 'create')
|
||||
{
|
||||
print_fiche_titre($langs->trans("NewProp"));
|
||||
|
||||
$soc = new Societe($db);
|
||||
@ -1356,12 +1357,16 @@ if ($action == 'create') {
|
||||
}
|
||||
print '</tr>' . "\n";
|
||||
|
||||
// Contacts
|
||||
if ($socid > 0) {
|
||||
// Contacts (ask contact only if thirdparty already defined). TODO do this also into order and invoice.
|
||||
if ($socid > 0)
|
||||
{
|
||||
print "<tr><td>" . $langs->trans("DefaultContact") . '</td><td colspan="2">';
|
||||
$form->select_contacts($soc->id, $setcontact, 'contactidp', 1, $srccontactslist);
|
||||
$form->select_contacts($soc->id, $contactid, 'contactid', 1, $srccontactslist);
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
if ($socid > 0)
|
||||
{
|
||||
// Ligne info remises tiers
|
||||
print '<tr><td>' . $langs->trans('Discounts') . '</td><td colspan="2">';
|
||||
if ($soc->remise_percent)
|
||||
|
||||
@ -233,7 +233,7 @@ else if ($action == 'add' && $user->rights->commande->creer) {
|
||||
$object->date_livraison = $datelivraison;
|
||||
$object->shipping_method_id = GETPOST('shipping_method_id', 'int');
|
||||
$object->fk_delivery_address = GETPOST('fk_address');
|
||||
$object->contactid = GETPOST('contactidp');
|
||||
$object->contactid = GETPOST('contactid');
|
||||
|
||||
// If creation from another object of another module (Example: origin=propal, originid=1)
|
||||
if (! empty($origin) && ! empty($originid)) {
|
||||
@ -383,8 +383,8 @@ else if ($action == 'add' && $user->rights->commande->creer) {
|
||||
|
||||
// Insert default contacts if defined
|
||||
if ($object_id > 0) {
|
||||
if (GETPOST('contactidp')) {
|
||||
$result = $object->add_contact(GETPOST('contactidp'), 'CUSTOMER', 'external');
|
||||
if (GETPOST('contactid')) {
|
||||
$result = $object->add_contact(GETPOST('contactid'), 'CUSTOMER', 'external');
|
||||
if ($result < 0) {
|
||||
setEventMessage($langs->trans("ErrorFailedToAddContact"), 'errors');
|
||||
$error ++;
|
||||
@ -1481,7 +1481,7 @@ if ($action == 'create' && $user->rights->commande->creer) {
|
||||
*/
|
||||
if ($socid > 0) {
|
||||
print "<tr><td>" . $langs->trans("DefaultContact") . '</td><td colspan="2">';
|
||||
$form->select_contacts($soc->id, $setcontact, 'contactidp', 1, $srccontactslist);
|
||||
$form->select_contacts($soc->id, $setcontact, 'contactid', 1, $srccontactslist);
|
||||
print '</td></tr>';
|
||||
|
||||
// Ligne info remises tiers
|
||||
|
||||
@ -77,7 +77,7 @@ class DeplacementStats extends Stats
|
||||
*/
|
||||
function getNbByYear()
|
||||
{
|
||||
$sql = "SELECT YEAR(datef) as dm, count(*)";
|
||||
$sql = "SELECT YEAR(dated) as dm, count(*)";
|
||||
$sql.= " FROM ".$this->from;
|
||||
$sql.= " GROUP BY dm DESC";
|
||||
$sql.= " WHERE ".$this->where;
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
/* Copyright (C) 2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2009 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2014 Florian Henry <florian.henry@open-concept.pro>
|
||||
*
|
||||
* 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
|
||||
@ -209,38 +209,42 @@ class Don extends CommonObject
|
||||
*/
|
||||
function check($minimum=0)
|
||||
{
|
||||
global $langs;
|
||||
$langs->load('main');
|
||||
$langs->load('companies');
|
||||
|
||||
$err = 0;
|
||||
|
||||
if (dol_strlen(trim($this->societe)) == 0)
|
||||
{
|
||||
if ((dol_strlen(trim($this->lastname)) + dol_strlen(trim($this->firstname))) == 0)
|
||||
{
|
||||
$error_string[$err] = "Vous devez saisir vos nom et prenom ou le nom de votre societe.";
|
||||
$error_string[$err] = $langs->trans('ErrorFieldRequired',$langs->trans('Company').'/'.$langs->trans('Firstname').'-'.$langs->trans('Lastname'));
|
||||
$err++;
|
||||
}
|
||||
}
|
||||
|
||||
if (dol_strlen(trim($this->address)) == 0)
|
||||
{
|
||||
$error_string[$err] = "L'adresse saisie est invalide";
|
||||
$error_string[$err] = $langs->trans('ErrorFieldRequired',$langs->trans('Address'));
|
||||
$err++;
|
||||
}
|
||||
|
||||
if (dol_strlen(trim($this->zip)) == 0)
|
||||
{
|
||||
$error_string[$err] = "Le code postal saisi est invalide";
|
||||
$error_string[$err] = $langs->trans('ErrorFieldRequired',$langs->trans('Zip'));
|
||||
$err++;
|
||||
}
|
||||
|
||||
if (dol_strlen(trim($this->town)) == 0)
|
||||
{
|
||||
$error_string[$err] = "La ville saisie est invalide";
|
||||
$error_string[$err] = $langs->trans('ErrorFieldRequired',$langs->trans('Town'));
|
||||
$err++;
|
||||
}
|
||||
|
||||
if (dol_strlen(trim($this->email)) == 0)
|
||||
{
|
||||
$error_string[$err] = "L'email saisi est invalide";
|
||||
$error_string[$err] = $langs->trans('ErrorFieldRequired',$langs->trans('EMail'));
|
||||
$err++;
|
||||
}
|
||||
|
||||
@ -252,7 +256,7 @@ class Don extends CommonObject
|
||||
{
|
||||
if (!isset($map[substr($this->amount, $i, 1)] ))
|
||||
{
|
||||
$error_string[$err] = "Le montant du don contient un/des caractere(s) invalide(s)";
|
||||
$error_string[$err] = $langs->trans('ErrorFieldRequired',$langs->trans('Amount'));
|
||||
$err++;
|
||||
$amount_invalid = 1;
|
||||
break;
|
||||
@ -263,14 +267,14 @@ class Don extends CommonObject
|
||||
{
|
||||
if ($this->amount == 0)
|
||||
{
|
||||
$error_string[$err] = "Le montant du don est null";
|
||||
$error_string[$err] = $langs->trans('ErrorFieldRequired',$langs->trans('Amount'));
|
||||
$err++;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($this->amount < $minimum && $minimum > 0)
|
||||
{
|
||||
$error_string[$err] = "Le montant minimum du don est de $minimum";
|
||||
$error_string[$err] = $langs->trans('MinimumAmount',$langs->trans('$minimum'));
|
||||
$err++;
|
||||
}
|
||||
}
|
||||
|
||||
@ -372,6 +372,17 @@ $search_montant_ht = GETPOST("search_montant_ht");
|
||||
$search_montant_ttc = GETPOST("search_montant_ttc");
|
||||
$late = GETPOST("late");
|
||||
|
||||
// Do we click on purge search criteria ?
|
||||
if (GETPOST("button_removefilter_x"))
|
||||
{
|
||||
$search_ref='';
|
||||
$search_refcustomer='';
|
||||
$search_societe='';
|
||||
$search_paymentmode='';
|
||||
$search_montant_ht='';
|
||||
$search_montant_ttc='';
|
||||
}
|
||||
|
||||
$sortfield = GETPOST("sortfield",'alpha');
|
||||
$sortorder = GETPOST("sortorder",'alpha');
|
||||
$page = GETPOST("page",'int');
|
||||
@ -571,6 +582,7 @@ if ($resql)
|
||||
print '<td class="liste_titre"> </td>';
|
||||
print '<td class="liste_titre" align="right">';
|
||||
print '<input type="image" class="liste_titre" name="button_search" src="'.img_picto($langs->trans("Search"),'search.png','','',1).'" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'">';
|
||||
print '<input type="image" class="liste_titre" name="button_removefilter" src="'.img_picto($langs->trans("Search"),'searchclear.png','','',1).'" value="'.dol_escape_htmltag($langs->trans("RemoveFilter")).'" title="'.dol_escape_htmltag($langs->trans("RemoveFilter")).'">';
|
||||
print '</td>';
|
||||
if (empty($mode))
|
||||
{
|
||||
|
||||
@ -327,6 +327,7 @@ if ($resql)
|
||||
print '<td class="liste_titre" align="right"><input class="flat" type="text" size="10" name="search_montant_ttc" value="'.$search_montant_ttc.'"></td>';
|
||||
print '<td class="liste_titre" align="right"> </td>';
|
||||
print '<td class="liste_titre" align="right"><input type="image" class="liste_titre" name="button_search" src="'.img_picto($langs->trans("Search"),'search.png','','',1).'" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'">';
|
||||
print '<input type="image" class="liste_titre" name="button_removefilter" src="'.img_picto($langs->trans("Search"),'searchclear.png','','',1).'" value="'.dol_escape_htmltag($langs->trans("RemoveFilter")).'" title="'.dol_escape_htmltag($langs->trans("RemoveFilter")).'">';
|
||||
print "</td></tr>\n";
|
||||
|
||||
if ($num > 0)
|
||||
|
||||
@ -109,8 +109,8 @@ if ($action == 'add_paiement' || ($action == 'confirm_paiement' && $confirm=='ye
|
||||
if ($datepaye && ($datepaye < $tmpinvoice->date))
|
||||
{
|
||||
$langs->load("errors");
|
||||
$error++;
|
||||
setEventMessage($langs->transnoentities("ErrorPaymentDateLowerThanInvoiceDate", dol_print_date($datepaye,'day'), dol_print_date($tmpinvoice->date, 'day'), $tmpinvoice->ref), 'errors');
|
||||
//$error++;
|
||||
setEventMessage($langs->transnoentities("WarningPaymentDateLowerThanInvoiceDate", dol_print_date($datepaye,'day'), dol_print_date($tmpinvoice->date, 'day'), $tmpinvoice->ref), 'warnings');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
/* Copyright (C) 2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2007-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2009-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2014 Alexandre Spangaro <alexandre.spangaro@gmail.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
|
||||
@ -20,12 +21,14 @@
|
||||
/**
|
||||
* \file htdocs/compta/paiement/cheque/liste.php
|
||||
* \ingroup compta
|
||||
* \brief Page liste des bordereau de remise de cheque
|
||||
* \brief Page list of cheque deposits
|
||||
*/
|
||||
|
||||
require('../../../main.inc.php');
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/paiement/cheque/class/remisecheque.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||
|
||||
$langs->load("banks");
|
||||
$langs->load("categories");
|
||||
@ -44,12 +47,16 @@ $pageprev = $page - 1;
|
||||
$pagenext = $page + 1;
|
||||
$limit = $conf->liste_limit;
|
||||
if (! $sortorder) $sortorder="DESC";
|
||||
if (! $sortfield) $sortfield="bc.number";
|
||||
if (! $sortfield) $sortfield="dp";
|
||||
|
||||
$year=GETPOST("year");
|
||||
$month=GETPOST("month");
|
||||
|
||||
$form=new Form($db);
|
||||
$formother = new FormOther($db);
|
||||
$checkdepositstatic=new RemiseCheque($db);
|
||||
$accountstatic=new Account($db);
|
||||
|
||||
|
||||
/*
|
||||
* View
|
||||
*/
|
||||
@ -63,10 +70,25 @@ $sql.= " FROM ".MAIN_DB_PREFIX."bordereau_cheque as bc,";
|
||||
$sql.= " ".MAIN_DB_PREFIX."bank_account as ba";
|
||||
$sql.= " WHERE bc.fk_bank_account = ba.rowid";
|
||||
$sql.= " AND bc.entity = ".$conf->entity;
|
||||
if (GETPOST('search_montant'))
|
||||
|
||||
// Search criteria
|
||||
if (GETPOST("search_ref")) $sql.=" AND bc.number=".GETPOST("search_ref",'int');
|
||||
if (GETPOST("search_account") > 0) $sql.=" AND bc.fk_bank_account=".GETPOST("search_account",'int');
|
||||
if (GETPOST("search_amount")) $sql.=" AND bc.amount=".price2num(GETPOST("search_amount"));
|
||||
if ($month > 0)
|
||||
{
|
||||
$sql.=" AND bc.amount=".price2num(GETPOST('search_montant'));
|
||||
if ($year > 0 && empty($day))
|
||||
$sql.= " AND bc.date_bordereau BETWEEN '".$db->idate(dol_get_first_day($year,$month,false))."' AND '".$db->idate(dol_get_last_day($year,$month,false))."'";
|
||||
else if ($year > 0 && ! empty($day))
|
||||
$sql.= " AND bc.date_bordereau BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $month, $day, $year))."' AND '".$db->idate(dol_mktime(23, 59, 59, $month, $day, $year))."'";
|
||||
else
|
||||
$sql.= " AND date_format(bc.date_bordereau, '%m') = '".$month."'";
|
||||
}
|
||||
else if ($year > 0)
|
||||
{
|
||||
$sql.= " AND bc.date_bordereau BETWEEN '".$db->idate(dol_get_first_day($year,1,false))."' AND '".$db->idate(dol_get_last_day($year,12,false))."'";
|
||||
}
|
||||
|
||||
$sql.= " ORDER BY $sortfield $sortorder";
|
||||
$sql.= $db->plimit($limit+1, $offset);
|
||||
//print "$sql";
|
||||
@ -79,27 +101,35 @@ if ($resql)
|
||||
$i = 0;
|
||||
$params='';
|
||||
|
||||
print_barre_liste($langs->trans("MenuChequeDeposits"), $page, 'liste.php', $params, $sortfield, $sortorder, '', $num);
|
||||
print_barre_liste($langs->trans("MenuChequeDeposits"), $page, $_SERVER["PHP_SELF"], $params, $sortfield, $sortorder, '', $num);
|
||||
|
||||
print '<form method="get" action="liste.php">';
|
||||
print '<form method="get" action="'.$_SERVER["PHP_SELF"].'">';
|
||||
print '<table class="liste" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre($langs->trans("Ref"),"liste.php","bc.number","",$params,"",$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Date"),"liste.php","dp","",$params,'align="center"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Account"),"liste.php","ba.label","",$params,"",$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("NbOfCheques"),"liste.php","bc.nbcheque","",$params,'align="right"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Amount"),"liste.php","bc.amount","",$params,'align="right"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Status"),"liste.php","bc.statut","",$params,'align="right"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"bc.number","",$params,"",$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Date"),$_SERVER["PHP_SELF"],"dp","",$params,'align="center"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Account"),$_SERVER["PHP_SELF"],"ba.label","",$params,"",$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("NbOfCheques"),$_SERVER["PHP_SELF"],"bc.nbcheque","",$params,'align="right"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Amount"),$_SERVER["PHP_SELF"],"bc.amount","",$params,'align="right"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"bc.statut","",$params,'align="right"',$sortfield,$sortorder);
|
||||
print "</tr>\n";
|
||||
|
||||
// Lignes des champs de filtre
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td class="liste_titre"> </td>';
|
||||
print '<td class="liste_titre"> </td>';
|
||||
print '<td class="liste_titre"> </td>';
|
||||
print '<td class="liste_titre" align="left">';
|
||||
print '<input class="fat" type="text" size="4" name="search_ref" value="'.GETPOST('search_ref').'">';
|
||||
print '</td>';
|
||||
print '<td class="liste_titre" align="center">';
|
||||
if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print '<input class="flat" type="text" size="1" maxlength="2" name="day" value="'.$day.'">';
|
||||
print '<input class="flat" type="text" size="1" maxlength="2" name="month" value="'.$month.'">';
|
||||
$formother->select_year($year?$year:-1,'year',1, 20, 5);
|
||||
print '</td>';
|
||||
print '<td>';
|
||||
$form->select_comptes($_REQUEST["search_account"],'search_account',0,'',1);
|
||||
print '</td>';
|
||||
print '<td class="liste_titre"> </td>';
|
||||
print '<td class="liste_titre" align="right">';
|
||||
print '<input class="fat" type="text" size="6" name="search_montant" value="'.GETPOST('search_montant').'">';
|
||||
print '<input class="fat" type="text" size="6" name="search_amount" value="'.GETPOST('search_amount').'">';
|
||||
print '</td>';
|
||||
print '<td class="liste_titre" align="right">';
|
||||
print '<input type="image" class="liste_titre" name="button_search" src="'.img_picto($langs->trans("Search"),'search.png','','',1).'" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'">';
|
||||
@ -124,16 +154,16 @@ if ($resql)
|
||||
// Date
|
||||
print '<td align="center">'.dol_print_date($db->jdate($objp->dp),'day').'</td>';
|
||||
|
||||
// Banque
|
||||
// Bank
|
||||
print '<td>';
|
||||
if ($objp->bid) print '<a href="'.DOL_URL_ROOT.'/compta/bank/account.php?account='.$objp->bid.'">'.img_object($langs->trans("ShowAccount"),'account').' '.$objp->label.'</a>';
|
||||
else print ' ';
|
||||
print '</td>';
|
||||
|
||||
// Nb of cheques
|
||||
// Number of cheques
|
||||
print '<td align="right">'.$objp->nbcheque.'</td>';
|
||||
|
||||
// Montant
|
||||
// Amount
|
||||
print '<td align="right">'.price($objp->amount).'</td>';
|
||||
|
||||
// Statut
|
||||
|
||||
@ -4,6 +4,7 @@
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2014 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2014 Florian Henry <florian.henry@open-concept.pro>
|
||||
*
|
||||
* 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
|
||||
@ -33,6 +34,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||
|
||||
|
||||
$langs->load("bills");
|
||||
$langs->load("donation");
|
||||
$langs->load("salaries");
|
||||
|
||||
$date_startmonth=GETPOST('date_startmonth');
|
||||
$date_startday=GETPOST('date_startday');
|
||||
@ -555,7 +558,7 @@ if (! empty($date_start) && ! empty($date_end))
|
||||
$sql.= " GROUP BY u.rowid, u.firstname, u.lastname, p.fk_user, p.label, dm";
|
||||
$sql.= " ORDER BY u.firstname";
|
||||
|
||||
dol_syslog("get payment salaries sql=".$sql);
|
||||
dol_syslog("get payment salaries");
|
||||
$result=$db->query($sql);
|
||||
$subtotal_ht = 0;
|
||||
$subtotal_ttc = 0;
|
||||
@ -598,6 +601,64 @@ else
|
||||
{
|
||||
dol_print_error($db);
|
||||
}
|
||||
|
||||
/*
|
||||
* Dunning
|
||||
*/
|
||||
|
||||
print '<tr><td colspan="4">'.$langs->trans("Donation").'</td></tr>';
|
||||
$sql = "SELECT p.societe as nom, p.firstname, p.lastname, date_format(p.datedon,'%Y-%m') as dm, sum(p.amount) as amount";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."don as p";
|
||||
$sql.= " WHERE p.entity = ".$conf->entity;
|
||||
$sql.= " AND fk_statut=2";
|
||||
if (! empty($date_start) && ! empty($date_end))
|
||||
$sql.= " AND p.datedon >= '".$db->idate($date_start)."' AND p.datedon <= '".$db->idate($date_end)."'";
|
||||
$sql.= " GROUP BY p.societe, p.firstname, p.lastname";
|
||||
$sql.= " ORDER BY p.societe, p.firstname, p.lastname";
|
||||
|
||||
dol_syslog("get dunning");
|
||||
$result=$db->query($sql);
|
||||
$subtotal_ht = 0;
|
||||
$subtotal_ttc = 0;
|
||||
if ($result)
|
||||
{
|
||||
$num = $db->num_rows($result);
|
||||
$var=true;
|
||||
$i = 0;
|
||||
if ($num)
|
||||
{
|
||||
while ($i < $num)
|
||||
{
|
||||
$obj = $db->fetch_object($result);
|
||||
|
||||
$total_ht += $obj->amount;
|
||||
$total_ttc += $obj->amount;
|
||||
$subtotal_ht -= $obj->amount;
|
||||
$subtotal_ttc -= $obj->amount;
|
||||
|
||||
$var = !$var;
|
||||
print "<tr ".$bc[$var]."><td> </td>";
|
||||
|
||||
print "<td>".$langs->trans("Donation")." <a href=\"".DOL_URL_ROOT."/compta/dons/liste.php?search_company=".$obj->nom."&search_name=".$obj->firstname." ".$obj->lastname."\">".$obj->nom. " ".$obj->firstname." ".$obj->lastname."</a></td>\n";
|
||||
|
||||
if ($modecompta == 'CREANCES-DETTES') print '<td align="right">'.price($obj->amount).'</td>';
|
||||
print '<td align="right">'.price($obj->amount).'</td>';
|
||||
print '</tr>';
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$var = !$var;
|
||||
print "<tr ".$bc[$var]."><td> </td>";
|
||||
print '<td colspan="3">'.$langs->trans("None").'</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
dol_print_error($db);
|
||||
}
|
||||
print '<tr class="liste_total">';
|
||||
if ($modecompta == 'CREANCES-DETTES')
|
||||
print '<td colspan="3" align="right">'.price(-$subtotal_ht).'</td>';
|
||||
|
||||
@ -4,6 +4,7 @@
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2014 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2014 Florian Henry <florian.henry@open-concept.pro>
|
||||
*
|
||||
* 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
|
||||
@ -480,7 +481,7 @@ $sql.= " FROM ".MAIN_DB_PREFIX."payment_salary as p";
|
||||
$sql.= " WHERE p.entity = ".$conf->entity;
|
||||
$sql.= " GROUP BY p.label, dm";
|
||||
|
||||
dol_syslog("get social salaries payments sql=".$sql);
|
||||
dol_syslog("get social salaries payments");
|
||||
$result=$db->query($sql);
|
||||
if ($result)
|
||||
{
|
||||
@ -508,6 +509,45 @@ else
|
||||
dol_print_error($db);
|
||||
}
|
||||
|
||||
/*
|
||||
* get dunning paiement
|
||||
*/
|
||||
$subtotal_ht = 0;
|
||||
$subtotal_ttc = 0;
|
||||
$sql = "SELECT p.societe as nom, p.firstname, p.lastname, date_format(p.datedon,'%Y-%m') as dm, sum(p.amount) as amount";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."don as p";
|
||||
$sql.= " WHERE p.entity = ".$conf->entity;
|
||||
$sql.= " AND fk_statut=2";
|
||||
$sql.= " GROUP BY p.societe, p.firstname, p.lastname, dm";
|
||||
|
||||
dol_syslog("get social salaries payments");
|
||||
$result=$db->query($sql);
|
||||
if ($result)
|
||||
{
|
||||
$num = $db->num_rows($result);
|
||||
$var=false;
|
||||
$i = 0;
|
||||
if ($num)
|
||||
{
|
||||
while ($i < $num)
|
||||
{
|
||||
$obj = $db->fetch_object($result);
|
||||
|
||||
if (! isset($encaiss[$obj->dm])) $encaiss[$obj->dm]=0;
|
||||
$encaiss[$obj->dm] += $obj->amount;
|
||||
|
||||
if (! isset($encaiss_ttc[$obj->dm])) $encaiss_ttc[$obj->dm]=0;
|
||||
$encaiss_ttc[$obj->dm] += $obj->amount;
|
||||
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
dol_print_error($db);
|
||||
}
|
||||
|
||||
/*
|
||||
* Show result array
|
||||
*/
|
||||
|
||||
@ -27,8 +27,7 @@
|
||||
|
||||
|
||||
/**
|
||||
* \class CommonDocGenerator
|
||||
* \brief Parent class for documents generators
|
||||
* Parent class for documents generators
|
||||
*/
|
||||
abstract class CommonDocGenerator
|
||||
{
|
||||
|
||||
@ -3344,7 +3344,7 @@ class Form
|
||||
* @param string $htmlname Nom du formulaire select
|
||||
* @return void
|
||||
*/
|
||||
function form_contacts($page, $societe, $selected='', $htmlname='contactidp')
|
||||
function form_contacts($page, $societe, $selected='', $htmlname='contactid')
|
||||
{
|
||||
global $langs, $conf;
|
||||
|
||||
|
||||
@ -685,7 +685,7 @@ class FormMail
|
||||
* @param DoliDB $db Database handler
|
||||
* @param string $type_template Get message for key module
|
||||
* @param string $user Use template public or limited to this user
|
||||
* @para Translate $outputlangs Output lang object
|
||||
* @param Translate $outputlangs Output lang object
|
||||
* @return array array('topic'=>,'content'=>,..)
|
||||
*/
|
||||
private function getEMailTemplate($db, $type_template, $user, $outputlangs)
|
||||
|
||||
@ -1841,7 +1841,8 @@ function img_picto($titlealt, $picto, $options = '', $pictoisfullpath = false, $
|
||||
if ($srconly) return $fullpathpicto;
|
||||
else
|
||||
{
|
||||
$tmparray=explode(':',$titlealt);
|
||||
$tmparray=array(0=>$titlealt);
|
||||
if (preg_match('/:[^\s]/',$titlealt)) $tmparray=explode(':',$titlealt); // We explode if we have TextA:TextB. Not if we have TextA: TextB
|
||||
$title=$tmparray[0];
|
||||
$alt=empty($tmparray[1])?'':$tmparray[1];
|
||||
return '<img src="'.$fullpathpicto.'" border="0" alt="'.dol_escape_htmltag($alt).'"'.($notitle?'':' title="'.dol_escape_htmltag($title).'"').($options?' '.$options:'').'>'; // Alt is used for accessibility, title for popup
|
||||
@ -2252,6 +2253,47 @@ function img_phone($titlealt = 'default', $option = 0)
|
||||
return img_picto($titlealt, $img);
|
||||
}
|
||||
|
||||
/**
|
||||
* Show search logo
|
||||
*
|
||||
* @param string $titlealt Text on alt and title of image. Alt only if param notitle is set to 1. If text is "TextA:TextB", use Text A on alt and Text B on title.
|
||||
* @param string $other Add more attributes on img
|
||||
* @return string Retourne tag img
|
||||
*/
|
||||
function img_search($titlealt = 'default', $other = '')
|
||||
{
|
||||
global $conf, $langs;
|
||||
|
||||
if ($titlealt == 'default') $titlealt = $langs->trans('Search');
|
||||
|
||||
$img = img_picto($titlealt, 'search.png', $other, false, 1);
|
||||
|
||||
$input = '<input type="image" class="liste_titre" name="button_search" src="'.$img.'" ';
|
||||
$input.= 'value="'.dol_escape_htmltag($titlealt).'" title="'.dol_escape_htmltag($titlealt).'" >';
|
||||
|
||||
return $input;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show search logo
|
||||
*
|
||||
* @param string $titlealt Text on alt and title of image. Alt only if param notitle is set to 1. If text is "TextA:TextB", use Text A on alt and Text B on title.
|
||||
* @param string $other Add more attributes on img
|
||||
* @return string Retourne tag img
|
||||
*/
|
||||
function img_searchclear($titlealt = 'default', $other = '')
|
||||
{
|
||||
global $conf, $langs;
|
||||
|
||||
if ($titlealt == 'default') $titlealt = $langs->trans('Search');
|
||||
|
||||
$img = img_picto($titlealt, 'searchclear.png', $other, false, 1);
|
||||
|
||||
$input = '<input type="image" class="liste_titre" name="button_removefilter" src="'.$img.'" ';
|
||||
$input.= 'value="'.dol_escape_htmltag($titlealt).'" title="'.dol_escape_htmltag($titlealt).'" >';
|
||||
|
||||
return $input;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show information for admin users
|
||||
|
||||
@ -1326,7 +1326,7 @@ function getListOfModels($db,$type,$maxfilenamelength=0)
|
||||
if (! $tmpdir) { unset($listofdir[$key]); continue; }
|
||||
if (is_dir($tmpdir))
|
||||
{
|
||||
$tmpfiles=dol_dir_list($tmpdir,'files',0,'\.od(s|t)$');
|
||||
$tmpfiles=dol_dir_list($tmpdir,'files',0,'\.od(s|t)$','','name',SORT_ASC,0);
|
||||
if (count($tmpfiles)) $listoffiles=array_merge($listoffiles,$tmpfiles);
|
||||
}
|
||||
}
|
||||
|
||||
@ -642,6 +642,7 @@ function print_projecttasks_array($db, $socid, $projectsListId, $mytasks=0, $sta
|
||||
|
||||
$sortfield='';
|
||||
$sortorder='';
|
||||
$project_year_filter=0;
|
||||
|
||||
$title=$langs->trans("Project");
|
||||
if ($statut == 0) $title=$langs->trans("ProjectDraft");
|
||||
@ -681,6 +682,17 @@ function print_projecttasks_array($db, $socid, $projectsListId, $mytasks=0, $sta
|
||||
{
|
||||
$sql.= " AND p.fk_statut = ".$statut;
|
||||
}
|
||||
if (!empty($conf->global->PROJECT_LIMIT_YEAR_RANGE)) {
|
||||
$project_year_filter = GETPOST("project_year_filter");
|
||||
//Check if empty or invalid year. Wildcard ignores the sql check
|
||||
if ($project_year_filter != "*") {
|
||||
if (empty($project_year_filter) || !ctype_digit($project_year_filter)) { //
|
||||
$project_year_filter = date("Y");
|
||||
}
|
||||
$sql.= " AND (p.dateo IS NULL OR p.dateo <= ".$db->idate(dol_get_last_day($project_year_filter,12,false)).")";
|
||||
$sql.= " AND (p.datee IS NULL OR p.datee >= ".$db->idate(dol_get_first_day($project_year_filter,1,false)).")";
|
||||
}
|
||||
}
|
||||
$sql.= " GROUP BY p.rowid, p.ref, p.title, p.fk_user_creat, p.public, p.fk_statut";
|
||||
$sql.= " ORDER BY p.title, p.ref";
|
||||
|
||||
@ -724,6 +736,19 @@ function print_projecttasks_array($db, $socid, $projectsListId, $mytasks=0, $sta
|
||||
{
|
||||
dol_print_error($db);
|
||||
}
|
||||
|
||||
print "</table>";
|
||||
|
||||
if (!empty($conf->global->PROJECT_LIMIT_YEAR_RANGE)) {
|
||||
//Add the year filter input
|
||||
print '<table width="100%">';
|
||||
print '<tr>';
|
||||
print '<td>'.$langs->trans("Year").'</td>';
|
||||
print '<form method="get" action="'.$_SERVER["PHP_SELF"].'">';
|
||||
print '<td style="text-align:right"><input type="text" size="4" class="flat" name="project_year_filter" value="'.$project_year_filter.'"/>';
|
||||
print '</form>';
|
||||
print "</tr>\n";
|
||||
print '</table>';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -918,7 +918,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
|
||||
// Grand livre
|
||||
$newmenu->add("/accountancy/bookkeeping/list.php?leftmenu=bookkeeping",$langs->trans("Bookkeeping"),0,$user->rights->accounting->mouvements->lire, '', $mainmenu, 'bookkeeping');
|
||||
if (empty($leftmenu) || preg_match('/bookkeeping/',$leftmenu)) $newmenu->add("/accountancy/bookkeeping/listbyyear.php",$langs->trans("ByYear"),1,$user->rights->accounting->mouvements->lire);
|
||||
if (empty($leftmenu) || preg_match('/bookkeeping/',$leftmenu)) $newmenu->add("/accountancy/bookkeeping/balancebymonth.php.php",$langs->trans("AccountBalanceByMonth"),1,$user->rights->accounting->mouvements->lire);
|
||||
if (empty($leftmenu) || preg_match('/bookkeeping/',$leftmenu)) $newmenu->add("/accountancy/bookkeeping/balancebymonth.php",$langs->trans("AccountBalanceByMonth"),1,$user->rights->accounting->mouvements->lire);
|
||||
|
||||
// Accountancy journals
|
||||
if (! empty($conf->accounting->enabled) && !empty($user->rights->accounting->mouvements->lire) && $mainmenu == 'accountancy')
|
||||
|
||||
@ -34,6 +34,10 @@ $expeditionid = GETPOST('id','int');
|
||||
if ($user->societe_id) $socid=$user->societe_id;
|
||||
$result = restrictedArea($user, 'expedition',$expeditionid,'');
|
||||
|
||||
$search_ref_exp = GETPOST("search_ref_exp");
|
||||
$search_ref_liv = GETPOST('search_ref_liv');
|
||||
$search_societe = GETPOST("search_societe");
|
||||
|
||||
$sortfield = GETPOST('sortfield','alpha');
|
||||
$sortorder = GETPOST('sortorder','alpha');
|
||||
$page = GETPOST('page','int');
|
||||
@ -47,6 +51,13 @@ if (! $sortfield) $sortfield="e.ref";
|
||||
if (! $sortorder) $sortorder="DESC";
|
||||
$limit = $conf->liste_limit;
|
||||
|
||||
// Do we click on purge search criteria ?
|
||||
if (GETPOST("button_removefilter_x"))
|
||||
{
|
||||
$search_ref_exp='';
|
||||
$search_ref_liv='';
|
||||
$search_societe='';
|
||||
}
|
||||
|
||||
/*
|
||||
* View
|
||||
@ -79,10 +90,9 @@ if ($socid)
|
||||
{
|
||||
$sql.= " AND e.fk_soc = ".$socid;
|
||||
}
|
||||
if (GETPOST('sf_ref','alpha'))
|
||||
{
|
||||
$sql.= " AND e.ref like '%".$db->escape(GETPOST('sf_ref','alpha'))."%'";
|
||||
}
|
||||
if ($search_ref_exp) $sql .= natural_search('e.ref', $search_ref_exp);
|
||||
if ($search_ref_liv) $sql .= natural_search('l.ref', $search_ref_liv);
|
||||
if ($search_societe) $sql .= natural_search('s.nom', $search_societe);
|
||||
|
||||
$sql.= $db->order($sortfield,$sortorder);
|
||||
$sql.= $db->plimit($limit + 1,$offset);
|
||||
@ -94,7 +104,10 @@ if ($resql)
|
||||
|
||||
$expedition = new Expedition($db);
|
||||
|
||||
$param="&socid=$socid";
|
||||
$param="";
|
||||
if ($search_ref_exp) $param.= "&search_ref_exp=".$search_ref_exp;
|
||||
if ($search_ref_liv) $param.= "&search_ref_liv=".$search_ref_liv;
|
||||
if ($search_societe) $param.= "&search_societe=".$search_societe;
|
||||
|
||||
print_barre_liste($langs->trans('ListOfSendings'), $page, $_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,'',$num);
|
||||
|
||||
@ -103,14 +116,44 @@ if ($resql)
|
||||
print '<table class="noborder" width="100%">';
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"e.ref","",$param,'',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"s.nom", "", $param,'align="left"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("DateDeliveryPlanned"),$_SERVER["PHP_SELF"],"e.date_delivery","",$param, 'align="center"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Ref"),"ship2bill.php","e.ref","",$param,'',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Company"),"ship2bill.php","s.nom", "", $param,'align="left"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("DateDeliveryPlanned"),"ship2bill.php","e.date_delivery","",$param, 'align="center"',$sortfield,$sortorder);
|
||||
if($conf->livraison_bon->enabled) {
|
||||
print_liste_field_titre($langs->trans("DateReceived"),$_SERVER["PHP_SELF"],"e.date_expedition","",$param, 'align="center"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("DeliveryOrder"),"ship2bill.php","e.date_expedition","",$param, '',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("DateReceived"),"ship2bill.php","e.date_expedition","",$param, 'align="center"',$sortfield,$sortorder);
|
||||
}
|
||||
print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"e.fk_statut","",$param,'align="right"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Status"),"ship2bill.php","e.fk_statut","",$param,'align="right"',$sortfield,$sortorder);
|
||||
print "</tr>\n";
|
||||
|
||||
// Lignes des champs de filtre
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td class="liste_titre">';
|
||||
print '<input class="flat" size="10" type="text" name="search_ref_exp" value="'.$search_ref_exp.'">';
|
||||
print '</td>';
|
||||
print '<td class="liste_titre" align="left">';
|
||||
print '<input class="flat" type="text" size="10" name="search_societe" value="'.dol_escape_htmltag($search_societe).'">';
|
||||
print '</td>';
|
||||
print '<td class="liste_titre"> </td>';
|
||||
if($conf->livraison_bon->enabled) {
|
||||
print '<td class="liste_titre">';
|
||||
print '<input class="flat" size="10" type="text" name="search_ref_liv" value="'.$search_ref_liv.'"';
|
||||
print '</td>';
|
||||
print '<td class="liste_titre"> </td>';
|
||||
}
|
||||
print '<td class="liste_titre" align="right">';
|
||||
// Développé dans la 3.7
|
||||
//print img_search();
|
||||
//print img_searchclear();
|
||||
print '<input type="image" class="liste_titre" name="button_search" src="'.img_picto($langs->trans("Search"),'search.png','','',1).'" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'">';
|
||||
print '<input type="image" class="liste_titre" name="button_removefilter" src="'.img_picto($langs->trans("Search"),'searchclear.png','','',1).'" value="'.dol_escape_htmltag($langs->trans("RemoveFilter")).'" title="'.dol_escape_htmltag($langs->trans("RemoveFilter")).'">';
|
||||
print '</td>';
|
||||
print '<td class="liste_titre" align="center">';
|
||||
print '<a href="#" id="checkall">'.$langs->trans("All").'</a> / <a href="#" id="checknone">'.$langs->trans("None").'</a>';
|
||||
print '</td>';
|
||||
|
||||
print "</tr>\n";
|
||||
|
||||
$var=True;
|
||||
|
||||
while ($i < min($num,$limit))
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2002-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004-2014 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2011-2013 Juanjo Menent <jmenent@2byte.es>
|
||||
*
|
||||
@ -28,7 +28,7 @@ require_once DOL_DOCUMENT_ROOT .'/core/class/commonobjectline.class.php';
|
||||
|
||||
|
||||
/**
|
||||
* Classe des gestion des fiches interventions
|
||||
* Class to manage interventions
|
||||
*/
|
||||
class Fichinter extends CommonObject
|
||||
{
|
||||
|
||||
@ -1682,11 +1682,11 @@ else if ($id > 0 || ! empty($ref))
|
||||
{
|
||||
if ($object->statut != 2)
|
||||
{
|
||||
print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=classifybilled">'.$langs->trans("ClassifyBilled").'</a></div>';
|
||||
print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=classifybilled">'.$langs->trans("InterventionClassifyBilled").'</a></div>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=classifyunbilled">'.$langs->trans("ClassifyUnBilled").'</a></div>';
|
||||
print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=classifyunbilled">'.$langs->trans("InterventionClassifyUnBilled").'</a></div>';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -63,8 +63,9 @@ $search_status=GETPOST('search_status');
|
||||
*/
|
||||
|
||||
$form = new Form($db);
|
||||
$interventionstatic=new Fichinter($db);
|
||||
|
||||
llxHeader();
|
||||
llxHeader('', $langs->trans("Intervention"));
|
||||
|
||||
|
||||
$sql = "SELECT";
|
||||
@ -102,8 +103,6 @@ if ($result)
|
||||
{
|
||||
$num = $db->num_rows($result);
|
||||
|
||||
$interventionstatic=new Fichinter($db);
|
||||
|
||||
$urlparam="&socid=$socid";
|
||||
print_barre_liste($langs->trans("ListOfInterventions"), $page, $_SERVER['PHP_SELF'], $urlparam, $sortfield, $sortorder, '', $num);
|
||||
|
||||
@ -139,8 +138,8 @@ if ($result)
|
||||
print '<td class="liste_titre"> </td>';
|
||||
}
|
||||
print '<td class="liste_titre" align="right">';
|
||||
$liststatus=array('0'=>$langs->trans("Draft"), '1'=>$langs->trans("Validated"), '2'=>$langs->trans("Billed"));
|
||||
print $form->selectarray('search_status', $liststatus, GETPOST('search_status'), 1);
|
||||
$liststatus=$interventionstatic->statuts_short;
|
||||
print $form->selectarray('search_status', $liststatus, GETPOST('search_status'), 1, 0, 0, '', 1);
|
||||
print '<input class="liste_titre" align="right" type="image" src="'.img_picto($langs->trans("Search"),'search.png','','',1).'" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'">';
|
||||
print '</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
@ -106,8 +106,8 @@ if ($action == 'add_paiement' || ($action == 'confirm_paiement' && $confirm=='ye
|
||||
if ($datepaye && ($datepaye < $tmpinvoice->date))
|
||||
{
|
||||
$langs->load("errors");
|
||||
$error++;
|
||||
setEventMessage($langs->transnoentities("ErrorPaymentDateLowerThanInvoiceDate", dol_print_date($datepaye,'day'), dol_print_date($tmpinvoice->date, 'day'), $tmpinvoice->ref), 'errors');
|
||||
//$error++;
|
||||
setEventMessage($langs->transnoentities("WarningPaymentDateLowerThanInvoiceDate", dol_print_date($datepaye,'day'), dol_print_date($tmpinvoice->date, 'day'), $tmpinvoice->ref), 'warnings');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -20,6 +20,9 @@
|
||||
|
||||
|
||||
|
||||
ALTER TABLE llx_fichinter ADD COLUMN ref_ext varchar(255);
|
||||
|
||||
|
||||
-- Defined only to have specific list for countries that can't use generic list (like argentina that need type A or B)
|
||||
ALTER TABLE llx_c_typent ADD COLUMN fk_country integer NULL AFTER libelle;
|
||||
|
||||
|
||||
@ -108,6 +108,7 @@ UPDATE llx_product p SET p.stock= (SELECT SUM(ps.reel) FROM llx_product_stock ps
|
||||
-- VMYSQL DELETE from llx_menu where module = 'margins' and url = '/margin/index.php' and not exists (select * from llx_const where name = 'MAIN_MODULE_MARGIN' or name = 'MAIN_MODULE_MARGINS');
|
||||
|
||||
|
||||
ALTER TABLE llx_product_fournisseur_price DROP COLUMN fk_product_fournisseur;
|
||||
ALTER TABLE llx_product_fournisseur_price DROP FOREIGN KEY fk_product_fournisseur;
|
||||
|
||||
|
||||
@ -178,3 +179,9 @@ UPDATE llx_actioncomm set fk_user_action = fk_user_author where fk_user_author >
|
||||
-- DROP TABLE llx_pos_moviments;
|
||||
-- DROP TABLE llx_pos_ticketdet;
|
||||
|
||||
-- To replace amount on all invoice and lines when forgetting to apply a 20% vat
|
||||
-- update llx_facturedet set tva_tx = 20 where tva_tx = 0;
|
||||
-- update llx_facturedet set total_ht = round(total_ttc / 1.2, 5) where total_ht = total_ttc;
|
||||
-- update llx_facturedet set total_tva = total_ttc - total_ht where total_vat = 0;
|
||||
-- update llx_facture set total = round(total_ttc / 1.2, 5) where total_ht = total_ttc;
|
||||
-- update llx_facture set tva = total_ttc - total where tva = 0;
|
||||
|
||||
@ -24,6 +24,7 @@ create table llx_fichinter
|
||||
fk_projet integer DEFAULT 0, -- projet auquel est rattache la fiche
|
||||
fk_contrat integer DEFAULT 0, -- contrat auquel est rattache la fiche
|
||||
ref varchar(30) NOT NULL, -- number
|
||||
ref_ext varchar(255),
|
||||
entity integer DEFAULT 1 NOT NULL, -- multi company id
|
||||
tms timestamp,
|
||||
datec datetime, -- date de creation
|
||||
|
||||
@ -122,6 +122,7 @@ CustomerInvoicePayment=Payment of invoice customer
|
||||
|
||||
ThirdPartyAccount=Thirdparty account
|
||||
|
||||
NewAccountingMvt=New movement
|
||||
NumMvts=Number of movement
|
||||
ListeMvts=List of the movement
|
||||
ErrorDebitCredit=Debit and Credit cannot have a value at the same time
|
||||
|
||||
@ -30,3 +30,4 @@ SearchADonation=Search a donation
|
||||
DonationRecipient=Donation recipient
|
||||
ThankYou=Thank You
|
||||
IConfirmDonationReception=The recipient declare reception, as a donation, of the following amount
|
||||
MinimumAmount=Minimum amount is %s
|
||||
|
||||
@ -133,7 +133,6 @@ ErrorPHPNeedModule=Error, your PHP must have module <b>%s</b> installed to use t
|
||||
ErrorOpenIDSetupNotComplete=You setup Dolibarr config file to allow OpenID authentication, but URL of OpenID service is not defined into constant %s
|
||||
ErrorWarehouseMustDiffers=Source and target warehouses must differs
|
||||
ErrorBadFormat=Bad format!
|
||||
ErrorPaymentDateLowerThanInvoiceDate=Payment date (%s) cant' be before invoice date (%s) for invoice %s.
|
||||
ErrorMemberNotLinkedToAThirpartyLinkOrCreateFirst=Error, this member is not yet linked to any thirdparty. Link member to an existing third party or create a new thirdparty before creating subscription with invoice.
|
||||
ErrorThereIsSomeDeliveries=Error, there is some deliveries linked to this shipment. Deletion refused.
|
||||
ErrorCantDeletePaymentReconciliated=Can't delete a payment that had generated a bank transaction that was conciliated
|
||||
@ -155,4 +154,6 @@ WarningCloseAlways=Warning, closing is done even if amount differs between sourc
|
||||
WarningUsingThisBoxSlowDown=Warning, using this box slow down seriously all pages showing the box.
|
||||
WarningClickToDialUserSetupNotComplete=Setup of ClickToDial information for your user are not complete (see tab ClickToDial onto your user card).
|
||||
WarningNotRelevant=Irrelevant operation for this dataset
|
||||
WarningFeatureDisabledWithDisplayOptimizedForBlindNoJs=Feature disabled when display setup is optimized for blind person or text browsers.
|
||||
WarningFeatureDisabledWithDisplayOptimizedForBlindNoJs=Feature disabled when display setup is optimized for blind person or text browsers.
|
||||
WarningPaymentDateLowerThanInvoiceDate=Payment date (%s) is earlier than invoice date (%s) for invoice %s.
|
||||
WarningTooManyDataPleaseUseMoreFilters=Too many data. Please use more filters
|
||||
|
||||
@ -24,8 +24,8 @@ NameAndSignatureOfInternalContact=Name and signature of intervening :
|
||||
NameAndSignatureOfExternalContact=Name and signature of customer :
|
||||
DocumentModelStandard=Standard document model for interventions
|
||||
InterventionCardsAndInterventionLines=Interventions and lines of interventions
|
||||
ClassifyBilled=Classify "Billed"
|
||||
ClassifyUnBilled=Classify "Unbilled"
|
||||
InterventionClassifyBilled=Classify "Billed"
|
||||
InterventionClassifyUnBilled=Classify "Unbilled"
|
||||
StatusInterInvoiced=Billed
|
||||
RelatedInterventions=Related interventions
|
||||
ShowIntervention=Show intervention
|
||||
|
||||
@ -120,6 +120,7 @@ CustomerInvoicePayment=Pago Factura a cliente
|
||||
|
||||
ThirdPartyAccount=Cuenta tercero
|
||||
|
||||
NewAccountingMvt=Nueva movimiento
|
||||
NumMvts=Número de movimiento
|
||||
ListeMvts=Apuntes del movimiento
|
||||
ErrorDebitCredit=Débito y Crédito no pueden terner valor al mismo tiempo
|
||||
|
||||
@ -133,7 +133,6 @@ ErrorPHPNeedModule=Error, su PHP debe tener instalado el módulo <b>%s</b> para
|
||||
ErrorOpenIDSetupNotComplete=Ha configurado Dolibarr para aceptar la autentificación OpenID, pero la URL del servicio OpenID no se encuentra definida en la constante %s
|
||||
ErrorWarehouseMustDiffers=El almacén de origen y destino deben de ser diferentes
|
||||
ErrorBadFormat=¡El formato es erróneo!
|
||||
ErrorPaymentDateLowerThanInvoiceDate=La fecha de pago (%s) no puede ser anterior a la fecha (%s) de la factura %s.
|
||||
ErrorMemberNotLinkedToAThirpartyLinkOrCreateFirst=Error, este miembro aún no está enlazado a un tercero. Enlace el miembro a un tercero existente o cree un tercero nuevo antes de crear la suscripción con la factura.
|
||||
ErrorThereIsSomeDeliveries=Error, hay entregas vinculadas a este envío. No se puede eliminar.
|
||||
ErrorCantDeletePaymentReconciliated=No se puede eliminar un pago que ha generado una transacción bancaria que se encuentra conciliada
|
||||
@ -156,3 +155,4 @@ WarningUsingThisBoxSlowDown=Atención, el uso de este panel provoca serias ralen
|
||||
WarningClickToDialUserSetupNotComplete=La configuración de ClickToDial para su cuenta de usuario no está completa (vea la pestaña ClickToDial en su ficha de usuario)
|
||||
WarningNotRelevant=Operación irrelevante para este conjunto de datos
|
||||
WarningFeatureDisabledWithDisplayOptimizedForBlindNoJs=Funcionalidad desactivada cuando la configuración de visualización es optimizada para personas ciegas o navegadores de texto.
|
||||
WarningPaymentDateLowerThanInvoiceDate=La fecha de pago (%s) es anterior a la fecha (%s) de la factura %s.
|
||||
|
||||
@ -122,6 +122,7 @@ CustomerInvoicePayment=Règlement de facture client
|
||||
|
||||
ThirdPartyAccount=Compte tiers
|
||||
|
||||
NewAccountingMvt=Nouveau mouvement
|
||||
NumMvts=Numéro de mouvement
|
||||
ListeMvts=Liste du mouvement
|
||||
ErrorDebitCredit=Debit et Credit ne peuvent avoir une valeur en même temps
|
||||
|
||||
@ -37,4 +37,5 @@ IConfirmDonationReception=Le bénéficiaire reconnait avoir reçu au titre des d
|
||||
FrenchOptions=Options éligibles en France
|
||||
DONATION_ART200=Les dons ou versements reçus sont éligibles à l'article 200 du CGI
|
||||
DONATION_ART238=Les dons ou versements reçus sont éligibles à l'article 238bis du CGI
|
||||
DONATION_ART885=Les dons ou versements reçus sont éligibles à l'article 885-0 V bis A du CGI
|
||||
DONATION_ART885=Les dons ou versements reçus sont éligibles à l'article 885-0 V bis A du CGI
|
||||
MinimumAmount=Le montant minimum du don est de %s
|
||||
@ -133,7 +133,6 @@ ErrorPHPNeedModule=Erreur, votre PHP doit avoir le module <b>%s</b> installé po
|
||||
ErrorOpenIDSetupNotComplete=Vous avez configuré Dolibarr pour accepter l'authentication OpenID, mais l'URL du service OpenID n'est pas défini dans la constante %s
|
||||
ErrorWarehouseMustDiffers=Les entrepôts source et destination doivent être différents
|
||||
ErrorBadFormat=Mauvais format
|
||||
ErrorPaymentDateLowerThanInvoiceDate=La date de paiement (%s) ne peut être inférieure à la date de facturaction (%s) de la facture %s.
|
||||
ErrorMemberNotLinkedToAThirpartyLinkOrCreateFirst=Erreur, cet adhérent n'est lié à aucun tiers. Lier l'adhérent à un tiers existant ou créer un nouveau tiers pour le lier avant de créer l'adhésion avec facture.
|
||||
ErrorThereIsSomeDeliveries=Erreur, il y a des bordereaux de réception liées à ces expéditions. La suppression est refusée.
|
||||
|
||||
@ -154,3 +153,4 @@ WarningUsingThisBoxSlowDown=Attention, l'utilisation de cette boite provoque de
|
||||
WarningClickToDialUserSetupNotComplete=La configuration ClickToDial pour votre compte utilisateur n'est pas complète (voir l'onglet ClickToDial sur votre fiche utilisateur)
|
||||
WarningNotRelevant=Opération non pertinente pour cet ensemble de données
|
||||
WarningFeatureDisabledWithDisplayOptimizedForBlindNoJs=Fonction désactivé quand l'affichage est en mode optimisé pour les personnes aveugles ou les navigateurs textes.
|
||||
WarningPaymentDateLowerThanInvoiceDate=La date de paiement (%s) est inférieure à la date de facturaction (%s) de la facture %s.
|
||||
|
||||
@ -1398,7 +1398,7 @@ class Product extends CommonObject
|
||||
return -1;
|
||||
}
|
||||
|
||||
$sql = "SELECT rowid, ref, label, description, url, note, customcode, fk_country, price, price_ttc,";
|
||||
$sql = "SELECT rowid, ref, ref_ext, label, description, url, note, customcode, fk_country, price, price_ttc,";
|
||||
$sql.= " price_min, price_min_ttc, price_base_type, tva_tx, recuperableonly as tva_npr, localtax1_tx, localtax2_tx, tosell,";
|
||||
$sql.= " tobuy, fk_product_type, duration, seuil_stock_alerte, canvas,";
|
||||
$sql.= " weight, weight_units, length, length_units, surface, surface_units, volume, volume_units, barcode, fk_barcode_type, finished,";
|
||||
@ -1423,6 +1423,7 @@ class Product extends CommonObject
|
||||
|
||||
$this->id = $obj->rowid;
|
||||
$this->ref = $obj->ref;
|
||||
$this->ref_ext = $obj->ref_ext;
|
||||
$this->libelle = $obj->label; // TODO deprecated
|
||||
$this->label = $obj->label;
|
||||
$this->description = $obj->description;
|
||||
|
||||
@ -41,9 +41,10 @@ $mine = GETPOST('mode')=='mine' ? 1 : 0;
|
||||
//if (! $user->rights->projet->all->lire) $mine=1; // Special for projects
|
||||
|
||||
$object = new Project($db);
|
||||
if ($ref)
|
||||
if ($id > 0 || ! empty($ref))
|
||||
{
|
||||
$object->fetch(0,$ref);
|
||||
$object->fetch($id,$ref);
|
||||
$object->fetch_thirdparty();
|
||||
$id=$object->id;
|
||||
}
|
||||
|
||||
@ -140,82 +141,73 @@ $userstatic=new User($db);
|
||||
|
||||
if ($id > 0 || ! empty($ref))
|
||||
{
|
||||
if ( $object->fetch($id,$ref) > 0)
|
||||
// To verify role of users
|
||||
//$userAccess = $object->restrictedProjectArea($user,'read');
|
||||
$userWrite = $object->restrictedProjectArea($user,'write');
|
||||
//$userDelete = $object->restrictedProjectArea($user,'delete');
|
||||
//print "userAccess=".$userAccess." userWrite=".$userWrite." userDelete=".$userDelete;
|
||||
|
||||
$head = project_prepare_head($object);
|
||||
dol_fiche_head($head, 'contact', $langs->trans("Project"), 0, ($object->public?'projectpub':'project'));
|
||||
|
||||
|
||||
/*
|
||||
* Projet synthese pour rappel
|
||||
*/
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/projet/liste.php">'.$langs->trans("BackToList").'</a>';
|
||||
|
||||
// Ref
|
||||
print '<tr><td width="30%">'.$langs->trans('Ref').'</td><td colspan="3">';
|
||||
// Define a complementary filter for search of next/prev ref.
|
||||
if (! $user->rights->projet->all->lire)
|
||||
{
|
||||
if ($object->societe->id > 0) $result=$object->societe->fetch($object->societe->id);
|
||||
|
||||
// To verify role of users
|
||||
//$userAccess = $object->restrictedProjectArea($user,'read');
|
||||
$userWrite = $object->restrictedProjectArea($user,'write');
|
||||
//$userDelete = $object->restrictedProjectArea($user,'delete');
|
||||
//print "userAccess=".$userAccess." userWrite=".$userWrite." userDelete=".$userDelete;
|
||||
|
||||
$head = project_prepare_head($object);
|
||||
dol_fiche_head($head, 'contact', $langs->trans("Project"), 0, ($object->public?'projectpub':'project'));
|
||||
|
||||
|
||||
/*
|
||||
* Projet synthese pour rappel
|
||||
*/
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/projet/liste.php">'.$langs->trans("BackToList").'</a>';
|
||||
|
||||
// Ref
|
||||
print '<tr><td width="30%">'.$langs->trans('Ref').'</td><td colspan="3">';
|
||||
// Define a complementary filter for search of next/prev ref.
|
||||
if (! $user->rights->projet->all->lire)
|
||||
{
|
||||
$objectsListId = $object->getProjectsAuthorizedForUser($user,$mine,0);
|
||||
$object->next_prev_filter=" rowid in (".(count($objectsListId)?join(',',array_keys($objectsListId)):'0').")";
|
||||
}
|
||||
print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', '');
|
||||
print '</td></tr>';
|
||||
|
||||
// Label
|
||||
print '<tr><td>'.$langs->trans("Label").'</td><td>'.$object->title.'</td></tr>';
|
||||
|
||||
// Customer
|
||||
print "<tr><td>".$langs->trans("ThirdParty")."</td>";
|
||||
print '<td colspan="3">';
|
||||
if ($object->societe->id > 0) print $object->societe->getNomUrl(1);
|
||||
else print ' ';
|
||||
print '</td></tr>';
|
||||
|
||||
// Visibility
|
||||
print '<tr><td>'.$langs->trans("Visibility").'</td><td>';
|
||||
if ($object->public) print $langs->trans('SharedProject');
|
||||
else print $langs->trans('PrivateProject');
|
||||
print '</td></tr>';
|
||||
|
||||
// Statut
|
||||
print '<tr><td>'.$langs->trans("Status").'</td><td>'.$object->getLibStatut(4).'</td></tr>';
|
||||
|
||||
// Date start
|
||||
print '<tr><td>'.$langs->trans("DateStart").'</td><td>';
|
||||
print dol_print_date($object->date_start,'day');
|
||||
print '</td></tr>';
|
||||
|
||||
// Date end
|
||||
print '<tr><td>'.$langs->trans("DateEnd").'</td><td>';
|
||||
print dol_print_date($object->date_end,'day');
|
||||
print '</td></tr>';
|
||||
|
||||
print "</table>";
|
||||
|
||||
print '</div>';
|
||||
|
||||
// Contacts lines (modules that overwrite templates must declare this into descriptor)
|
||||
$dirtpls=array_merge($conf->modules_parts['tpl'],array('/core/tpl'));
|
||||
foreach($dirtpls as $reldir)
|
||||
{
|
||||
$res=@include dol_buildpath($reldir.'/contacts.tpl.php');
|
||||
if ($res) break;
|
||||
}
|
||||
$objectsListId = $object->getProjectsAuthorizedForUser($user,$mine,0);
|
||||
$object->next_prev_filter=" rowid in (".(count($objectsListId)?join(',',array_keys($objectsListId)):'0').")";
|
||||
}
|
||||
else
|
||||
print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', '');
|
||||
print '</td></tr>';
|
||||
|
||||
// Label
|
||||
print '<tr><td>'.$langs->trans("Label").'</td><td>'.$object->title.'</td></tr>';
|
||||
|
||||
// Customer
|
||||
print "<tr><td>".$langs->trans("ThirdParty")."</td>";
|
||||
print '<td colspan="3">';
|
||||
if ($object->thirdparty->id > 0) print $object->thirdparty->getNomUrl(1);
|
||||
else print ' ';
|
||||
print '</td></tr>';
|
||||
|
||||
// Visibility
|
||||
print '<tr><td>'.$langs->trans("Visibility").'</td><td>';
|
||||
if ($object->public) print $langs->trans('SharedProject');
|
||||
else print $langs->trans('PrivateProject');
|
||||
print '</td></tr>';
|
||||
|
||||
// Statut
|
||||
print '<tr><td>'.$langs->trans("Status").'</td><td>'.$object->getLibStatut(4).'</td></tr>';
|
||||
|
||||
// Date start
|
||||
print '<tr><td>'.$langs->trans("DateStart").'</td><td>';
|
||||
print dol_print_date($object->date_start,'day');
|
||||
print '</td></tr>';
|
||||
|
||||
// Date end
|
||||
print '<tr><td>'.$langs->trans("DateEnd").'</td><td>';
|
||||
print dol_print_date($object->date_end,'day');
|
||||
print '</td></tr>';
|
||||
|
||||
print "</table>";
|
||||
|
||||
print '</div>';
|
||||
|
||||
// Contacts lines (modules that overwrite templates must declare this into descriptor)
|
||||
$dirtpls=array_merge($conf->modules_parts['tpl'],array('/core/tpl'));
|
||||
foreach($dirtpls as $reldir)
|
||||
{
|
||||
print "ErrorRecordNotFound";
|
||||
$res=@include dol_buildpath($reldir.'/contacts.tpl.php');
|
||||
if ($res) break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -46,9 +46,9 @@ if ($user->societe_id > 0) $socid=$user->societe_id;
|
||||
$result=restrictedArea($user,'projet',$id,'');
|
||||
|
||||
$object = new Project($db);
|
||||
$object->fetch($id,$ref);
|
||||
if ($object->id > 0)
|
||||
if ($id > 0 || ! empty($ref))
|
||||
{
|
||||
$object->fetch($id,$ref);
|
||||
$object->fetch_thirdparty();
|
||||
$upload_dir = $conf->projet->dir_output . "/" . dol_sanitizeFileName($object->ref);
|
||||
}
|
||||
@ -85,8 +85,6 @@ if ($object->id > 0)
|
||||
{
|
||||
$upload_dir = $conf->projet->dir_output.'/'.dol_sanitizeFileName($object->ref);
|
||||
|
||||
if ($object->societe->id > 0) $result=$object->societe->fetch($object->societe->id);
|
||||
|
||||
// To verify role of users
|
||||
//$userAccess = $object->restrictedProjectArea($user,'read');
|
||||
$userWrite = $object->restrictedProjectArea($user,'write');
|
||||
@ -124,7 +122,7 @@ if ($object->id > 0)
|
||||
|
||||
// Company
|
||||
print '<tr><td>'.$langs->trans("ThirdParty").'</td><td>';
|
||||
if (! empty($object->societe->id)) print $object->societe->getNomUrl(1);
|
||||
if (! empty($object->thirdparty->id)) print $object->thirdparty->getNomUrl(1);
|
||||
else print ' ';
|
||||
print '</td></tr>';
|
||||
|
||||
|
||||
@ -61,12 +61,17 @@ $mine = $_REQUEST['mode']=='mine' ? 1 : 0;
|
||||
//if (! $user->rights->projet->all->lire) $mine=1; // Special for projects
|
||||
|
||||
$project = new Project($db);
|
||||
if ($ref)
|
||||
if ($id > 0 || ! empty($ref))
|
||||
{
|
||||
$project->fetch(0,$ref);
|
||||
$project->fetch($id,$ref);
|
||||
$project->fetch_thirdparty();
|
||||
$projectid=$project->id;
|
||||
}else {
|
||||
}
|
||||
else
|
||||
{
|
||||
$project->fetch($projectid);
|
||||
$project->fetch_thirdparty();
|
||||
$projectid=$project->id;
|
||||
}
|
||||
|
||||
// Security check
|
||||
@ -87,10 +92,6 @@ $formproject=new FormProjets($db);
|
||||
|
||||
$userstatic=new User($db);
|
||||
|
||||
$project = new Project($db);
|
||||
$project->fetch($projectid,$ref);
|
||||
$project->fetch_thirdparty();
|
||||
|
||||
// To verify role of users
|
||||
$userAccess = $project->restrictedProjectArea($user);
|
||||
|
||||
|
||||
@ -49,10 +49,11 @@ $hookmanager->initHooks(array('projectcard'));
|
||||
|
||||
$object = new Project($db);
|
||||
$extrafields = new ExtraFields($db);
|
||||
$object->fetch($id,$ref);
|
||||
if ($object->id > 0)
|
||||
if ($id > 0 || ! empty($ref))
|
||||
{
|
||||
$object->fetch($id,$ref);
|
||||
$object->fetch_thirdparty();
|
||||
$id=$object->id;
|
||||
}
|
||||
|
||||
// Security check
|
||||
@ -259,8 +260,8 @@ if (empty($reshook))
|
||||
{
|
||||
$db->commit();
|
||||
|
||||
if (GETPOST('socid','int') > 0) $object->societe->fetch(GETPOST('socid','int'));
|
||||
else unset($object->societe);
|
||||
if (GETPOST('socid','int') > 0) $object->thirdparty->fetch(GETPOST('socid','int'));
|
||||
else unset($object->thirdparty);
|
||||
}
|
||||
}
|
||||
|
||||
@ -488,7 +489,6 @@ else
|
||||
* Show or edit
|
||||
*/
|
||||
|
||||
if ($object->societe->id > 0) $result=$object->societe->fetch($object->societe->id);
|
||||
$res=$object->fetch_optionals($object->id,$extralabels);
|
||||
|
||||
// To verify role of users
|
||||
@ -562,7 +562,7 @@ else
|
||||
|
||||
// Customer
|
||||
print '<tr><td>'.$langs->trans("ThirdParty").'</td><td>';
|
||||
$text=$form->select_company($object->societe->id,'socid','',1,1);
|
||||
$text=$form->select_company($object->thirdparty->id,'socid','',1,1);
|
||||
$texthelp=$langs->trans("IfNeedToUseOhterObjectKeepEmpty");
|
||||
print $form->textwithtooltip($text.' '.img_help(),$texthelp,1);
|
||||
print '</td></tr>';
|
||||
@ -633,7 +633,7 @@ else
|
||||
|
||||
// Third party
|
||||
print '<tr><td>'.$langs->trans("ThirdParty").'</td><td>';
|
||||
if ($object->societe->id > 0) print $object->societe->getNomUrl(1);
|
||||
if ($object->thirdparty->id > 0) print $object->thirdparty->getNomUrl(1);
|
||||
else print' ';
|
||||
print '</td></tr>';
|
||||
|
||||
|
||||
@ -38,9 +38,10 @@ $mine = ($mode == 'mine' ? 1 : 0);
|
||||
//if (! $user->rights->projet->all->lire) $mine=1; // Special for projects
|
||||
|
||||
$object = new Project($db);
|
||||
if ($ref)
|
||||
if ($id > 0 || ! empty($ref))
|
||||
{
|
||||
$object->fetch(0,$ref);
|
||||
$object->fetch($id,$ref);
|
||||
$object->fetch_thirdparty();
|
||||
$id=$object->id;
|
||||
}
|
||||
|
||||
@ -69,7 +70,6 @@ $formother=new FormOther($db);
|
||||
$userstatic=new User($db);
|
||||
$companystatic=new Societe($db);
|
||||
$task = new Task($db);
|
||||
$object = new Project($db);
|
||||
|
||||
$arrayofcss=array('/includes/jsgantt/jsgantt.css');
|
||||
|
||||
@ -86,9 +86,6 @@ llxHeader("",$langs->trans("Tasks"),$help_url,'',0,0,$arrayofjs,$arrayofcss);
|
||||
|
||||
if ($id > 0 || ! empty($ref))
|
||||
{
|
||||
$object->fetch($id,$ref);
|
||||
if ($object->societe->id > 0) $result=$object->societe->fetch($object->societe->id);
|
||||
|
||||
// To verify role of users
|
||||
//$userAccess = $object->restrictedProjectArea($user,'read');
|
||||
$userWrite = $object->restrictedProjectArea($user,'write');
|
||||
@ -123,7 +120,7 @@ if ($id > 0 || ! empty($ref))
|
||||
print '<tr><td>'.$langs->trans("Label").'</td><td>'.$object->title.'</td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans("ThirdParty").'</td><td>';
|
||||
if (! empty($object->societe->id)) print $object->societe->getNomUrl(1);
|
||||
if (! empty($object->thirdparty->id)) print $object->thirdparty->getNomUrl(1);
|
||||
else print ' ';
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
@ -180,9 +180,10 @@ if ( $resql )
|
||||
|
||||
if ($num > (empty($conf->global->PROJECT_LIMIT_TASK_PROJECT_AREA)?1000:$conf->global->PROJECT_LIMIT_TASK_PROJECT_AREA))
|
||||
{
|
||||
/* print '<tr '.$bc[0].'>';
|
||||
/* $langs->load("errors");
|
||||
print '<tr '.$bc[0].'>';
|
||||
print '<td colspan="9">';
|
||||
print $langs->trans("TooManyDataPleaseUseMoreFilters");
|
||||
print $langs->trans("WarningTooManyDataPleaseUseMoreFilters");
|
||||
print '</td></tr>';*/
|
||||
}
|
||||
else
|
||||
|
||||
@ -36,9 +36,10 @@ $mine = $_REQUEST['mode']=='mine' ? 1 : 0;
|
||||
//if (! $user->rights->projet->all->lire) $mine=1; // Special for projects
|
||||
|
||||
$object = new Project($db);
|
||||
if ($ref)
|
||||
if ($id > 0 || ! empty($ref))
|
||||
{
|
||||
$object->fetch(0,$ref);
|
||||
$object->fetch($id,$ref);
|
||||
$object->fetch_thirdparty();
|
||||
$id=$object->id;
|
||||
}
|
||||
|
||||
@ -66,77 +67,71 @@ llxHeader("",$langs->trans("Project"),$help_url);
|
||||
|
||||
$form = new Form($db);
|
||||
$userstatic=new User($db);
|
||||
$object = new Project($db);
|
||||
|
||||
$now=dol_now();
|
||||
|
||||
if ($id > 0 || ! empty($ref))
|
||||
{
|
||||
if ($object->fetch($id, $ref))
|
||||
// To verify role of users
|
||||
//$userAccess = $object->restrictedProjectArea($user,'read');
|
||||
$userWrite = $object->restrictedProjectArea($user,'write');
|
||||
//$userDelete = $object->restrictedProjectArea($user,'delete');
|
||||
//print "userAccess=".$userAccess." userWrite=".$userWrite." userDelete=".$userDelete;
|
||||
|
||||
$head = project_prepare_head($object);
|
||||
dol_fiche_head($head, 'notes', $langs->trans('Project'), 0, ($object->public?'projectpub':'project'));
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/projet/liste.php">'.$langs->trans("BackToList").'</a>';
|
||||
|
||||
// Ref
|
||||
print '<tr><td width="30%">'.$langs->trans("Ref").'</td><td>';
|
||||
// Define a complementary filter for search of next/prev ref.
|
||||
if (! $user->rights->projet->all->lire)
|
||||
{
|
||||
if ($object->societe->id > 0) $result=$object->societe->fetch($object->societe->id);
|
||||
|
||||
// To verify role of users
|
||||
//$userAccess = $object->restrictedProjectArea($user,'read');
|
||||
$userWrite = $object->restrictedProjectArea($user,'write');
|
||||
//$userDelete = $object->restrictedProjectArea($user,'delete');
|
||||
//print "userAccess=".$userAccess." userWrite=".$userWrite." userDelete=".$userDelete;
|
||||
|
||||
$head = project_prepare_head($object);
|
||||
dol_fiche_head($head, 'notes', $langs->trans('Project'), 0, ($object->public?'projectpub':'project'));
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/projet/liste.php">'.$langs->trans("BackToList").'</a>';
|
||||
|
||||
// Ref
|
||||
print '<tr><td width="30%">'.$langs->trans("Ref").'</td><td>';
|
||||
// Define a complementary filter for search of next/prev ref.
|
||||
if (! $user->rights->projet->all->lire)
|
||||
{
|
||||
$projectsListId = $object->getProjectsAuthorizedForUser($user,$mine,0);
|
||||
$object->next_prev_filter=" rowid in (".(count($projectsListId)?join(',',array_keys($projectsListId)):'0').")";
|
||||
}
|
||||
print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref');
|
||||
print '</td></tr>';
|
||||
|
||||
// Label
|
||||
print '<tr><td>'.$langs->trans("Label").'</td><td>'.$object->title.'</td></tr>';
|
||||
|
||||
// Third party
|
||||
print '<tr><td>'.$langs->trans("ThirdParty").'</td><td>';
|
||||
if ($object->societe->id > 0) print $object->societe->getNomUrl(1);
|
||||
else print' ';
|
||||
print '</td></tr>';
|
||||
|
||||
// Visibility
|
||||
print '<tr><td>'.$langs->trans("Visibility").'</td><td>';
|
||||
if ($object->public) print $langs->trans('SharedProject');
|
||||
else print $langs->trans('PrivateProject');
|
||||
print '</td></tr>';
|
||||
|
||||
// Statut
|
||||
print '<tr><td>'.$langs->trans("Status").'</td><td>'.$object->getLibStatut(4).'</td></tr>';
|
||||
|
||||
// Date start
|
||||
print '<tr><td>'.$langs->trans("DateStart").'</td><td>';
|
||||
print dol_print_date($object->date_start,'day');
|
||||
print '</td></tr>';
|
||||
|
||||
// Date end
|
||||
print '<tr><td>'.$langs->trans("DateEnd").'</td><td>';
|
||||
print dol_print_date($object->date_end,'day');
|
||||
print '</td></tr>';
|
||||
|
||||
print "</table>";
|
||||
|
||||
print '<br>';
|
||||
|
||||
$colwidth=30;
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/notes.tpl.php';
|
||||
|
||||
dol_fiche_end();;
|
||||
$projectsListId = $object->getProjectsAuthorizedForUser($user,$mine,0);
|
||||
$object->next_prev_filter=" rowid in (".(count($projectsListId)?join(',',array_keys($projectsListId)):'0').")";
|
||||
}
|
||||
print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref');
|
||||
print '</td></tr>';
|
||||
|
||||
// Label
|
||||
print '<tr><td>'.$langs->trans("Label").'</td><td>'.$object->title.'</td></tr>';
|
||||
|
||||
// Third party
|
||||
print '<tr><td>'.$langs->trans("ThirdParty").'</td><td>';
|
||||
if ($object->thirdparty->id > 0) print $object->thirdparty->getNomUrl(1);
|
||||
else print' ';
|
||||
print '</td></tr>';
|
||||
|
||||
// Visibility
|
||||
print '<tr><td>'.$langs->trans("Visibility").'</td><td>';
|
||||
if ($object->public) print $langs->trans('SharedProject');
|
||||
else print $langs->trans('PrivateProject');
|
||||
print '</td></tr>';
|
||||
|
||||
// Statut
|
||||
print '<tr><td>'.$langs->trans("Status").'</td><td>'.$object->getLibStatut(4).'</td></tr>';
|
||||
|
||||
// Date start
|
||||
print '<tr><td>'.$langs->trans("DateStart").'</td><td>';
|
||||
print dol_print_date($object->date_start,'day');
|
||||
print '</td></tr>';
|
||||
|
||||
// Date end
|
||||
print '<tr><td>'.$langs->trans("DateEnd").'</td><td>';
|
||||
print dol_print_date($object->date_end,'day');
|
||||
print '</td></tr>';
|
||||
|
||||
print "</table>";
|
||||
|
||||
print '<br>';
|
||||
|
||||
$colwidth=30;
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/notes.tpl.php';
|
||||
|
||||
dol_fiche_end();;
|
||||
}
|
||||
|
||||
llxFooter();
|
||||
|
||||
@ -47,7 +47,7 @@ $object = new Project($db);
|
||||
$taskstatic = new Task($db);
|
||||
$extrafields_project = new ExtraFields($db);
|
||||
$extrafields_task = new ExtraFields($db);
|
||||
if ($id > 0 || $ref)
|
||||
if ($id > 0 || ! empty($ref))
|
||||
{
|
||||
$object->fetch($id,$ref);
|
||||
$id=$object->id;
|
||||
@ -130,8 +130,8 @@ if ($action == 'createtask' && $user->rights->projet->creer)
|
||||
if ($taskid > 0)
|
||||
{
|
||||
$result = $task->add_contact($_POST["userid"], 'TASKEXECUTIVE', 'internal');
|
||||
}
|
||||
else
|
||||
}
|
||||
else
|
||||
{
|
||||
setEventMessage($task->error,'errors');
|
||||
setEventMessage($task->errors,'errors');
|
||||
@ -183,7 +183,7 @@ llxHeader("",$langs->trans("Tasks"),$help_url);
|
||||
if ($id > 0 || ! empty($ref))
|
||||
{
|
||||
$object->fetch($id, $ref);
|
||||
if ($object->societe->id > 0) $result=$object->societe->fetch($object->societe->id);
|
||||
$object->fetch_thirdparty();
|
||||
$res=$object->fetch_optionals($object->id,$extralabels_projet);
|
||||
|
||||
|
||||
@ -198,7 +198,7 @@ if ($id > 0 || ! empty($ref))
|
||||
|
||||
$head=project_prepare_head($object);
|
||||
dol_fiche_head($head, $tab, $langs->trans("Project"),0,($object->public?'projectpub':'project'));
|
||||
|
||||
|
||||
$param=($mode=='mine'?'&mode=mine':'');
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
@ -221,7 +221,7 @@ if ($id > 0 || ! empty($ref))
|
||||
print '<tr><td>'.$langs->trans("Label").'</td><td>'.$object->title.'</td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans("ThirdParty").'</td><td>';
|
||||
if (! empty($object->societe->id)) print $object->societe->getNomUrl(1);
|
||||
if (! empty($object->thirdparty->id)) print $object->thirdparty->getNomUrl(1);
|
||||
else print ' ';
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
@ -259,7 +259,7 @@ if ($id > 0 || ! empty($ref))
|
||||
}
|
||||
|
||||
|
||||
if ($action == 'create' && $user->rights->projet->creer && (empty($object->societe->id) || $userWrite > 0))
|
||||
if ($action == 'create' && $user->rights->projet->creer && (empty($object->thirdparty->id) || $userWrite > 0))
|
||||
{
|
||||
if ($id > 0 || ! empty($ref)) print '<br>';
|
||||
|
||||
|
||||
@ -128,9 +128,10 @@ print "</tr>\n";
|
||||
|
||||
if (count($tasksarray) > (empty($conf->global->PROJECT_LIMIT_TASK_PROJECT_AREA)?1000:$conf->global->PROJECT_LIMIT_TASK_PROJECT_AREA))
|
||||
{
|
||||
$langs->load("errors");
|
||||
print '<tr '.$bc[0].'>';
|
||||
print '<td colspan="9">';
|
||||
print $langs->trans("TooManyDataPleaseUseMoreFilters");
|
||||
print $langs->trans("WarningTooManyDataPleaseUseMoreFilters");
|
||||
print '</td></tr>';
|
||||
}
|
||||
else
|
||||
|
||||
Loading…
Reference in New Issue
Block a user