Merge remote-tracking branch 'Upstream/develop' into develop-loan
Conflicts: htdocs/install/mysql/migration/3.6.0-3.7.0.sql
This commit is contained in:
commit
f70e8b766f
13
ChangeLog
13
ChangeLog
@ -6,12 +6,10 @@ English Dolibarr ChangeLog
|
||||
***** ChangeLog for 3.7 compared to 3.6.* *****
|
||||
For users:
|
||||
- New: PDF event report show project and status of event.
|
||||
- New: Onto event summary of elements, end date and status are visible.
|
||||
- New: Can filter on status on interventions.
|
||||
- New: Add help info of field type into dictionary of payment types.
|
||||
- New: Add proposals into referer page of thirdparty.
|
||||
- New: On contact list can set filter on both active and not active (no more exclusive select).
|
||||
- New: Each user can include its own external ics calendar into dolibarr agenda view.
|
||||
- New: Intervention documents are now available in ECM module.
|
||||
- New: Can attach supplier order to a customer order.
|
||||
- New: Supervisor is now visible into user list.
|
||||
@ -22,16 +20,21 @@ For users:
|
||||
- New: No more dependency between contract and service module.
|
||||
- New: [ task #867 ] Remove ESAEB external module code from core.
|
||||
- New: Can create proposal from an intervention.
|
||||
- New: An event can be assigned to several users.
|
||||
- New: Can filter events on a group of users.
|
||||
- New: Can filter events of a thirdparty.
|
||||
- New: Onto event summary of elements, end date and status are visible.
|
||||
- New: Split Agenda view (month, week, day) into different tabs.
|
||||
- New: Add a view "per user" of agenda events (with different colors according to type of event).
|
||||
- New: Each user can include its own external ics calendar into dolibarr agenda view.
|
||||
- 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: Can disable predefined type of events.
|
||||
- New: Form to add a photo is immediatly available on photo page if
|
||||
permissions are ok (save one click per photo to add).
|
||||
- New: Add option PRODUCT_MAX_VISIBLE_PHOTO to limit number of photos
|
||||
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 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).
|
||||
|
||||
@ -137,17 +137,19 @@ if ($result) {
|
||||
$tabpay = array ();
|
||||
$tabbq = array ();
|
||||
$tabtp = array ();
|
||||
$tabcompany[$obj->rowid] = array (
|
||||
'id' => $obj->socid,
|
||||
'name' => $obj->name,
|
||||
'code_client' => $obj->code_compta
|
||||
);
|
||||
$tabtype = array ();
|
||||
|
||||
$i = 0;
|
||||
while ( $i < $num ) {
|
||||
while ( $i < $num )
|
||||
{
|
||||
$obj = $db->fetch_object($result);
|
||||
|
||||
$tabcompany[$obj->rowid] = array(
|
||||
'id' => $obj->socid,
|
||||
'name' => $obj->name,
|
||||
'code_client' => $obj->code_compta
|
||||
);
|
||||
|
||||
// Controls
|
||||
$compta_bank = $obj->account_number;
|
||||
if ($obj->label == '(SupplierInvoicePayment)')
|
||||
@ -169,15 +171,15 @@ if ($result) {
|
||||
}
|
||||
$links = $object->get_url($obj->rowid);
|
||||
|
||||
foreach ( $links as $key => $val ) {
|
||||
|
||||
foreach ( $links as $key => $val )
|
||||
{
|
||||
$tabtype[$obj->rowid] = $links[$key]['type'];
|
||||
|
||||
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')
|
||||
{
|
||||
$paymentsupplierstatic->id = $links[$key]['url_id'];
|
||||
@ -232,7 +234,7 @@ if ($result) {
|
||||
$tabtp[$obj->rowid][$cpttva] += $obj->amount;
|
||||
}
|
||||
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);
|
||||
@ -259,14 +261,17 @@ if ($result) {
|
||||
|
||||
/*
|
||||
* Actions
|
||||
*/
|
||||
*/
|
||||
|
||||
// Write bookkeeping
|
||||
if ($action == 'writeBookKeeping') {
|
||||
if ($action == 'writeBookKeeping')
|
||||
{
|
||||
$error = 0;
|
||||
foreach ( $tabpay as $key => $val ) {
|
||||
foreach ( $tabpay as $key => $val )
|
||||
{
|
||||
// Bank
|
||||
foreach ( $tabbq[$key] as $k => $mt ) {
|
||||
foreach ( $tabbq[$key] as $k => $mt )
|
||||
{
|
||||
$bookkeeping = new BookKeeping($db);
|
||||
$bookkeeping->doc_date = $val["date"];
|
||||
$bookkeeping->doc_ref = $val["ref"];
|
||||
@ -317,8 +322,8 @@ if ($action == 'writeBookKeeping') {
|
||||
}
|
||||
}
|
||||
// Third party
|
||||
foreach ( $tabtp[$key] as $k => $mt ) {
|
||||
|
||||
foreach ( $tabtp[$key] as $k => $mt )
|
||||
{
|
||||
$bookkeeping = new BookKeeping($db);
|
||||
$bookkeeping->doc_date = $val["date"];
|
||||
$bookkeeping->doc_ref = $val["ref"];
|
||||
@ -399,7 +404,8 @@ if ($action == 'writeBookKeeping') {
|
||||
}
|
||||
}
|
||||
// export csv
|
||||
if ($action == 'export_csv') {
|
||||
if ($action == 'export_csv')
|
||||
{
|
||||
$sep = $conf->global->ACCOUNTING_SEPARATORCSV;
|
||||
|
||||
header('Content-Type: text/csv');
|
||||
@ -482,7 +488,9 @@ if ($action == 'export_csv') {
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
$form = new Form($db);
|
||||
|
||||
@ -580,4 +588,5 @@ if ($action == 'export_csv') {
|
||||
// End of page
|
||||
llxFooter();
|
||||
}
|
||||
$db->close();
|
||||
|
||||
$db->close();
|
||||
|
||||
@ -44,6 +44,8 @@ $object = new Adherent($db);
|
||||
$result=$object->fetch($id);
|
||||
if ($result > 0)
|
||||
{
|
||||
$object->fetch_thirdparty();
|
||||
|
||||
$adht = new AdherentType($db);
|
||||
$result=$adht->fetch($object->typeid);
|
||||
}
|
||||
@ -146,7 +148,23 @@ if ($object->id > 0)
|
||||
|
||||
print '<br>';
|
||||
|
||||
print load_fiche_titre($langs->trans("ActionsOnMember"),'','');
|
||||
$out='';
|
||||
|
||||
/*$objthirdparty=$object->thirdparty;
|
||||
$objcon=new stdClass();
|
||||
|
||||
$permok=$user->rights->agenda->myactions->create;
|
||||
if ((! empty($objthirdparty->id) || ! empty($objcon->id)) && $permok)
|
||||
{
|
||||
$out.='<a href="'.DOL_URL_ROOT.'/comm/action/card.php?action=create';
|
||||
if (get_class($objthirdparty) == 'Societe') $out.='&socid='.$objthirdparty->id;
|
||||
$out.=(! empty($objcon->id)?'&contactid='.$objcon->id:'').'&backtopage=1&percentage=-1">';
|
||||
$out.=$langs->trans("AddAnAction").' ';
|
||||
$out.=img_picto($langs->trans("AddAnAction"),'filenew');
|
||||
$out.="</a>";
|
||||
}*/
|
||||
|
||||
print load_fiche_titre($langs->trans("ActionsOnMember"),$out,'');
|
||||
|
||||
// List of todo actions
|
||||
show_actions_todo($conf,$langs,$db,$object);
|
||||
|
||||
@ -35,8 +35,9 @@ if (!$user->admin) accessforbidden();
|
||||
|
||||
$action = GETPOST('action','alpha');
|
||||
$value = GETPOST('value','alpha');
|
||||
$label = GETPOST('label','alpha');
|
||||
$scandir = GETPOST('scandir','alpha');
|
||||
$type='contrat';
|
||||
$type='contract';
|
||||
|
||||
if (empty($conf->global->CONTRACT_ADDON))
|
||||
{
|
||||
@ -111,6 +112,35 @@ else if ($action == 'specimen') // For contract
|
||||
}
|
||||
}
|
||||
|
||||
// Define constants for submodules that contains parameters (forms with param1, param2, ... and value1, value2, ...)
|
||||
if ($action == 'setModuleOptions')
|
||||
{
|
||||
$post_size=count($_POST);
|
||||
|
||||
$db->begin();
|
||||
|
||||
for($i=0;$i < $post_size;$i++)
|
||||
{
|
||||
if (array_key_exists('param'.$i,$_POST))
|
||||
{
|
||||
$param=GETPOST("param".$i,'alpha');
|
||||
$value=GETPOST("value".$i,'alpha');
|
||||
if ($param) $res = dolibarr_set_const($db,$param,$value,'chaine',0,'',$conf->entity);
|
||||
if (! $res > 0) $error++;
|
||||
}
|
||||
}
|
||||
if (! $error)
|
||||
{
|
||||
$db->commit();
|
||||
setEventMessage($langs->trans("SetupSaved"));
|
||||
}
|
||||
else
|
||||
{
|
||||
$db->rollback();
|
||||
setEventMessage($langs->trans("Error"),'errors');
|
||||
}
|
||||
}
|
||||
|
||||
// Activate a model
|
||||
else if ($action == 'set')
|
||||
{
|
||||
@ -192,7 +222,7 @@ else if ($action == 'set_CONTRACT_DRAFT_WATERMARK')
|
||||
*/
|
||||
|
||||
$dirmodels=array_merge(array('/'),(array) $conf->modules_parts['models']);
|
||||
|
||||
|
||||
llxHeader();
|
||||
|
||||
$form=new Form($db);
|
||||
@ -318,7 +348,6 @@ print '</table><br>';
|
||||
print_titre($langs->trans("TemplatePDFContracts"));
|
||||
|
||||
// Defini tableau def des modeles
|
||||
$type='contrat';
|
||||
$def = array();
|
||||
$sql = "SELECT nom";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."document_model";
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004-2014 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2010-2013 Juanjo Menent <jmenent@2byte.es>
|
||||
@ -375,7 +375,7 @@ $tabfieldcheck[24] = array();
|
||||
complete_dictionary_with_modules($taborder,$tabname,$tablib,$tabsql,$tabsqlsort,$tabfield,$tabfieldvalue,$tabfieldinsert,$tabrowid,$tabcond,$tabhelp,$tabfieldcheck);
|
||||
|
||||
|
||||
// Define elementList and sourceList (used for dictionary "type of contacts")
|
||||
// Define elementList and sourceList (used for dictionary type of contacts "llx_c_type_contact")
|
||||
$elementList = array();
|
||||
$sourceList=array();
|
||||
if ($id == 11)
|
||||
@ -412,7 +412,7 @@ if ($id == 11)
|
||||
);
|
||||
}
|
||||
|
||||
// Define localtax_typeList (used for dictionary "c_tva")
|
||||
// Define localtax_typeList (used for dictionary "llx_c_tva")
|
||||
$localtax_typeList = array();
|
||||
if ($id == 10)
|
||||
{
|
||||
@ -425,7 +425,6 @@ if ($id == 10)
|
||||
"5" => $langs->trans("Yes").' ('.$langs->trans("Type")." 5)", //$langs->trans("%ageOnServiceWithoutVAT"),
|
||||
"6" => $langs->trans("Yes").' ('.$langs->trans("Type")." 6)" //$langs->trans("%ageOnServiceBeforeVAT"),
|
||||
);
|
||||
if (! empty($conf->global->MAIN_USE_LOCALTAX_TYPE_7)) $localtax_typeList["7"]= $langs->trans("Yes").' ('.$langs->trans("Type")." 7)"; //$langs->trans("AmountOnOrder") // We will enable this later. For the moment, work only of invoice localtype
|
||||
}
|
||||
|
||||
|
||||
@ -445,6 +444,7 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
|
||||
if ($value == 'country_id' && in_array($tablib[$id],array('DictionaryRegion','DictionaryCompanyType'))) continue; // For some pages, country is not mandatory
|
||||
if ($value == 'localtax1' && empty($_POST['localtax1_type'])) continue;
|
||||
if ($value == 'localtax2' && empty($_POST['localtax2_type'])) continue;
|
||||
if ($value == 'color' && empty($_POST['color'])) continue;
|
||||
if ((! isset($_POST[$value]) || $_POST[$value]=='')
|
||||
&& (! in_array($listfield[$f], array('decalage','module','accountancy_code','accountancy_code_sell','accountancy_code_buy'))) // Fields that are not mandatory
|
||||
)
|
||||
@ -1127,27 +1127,29 @@ if ($id)
|
||||
}
|
||||
}
|
||||
|
||||
// Est-ce une entree du dictionnaire qui peut etre desactivee ?
|
||||
// True by default
|
||||
$iserasable=1;
|
||||
// Can an entry be erased or disabled ?
|
||||
$iserasable=1;$isdisable=1; // true by default
|
||||
|
||||
if (isset($obj->code))
|
||||
{
|
||||
if (($obj->code == '0' || $obj->code == '' || preg_match('/unknown/i',$obj->code))) $iserasable = 0;
|
||||
else if ($obj->code == 'RECEP') $iserasable = 0;
|
||||
else if ($obj->code == 'EF0') $iserasable = 0;
|
||||
if (($obj->code == '0' || $obj->code == '' || preg_match('/unknown/i',$obj->code))) { $iserasable = 0; $isdisable = 0; }
|
||||
else if ($obj->code == 'RECEP') { $iserasable = 0; $isdisable = 0; }
|
||||
else if ($obj->code == 'EF0') { $iserasable = 0; $isdisable = 0; }
|
||||
}
|
||||
|
||||
if (isset($obj->type) && in_array($obj->type, array('system', 'systemauto'))) $iserasable=0;
|
||||
if (isset($obj->type) && in_array($obj->type, array('system', 'systemauto'))) { $iserasable=0; }
|
||||
if (in_array($obj->code, array('AC_OTH','AC_OTH_AUTO')) || in_array($obj->type, array('systemauto'))) { $isdisable=0; $isdisable = 0; }
|
||||
|
||||
$url = $_SERVER["PHP_SELF"].'?'.($page?'page='.$page.'&':'').'sortfield='.$sortfield.'&sortorder='.$sortorder.'&rowid='.(! empty($obj->rowid)?$obj->rowid:(! empty($obj->code)?$obj->code:'')).'&code='.(! empty($obj->code)?$obj->code:'').'&id='.$id.'&';
|
||||
|
||||
// Active
|
||||
print '<td align="center" class="nowrap">';
|
||||
if ($iserasable) print '<a href="'.$url.'action='.$acts[$obj->active].'">'.$actl[$obj->active].'</a>';
|
||||
if ($isdisable) print '<a href="'.$url.'action='.$acts[$obj->active].'">'.$actl[$obj->active].'</a>';
|
||||
else
|
||||
{
|
||||
if (isset($obj->type) && in_array($obj->type, array('system', 'systemauto')) && empty($obj->active)) print $langs->trans("Deprecated");
|
||||
if (in_array($obj->code, array('AC_OTH','AC_OTH_AUTO'))) print $langs->trans("AlwaysActive");
|
||||
else if (isset($obj->type) && in_array($obj->type, array('systemauto')) && empty($obj->active)) print $langs->trans("Deprecated");
|
||||
else if (isset($obj->type) && in_array($obj->type, array('system')) && ! empty($obj->active) && $obj->code != 'AC_OTH') print $langs->trans("UsedOnlyWithTypeOption");
|
||||
else print $langs->trans("AlwaysActive");
|
||||
}
|
||||
print "</td>";
|
||||
|
||||
@ -171,28 +171,27 @@ if ($action == 'setModuleOptions')
|
||||
$db->begin();
|
||||
|
||||
for($i=0;$i < $post_size;$i++)
|
||||
{
|
||||
if (array_key_exists('param'.$i,$_POST))
|
||||
{
|
||||
$param=GETPOST("param".$i,'alpha');
|
||||
$value=GETPOST("value".$i,'alpha');
|
||||
if ($param) $res = dolibarr_set_const($db,$param,$value,'chaine',0,'',$conf->entity);
|
||||
if (! $res > 0) $error++;
|
||||
}
|
||||
}
|
||||
{
|
||||
if (array_key_exists('param'.$i,$_POST))
|
||||
{
|
||||
$param=GETPOST("param".$i,'alpha');
|
||||
$value=GETPOST("value".$i,'alpha');
|
||||
if ($param) $res = dolibarr_set_const($db,$param,$value,'chaine',0,'',$conf->entity);
|
||||
if (! $res > 0) $error++;
|
||||
}
|
||||
}
|
||||
if (! $error)
|
||||
{
|
||||
$db->commit();
|
||||
setEventMessage($langs->trans("SetupSaved"));
|
||||
}
|
||||
else
|
||||
{
|
||||
$db->rollback();
|
||||
setEventMessage($langs->trans("Error"),'errors');
|
||||
{
|
||||
$db->commit();
|
||||
setEventMessage($langs->trans("SetupSaved"));
|
||||
}
|
||||
else
|
||||
{
|
||||
$db->rollback();
|
||||
setEventMessage($langs->trans("Error"),'errors');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Activate a model
|
||||
if ($action == 'set')
|
||||
{
|
||||
|
||||
@ -35,7 +35,8 @@ require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/comm/action/class/cactioncomm.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php';
|
||||
if (! empty($conf->projet->enabled)) {
|
||||
if (! empty($conf->projet->enabled))
|
||||
{
|
||||
require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php';
|
||||
}
|
||||
@ -366,8 +367,8 @@ if ($action == 'update')
|
||||
$object->location = GETPOST('location');
|
||||
$object->socid = $_POST["socid"];
|
||||
$object->contactid = $_POST["contactid"];
|
||||
$object->societe->id = $_POST["socid"]; // deprecated
|
||||
$object->contact->id = $_POST["contactid"]; // deprecated
|
||||
//$object->societe->id = $_POST["socid"]; // deprecated
|
||||
//$object->contact->id = $_POST["contactid"]; // deprecated
|
||||
$object->fk_project = $_POST["projectid"];
|
||||
$object->note = $_POST["note"];
|
||||
$object->pnote = $_POST["note"];
|
||||
@ -380,13 +381,14 @@ if ($action == 'update')
|
||||
setEventMessages($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("DateEnd")),$object->errors,'errors');
|
||||
$action = 'edit';
|
||||
}
|
||||
|
||||
$transparency=(GETPOST("transparency")=='on'?1:0);
|
||||
|
||||
// Users
|
||||
$listofuserid=array();
|
||||
//$assignedtouser=(GETPOST("assignedtouser") >0)?GETPOST("assignedtouser"):(! empty($object->usertodo->id) && $object->usertodo->id > 0 ? $object->usertodo->id : 0);
|
||||
$assignedtouser=(! empty($object->usertodo->id) && $object->usertodo->id > 0 ? $object->usertodo->id : 0);
|
||||
if ($assignedtouser) $listofuserid[$assignedtouser]=array('id'=>$assignedtouser, 'mandatory'=>0, 'transparency'=>$object->transparency); // Owner first
|
||||
|
||||
if (! empty($_SESSION['assignedtouser']))
|
||||
$assignedtouser=(! empty($object->userownerid) && $object->userownerid > 0 ? $object->userownerid : 0);
|
||||
if ($assignedtouser) $listofuserid[$assignedtouser]=array('id'=>$assignedtouser, 'mandatory'=>0, 'transparency'=>($user->id == $assignedtouser ? $transparency : '')); // Owner first
|
||||
if (! empty($_SESSION['assignedtouser'])) // Now concat assigned users
|
||||
{
|
||||
// Restore array with key with same value than param 'id'
|
||||
$tmplist1=dol_json_decode($_SESSION['assignedtouser'], true); $tmplist2=array();
|
||||
@ -399,7 +401,7 @@ if ($action == 'update')
|
||||
$object->userassigned=array(); // Clear old content
|
||||
foreach($listofuserid as $key => $val)
|
||||
{
|
||||
$object->userassigned[$val['id']]=array('id'=>$val['id'], 'mandatory'=>0, 'transparency'=>(GETPOST("transparency")=='on'?1:0));
|
||||
$object->userassigned[$val['id']]=array('id'=>$val['id'], 'mandatory'=>0, 'transparency'=>($user->id == $val['id'] ? $transparency : ''));
|
||||
}
|
||||
|
||||
if (! empty($conf->global->AGENDA_ENABLE_DONEBY))
|
||||
@ -670,36 +672,19 @@ if ($action == 'create')
|
||||
$listofuserid=array();
|
||||
if (empty($donotclearsession))
|
||||
{
|
||||
$assignedtouser=GETPOST("assignedtouser")?GETPOST("assignedtouser"):(! empty($object->usertodo->id) && $object->usertodo->id > 0 ? $object->usertodo->id : $user->id);
|
||||
$assignedtouser=GETPOST("assignedtouser")?GETPOST("assignedtouser"):(! empty($object->userownerid) && $object->userownerid > 0 ? $object->userownerid : $user->id);
|
||||
if ($assignedtouser) $listofuserid[$assignedtouser]=array('id'=>$assignedtouser,'mandatory'=>0,'transparency'=>$object->transparency); // Owner first
|
||||
$_SESSION['assignedtouser']=dol_json_encode($listofuserid);
|
||||
}
|
||||
/*
|
||||
if (empty($donotclearsession))
|
||||
{
|
||||
$assignedtouser=GETPOST("assignedtouser")?GETPOST("assignedtouser"):(! empty($object->usertodo->id) && $object->usertodo->id > 0 ? $object->usertodo->id : $user->id);
|
||||
$_SESSION['assignedtouser']=dol_json_encode(array($assignedtouser=>array('id'=>$assignedtouser,'transparency'=>1,'mandatory'=>1)));
|
||||
}*/
|
||||
print $form->select_dolusers_forevent(($action=='create'?'add':'update'),'assignedtouser',1);
|
||||
//print $form->select_dolusers(GETPOST("assignedtouser")?GETPOST("assignedtouser"):(! empty($object->usertodo->id) && $object->usertodo->id > 0 ? $object->usertodo->id : $user->id),'affectedto',1);
|
||||
print '</td></tr>';
|
||||
|
||||
print '</table>';
|
||||
|
||||
print '<br><br>';
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
// Busy
|
||||
print '<tr><td width="30%" class="nowrap">'.$langs->trans("Busy").'</td><td>';
|
||||
print '<input id="transparency" type="checkbox" name="transparency"'.(((! isset($_GET['transparency']) && ! isset($_POST['transparency'])) || GETPOST('transparency'))?' checked="checked"':'').'>';
|
||||
print $langs->trans("MyAvailability").': <input id="transparency" type="checkbox" name="transparency"'.(((! isset($_GET['transparency']) && ! isset($_POST['transparency'])) || GETPOST('transparency'))?' checked="checked"':'').'> '.$langs->trans("Busy");
|
||||
print '</td></tr>';
|
||||
|
||||
// Realised by
|
||||
if (! empty($conf->global->AGENDA_ENABLE_DONEBY))
|
||||
{
|
||||
print '<tr><td class="nowrap">'.$langs->trans("ActionDoneBy").'</td><td>';
|
||||
print $form->select_dolusers(GETPOST("doneby")?GETPOST("doneby"):(! empty($object->userdone->id) && $percent==100?$object->userdone->id:0),'doneby',1);
|
||||
print $form->select_dolusers(GETPOST("doneby")?GETPOST("doneby"):(! empty($object->userdoneid) && $percent==100?$object->userdoneid:0),'doneby',1);
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
@ -803,6 +788,7 @@ if ($id > 0)
|
||||
{
|
||||
$result1=$object->fetch($id);
|
||||
$result2=$object->fetch_thirdparty();
|
||||
$result2=$object->fetch_contact();
|
||||
$result3=$object->fetch_userassigned();
|
||||
$result4=$object->fetch_optionals($id,$extralabels);
|
||||
|
||||
@ -812,20 +798,15 @@ if ($id > 0)
|
||||
exit;
|
||||
}
|
||||
|
||||
if ($object->author->id > 0) { $tmpuser=new User($db); $res=$tmpuser->fetch($object->author->id); $object->author=$tmpuser; }
|
||||
if ($object->usermod->id > 0) { $tmpuser=new User($db); $res=$tmpuser->fetch($object->usermod->id); $object->usermod=$tmpuser; }
|
||||
if ($object->usertodo->id > 0) { $tmpuser=new User($db); $res=$tmpuser->fetch($object->usertodo->id); $object->usertodo=$tmpuser; }
|
||||
if ($object->userdone->id > 0) { $tmpuser=new User($db); $res=$tmpuser->fetch($object->userdone->id); $object->userdone=$tmpuser; }
|
||||
if ($object->authorid > 0) { $tmpuser=new User($db); $res=$tmpuser->fetch($object->authorid); $object->author=$tmpuser; }
|
||||
if ($object->usermodid > 0) { $tmpuser=new User($db); $res=$tmpuser->fetch($object->usermodid); $object->usermod=$tmpuser; }
|
||||
|
||||
if ($object->userownerid > 0) { $tmpuser=new User($db); $res=$tmpuser->fetch($object->userownerid); $object->usertodo=$tmpuser; }
|
||||
if ($object->userdoneid > 0) { $tmpuser=new User($db); $res=$tmpuser->fetch($object->userdoneid); $object->userdone=$tmpuser; }
|
||||
|
||||
$contact = new Contact($db);
|
||||
if ($object->contact->id)
|
||||
{
|
||||
$result=$contact->fetch($object->contact->id,$user);
|
||||
}
|
||||
$object->contact = $contact;
|
||||
|
||||
/*
|
||||
* Affichage onglets
|
||||
* Show tabs
|
||||
*/
|
||||
|
||||
$head=actions_prepare_head($object);
|
||||
@ -867,7 +848,6 @@ if ($id > 0)
|
||||
print '</script>'."\n";
|
||||
}
|
||||
|
||||
// Fiche action en mode edition
|
||||
print '<form name="formaction" action="'.$_SERVER['PHP_SELF'].'" method="POST">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="action" value="update">';
|
||||
@ -926,30 +906,33 @@ if ($id > 0)
|
||||
$listofuserid=array();
|
||||
if (empty($donotclearsession))
|
||||
{
|
||||
if (is_object($object->usertodo)) $listofuserid[$object->usertodo->id]=array('id'=>$object->usertodo->id,'transparency'=>$object->transparency); // Owner first
|
||||
$listofuserid=array_merge($listofuserid,$object->userassigned);
|
||||
if ($object->userownerid > 0) $listofuserid[$object->userownerid]=array('id'=>$object->userownerid,'transparency'=>$object->userassigned[$user->id]['transparency'],'answer_status'=>$object->userassigned[$user->id]['answer_status'],'mandatory'=>$object->userassigned[$user->id]['mandatory']); // Owner first
|
||||
if (! empty($object->userassigned)) // Now concat assigned users
|
||||
{
|
||||
// Restore array with key with same value than param 'id'
|
||||
$tmplist1=$object->userassigned; $tmplist2=array();
|
||||
foreach($tmplist1 as $key => $val)
|
||||
{
|
||||
if ($val['id'] && $val['id'] != $object->userownerid) $listofuserid[$val['id']]=$val;
|
||||
}
|
||||
}
|
||||
$_SESSION['assignedtouser']=dol_json_encode($listofuserid);
|
||||
}
|
||||
print $form->select_dolusers_forevent(($action=='create'?'add':'update'),'assignedtouser',1);
|
||||
//print $form->select_dolusers($object->usertodo->id>0?$object->usertodo->id:-1,'assignedtouser',1);
|
||||
print '</td></tr>';
|
||||
|
||||
print '</table><br><br><table class="border" width="100%">';
|
||||
|
||||
// Busy
|
||||
print '<tr><td width="30%" class="nowrap">'.$langs->trans("Busy").'</td><td>';
|
||||
print '<input id="transparency" type="checkbox" name="transparency"'.($object->transparency?' checked="checked"':'').'">';
|
||||
print $langs->trans("MyAvailability").': <input id="transparency" type="checkbox" name="transparency"'.($listofuserid[$user->id]['transparency']?' checked="checked"':'').'">'.$langs->trans("Busy");
|
||||
print '</td></tr>';
|
||||
|
||||
// Realised by
|
||||
if (! empty($conf->global->AGENDA_ENABLE_DONEBY))
|
||||
{
|
||||
print '<tr><td class="nowrap">'.$langs->trans("ActionDoneBy").'</td><td colspan="3">';
|
||||
print $form->select_dolusers($object->userdone->id> 0?$object->userdone->id:-1,'doneby',1);
|
||||
print $form->select_dolusers($object->userdoneid> 0?$object->userdoneid:-1,'doneby',1);
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
print '</table><br><br>';
|
||||
print '</table>';
|
||||
|
||||
print '<br><br>';
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
@ -960,12 +943,12 @@ if ($id > 0)
|
||||
print '<td>';
|
||||
$events=array();
|
||||
$events[]=array('method' => 'getContacts', 'url' => dol_buildpath('/core/ajax/contacts.php',1), 'htmlname' => 'contactid', 'params' => array('add-customer-contact' => 'disabled'));
|
||||
print $form->select_company($object->thirdparty->id,'socid','',1,1,0,$events);
|
||||
print $form->select_company($object->socid,'socid','',1,1,0,$events);
|
||||
print '</td>';
|
||||
|
||||
// Contact
|
||||
print '<td>'.$langs->trans("Contact").'</td><td width="30%">';
|
||||
$form->select_contacts($object->thirdparty->id, $object->contact->id,'contactid',1);
|
||||
$form->select_contacts($object->socid, $object->contactid,'contactid',1);
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
@ -979,10 +962,10 @@ if ($id > 0)
|
||||
$langs->load("project");
|
||||
|
||||
print '<tr><td width="30%" valign="top">'.$langs->trans("Project").'</td><td colspan="3">';
|
||||
$numprojet=$formproject->select_projects($object->thirdparty->id,$object->fk_project,'projectid');
|
||||
$numprojet=$formproject->select_projects($object->socid,$object->fk_project,'projectid');
|
||||
if ($numprojet==0)
|
||||
{
|
||||
print ' <a href="../../projet/card.php?socid='.$societe->id.'&action=create">'.$langs->trans("AddProject").'</a>';
|
||||
print ' <a href="../../projet/card.php?socid='.$object->socid.'&action=create">'.$langs->trans("AddProject").'</a>';
|
||||
}
|
||||
print '</td></tr>';
|
||||
}
|
||||
@ -1056,99 +1039,65 @@ if ($id > 0)
|
||||
if (empty($conf->global->AGENDA_DISABLE_LOCATION)) $rowspan++;
|
||||
|
||||
// Date start
|
||||
print '<tr><td width="30%">'.$langs->trans("DateActionStart").'</td><td colspan="2">';
|
||||
print '<tr><td width="30%">'.$langs->trans("DateActionStart").'</td><td colspan="3">';
|
||||
if (! $object->fulldayevent) print dol_print_date($object->datep,'dayhour');
|
||||
else print dol_print_date($object->datep,'day');
|
||||
if ($object->percentage == 0 && $object->datep && $object->datep < ($now - $delay_warning)) print img_warning($langs->trans("Late"));
|
||||
print '</td>';
|
||||
print '<td rowspan="'.$rowspan.'" align="center" valign="middle" width="180">'."\n";
|
||||
print '<form name="listactionsfiltermonth" action="'.DOL_URL_ROOT.'/comm/action/index.php" method="POST">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="action" value="show_month">';
|
||||
print '<input type="hidden" name="year" value="'.dol_print_date($object->datep,'%Y').'">';
|
||||
print '<input type="hidden" name="month" value="'.dol_print_date($object->datep,'%m').'">';
|
||||
print '<input type="hidden" name="day" value="'.dol_print_date($object->datep,'%d').'">';
|
||||
//print '<input type="hidden" name="day" value="'.dol_print_date($object->datep,'%d').'">';
|
||||
print img_picto($langs->trans("ViewCal"),'object_calendar','class="hideonsmartphone"').' <input type="submit" style="min-width: 120px" class="button" name="viewcal" value="'.$langs->trans("ViewCal").'">';
|
||||
print '</form>'."\n";
|
||||
print '<form name="listactionsfilterweek" action="'.DOL_URL_ROOT.'/comm/action/index.php" method="POST">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="action" value="show_week">';
|
||||
print '<input type="hidden" name="year" value="'.dol_print_date($object->datep,'%Y').'">';
|
||||
print '<input type="hidden" name="month" value="'.dol_print_date($object->datep,'%m').'">';
|
||||
print '<input type="hidden" name="day" value="'.dol_print_date($object->datep,'%d').'">';
|
||||
//print '<input type="hidden" name="day" value="'.dol_print_date($object->datep,'%d').'">';
|
||||
print img_picto($langs->trans("ViewCal"),'object_calendarweek','class="hideonsmartphone"').' <input type="submit" style="min-width: 120px" class="button" name="viewweek" value="'.$langs->trans("ViewWeek").'">';
|
||||
print '</form>'."\n";
|
||||
print '<form name="listactionsfilterday" action="'.DOL_URL_ROOT.'/comm/action/index.php" method="POST">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="action" value="show_day">';
|
||||
print '<input type="hidden" name="year" value="'.dol_print_date($object->datep,'%Y').'">';
|
||||
print '<input type="hidden" name="month" value="'.dol_print_date($object->datep,'%m').'">';
|
||||
print '<input type="hidden" name="day" value="'.dol_print_date($object->datep,'%d').'">';
|
||||
//print '<input type="hidden" name="day" value="'.dol_print_date($object->datep,'%d').'">';
|
||||
print img_picto($langs->trans("ViewCal"),'object_calendarday','class="hideonsmartphone"').' <input type="submit" style="min-width: 120px" class="button" name="viewday" value="'.$langs->trans("ViewDay").'">';
|
||||
print '</form>'."\n";
|
||||
print '<form name="listactionsfilterperuser" action="'.DOL_URL_ROOT.'/comm/action/peruser.php" method="POST">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="action" value="show_peruser">';
|
||||
print '<input type="hidden" name="year" value="'.dol_print_date($object->datep,'%Y').'">';
|
||||
print '<input type="hidden" name="month" value="'.dol_print_date($object->datep,'%m').'">';
|
||||
print '<input type="hidden" name="day" value="'.dol_print_date($object->datep,'%d').'">';
|
||||
//print '<input type="hidden" name="day" value="'.dol_print_date($object->datep,'%d').'">';
|
||||
print img_picto($langs->trans("ViewCal"),'object_calendarperuser','class="hideonsmartphone"').' <input type="submit" style="min-width: 120px" class="button" name="viewperuser" value="'.$langs->trans("ViewPerUser").'">';
|
||||
print '</form>'."\n";
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
// Date end
|
||||
print '<tr><td>'.$langs->trans("DateActionEnd").'</td><td colspan="2">';
|
||||
print '<tr><td>'.$langs->trans("DateActionEnd").'</td><td colspan="3">';
|
||||
if (! $object->fulldayevent) print dol_print_date($object->datef,'dayhour');
|
||||
else print dol_print_date($object->datef,'day');
|
||||
if ($object->percentage > 0 && $object->percentage < 100 && $object->datef && $object->datef < ($now- $delay_warning)) print img_warning($langs->trans("Late"));
|
||||
print '</td></tr>';
|
||||
|
||||
// Status
|
||||
print '<tr><td class="nowrap">'.$langs->trans("Status").' / '.$langs->trans("Percentage").'</td><td colspan="2">';
|
||||
print '<tr><td class="nowrap">'.$langs->trans("Status").' / '.$langs->trans("Percentage").'</td><td colspan="3">';
|
||||
print $object->getLibStatut(4);
|
||||
print '</td></tr>';
|
||||
|
||||
// Location
|
||||
if (empty($conf->global->AGENDA_DISABLE_LOCATION))
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("Location").'</td><td colspan="2">'.$object->location.'</td></tr>';
|
||||
print '<tr><td>'.$langs->trans("Location").'</td><td colspan="3">'.$object->location.'</td></tr>';
|
||||
}
|
||||
|
||||
// Assigned to
|
||||
//if ($object->usertodo->id > 0) print $object->usertodo->getNomUrl(1);
|
||||
print '<tr><td width="30%" class="nowrap">'.$langs->trans("ActionAffectedTo").'</td><td>';
|
||||
print '<tr><td width="30%" class="nowrap">'.$langs->trans("ActionAffectedTo").'</td><td colspan="3">';
|
||||
$listofuserid=array();
|
||||
if (empty($donotclearsession))
|
||||
{
|
||||
if (is_object($object->usertodo)) $listofuserid[$object->usertodo->id]=array('id'=>$object->usertodo->id,'transparency'=>$object->transparency); // Owner first
|
||||
$listofuserid=array_merge($listofuserid,$object->userassigned);
|
||||
if (is_object($object->usertodo)) $listofuserid[$object->userownerid]=array('id'=>$object->userownerid,'transparency'=>$object->transparency); // Owner first
|
||||
if (! empty($object->userassigned)) // Now concat assigned users
|
||||
{
|
||||
// Restore array with key with same value than param 'id'
|
||||
$tmplist1=$object->userassigned; $tmplist2=array();
|
||||
foreach($tmplist1 as $key => $val)
|
||||
{
|
||||
if ($val['id'] && $val['id'] != $object->userownerid) $listofuserid[$val['id']]=$val;
|
||||
}
|
||||
}
|
||||
$_SESSION['assignedtouser']=dol_json_encode($listofuserid);
|
||||
//var_dump($_SESSION['assignedtouser']);
|
||||
}
|
||||
print $form->select_dolusers_forevent('view','assignedtouser',1);
|
||||
print '</td></tr>';
|
||||
|
||||
print '</table><br><br><table class="border" width="100%">';
|
||||
|
||||
// Busy
|
||||
print '<tr><td width="30%" class="nowrap">'.$langs->trans("Busy").'</td><td colspan="3">';
|
||||
if ($object->usertodo->id > 0) print yn(($object->transparency > 0)?1:0); // We show nothing if event is assigned to nobody
|
||||
print '</td></tr>';
|
||||
print $langs->trans("MyAvailability").': '.(($object->userassigned[$user->id]['transparency'] > 0)?$langs->trans("Busy"):$langs->trans("Available")); // We show nothing if event is assigned to nobody
|
||||
print ' </td></tr>';
|
||||
|
||||
// Done by
|
||||
if ($conf->global->AGENDA_ENABLE_DONEBY)
|
||||
{
|
||||
print '<tr><td class="nowrap">'.$langs->trans("ActionDoneBy").'</td><td colspan="3">';
|
||||
if ($object->userdone->id > 0) print $object->userdone->getNomUrl(1);
|
||||
if ($object->userdoneid > 0) print $object->userdone->getNomUrl(1);
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
print '</table><br><br><table class="border" width="100%">';
|
||||
print '</table>';
|
||||
|
||||
print '<br><br>';
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
// Third party - Contact
|
||||
if ($conf->societe->enabled)
|
||||
@ -1164,12 +1113,12 @@ if ($id > 0)
|
||||
print '</td>';
|
||||
print '<td>'.$langs->trans("Contact").'</td>';
|
||||
print '<td>';
|
||||
if ($object->contact->id > 0)
|
||||
if ($object->contactid > 0)
|
||||
{
|
||||
print $object->contact->getNomUrl(1);
|
||||
if ($object->contact->id && $object->type_code == 'AC_TEL')
|
||||
if ($object->contactid && $object->type_code == 'AC_TEL')
|
||||
{
|
||||
if ($object->contact->fetch($object->contact->id))
|
||||
if ($object->contact->fetch($object->contactid))
|
||||
{
|
||||
print "<br>".dol_print_phone($object->contact->phone_pro);
|
||||
}
|
||||
@ -1250,7 +1199,7 @@ if ($id > 0)
|
||||
if ($action != 'edit')
|
||||
{
|
||||
if ($user->rights->agenda->allactions->create ||
|
||||
(($object->author->id == $user->id || $object->usertodo->id == $user->id) && $user->rights->agenda->myactions->create))
|
||||
(($object->authorid == $user->id || $object->userownerid == $user->id) && $user->rights->agenda->myactions->create))
|
||||
{
|
||||
print '<div class="inline-block divButAction"><a class="butAction" href="card.php?action=edit&id='.$object->id.'">'.$langs->trans("Modify").'</a></div>';
|
||||
}
|
||||
@ -1260,7 +1209,7 @@ if ($id > 0)
|
||||
}
|
||||
|
||||
if ($user->rights->agenda->allactions->delete ||
|
||||
(($object->author->id == $user->id || $object->usertodo->id == $user->id) && $user->rights->agenda->myactions->delete))
|
||||
(($object->authorid == $user->id || $object->userownerid == $user->id) && $user->rights->agenda->myactions->delete))
|
||||
{
|
||||
print '<div class="inline-block divButAction"><a class="butActionDelete" href="card.php?action=delete&id='.$object->id.'">'.$langs->trans("Delete").'</a></div>';
|
||||
}
|
||||
@ -1272,6 +1221,47 @@ if ($id > 0)
|
||||
}
|
||||
|
||||
print '</div>';
|
||||
|
||||
|
||||
// Link to agenda views
|
||||
print '<div id="agendaviewbutton">';
|
||||
print '<form name="listactionsfiltermonth" action="'.DOL_URL_ROOT.'/comm/action/index.php" method="POST" style="float: left">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="action" value="show_month">';
|
||||
print '<input type="hidden" name="year" value="'.dol_print_date($object->datep,'%Y').'">';
|
||||
print '<input type="hidden" name="month" value="'.dol_print_date($object->datep,'%m').'">';
|
||||
print '<input type="hidden" name="day" value="'.dol_print_date($object->datep,'%d').'">';
|
||||
//print '<input type="hidden" name="day" value="'.dol_print_date($object->datep,'%d').'">';
|
||||
print img_picto($langs->trans("ViewCal"),'object_calendar','class="hideonsmartphone"').' <input type="submit" style="min-width: 120px" class="button" name="viewcal" value="'.$langs->trans("ViewCal").'">';
|
||||
print '</form>'."\n";
|
||||
print '<form name="listactionsfilterweek" action="'.DOL_URL_ROOT.'/comm/action/index.php" method="POST" style="float: left">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="action" value="show_week">';
|
||||
print '<input type="hidden" name="year" value="'.dol_print_date($object->datep,'%Y').'">';
|
||||
print '<input type="hidden" name="month" value="'.dol_print_date($object->datep,'%m').'">';
|
||||
print '<input type="hidden" name="day" value="'.dol_print_date($object->datep,'%d').'">';
|
||||
//print '<input type="hidden" name="day" value="'.dol_print_date($object->datep,'%d').'">';
|
||||
print img_picto($langs->trans("ViewCal"),'object_calendarweek','class="hideonsmartphone"').' <input type="submit" style="min-width: 120px" class="button" name="viewweek" value="'.$langs->trans("ViewWeek").'">';
|
||||
print '</form>'."\n";
|
||||
print '<form name="listactionsfilterday" action="'.DOL_URL_ROOT.'/comm/action/index.php" method="POST" style="float: left">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="action" value="show_day">';
|
||||
print '<input type="hidden" name="year" value="'.dol_print_date($object->datep,'%Y').'">';
|
||||
print '<input type="hidden" name="month" value="'.dol_print_date($object->datep,'%m').'">';
|
||||
print '<input type="hidden" name="day" value="'.dol_print_date($object->datep,'%d').'">';
|
||||
//print '<input type="hidden" name="day" value="'.dol_print_date($object->datep,'%d').'">';
|
||||
print img_picto($langs->trans("ViewCal"),'object_calendarday','class="hideonsmartphone"').' <input type="submit" style="min-width: 120px" class="button" name="viewday" value="'.$langs->trans("ViewDay").'">';
|
||||
print '</form>'."\n";
|
||||
print '<form name="listactionsfilterperuser" action="'.DOL_URL_ROOT.'/comm/action/peruser.php" method="POST" style="float: left">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="action" value="show_peruser">';
|
||||
print '<input type="hidden" name="year" value="'.dol_print_date($object->datep,'%Y').'">';
|
||||
print '<input type="hidden" name="month" value="'.dol_print_date($object->datep,'%m').'">';
|
||||
print '<input type="hidden" name="day" value="'.dol_print_date($object->datep,'%d').'">';
|
||||
//print '<input type="hidden" name="day" value="'.dol_print_date($object->datep,'%d').'">';
|
||||
print img_picto($langs->trans("ViewCal"),'object_calendarperuser','class="hideonsmartphone"').' <input type="submit" style="min-width: 120px" class="button" name="viewperuser" value="'.$langs->trans("ViewPerUser").'">';
|
||||
print '</form>'."\n";
|
||||
print '</div>';
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -39,9 +39,10 @@ class ActionComm extends CommonObject
|
||||
|
||||
var $id;
|
||||
|
||||
var $type_id; // id into parent table llx_c_actioncomm (will be deprecated into future, link should not be required)
|
||||
var $type_code; // code into parent table llx_c_actioncomm (will be deprecated into future, link should not be required). With defautl setup, should be AC_OTH_AUTO or AC_OTH
|
||||
var $type; // label into parent table llx_c_actioncomm (will be deprecated into future, link should not be required)
|
||||
var $type_id; // Id into parent table llx_c_actioncomm (used only if option to use type is set)
|
||||
var $type_code; // Code into parent table llx_c_actioncomm (used only if option to use type is set). With default setup, should be AC_OTH_AUTO or AC_OTH.
|
||||
var $type; // Label into parent table llx_c_actioncomm (used only if option to use type is set)
|
||||
var $type_color; // Color into parent table llx_c_actioncomm (used only if option to use type is set)
|
||||
var $code; // Free code to identify action. Ie: Agenda trigger add here AC_TRIGGERNAME ('AC_COMPANY_CREATE', 'AC_PROPAL_VALIDATE', ...)
|
||||
var $label;
|
||||
|
||||
@ -56,7 +57,7 @@ class ActionComm extends CommonObject
|
||||
var $datef; // Date action end (datep2)
|
||||
var $durationp = -1; // -1=Unkown duration // deprecated
|
||||
var $fulldayevent = 0; // 1=Event on full day
|
||||
var $punctual = 1; // Milestone
|
||||
var $punctual = 1; // Milestone // TODO Not sure we need this. Milestone is already event with end date = start date
|
||||
var $percentage; // Percentage
|
||||
var $location; // Location
|
||||
|
||||
@ -66,7 +67,8 @@ class ActionComm extends CommonObject
|
||||
|
||||
var $userassigned = array(); // Array of user ids
|
||||
var $userownerid; // Id of user owner
|
||||
var $usertodo; // Object user of owner // deprecated
|
||||
var $userdoneid; // Id of user done
|
||||
var $usertodo; // Object user of owner // deprecated
|
||||
var $userdone; // Object user that did action // deprecated
|
||||
|
||||
var $socid;
|
||||
@ -310,7 +312,7 @@ class ActionComm extends CommonObject
|
||||
$sql.= " a.fk_user_action, a.fk_user_done,";
|
||||
$sql.= " a.fk_contact, a.percent as percentage,";
|
||||
$sql.= " a.fk_element, a.elementtype,";
|
||||
$sql.= " a.priority, a.fulldayevent, a.location, a.transparency,";
|
||||
$sql.= " a.priority, a.fulldayevent, a.location, a.punctual, a.transparency,";
|
||||
$sql.= " c.id as type_id, c.code as type_code, c.libelle,";
|
||||
$sql.= " s.nom as socname,";
|
||||
$sql.= " u.firstname, u.lastname as lastname";
|
||||
@ -352,25 +354,29 @@ class ActionComm extends CommonObject
|
||||
$this->note = $obj->note;
|
||||
$this->percentage = $obj->percentage;
|
||||
|
||||
$this->author->id = $obj->fk_user_author;
|
||||
$this->author->firstname = $obj->firstname;
|
||||
$this->author->lastname = $obj->lastname;
|
||||
$this->usermod->id = $obj->fk_user_mod;
|
||||
$this->authorid = $obj->fk_user_author;
|
||||
$this->usermodid = $obj->fk_user_mod;
|
||||
$this->author->id = $obj->fk_user_author; // deprecated
|
||||
$this->author->firstname = $obj->firstname; // deprecated
|
||||
$this->author->lastname = $obj->lastname; // deprecated
|
||||
$this->usermod->id = $obj->fk_user_mod; // deprecated
|
||||
|
||||
$this->userownerid = $obj->fk_user_action;
|
||||
$this->userdoneid = $obj->fk_user_done;
|
||||
$this->usertodo->id = $obj->fk_user_action; // deprecated
|
||||
//$this->userdone->id = $obj->fk_user_done;
|
||||
$this->userdone->id = $obj->fk_user_done; // deprecated
|
||||
$this->priority = $obj->priority;
|
||||
$this->fulldayevent = $obj->fulldayevent;
|
||||
$this->location = $obj->location;
|
||||
$this->transparency = $obj->transparency;
|
||||
$this->punctual = $obj->punctual;
|
||||
|
||||
$this->socid = $obj->fk_soc; // To have fetch_thirdparty method working
|
||||
$this->contactid = $obj->fk_contact;
|
||||
$this->contactid = $obj->fk_contact; // To have fetch_contact method working
|
||||
$this->fk_project = $obj->fk_project; // To have fetch_project method working
|
||||
|
||||
$this->societe->id = $obj->fk_soc; // For backward compatibility
|
||||
$this->contact->id = $obj->fk_contact; // For backward compatibility
|
||||
$this->societe->id = $obj->fk_soc; // deprecated
|
||||
$this->contact->id = $obj->fk_contact; // deprecated
|
||||
|
||||
$this->fk_element = $obj->fk_element;
|
||||
$this->elementtype = $obj->elementtype;
|
||||
@ -961,7 +967,7 @@ class ActionComm extends CommonObject
|
||||
$sql.= " a.fk_user_action, a.fk_user_done,";
|
||||
$sql.= " a.fk_contact, a.percent as percentage,";
|
||||
$sql.= " a.fk_element, a.elementtype,";
|
||||
$sql.= " a.priority, a.fulldayevent, a.location,";
|
||||
$sql.= " a.priority, a.fulldayevent, a.location, a.punctual, a.transparency,";
|
||||
$sql.= " u.firstname, u.lastname,";
|
||||
$sql.= " s.nom as socname,";
|
||||
$sql.= " c.id as type_id, c.code as type_code, c.libelle";
|
||||
@ -1041,6 +1047,7 @@ class ActionComm extends CommonObject
|
||||
$event['fulldayevent']=$obj->fulldayevent;
|
||||
$event['location']=$obj->location;
|
||||
$event['transparency']=(($obj->transparency > 0)?'OPAQUE':'TRANSPARENT'); // OPAQUE (busy) or TRANSPARENT (not busy)
|
||||
$event['punctual']=$obj->punctual;
|
||||
$event['category']=$obj->libelle; // libelle type action
|
||||
// Define $urlwithroot
|
||||
$urlwithouturlroot=preg_replace('/'.preg_quote(DOL_URL_ROOT,'/').'$/i','',trim($dolibarr_main_url_root));
|
||||
@ -1146,7 +1153,7 @@ class ActionComm extends CommonObject
|
||||
$this->punctual=0;
|
||||
$this->percentage=0;
|
||||
$this->location='Location';
|
||||
$this->transparency=0;
|
||||
$this->transparency=1; // 1 means opaque
|
||||
$this->priority=1;
|
||||
$this->note = 'Note';
|
||||
}
|
||||
|
||||
@ -218,9 +218,9 @@ if (empty($action) || $action=='show_month')
|
||||
$tmpday = -date("w",dol_mktime(0,0,0,$month,1,$year))+2;
|
||||
$tmpday+=((isset($conf->global->MAIN_START_WEEK)?$conf->global->MAIN_START_WEEK:1)-1);
|
||||
if ($tmpday >= 1) $tmpday -= 7;
|
||||
// Define firstdaytoshow and lastdaytoshow
|
||||
// Define firstdaytoshow and lastdaytoshow (warning: lastdaytoshow is last second to show + 1)
|
||||
$firstdaytoshow=dol_mktime(0,0,0,$prev_month,$max_day_in_prev_month+$tmpday,$prev_year);
|
||||
$next_day=7-($max_day_in_month+1-$tmpday)%7;
|
||||
$next_day=7 - ($max_day_in_month+1-$tmpday) % 7;
|
||||
if ($next_day < 6) $next_day+=7;
|
||||
$lastdaytoshow=dol_mktime(0,0,0,$next_month,$next_day,$next_year);
|
||||
}
|
||||
@ -242,9 +242,9 @@ if ($action=='show_week')
|
||||
$next_month = $next['month'];
|
||||
$next_day = $next['day'];
|
||||
|
||||
// Define firstdaytoshow and lastdaytoshow
|
||||
// Define firstdaytoshow and lastdaytoshow (warning: lastdaytoshow is last second to show + 1)
|
||||
$firstdaytoshow=dol_mktime(0,0,0,$first_month,$first_day,$first_year);
|
||||
$lastdaytoshow=dol_time_plus_duree($firstdaytoshow, 6, 'd');
|
||||
$lastdaytoshow=dol_time_plus_duree($firstdaytoshow, 7, 'd');
|
||||
|
||||
$max_day_in_month = date("t",dol_mktime(0,0,0,$month,1,$year));
|
||||
|
||||
@ -261,7 +261,7 @@ if ($action == 'show_day')
|
||||
$next_month = $next['month'];
|
||||
$next_day = $next['day'];
|
||||
|
||||
// Define firstdaytoshow and lastdaytoshow
|
||||
// Define firstdaytoshow and lastdaytoshow (warning: lastdaytoshow is last second to show + 1)
|
||||
$firstdaytoshow=dol_mktime(0,0,0,$prev_month,$prev_day,$prev_year);
|
||||
$lastdaytoshow=dol_mktime(0,0,0,$next_month,$next_day,$next_year);
|
||||
}
|
||||
@ -522,14 +522,14 @@ if ($resql)
|
||||
|
||||
// Check values
|
||||
if ($event->date_end_in_calendar < $firstdaytoshow ||
|
||||
$event->date_start_in_calendar > $lastdaytoshow)
|
||||
$event->date_start_in_calendar >= $lastdaytoshow)
|
||||
{
|
||||
// This record is out of visible range
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($event->date_start_in_calendar < $firstdaytoshow) $event->date_start_in_calendar=$firstdaytoshow;
|
||||
if ($event->date_end_in_calendar > $lastdaytoshow) $event->date_end_in_calendar=$lastdaytoshow;
|
||||
if ($event->date_end_in_calendar >= $lastdaytoshow) $event->date_end_in_calendar=($lastdaytoshow-1);
|
||||
|
||||
// Add an entry in actionarray for each day
|
||||
$daycursor=$event->date_start_in_calendar;
|
||||
@ -659,7 +659,7 @@ if (count($listofextcals))
|
||||
if (isset($icalevent['RRULE']) && is_array($icalevent['RRULE'])) //repeatable event
|
||||
{
|
||||
//if ($event->date_start_in_calendar < $firstdaytoshow) $event->date_start_in_calendar=$firstdaytoshow;
|
||||
//if ($event->date_end_in_calendar > $lastdaytoshow) $event->date_end_in_calendar=$lastdaytoshow;
|
||||
//if ($event->date_end_in_calendar > $lastdaytoshow) $event->date_end_in_calendar=($lastdaytoshow-1);
|
||||
if ($icalevent['DTSTART;VALUE=DATE']) //fullday event
|
||||
{
|
||||
$datecurstart=dol_stringtotime($icalevent['DTSTART;VALUE=DATE'],1);
|
||||
@ -698,10 +698,10 @@ if (count($listofextcals))
|
||||
$until=empty($icalevent['RRULE']['UNTIL'])?0:dol_stringtotime($icalevent['RRULE']['UNTIL'],1);
|
||||
$maxrepeat=empty($icalevent['RRULE']['COUNT'])?0:$icalevent['RRULE']['COUNT'];
|
||||
if ($until && ($until+($datecurend-$datecurstart)) < $firstdaytoshow) continue; // We discard repeatable event that end before start date to show
|
||||
if ($datecurstart > $lastdaytoshow) continue; // We discard repeatable event that start after end date to show
|
||||
if ($datecurstart >= $lastdaytoshow) continue; // We discard repeatable event that start after end date to show
|
||||
|
||||
$numofevent=0;
|
||||
while (($datecurstart <= $lastdaytoshow) && (empty($maxrepeat) || ($numofevent < $maxrepeat)))
|
||||
while (($datecurstart < $lastdaytoshow) && (empty($maxrepeat) || ($numofevent < $maxrepeat)))
|
||||
{
|
||||
if ($datecurend >= $firstdaytoshow) // We add event
|
||||
{
|
||||
@ -833,7 +833,7 @@ if (count($listofextcals))
|
||||
}
|
||||
|
||||
// Add event into $eventarray if date range are ok.
|
||||
if ($event->date_end_in_calendar < $firstdaytoshow || $event->date_start_in_calendar > $lastdaytoshow)
|
||||
if ($event->date_end_in_calendar < $firstdaytoshow || $event->date_start_in_calendar >= $lastdaytoshow)
|
||||
{
|
||||
//print 'x'.$datestart.'-'.$dateend;exit;
|
||||
//print 'x'.$datestart.'-'.$dateend;exit;
|
||||
@ -843,7 +843,7 @@ if (count($listofextcals))
|
||||
else
|
||||
{
|
||||
if ($event->date_start_in_calendar < $firstdaytoshow) $event->date_start_in_calendar=$firstdaytoshow;
|
||||
if ($event->date_end_in_calendar > $lastdaytoshow) $event->date_end_in_calendar=$lastdaytoshow;
|
||||
if ($event->date_end_in_calendar >= $lastdaytoshow) $event->date_end_in_calendar=($lastdaytoshow - 1);
|
||||
|
||||
// Add an entry in actionarray for each day
|
||||
$daycursor=$event->date_start_in_calendar;
|
||||
@ -1140,7 +1140,7 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa
|
||||
|
||||
$ponct=($event->date_start_in_calendar == $event->date_end_in_calendar);
|
||||
|
||||
// Define $color and $cssclass of event
|
||||
// Define $color (Hex string like '0088FF') and $cssclass of event
|
||||
$color=-1; $cssclass=''; $colorindex=-1;
|
||||
if (in_array($user->id, $keysofuserassigned))
|
||||
{
|
||||
@ -1163,8 +1163,14 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa
|
||||
$color=$event->icalcolor;
|
||||
$cssclass=(! empty($event->icalname)?'family_'.dol_string_nospecial($event->icalname):'family_other unsortable');
|
||||
}
|
||||
else if ($event->type_code == 'BIRTHDAY') { $numbirthday++; $colorindex=2; $cssclass='family_birthday unsortable'; $color=sprintf("%02x%02x%02x",$theme_datacolor[$colorindex][0],$theme_datacolor[$colorindex][1],$theme_datacolor[$colorindex][2]); }
|
||||
else { $numother++; $cssclass='family_other'; }
|
||||
else if ($event->type_code == 'BIRTHDAY')
|
||||
{
|
||||
$numbirthday++; $colorindex=2; $cssclass='family_birthday unsortable'; $color=sprintf("%02x%02x%02x",$theme_datacolor[$colorindex][0],$theme_datacolor[$colorindex][1],$theme_datacolor[$colorindex][2]);
|
||||
}
|
||||
else
|
||||
{
|
||||
$numother++; $cssclass='family_other';
|
||||
}
|
||||
if ($color == -1) // Color was not forced. Set color according to color index.
|
||||
{
|
||||
// Define color index if not yet defined
|
||||
|
||||
@ -96,7 +96,7 @@ if ($dateselect > 0)
|
||||
|
||||
$tmp=empty($conf->global->MAIN_DEFAULT_WORKING_HOURS)?'9-18':$conf->global->MAIN_DEFAULT_WORKING_HOURS;
|
||||
$tmparray=explode('-',$tmp);
|
||||
$begin_h = GETPOST('begin_h')?GETPOST('begin_h','int'):($tmparray[0] != '' ? $tmparray[0] : 9);
|
||||
$begin_h = GETPOST('begin_h')!=''?GETPOST('begin_h','int'):($tmparray[0] != '' ? $tmparray[0] : 9);
|
||||
$end_h = GETPOST('end_h')?GETPOST('end_h'):($tmparray[1] != '' ? $tmparray[1] : 18);
|
||||
if ($begin_h < 0 || $begin_h > 23) $begin_h = 9;
|
||||
if ($end_h < 1 || $end_h > 24) $end_h = 18;
|
||||
@ -108,7 +108,7 @@ $begin_d = GETPOST('begin_d')?GETPOST('begin_d','int'):($tmparray[0] != '' ? $tm
|
||||
$end_d = GETPOST('end_d')?GETPOST('end_d'):($tmparray[1] != '' ? $tmparray[1] : 5);
|
||||
if ($begin_d < 1 || $begin_d > 7) $begin_d = 1;
|
||||
if ($end_d < 1 || $end_d > 7) $end_d = 7;
|
||||
if ($end_d <= $begin_d) $end_d = $begin_d + 1;
|
||||
if ($end_d < $begin_d) $end_d = $begin_d + 1;
|
||||
|
||||
if ($actioncode == '') $actioncode=(empty($conf->global->AGENDA_DEFAULT_FILTER_TYPE)?'':$conf->global->AGENDA_DEFAULT_FILTER_TYPE);
|
||||
if ($status == '' && ! isset($_GET['status']) && ! isset($_POST['status'])) $status=(empty($conf->global->AGENDA_DEFAULT_FILTER_STATUS)?'':$conf->global->AGENDA_DEFAULT_FILTER_STATUS);
|
||||
@ -179,17 +179,11 @@ $next_year = $next['year'];
|
||||
$next_month = $next['month'];
|
||||
$next_day = $next['day'];
|
||||
|
||||
// Define firstdaytoshow and lastdaytoshow
|
||||
$firstdaytoshow=dol_mktime(0,0,0,$first_month,$first_day,$first_year);
|
||||
$lastdaytoshow=dol_time_plus_duree($firstdaytoshow, 6, 'd');
|
||||
|
||||
$max_day_in_month = date("t",dol_mktime(0,0,0,$month,1,$year));
|
||||
|
||||
$tmpday = $first_day;
|
||||
//print 'xx'.$prev_year.'-'.$prev_month.'-'.$prev_day;
|
||||
//print 'xx'.$next_year.'-'.$next_month.'-'.$next_day;
|
||||
//print dol_print_date($firstdaytoshow,'day');
|
||||
//print dol_print_date($lastdaytoshow,'day');
|
||||
|
||||
$title=$langs->trans("DoneAndToDoActions");
|
||||
if ($status == 'done') $title=$langs->trans("DoneActions");
|
||||
@ -225,9 +219,11 @@ $next_year = $next['year'];
|
||||
$next_month = $next['month'];
|
||||
$next_day = $next['day'];
|
||||
|
||||
// Define firstdaytoshow and lastdaytoshow
|
||||
// Define firstdaytoshow and lastdaytoshow (warning: lastdaytoshow is last second to show + 1)
|
||||
$firstdaytoshow=dol_mktime(0,0,0,$first_month,$first_day,$first_year);
|
||||
$lastdaytoshow=dol_time_plus_duree($firstdaytoshow, 6, 'd');
|
||||
$lastdaytoshow=dol_time_plus_duree($firstdaytoshow, 7, 'd');
|
||||
//print dol_print_date($firstdaytoshow,'dayhour');
|
||||
//print dol_print_date($lastdaytoshow,'dayhour');
|
||||
|
||||
$max_day_in_month = date("t",dol_mktime(0,0,0,$month,1,$year));
|
||||
|
||||
@ -325,7 +321,7 @@ $sql.= ' a.percent,';
|
||||
$sql.= ' a.fk_user_author,a.fk_user_action,a.fk_user_done,';
|
||||
$sql.= ' a.transparency, a.priority, a.fulldayevent, a.location,';
|
||||
$sql.= ' a.fk_soc, a.fk_contact,';
|
||||
$sql.= ' ca.code';
|
||||
$sql.= ' ca.code, ca.color';
|
||||
$sql.= ' FROM '.MAIN_DB_PREFIX.'c_actioncomm as ca, '.MAIN_DB_PREFIX."actioncomm as a";
|
||||
if (! $user->rights->societe->client->voir && ! $socid) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON a.fk_soc = sc.fk_soc";
|
||||
if ($usergroup > 0) $sql.= ", ".MAIN_DB_PREFIX."usergroup_user as ugu";
|
||||
@ -400,6 +396,7 @@ if ($resql)
|
||||
$event->datep=$db->jdate($obj->datep); // datep and datef are GMT date
|
||||
$event->datef=$db->jdate($obj->datep2);
|
||||
$event->type_code=$obj->code;
|
||||
$event->type_color=$obj->color;
|
||||
//$event->libelle=$obj->label; // deprecated
|
||||
$event->label=$obj->label;
|
||||
$event->percentage=$obj->percent;
|
||||
@ -440,14 +437,14 @@ if ($resql)
|
||||
|
||||
// Check values
|
||||
if ($event->date_end_in_calendar < $firstdaytoshow ||
|
||||
$event->date_start_in_calendar > $lastdaytoshow)
|
||||
$event->date_start_in_calendar >= $lastdaytoshow)
|
||||
{
|
||||
// This record is out of visible range
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($event->date_start_in_calendar < $firstdaytoshow) $event->date_start_in_calendar=$firstdaytoshow;
|
||||
if ($event->date_end_in_calendar > $lastdaytoshow) $event->date_end_in_calendar=$lastdaytoshow;
|
||||
if ($event->date_end_in_calendar >= $lastdaytoshow) $event->date_end_in_calendar=($lastdaytoshow - 1);
|
||||
|
||||
// Add an entry in actionarray for each day
|
||||
$daycursor=$event->date_start_in_calendar;
|
||||
@ -459,7 +456,7 @@ if ($resql)
|
||||
$loop=true; $j=0;
|
||||
$daykey=dol_mktime(0,0,0,$mois,$jour,$annee);
|
||||
do
|
||||
{
|
||||
{
|
||||
//if ($event->id==408) print 'daykey='.$daykey.' '.$event->datep.' '.$event->datef.'<br>';
|
||||
|
||||
$eventarray[$daykey][]=$event;
|
||||
@ -482,7 +479,6 @@ else
|
||||
dol_print_error($db);
|
||||
}
|
||||
|
||||
|
||||
$maxnbofchar=18;
|
||||
$cachethirdparties=array();
|
||||
$cachecontacts=array();
|
||||
@ -606,6 +602,7 @@ else
|
||||
$colorsbytype=array();
|
||||
|
||||
// Loop on each user to show calendar
|
||||
$todayarray=dol_getdate($now,'fast');
|
||||
$sav = $tmpday;
|
||||
$showheader = true;
|
||||
foreach ($usernames as $username)
|
||||
@ -634,11 +631,10 @@ foreach ($usernames as $username)
|
||||
$style='cal_current_month';
|
||||
if ($iter_day == 6) $style.=' cal_other_month';
|
||||
$today=0;
|
||||
$todayarray=dol_getdate($now,'fast');
|
||||
if ($todayarray['mday']==$tmpday && $todayarray['mon']==$month && $todayarray['year']==$year) $today=1;
|
||||
if ($todayarray['mday']==$tmpday && $todayarray['mon']==$tmpmonth && $todayarray['year']==$tmpyear) $today=1;
|
||||
if ($today) $style='cal_today_peruser';
|
||||
|
||||
show_day_events2($username, $tmpday, $month, $year, $monthshown, $style, $eventarray, 0, $maxnbofchar, $newparam, 1, 300, $showheader, $colorsbytype);
|
||||
show_day_events2($username, $tmpday, $tmpmonth, $tmpyear, $monthshown, $style, $eventarray, 0, $maxnbofchar, $newparam, 1, 300, $showheader, $colorsbytype);
|
||||
|
||||
$i++;
|
||||
}
|
||||
@ -648,7 +644,6 @@ foreach ($usernames as $username)
|
||||
|
||||
echo "</table>\n";
|
||||
|
||||
|
||||
// Add js code to manage click on a box
|
||||
print '<script type="text/javascript" language="javascript">
|
||||
jQuery(document).ready(function() {
|
||||
@ -671,7 +666,7 @@ jQuery(document).ready(function() {
|
||||
else if (ids.indexOf(",") > -1) /* There is several events */
|
||||
{
|
||||
/* alert(\'several events\'); */
|
||||
url = "'.DOL_URL_ROOT.'/comm/action/listactions.php?usertodo="+userid
|
||||
url = "'.DOL_URL_ROOT.'/comm/action/listactions.php?usertodo="+userid+"&dateselectyear="+year+"&dateselectmonth="+month+"&dateselectday="+dateselectday;
|
||||
window.location.href = url;
|
||||
}
|
||||
else /* One event */
|
||||
@ -694,7 +689,7 @@ $db->close();
|
||||
|
||||
|
||||
/**
|
||||
* Show event of a particular day
|
||||
* Show event of a particular day for a user
|
||||
*
|
||||
* @param string $username Login
|
||||
* @param int $day Day
|
||||
@ -729,6 +724,7 @@ function show_day_events2($username, $day, $month, $year, $monthshown, $style, &
|
||||
$ymd=sprintf("%04d",$year).sprintf("%02d",$month).sprintf("%02d",$day);
|
||||
|
||||
$nextindextouse=count($colorindexused); // At first run, this is 0, so fist user has 0, next 1, ...
|
||||
//if ($username->id && $day==1) var_dump($eventarray);
|
||||
|
||||
// We are in a particular day for $username, now we scan all events
|
||||
foreach ($eventarray as $daykey => $notused)
|
||||
@ -736,9 +732,11 @@ function show_day_events2($username, $day, $month, $year, $monthshown, $style, &
|
||||
$annee = date('Y',$daykey);
|
||||
$mois = date('m',$daykey);
|
||||
$jour = date('d',$daykey);
|
||||
if ($day==$jour && $month==$mois && $year==$annee)
|
||||
//print $annee.'-'.$mois.'-'.$jour.' '.$year.'-'.$month.'-'.$day."<br>\n";
|
||||
|
||||
if ($day==$jour && $month==$mois && $year==$annee) // Is it the day we are looking for when calling function ?
|
||||
{
|
||||
//Tout les events à la même date :
|
||||
// Scan all event for this date
|
||||
foreach ($eventarray[$daykey] as $index => $event)
|
||||
{
|
||||
$keysofuserassigned=array_keys($event->userassigned);
|
||||
@ -747,12 +745,12 @@ function show_day_events2($username, $day, $month, $year, $monthshown, $style, &
|
||||
|
||||
$ponct=($event->date_start_in_calendar == $event->date_end_in_calendar);
|
||||
|
||||
// Define $color and $cssclass of event
|
||||
// Define $color (Hex string like '0088FF') and $cssclass of event
|
||||
$color=-1; $cssclass=''; $colorindex=-1;
|
||||
if (in_array($user->id, $keysofuserassigned))
|
||||
{
|
||||
$nummytasks++; $cssclass='family_mytasks';
|
||||
// TODO Set color according to event type
|
||||
$color=$event->type_color;
|
||||
}
|
||||
else if ($event->type_code == 'ICALEVENT')
|
||||
{
|
||||
@ -763,15 +761,19 @@ function show_day_events2($username, $day, $month, $year, $monthshown, $style, &
|
||||
}
|
||||
$numicals[dol_string_nospecial($event->icalname)]++;
|
||||
}
|
||||
|
||||
$color=$event->icalcolor;
|
||||
$cssclass=(! empty($event->icalname)?'family_'.dol_string_nospecial($event->icalname):'family_other unsortable');
|
||||
}
|
||||
else if ($event->type_code == 'BIRTHDAY') {
|
||||
else if ($event->type_code == 'BIRTHDAY')
|
||||
{
|
||||
$numbirthday++; $colorindex=2; $cssclass='family_birthday unsortable'; $color=sprintf("%02x%02x%02x",$theme_datacolor[$colorindex][0],$theme_datacolor[$colorindex][1],$theme_datacolor[$colorindex][2]);
|
||||
}
|
||||
else { $numother++; $cssclass='family_other';
|
||||
else
|
||||
{
|
||||
$numother++; $cssclass='family_other';
|
||||
}
|
||||
if ($color == -1) // Color was not forced. Set color according to color index.
|
||||
if ($color < 0) // Color was not forced. Set color according to color index.
|
||||
{
|
||||
// Define color index if not yet defined
|
||||
$idusertouse=($event->userownerid?$event->userownerid:0);
|
||||
@ -793,7 +795,8 @@ function show_day_events2($username, $day, $month, $year, $monthshown, $style, &
|
||||
// Define all rects with event (cases1 is first half hour, cases2 is second half hour)
|
||||
for ($h = $begin_h; $h < $end_h; $h++)
|
||||
{
|
||||
$color = ''; //init
|
||||
//if ($username->id == 1 && $day==1) print 'h='.$h;
|
||||
$newcolor = ''; //init
|
||||
if (empty($event->fulldayevent))
|
||||
{
|
||||
$a = dol_mktime((int) $h,0,0,$month,$day,$year,false,false);
|
||||
@ -803,27 +806,47 @@ function show_day_events2($username, $day, $month, $year, $monthshown, $style, &
|
||||
$dateendtouse=$event->date_end_in_calendar;
|
||||
if ($dateendtouse==$event->date_start_in_calendar) $dateendtouse++;
|
||||
|
||||
//print dol_print_date($event->date_start_in_calendar,'dayhour').'-'.dol_print_date($a,'dayhour').'-'.dol_print_date($b,'dayhour').'<br>';
|
||||
|
||||
if ($event->date_start_in_calendar < $b && $dateendtouse > $a)
|
||||
{
|
||||
$busy=$event->transparency;
|
||||
$cases1[$h][$event->id]['busy']=$busy;
|
||||
$cases1[$h][$event->id]['string']=dol_print_date($event->date_start_in_calendar,'dayhour').' - '.dol_print_date($event->date_end_in_calendar,'dayhour').' - '.$event->label;
|
||||
$cases1[$h][$event->id]['string']=dol_print_date($event->date_start_in_calendar,'dayhour');
|
||||
if ($event->date_end_in_calendar && $event->date_end_in_calendar != $event->date_start_in_calendar)
|
||||
{
|
||||
$tmpa=dol_getdate($event->date_start_in_calendar,true);
|
||||
$tmpb=dol_getdate($event->date_end_in_calendar,true);
|
||||
if ($tmpa['mday'] == $tmpb['mday'] && $tmpa['mon'] == $tmpb['mon'] && $tmpa['year'] == $tmpb['year']) $cases1[$h][$event->id]['string'].='-'.dol_print_date($event->date_end_in_calendar,'hour');
|
||||
else $cases1[$h][$event->id]['string'].='-'.dol_print_date($event->date_end_in_calendar,'dayhour');
|
||||
}
|
||||
$cases1[$h][$event->id]['string'].=' - '.$event->label;
|
||||
$cases1[$h][$event->id]['typecode']=$event->type_code;
|
||||
if ($event->socid)
|
||||
{
|
||||
$cases1[$h][$event->id]['string'].='xxx';
|
||||
//$cases1[$h][$event->id]['string'].='xxx';
|
||||
}
|
||||
$cases1[$h][$event->id]['color']=$color;
|
||||
}
|
||||
if ($event->date_start_in_calendar < $c && $dateendtouse > $b)
|
||||
{
|
||||
$busy=$event->transparency;
|
||||
$cases2[$h][$event->id]['busy']=$busy;
|
||||
$cases2[$h][$event->id]['string']=dol_print_date($event->date_start_in_calendar,'dayhour').' - '.dol_print_date($event->date_end_in_calendar,'dayhour').' - '.$event->label;
|
||||
$cases1[$h][$event->id]['typecode']=$event->type_code;
|
||||
$cases2[$h][$event->id]['string']=dol_print_date($event->date_start_in_calendar,'dayhour');
|
||||
if ($event->date_end_in_calendar && $event->date_end_in_calendar != $event->date_start_in_calendar)
|
||||
{
|
||||
$tmpa=dol_getdate($event->date_start_in_calendar,true);
|
||||
$tmpb=dol_getdate($event->date_end_in_calendar,true);
|
||||
if ($tmpa['mday'] == $tmpb['mday'] && $tmpa['mon'] == $tmpb['mon'] && $tmpa['year'] == $tmpb['year']) $cases2[$h][$event->id]['string'].='-'.dol_print_date($event->date_end_in_calendar,'hour');
|
||||
else $cases2[$h][$event->id]['string'].='-'.dol_print_date($event->date_end_in_calendar,'dayhour');
|
||||
}
|
||||
$cases2[$h][$event->id]['string'].=' - '.$event->label;
|
||||
$cases2[$h][$event->id]['typecode']=$event->type_code;
|
||||
if ($event->socid)
|
||||
{
|
||||
$cases2[$h][$event->id]['string'].='xxx';
|
||||
//$cases2[$h][$event->id]['string'].='xxx';
|
||||
}
|
||||
$cases2[$h][$event->id]['color']=$color;
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -835,18 +858,20 @@ function show_day_events2($username, $day, $month, $year, $monthshown, $style, &
|
||||
$cases2[$h][$event->id]['string']=$event->label;
|
||||
$cases1[$h][$event->id]['typecode']=$event->type_code;
|
||||
$cases2[$h][$event->id]['typecode']=$event->type_code;
|
||||
break;
|
||||
$cases1[$h][$event->id]['color']='009900';
|
||||
$cases2[$h][$event->id]['color']='009900';
|
||||
}
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
|
||||
break;
|
||||
break; // We found the date we were looking for. No need to search anymore.
|
||||
}
|
||||
}
|
||||
|
||||
for ($h = $begin_h; $h < $end_h; $h++)
|
||||
{
|
||||
$color1='';$color2='';
|
||||
$style1='';$style2='';
|
||||
$string1=' ';$string2=' ';
|
||||
$title1='';$title2='';
|
||||
@ -879,20 +904,25 @@ function show_day_events2($username, $day, $month, $year, $monthshown, $style, &
|
||||
$ids=array_keys($cases1[$h]);
|
||||
$output = array_slice($cases1[$h], 0, 1);
|
||||
if ($output[0]['string']) $title1.=' - '.$output[0]['string'];
|
||||
if ($output[0]['color']) $color1 = $output[0]['color'];
|
||||
}
|
||||
else if (count($cases1[$h]) > 1) $color1='222222';
|
||||
|
||||
if (count($cases2[$h]) == 1) // 1 seul evenement
|
||||
{
|
||||
$ids=array_keys($cases2[$h]);
|
||||
$output = array_slice($cases2[$h], 0, 1);
|
||||
if ($output[0]['string']) $title2.=' - '.$output[0]['string'];
|
||||
if ($output[0]['color']) $color2 = $output[0]['color'];
|
||||
}
|
||||
else if (count($cases2[$h]) > 1) $color2='222222';
|
||||
$ids1=join(',',array_keys($cases1[$h]));
|
||||
$ids2=join(',',array_keys($cases2[$h]));
|
||||
//var_dump($cases1[$h]);
|
||||
print '<table class="nobordernopadding" width="100%">';
|
||||
print '<tr><td class="'.($style1?$style1.' ':'').'onclickopenref'.($title1?' cursorpointer':'').'" ref="ref_'.$username->id.'_'.sprintf("%04d",$year).'_'.sprintf("%02d",$month).'_'.sprintf("%02d",$day).'_'.sprintf("%02d",$h).'_00_'.($ids1?$ids1:'none').'"'.($title1?' title="'.$title1.'"':'').'>';
|
||||
print '<tr><td '.($color1?'style="background: #'.$color1.';"':'').'class="'.($style1?$style1.' ':'').'onclickopenref'.($title1?' cursorpointer':'').'" ref="ref_'.$username->id.'_'.sprintf("%04d",$year).'_'.sprintf("%02d",$month).'_'.sprintf("%02d",$day).'_'.sprintf("%02d",$h).'_00_'.($ids1?$ids1:'none').'"'.($title1?' title="'.$title1.'"':'').'>';
|
||||
print $string1;
|
||||
print '</td><td class="'.($style2?$style2.' ':'').'onclickopenref'.($title1?' cursorpointer':'').'" ref="ref_'.$username->id.'_'.sprintf("%04d",$year).'_'.sprintf("%02d",$month).'_'.sprintf("%02d",$day).'_'.sprintf("%02d",$h).'_30_'.($ids2?$ids2:'none').'"'.($title2?' title="'.$title2.'"':'').'>';
|
||||
print '</td><td '.($color2?'style="background: #'.$color2.';"':'').'class="'.($style2?$style2.' ':'').'onclickopenref'.($title1?' cursorpointer':'').'" ref="ref_'.$username->id.'_'.sprintf("%04d",$year).'_'.sprintf("%02d",$month).'_'.sprintf("%02d",$day).'_'.sprintf("%02d",$h).'_30_'.($ids2?$ids2:'none').'"'.($title2?' title="'.$title2.'"':'').'>';
|
||||
print $string2;
|
||||
print '</td></tr>';
|
||||
print '</table>';
|
||||
|
||||
@ -156,8 +156,9 @@ if ($viewstatut <> '')
|
||||
}
|
||||
if ($viewstatut == -3) // To bill
|
||||
{
|
||||
$sql.= ' AND c.fk_statut in (1,2,3)';
|
||||
$sql.= ' AND c.facture = 0'; // invoice not created
|
||||
//$sql.= ' AND c.fk_statut in (1,2,3)';
|
||||
//$sql.= ' AND c.facture = 0'; // invoice not created
|
||||
$sql .= ' AND ((c.fk_statut IN (1,2)) OR (c.fk_statut = 3 AND c.facture = 0))'; // validated, in process or closed but not billed
|
||||
}
|
||||
}
|
||||
if ($ordermonth > 0)
|
||||
|
||||
@ -866,6 +866,16 @@ else if ($action == 'add' && $user->rights->facture->creer)
|
||||
|
||||
// Possibility to add external linked objects with hooks
|
||||
$object->linked_objects [$object->origin] = $object->origin_id;
|
||||
// link with order if it is a shipping invoice
|
||||
if ($object->origin == 'shipping')
|
||||
{
|
||||
require_once DOL_DOCUMENT_ROOT . '/expedition/class/expedition.class.php';
|
||||
$exp = new Expedition($db);
|
||||
$exp->fetch($object->origin_id);
|
||||
$exp->fetchObjectLinked();
|
||||
if (count ($exp->linkedObjectsIds['commande']) > 0) $object->linked_objects['commande'] = $exp->linkedObjectsIds['commande'][0];
|
||||
}
|
||||
|
||||
if (is_array($_POST['other_linked_objects']) && ! empty($_POST['other_linked_objects'])) {
|
||||
$object->linked_objects = array_merge($object->linked_objects, $_POST['other_linked_objects']);
|
||||
}
|
||||
|
||||
@ -1,127 +0,0 @@
|
||||
<?php
|
||||
/* Copyright (C) 2001-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005 Simon TOSSER <simon@kornog-computing.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/compta/ventilation/fournisseur/index.php
|
||||
* \ingroup compta
|
||||
* \brief Page accueil ventilation
|
||||
*/
|
||||
|
||||
require '../../../main.inc.php';
|
||||
$langs->load("suppliers");
|
||||
|
||||
|
||||
llxHeader('','Compta - Ventilation');
|
||||
|
||||
print_titre("Ventilation Comptable");
|
||||
|
||||
print '<table border="0" width="100%">';
|
||||
|
||||
print '<tr><td valign="top" width="30%">';
|
||||
|
||||
|
||||
|
||||
$sql = "SELECT count(*) FROM ".MAIN_DB_PREFIX."facturedet";
|
||||
$sql .= " WHERE fk_code_ventilation = 0";
|
||||
$result = $db->query($sql);
|
||||
if ($result)
|
||||
{
|
||||
$row = $db->fetch_row($result);
|
||||
$nbfac = $row[0];
|
||||
|
||||
$db->free($result);
|
||||
}
|
||||
|
||||
$sql = "SELECT count(*) FROM ".MAIN_DB_PREFIX."paiement";
|
||||
$sql .= " WHERE fk_code_ventilation = 0";
|
||||
|
||||
$result = $db->query($sql);
|
||||
if ($result)
|
||||
{
|
||||
$row = $db->fetch_row($result);
|
||||
$nbp = $row[0];
|
||||
|
||||
$db->free($result);
|
||||
}
|
||||
|
||||
$sql = "SELECT count(*) FROM ".MAIN_DB_PREFIX."facture_fourn_det";
|
||||
$sql .= " WHERE fk_code_ventilation = 0";
|
||||
$result = $db->query($sql);
|
||||
if ($result)
|
||||
{
|
||||
$row = $db->fetch_row($result);
|
||||
$nbfacfourn = $row[0];
|
||||
|
||||
$db->free($result);
|
||||
}
|
||||
|
||||
/*$sql = "SELECT count(*) FROM ".MAIN_DB_PREFIX."paiementfourn";
|
||||
$sql .= " WHERE fk_code_ventilation = 0";
|
||||
|
||||
$result = $db->query($sql);
|
||||
if ($result)
|
||||
{
|
||||
$row = $db->fetch_row($result);
|
||||
$nbpfourn = $row[0];
|
||||
|
||||
$db->free($result);
|
||||
}*/
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td colspan="2">Lignes a ventiler</tr>';
|
||||
print '<tr class="liste_titre"><td>Type</td><td align="center">Nb</td></tr>';
|
||||
print '<tr><td>Factures clients</td><td align="center">'.$nbfac.'</td></tr>';
|
||||
print '<tr><td>Paiements clients</td><td align="center">'.$nbp.'</td></tr>';
|
||||
print '<tr><td>Factures fournisseurs</td><td align="center">'.$nbfacfourn.'</td></tr>';
|
||||
//print '<tr><td>Paiements fournisseurs</td><td align="center">'.$nbpfourn.'</td></tr>';
|
||||
print "</table>\n";
|
||||
|
||||
print '</td><td valign="top">';
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td>Type</td><td align="center">Nb de lignes</td></tr>';
|
||||
|
||||
$sql = "SELECT count(*), ccg.intitule FROM ".MAIN_DB_PREFIX."facturedet as fd";
|
||||
$sql .= " ,".MAIN_DB_PREFIX."compta_compte_generaux as ccg";
|
||||
$sql .= " WHERE fd.fk_code_ventilation = ccg.rowid";
|
||||
$sql .= " GROUP BY ccg.rowid";
|
||||
|
||||
$resql = $db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
$i = 0;
|
||||
$num = $db->num_rows($resql);
|
||||
|
||||
while ($i < $num)
|
||||
{
|
||||
|
||||
$row = $db->fetch_row($resql);
|
||||
|
||||
print '<tr><td>'.$row[1].'</td><td align="center">'.$row[0].'</td></tr>';
|
||||
$i++;
|
||||
}
|
||||
$db->free($resql);
|
||||
}
|
||||
print "</table>\n";
|
||||
|
||||
print '</td></tr></table>';
|
||||
|
||||
llxFooter();
|
||||
|
||||
@ -1,114 +0,0 @@
|
||||
<?php
|
||||
/* Copyright (C) 2002-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2005 Simon TOSSER <simon@kornog-computing.com>
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/compta/ventilation/fournisseur/lignes.php
|
||||
* \ingroup facture
|
||||
* \brief Page de detail des lignes de ventilation d'une facture
|
||||
*/
|
||||
|
||||
require '../../../main.inc.php';
|
||||
|
||||
$langs->load("bills");
|
||||
|
||||
if (!$user->rights->facture->lire) accessforbidden();
|
||||
if (!$user->rights->compta->ventilation->creer) accessforbidden();
|
||||
/*
|
||||
* Securite acces client
|
||||
*/
|
||||
if ($user->societe_id > 0) accessforbidden();
|
||||
|
||||
llxHeader('');
|
||||
|
||||
/*
|
||||
* Lignes de factures
|
||||
*
|
||||
*/
|
||||
$page = $_GET["page"];
|
||||
if ($page < 0) $page = 0;
|
||||
$limit = $conf->liste_limit;
|
||||
$offset = $limit * $page ;
|
||||
|
||||
$sql = "SELECT f.facnumber, f.rowid as facid, l.fk_product, l.description, l.total_ttc as price, l.qty, l.rowid, l.tva_tx, l.fk_code_ventilation, c.intitule, c.numero ";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."facture_fourn_det as l";
|
||||
$sql .= " , ".MAIN_DB_PREFIX."facture_fourn as f";
|
||||
$sql .= " , ".MAIN_DB_PREFIX."compta_compte_generaux as c";
|
||||
|
||||
$sql .= " WHERE f.rowid = l.fk_facture_fourn AND f.fk_statut = 1 AND l.fk_code_ventilation <> 0 ";
|
||||
$sql .= " AND c.rowid = l.fk_code_ventilation";
|
||||
|
||||
if (dol_strlen(trim($_GET["search_facture"])))
|
||||
{
|
||||
$sql .= " AND f.facnumber like '%".$_GET["search_facture"]."%'";
|
||||
}
|
||||
|
||||
$sql .= " ORDER BY l.rowid DESC";
|
||||
$sql .= $db->plimit($limit+1,$offset);
|
||||
|
||||
$result = $db->query($sql);
|
||||
|
||||
if ($result)
|
||||
{
|
||||
$num_lignes = $db->num_rows($result);
|
||||
$i = 0;
|
||||
|
||||
print_barre_liste("Lignes de facture ventilées",$page,"lignes.php","",$sortfield,$sortorder,'',$num_lignes);
|
||||
|
||||
print '<form method="GET" action="lignes.php">';
|
||||
print '<table class="noborder" width="100%">';
|
||||
print "<tr class=\"liste_titre\"><td>Facture</td>";
|
||||
print '<td>'.$langs->trans("Description").'</td>';
|
||||
print '<td align="right">'.$langs->trans("Montant").'</td>';
|
||||
print '<td colspan="2" align="center">'.$langs->trans("Compte").'</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
print '<tr class="liste_titre"><td><input name="search_facture" size="8" value="'.$_GET["search_facture"].'"></td>';
|
||||
print '<td><input type="submit"></td>';
|
||||
print '<td align="right"> </td>';
|
||||
print '<td align="center"> </td>';
|
||||
print '<td align="center"> </td>';
|
||||
print "</tr>\n";
|
||||
|
||||
$var=True;
|
||||
while ($i < min($num_lignes, $limit))
|
||||
{
|
||||
$objp = $db->fetch_object($result);
|
||||
$var=!$var;
|
||||
print "<tr ".$bc[$var].">";
|
||||
|
||||
print '<td><a href="'.DOL_URL_ROOT.'/compta/facture.php?facid='.$objp->facid.'">'.$objp->facnumber.'</a></td>';
|
||||
|
||||
print '<td>'.stripslashes(nl2br($objp->description)).'</td>';
|
||||
print '<td align="right">'.price($objp->price).'</td>';
|
||||
print '<td align="right">'.$objp->numero.'</td>';
|
||||
print '<td align="left">'.stripslashes($objp->intitule).'</td>';
|
||||
|
||||
print "</tr>";
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
print $db->error();
|
||||
}
|
||||
|
||||
print "</table></form>";
|
||||
|
||||
$db->close();
|
||||
|
||||
llxFooter();
|
||||
@ -1,102 +0,0 @@
|
||||
<?php
|
||||
/* Copyright (C) 2001-2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/compta/ventilation/index.php
|
||||
* \ingroup compta
|
||||
* \brief Page accueil ventilation
|
||||
*/
|
||||
|
||||
require '../../main.inc.php';
|
||||
|
||||
$langs->load("compta");
|
||||
$langs->load("bills");
|
||||
|
||||
llxHeader('','Compta - Ventilation');
|
||||
|
||||
print_fiche_titre("Ventilation Comptable");
|
||||
|
||||
//print '<table border="0" width="100%" class="notopnoleftnoright">';
|
||||
//print '<tr><td valign="top" width="30%" class="notopnoleft">';
|
||||
print '<div class="fichecenter"><div class="fichethirdleft">';
|
||||
|
||||
$sql = "SELECT count(*) FROM ".MAIN_DB_PREFIX."facturedet as fd";
|
||||
$sql.= " , ".MAIN_DB_PREFIX."facture as f";
|
||||
$sql.= " WHERE fd.fk_code_ventilation = 0";
|
||||
$sql.= " AND f.rowid = fd.fk_facture AND f.fk_statut = 1";
|
||||
|
||||
$result = $db->query($sql);
|
||||
if ($result)
|
||||
{
|
||||
$row = $db->fetch_row($result);
|
||||
$nbfac = $row[0];
|
||||
|
||||
$db->free($result);
|
||||
}
|
||||
|
||||
$var=true;
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td colspan="2">'.$langs->trans("Lines").'</tr>';
|
||||
print '<tr class="liste_titre"><td>'.$langs->trans("Type").'</td><td align="right">'.$langs->trans("Nb").'</td></tr>';
|
||||
$var=!$var;
|
||||
print "<tr ".$bc[$var].">".'<td>'.$langs->trans("Invoices").'</td><td align="right">'.$nbfac.'</td></tr>';
|
||||
$var=!$var;
|
||||
print "</table>\n";
|
||||
|
||||
|
||||
//print '</td><td valign="top" width="70%" class="notopnoleftnoright">';
|
||||
print '</div><div class="fichetwothirdright"><div class="ficheaddleft">';
|
||||
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td>'.$langs->trans("Type").'</td><td align="center">'.$langs->trans("NbOfLines").'</td><td align="center">'.$langs->trans("AccountNumber").'</td><td align="center">'.$langs->trans("TransID").'</td></tr>';
|
||||
|
||||
$sql = "SELECT count(*), ccg.intitule, ccg.rowid,ccg.numero FROM ".MAIN_DB_PREFIX."facturedet as fd";
|
||||
$sql.= " ,".MAIN_DB_PREFIX."compta_compte_generaux as ccg";
|
||||
$sql.= " WHERE fd.fk_code_ventilation = ccg.rowid";
|
||||
$sql.= " GROUP BY ccg.rowid";
|
||||
|
||||
$resql = $db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
$i = 0;
|
||||
$num = $db->num_rows($resql);
|
||||
$var=true;
|
||||
|
||||
while ($i < $num)
|
||||
{
|
||||
|
||||
$row = $db->fetch_row($resql);
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td>'.$row[1].'</td><td align="center">'.$row[0].'</td>';
|
||||
print '<td align="center">'.$row[3].'</td><td align="center">'.$row[2].'</td></tr>';
|
||||
$i++;
|
||||
}
|
||||
$db->free($resql);
|
||||
}
|
||||
print "</table>\n";
|
||||
|
||||
//print '</td></tr></table>';
|
||||
print '</div></div></div>';
|
||||
|
||||
|
||||
llxFooter();
|
||||
|
||||
$db->close();
|
||||
@ -1,141 +0,0 @@
|
||||
<?php
|
||||
/* Copyright (C) 2002-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2006 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/compta/ventilation/lignes.php
|
||||
* \ingroup facture
|
||||
* \brief Page de detail des lignes de ventilation d'une facture
|
||||
*/
|
||||
|
||||
require '../../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
|
||||
|
||||
$langs->load("bills");
|
||||
$langs->load("compta");
|
||||
|
||||
if (!$user->rights->facture->lire) accessforbidden();
|
||||
if (!$user->rights->compta->ventilation->creer) accessforbidden();
|
||||
|
||||
// Securite acces client
|
||||
if ($user->societe_id > 0) accessforbidden();
|
||||
|
||||
|
||||
llxHeader('');
|
||||
|
||||
/*
|
||||
* Lignes de factures
|
||||
*
|
||||
*/
|
||||
$page = $_GET["page"];
|
||||
if ($page < 0) $page = 0;
|
||||
$limit = $conf->liste_limit;
|
||||
$offset = $limit * $page ;
|
||||
|
||||
$sql = "SELECT f.facnumber, f.rowid as facid, l.fk_product, l.description, f.total_ttc as price, l.qty, l.rowid, l.tva_tx, l.fk_code_ventilation, c.intitule, c.numero,";
|
||||
$sql.= " p.rowid as product_id, p.ref as product_ref, p.label as product_label, p.fk_product_type as type";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."facture as f";
|
||||
$sql.= " , ".MAIN_DB_PREFIX."compta_compte_generaux as c";
|
||||
$sql.= " , ".MAIN_DB_PREFIX."facturedet as l";
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."product as p ON p.rowid = l.fk_product";
|
||||
$sql.= " WHERE f.rowid = l.fk_facture AND f.fk_statut = 1 AND l.fk_code_ventilation <> 0 ";
|
||||
$sql.= " AND f.entity = ".$conf->entity;
|
||||
$sql.= " AND c.rowid = l.fk_code_ventilation";
|
||||
if (dol_strlen(trim($_GET["search_facture"])))
|
||||
{
|
||||
$sql .= " AND f.facnumber LIKE '%".$_GET["search_facture"]."%'";
|
||||
}
|
||||
|
||||
$sql .= " ORDER BY l.rowid DESC";
|
||||
$sql .= $db->plimit($limit+1,$offset);
|
||||
|
||||
$result = $db->query($sql);
|
||||
|
||||
if ($result)
|
||||
{
|
||||
$num_lignes = $db->num_rows($result);
|
||||
$i = 0;
|
||||
|
||||
print_barre_liste($langs->trans("InvoiceDispatched"),$page,"lignes.php","",$sortfield,$sortorder,'',$num_lignes);
|
||||
|
||||
print '<form method="GET" action="lignes.php">';
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td>'.$langs->trans("Invoice").'</td>';
|
||||
print '<td>'.$langs->trans("Ref").'</td>';
|
||||
print '<td>'.$langs->trans("Label").'</td>';
|
||||
print '<td>'.$langs->trans("Description").'</td>';
|
||||
print '<td align="left">'.$langs->trans("Montant").'</td>';
|
||||
print '<td colspan="2" align="left">'.$langs->trans("Compte").'</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
print '<tr class="liste_titre"><td><input name="search_facture" size="8" value="'.$_GET["search_facture"].'"></td>';
|
||||
print '<td> </td>';
|
||||
print '<td align="right"> </td>';
|
||||
print '<td align="right"> </td>';
|
||||
print '<td align="center"> </td>';
|
||||
print '<td 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 '</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
$facture_static=new Facture($db);
|
||||
$product_static=new Product($db);
|
||||
|
||||
$var=True;
|
||||
while ($i < min($num_lignes, $limit))
|
||||
{
|
||||
$objp = $db->fetch_object($result);
|
||||
$var=!$var;
|
||||
$codeCompta = $objp->numero.' '.$objp->intitule;
|
||||
|
||||
print "<tr ".$bc[$var].">";
|
||||
|
||||
// Ref facture
|
||||
$facture_static->ref=$objp->facnumber;
|
||||
$facture_static->id=$objp->facid;
|
||||
print '<td>'.$facture_static->getNomUrl(1).'</td>';
|
||||
|
||||
// Ref produit
|
||||
$product_static->ref=$objp->product_ref;
|
||||
$product_static->id=$objp->product_id;
|
||||
$product_static->type=$objp->type;
|
||||
print '<td>';
|
||||
if ($product_static->id) print $product_static->getNomUrl(1);
|
||||
else print ' ';
|
||||
print '</td>';
|
||||
|
||||
print '<td>'.dol_trunc($objp->product_label,24).'</td>';
|
||||
print '<td>'.nl2br(dol_trunc($objp->description,32)).'</td>';
|
||||
print '<td align="left">'.price($objp->price).'</td>';
|
||||
print '<td align="left">'.$codeCompta.'</td>';
|
||||
|
||||
print "</tr>";
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
print $db->error();
|
||||
}
|
||||
|
||||
print "</table></form>";
|
||||
|
||||
|
||||
llxFooter();
|
||||
$db->close();
|
||||
@ -1110,7 +1110,22 @@ else
|
||||
|
||||
if (! empty($conf->agenda->enabled))
|
||||
{
|
||||
print load_fiche_titre($langs->trans("TasksHistoryForThisContact"),'','');
|
||||
$objthirdparty=$objsoc;
|
||||
$objcon=$object;
|
||||
|
||||
$out='';
|
||||
$permok=$user->rights->agenda->myactions->create;
|
||||
if ((! empty($objthirdparty->id) || ! empty($objcon->id)) && $permok)
|
||||
{
|
||||
$out.='<a href="'.DOL_URL_ROOT.'/comm/action/card.php?action=create';
|
||||
if (get_class($objthirdparty) == 'Societe') $out.='&socid='.$objthirdparty->id;
|
||||
$out.=(! empty($objcon->id)?'&contactid='.$objcon->id:'').'&backtopage=1&percentage=-1">';
|
||||
$out.=$langs->trans("AddAnAction").' ';
|
||||
$out.=img_picto($langs->trans("AddAnAction"),'filenew');
|
||||
$out.="</a>";
|
||||
}
|
||||
|
||||
print load_fiche_titre($langs->trans("TasksHistoryForThisContact"),$out,'');
|
||||
|
||||
print show_actions_todo($conf,$langs,$db,$objsoc,$object);
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/* Copyright (C) 2003-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2005-2014 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
|
||||
* Copyright (C) 2010-2014 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2013 Christophe Battarel <christophe.battarel@altairis.fr>
|
||||
@ -29,17 +29,18 @@
|
||||
*/
|
||||
|
||||
require ("../main.inc.php");
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/contract.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/modules/contract/modules_contract.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
||||
if (! empty($conf->produit->enabled) || ! empty($conf->service->enabled)) require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
|
||||
if (! empty($conf->propal->enabled)) require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/price.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/contract.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/contrat/class/contrat.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/modules/contract/modules_contract.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/class/doleditor.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formfile.class.php';
|
||||
if (! empty($conf->produit->enabled) || ! empty($conf->service->enabled)) require_once DOL_DOCUMENT_ROOT . '/product/class/product.class.php';
|
||||
if (! empty($conf->propal->enabled)) require_once DOL_DOCUMENT_ROOT . '/comm/propal/class/propal.class.php';
|
||||
if (! empty($conf->projet->enabled)) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formprojet.class.php';
|
||||
}
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/class/extrafields.class.php';
|
||||
|
||||
@ -70,6 +71,15 @@ $hookmanager->initHooks(array('contractcard'));
|
||||
$object = new Contrat($db);
|
||||
$extrafields = new ExtraFields($db);
|
||||
|
||||
// Load object
|
||||
if ($id > 0 || ! empty($ref)) {
|
||||
$ret = $object->fetch($id, $ref);
|
||||
if ($ret > 0)
|
||||
$ret = $object->fetch_thirdparty();
|
||||
if ($ret < 0)
|
||||
dol_print_error('', $object->error);
|
||||
}
|
||||
|
||||
// fetch optionals attributes and labels
|
||||
$extralabels = $extrafields->fetch_name_optionals_label($object->table_element);
|
||||
|
||||
@ -84,7 +94,6 @@ include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include,
|
||||
|
||||
if ($action == 'confirm_active' && $confirm == 'yes' && $user->rights->contrat->activer)
|
||||
{
|
||||
$object->fetch($id);
|
||||
$result = $object->active_line($user, GETPOST('ligne'), GETPOST('date'), GETPOST('dateend'), GETPOST('comment'));
|
||||
|
||||
if ($result > 0)
|
||||
@ -106,7 +115,6 @@ else if ($action == 'confirm_closeline' && $confirm == 'yes' && $user->rights->c
|
||||
}
|
||||
if (! $error)
|
||||
{
|
||||
$object->fetch($id);
|
||||
$result = $object->close_line($user, GETPOST('ligne'), GETPOST('dateend'), urldecode(GETPOST('comment')));
|
||||
if ($result > 0)
|
||||
{
|
||||
@ -363,7 +371,6 @@ if ($action == 'add' && $user->rights->contrat->creer)
|
||||
|
||||
else if ($action == 'classin' && $user->rights->contrat->creer)
|
||||
{
|
||||
$object->fetch($id);
|
||||
$object->setProject(GETPOST('projectid'));
|
||||
}
|
||||
|
||||
@ -402,14 +409,6 @@ else if ($action == 'addline' && $user->rights->contrat->creer)
|
||||
|
||||
if (! $error)
|
||||
{
|
||||
$ret=$object->fetch($id);
|
||||
if ($ret < 0)
|
||||
{
|
||||
setEventMessage($object->error,'errors');
|
||||
exit;
|
||||
}
|
||||
$ret=$object->fetch_thirdparty();
|
||||
|
||||
// Clean parameters
|
||||
$date_start=dol_mktime(GETPOST('date_start'.$predef.'hour'), GETPOST('date_start'.$predef.'min'), GETPOST('date_start'.$predef.'sec'), GETPOST('date_start'.$predef.'month'), GETPOST('date_start'.$predef.'day'), GETPOST('date_start'.$predef.'year'));
|
||||
$date_end=dol_mktime(GETPOST('date_end'.$predef.'hour'), GETPOST('date_end'.$predef.'min'), GETPOST('date_end'.$predef.'sec'), GETPOST('date_end'.$predef.'month'), GETPOST('date_end'.$predef.'day'), GETPOST('date_end'.$predef.'year'));
|
||||
@ -584,14 +583,6 @@ else if ($action == 'addline' && $user->rights->contrat->creer)
|
||||
|
||||
else if ($action == 'updateligne' && $user->rights->contrat->creer && ! GETPOST('cancel'))
|
||||
{
|
||||
$ret=$object->fetch($id);
|
||||
if ($ret < 0)
|
||||
{
|
||||
dol_print_error($db,$object->error);
|
||||
exit;
|
||||
}
|
||||
|
||||
$object->fetch_thirdparty();
|
||||
$objectline = new ContratLigne($db);
|
||||
if ($objectline->fetch(GETPOST('elrowid')))
|
||||
{
|
||||
@ -647,7 +638,6 @@ else if ($action == 'updateligne' && $user->rights->contrat->creer && ! GETPOST(
|
||||
|
||||
else if ($action == 'confirm_deleteline' && $confirm == 'yes' && $user->rights->contrat->creer)
|
||||
{
|
||||
$object->fetch($id);
|
||||
$result = $object->deleteline(GETPOST('lineid'),$user);
|
||||
|
||||
if ($result >= 0)
|
||||
@ -663,21 +653,17 @@ else if ($action == 'confirm_deleteline' && $confirm == 'yes' && $user->rights->
|
||||
|
||||
else if ($action == 'confirm_valid' && $confirm == 'yes' && $user->rights->contrat->creer)
|
||||
{
|
||||
$object->fetch($id);
|
||||
$result = $object->validate($user);
|
||||
}
|
||||
|
||||
// Close all lines
|
||||
else if ($action == 'confirm_close' && $confirm == 'yes' && $user->rights->contrat->creer)
|
||||
{
|
||||
$object->fetch($id);
|
||||
$result = $object->cloture($user);
|
||||
}
|
||||
|
||||
else if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->contrat->supprimer)
|
||||
{
|
||||
$object->fetch($id);
|
||||
$object->fetch_thirdparty();
|
||||
$result=$object->delete($user);
|
||||
if ($result >= 0)
|
||||
{
|
||||
@ -714,7 +700,6 @@ else if ($action == 'confirm_move' && $confirm == 'yes' && $user->rights->contra
|
||||
}
|
||||
} else if ($action == 'update_extras') {
|
||||
// Fill array 'array_options' with data from update form
|
||||
$object->fetch($id);
|
||||
$extralabels = $extrafields->fetch_name_optionals_label($object->table_element);
|
||||
$ret = $extrafields->setOptionalsFromPost($extralabels, $object, GETPOST('attribute'));
|
||||
if ($ret < 0)
|
||||
@ -734,10 +719,6 @@ else if ($action == 'confirm_move' && $confirm == 'yes' && $user->rights->contra
|
||||
setEventMessage($object->error,'errors');
|
||||
}
|
||||
} elseif ($action=='setref_customer') {
|
||||
$result = $object->fetch($id);
|
||||
if ($result < 0) {
|
||||
setEventMessage($object->errors,'errors');
|
||||
}
|
||||
$object->ref_customer=GETPOST('ref_customer','alpha');
|
||||
|
||||
$result = $object->update($user);
|
||||
@ -749,10 +730,6 @@ else if ($action == 'confirm_move' && $confirm == 'yes' && $user->rights->contra
|
||||
exit;
|
||||
}
|
||||
} elseif ($action=='setref') {
|
||||
$result = $object->fetch($id);
|
||||
if ($result < 0) {
|
||||
setEventMessage($object->errors,'errors');
|
||||
}
|
||||
$object->ref=GETPOST('ref','alpha');
|
||||
|
||||
$result = $object->update($user);
|
||||
@ -765,17 +742,53 @@ else if ($action == 'confirm_move' && $confirm == 'yes' && $user->rights->contra
|
||||
}
|
||||
}
|
||||
|
||||
// Generation doc (depuis lien ou depuis cartouche doc)
|
||||
else if ($action == 'builddoc' && $user->rights->contrat->creer) {
|
||||
if (GETPOST('model')) {
|
||||
$object->setDocModel($user, GETPOST('model'));
|
||||
}
|
||||
|
||||
// Define output language
|
||||
$outputlangs = $langs;
|
||||
if (! empty($conf->global->MAIN_MULTILANGS)) {
|
||||
$outputlangs = new Translate("", $conf);
|
||||
$newlang = (GETPOST('lang_id') ? GETPOST('lang_id') : $object->thirdparty->default_lang);
|
||||
$outputlangs->setDefaultLang($newlang);
|
||||
}
|
||||
$ret = $object->fetch($id); // Reload to get new records
|
||||
$result = $object->generateDocument($object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref);
|
||||
|
||||
if ($result <= 0) {
|
||||
dol_print_error($db, $result);
|
||||
exit();
|
||||
} else {
|
||||
header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . (empty($conf->global->MAIN_JUMP_TAG) ? '' : '#builddoc'));
|
||||
exit();
|
||||
}
|
||||
}
|
||||
|
||||
// Remove file in doc form
|
||||
else if ($action == 'remove_file' && $user->rights->contrat->creer) {
|
||||
if ($object->id > 0) {
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php';
|
||||
|
||||
$langs->load("other");
|
||||
$upload_dir = $conf->contrat->dir_output;
|
||||
$file = $upload_dir . '/' . GETPOST('file');
|
||||
$ret = dol_delete_file($file, 0, 0, 0, $object);
|
||||
if ($ret)
|
||||
setEventMessage($langs->trans("FileWasRemoved", GETPOST('file')));
|
||||
else
|
||||
setEventMessage($langs->trans("ErrorFailToDeleteFile", GETPOST('file')), 'errors');
|
||||
}
|
||||
}
|
||||
|
||||
if (! empty($conf->global->MAIN_DISABLE_CONTACTS_TAB) && $user->rights->contrat->creer)
|
||||
{
|
||||
if ($action == 'addcontact')
|
||||
{
|
||||
$result = $object->fetch($id);
|
||||
|
||||
if ($result > 0 && $id > 0)
|
||||
{
|
||||
$contactid = (GETPOST('userid') ? GETPOST('userid') : GETPOST('contactid'));
|
||||
$result = $object->add_contact($contactid, GETPOST('type'), GETPOST('source'));
|
||||
}
|
||||
$contactid = (GETPOST('userid') ? GETPOST('userid') : GETPOST('contactid'));
|
||||
$result = $object->add_contact($contactid, GETPOST('type'), GETPOST('source'));
|
||||
|
||||
if ($result >= 0)
|
||||
{
|
||||
@ -799,20 +812,12 @@ if (! empty($conf->global->MAIN_DISABLE_CONTACTS_TAB) && $user->rights->contrat-
|
||||
// bascule du statut d'un contact
|
||||
else if ($action == 'swapstatut')
|
||||
{
|
||||
if ($object->fetch($id))
|
||||
{
|
||||
$result=$object->swapContactStatus(GETPOST('ligne'));
|
||||
}
|
||||
else
|
||||
{
|
||||
setEventMessage($object->error,'errors');
|
||||
}
|
||||
$result=$object->swapContactStatus(GETPOST('ligne'));
|
||||
}
|
||||
|
||||
// Efface un contact
|
||||
else if ($action == 'deletecontact')
|
||||
{
|
||||
$object->fetch($id);
|
||||
$result = $object->delete_contact(GETPOST('lineid'));
|
||||
|
||||
if ($result >= 0)
|
||||
@ -834,6 +839,7 @@ if (! empty($conf->global->MAIN_DISABLE_CONTACTS_TAB) && $user->rights->contrat-
|
||||
llxHeader('',$langs->trans("ContractCard"),"Contrat");
|
||||
|
||||
$form = new Form($db);
|
||||
$formfile = new FormFile($db);
|
||||
|
||||
$objectlignestatic=new ContratLigne($db);
|
||||
|
||||
@ -1032,14 +1038,10 @@ else
|
||||
{
|
||||
$now=dol_now();
|
||||
|
||||
if ($id > 0 || ! empty($ref))
|
||||
if ($object->id > 0)
|
||||
{
|
||||
$result=$object->fetch($id,$ref);
|
||||
if ($result < 0) dol_print_error($db,$object->error);
|
||||
$result=$object->fetch_lines(); // This also init $this->nbofserviceswait, $this->nbofservicesopened, $this->nbofservicesexpired=, $this->nbofservicesclosed
|
||||
if ($result < 0) dol_print_error($db,$object->error);
|
||||
$result=$object->fetch_thirdparty();
|
||||
if ($result < 0) dol_print_error($db,$object->error);
|
||||
|
||||
$nbofservices=count($object->lines);
|
||||
|
||||
@ -1793,16 +1795,29 @@ else
|
||||
print "</div>";
|
||||
}
|
||||
|
||||
print '<div class="fichecenter"><div class="fichehalfleft">';
|
||||
|
||||
print '<table width="100%"><tr><td width="50%" valign="top">';
|
||||
/*
|
||||
* Documents generes
|
||||
*/
|
||||
$filename = dol_sanitizeFileName($object->ref);
|
||||
$filedir = $conf->contrat->dir_output . "/" . dol_sanitizeFileName($object->ref);
|
||||
$urlsource = $_SERVER["PHP_SELF"] . "?id=" . $object->id;
|
||||
$genallowed = $user->rights->contrat->creer;
|
||||
$delallowed = $user->rights->contrat->supprimer;
|
||||
|
||||
$var = true;
|
||||
|
||||
$somethingshown = $formfile->show_documents('contract', $filename, $filedir, $urlsource, $genallowed, $delallowed, $object->modelpdf, 1, 0, 0, 28, 0, '', 0, '', $soc->default_lang);
|
||||
|
||||
/*
|
||||
* Linked object block
|
||||
*/
|
||||
$somethingshown=$object->showLinkedObjectBlock();
|
||||
*/
|
||||
$somethingshown = $object->showLinkedObjectBlock();
|
||||
|
||||
print '</td><td valign="top" width="50%">';
|
||||
print '</td></tr></table>';
|
||||
print '</div><div class="fichehalfright"><div class="ficheaddleft">';
|
||||
|
||||
print '</div></div></div>';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2012 Destailleur Laurent <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2005-2014 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
|
||||
* Copyright (C) 2008 Raphael Bertrand <raphael.bertrand@resultic.fr>
|
||||
* Copyright (C) 2010-2014 Juanjo Menent <jmenent@2byte.es>
|
||||
@ -65,6 +65,7 @@ class Contrat extends CommonObject
|
||||
var $note; // deprecated
|
||||
var $note_private;
|
||||
var $note_public;
|
||||
var $modelpdf;
|
||||
|
||||
var $fk_projet;
|
||||
|
||||
@ -401,7 +402,7 @@ class Contrat extends CommonObject
|
||||
$sql.= " fk_user_author,";
|
||||
$sql.= " fk_projet,";
|
||||
$sql.= " fk_commercial_signature, fk_commercial_suivi,";
|
||||
$sql.= " note_private, note_public, extraparams";
|
||||
$sql.= " note_private, note_public, model_pdf, extraparams";
|
||||
$sql.= " ,ref_customer";
|
||||
$sql.= " ,ref_ext";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."contrat";
|
||||
@ -436,6 +437,7 @@ class Contrat extends CommonObject
|
||||
$this->note = $result["note_private"]; // deprecated
|
||||
$this->note_private = $result["note_private"];
|
||||
$this->note_public = $result["note_public"];
|
||||
$this->modelpdf = $result["model_pdf"];
|
||||
|
||||
$this->fk_projet = $result["fk_projet"]; // deprecated
|
||||
$this->fk_project = $result["fk_projet"];
|
||||
@ -744,7 +746,7 @@ class Contrat extends CommonObject
|
||||
|
||||
$this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."contrat");
|
||||
|
||||
|
||||
|
||||
// Load object modContract
|
||||
$module=(! empty($conf->global->CONTRACT_ADDON)?$conf->global->CONTRACT_ADDON:'mod_contract_olive');
|
||||
if (substr($module, 0, 13) == 'mod_contract_' && substr($module, -3) == 'php')
|
||||
@ -1866,6 +1868,40 @@ class Contrat extends CommonObject
|
||||
$this->total_tva = $xnbp*19.6;
|
||||
$this->total_ttc = $xnbp*119.6;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a document onto disk according to template module.
|
||||
*
|
||||
* @param string $modele Force model to use ('' to not force)
|
||||
* @param Translate $outputlangs Object langs to use for output
|
||||
* @param int $hidedetails Hide details of lines
|
||||
* @param int $hidedesc Hide description
|
||||
* @param int $hideref Hide ref
|
||||
* @return int 0 if KO, 1 if OK
|
||||
*/
|
||||
public function generateDocument($modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0)
|
||||
{
|
||||
global $conf,$user,$langs;
|
||||
|
||||
$langs->load("contracts");
|
||||
|
||||
// Positionne le modele sur le nom du modele a utiliser
|
||||
if (! dol_strlen($modele))
|
||||
{
|
||||
if (! empty($conf->global->CONTRACT_ADDON_PDF))
|
||||
{
|
||||
$modele = $conf->global->CONTRACT_ADDON_PDF;
|
||||
}
|
||||
else
|
||||
{
|
||||
$modele = 'strato';
|
||||
}
|
||||
}
|
||||
|
||||
$modelpath = "core/modules/contract/doc/";
|
||||
|
||||
return $this->commonGenerateDocument($modelpath, $modele, $outputlangs, $hidedetails, $hidedesc, $hideref);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -577,11 +577,15 @@ abstract class CommonObject
|
||||
/**
|
||||
* Charge le contact d'id $id dans this->contact
|
||||
*
|
||||
* @param int $contactid Id du contact
|
||||
* @param int $contactid Id du contact. Use this->contactid if empty.
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
function fetch_contact($contactid)
|
||||
function fetch_contact($contactid='')
|
||||
{
|
||||
if (empty($contactid)) $contactid=$this->contactid;
|
||||
|
||||
if (empty($contactid)) return 0;
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
|
||||
$contact = new Contact($this->db);
|
||||
$result=$contact->fetch($contactid);
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2010-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2010-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2010-2014 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2010-2011 Juanjo Menent <jmenent@2byte.es>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@ -152,10 +152,12 @@ class HookManager
|
||||
$modulealreadyexecuted=array();
|
||||
$resaction=0; $error=0; $result='';
|
||||
$this->resPrint=''; $this->resArray=array();
|
||||
foreach($this->hooks as $modules) // this->hooks is an array with context as key and value is an array of modules that handle this context
|
||||
foreach($this->hooks as $context => $modules) // this->hooks is an array with context as key and value is an array of modules that handle this context
|
||||
{
|
||||
if (! empty($modules))
|
||||
{
|
||||
$modulealreadyexecuted[$context]=array(); // Filter by context
|
||||
|
||||
foreach($modules as $module => $actionclassinstance)
|
||||
{
|
||||
//print "Before hook ".get_class($actionclassinstance)." method=".$method." hooktype=".$hooktype." results=".count($actionclassinstance->results)." resprints=".count($actionclassinstance->resprints)." resaction=".$resaction." result=".$result."<br>\n";
|
||||
@ -164,8 +166,10 @@ class HookManager
|
||||
// jump to next class if method does not exists
|
||||
if (! method_exists($actionclassinstance,$method)) continue;
|
||||
// test to avoid to run twice a hook, when a module implements several active contexts
|
||||
if (in_array($module,$modulealreadyexecuted)) continue;
|
||||
$modulealreadyexecuted[$module]=$module;
|
||||
if (in_array($module,$modulealreadyexecuted[$context])) continue;
|
||||
$modulealreadyexecuted[$context][$module]=$module; // Use the $currentcontext in method for avoid to run twice
|
||||
// Add current context for avoid method execution in bad context, you can add this test in your method : eg if($currentcontext != 'formfile') return;
|
||||
$parameters['currentcontext'] = $context;
|
||||
// Hooks that must return int (hooks with type 'addreplace')
|
||||
if ($hooktype == 'addreplace')
|
||||
{
|
||||
|
||||
@ -1329,9 +1329,9 @@ class Form
|
||||
{
|
||||
$assignedtouser=dol_json_decode($_SESSION['assignedtouser'], true);
|
||||
}
|
||||
$numassignetouser=count($assignedtouser);
|
||||
$nbassignetouser=count($assignedtouser);
|
||||
|
||||
if ($numassignetouser && $action != 'view') $out.='<br>';
|
||||
if ($nbassignetouser && $action != 'view') $out.='<br>';
|
||||
$i=0; $ownerid=0;
|
||||
foreach($assignedtouser as $key => $value)
|
||||
{
|
||||
@ -1339,7 +1339,7 @@ class Form
|
||||
$userstatic->fetch($value['id']);
|
||||
$out.=$userstatic->getNomUrl(1);
|
||||
if ($i == 0) { $ownerid = $value['id']; $out.=' ('.$langs->trans("Owner").')'; }
|
||||
if ($numassignetouser > 1 && $action != 'view') $out.=' <input type="image" style="border: 0px;" src="'.img_picto($langs->trans("Remove"), 'delete', '', 0, 1).'" value="'.$userstatic->id.'" class="removedassigned" id="removedassigned_'.$userstatic->id.'" name="removedassigned_'.$userstatic->id.'">';
|
||||
if ($nbassignetouser > 1 && $action != 'view') $out.=' <input type="image" style="border: 0px;" src="'.img_picto($langs->trans("Remove"), 'delete', '', 0, 1).'" value="'.$userstatic->id.'" class="removedassigned" id="removedassigned_'.$userstatic->id.'" name="removedassigned_'.$userstatic->id.'">';
|
||||
//$out.=' '.($value['mandatory']?$langs->trans("Mandatory"):$langs->trans("Optional"));
|
||||
//$out.=' '.($value['transparency']?$langs->trans("Busy"):$langs->trans("NotBusy"));
|
||||
$out.='<br>';
|
||||
|
||||
@ -355,6 +355,15 @@ class FormFile
|
||||
$modellist=ModelePDFFactures::liste_modeles($this->db);
|
||||
}
|
||||
}
|
||||
elseif ($modulepart == 'contract')
|
||||
{
|
||||
if (is_array($genallowed)) $modellist=$genallowed;
|
||||
else
|
||||
{
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/modules/contract/modules_contract.php';
|
||||
$modellist=ModelePDFContract::liste_modeles($this->db);
|
||||
}
|
||||
}
|
||||
elseif ($modulepart == 'project')
|
||||
{
|
||||
if (is_array($genallowed)) $modellist=$genallowed;
|
||||
|
||||
@ -914,22 +914,12 @@ function show_actions_todo($conf,$langs,$db,$object,$objcon='',$noprint=0)
|
||||
if (get_class($object) == 'Societe') $out.='</a>';
|
||||
$out.='</td>';
|
||||
$out.='<td colspan="5" align="right">';
|
||||
$permok=$user->rights->agenda->myactions->create;
|
||||
if (($object->id || $objcon->id) && $permok)
|
||||
{
|
||||
$out.='<a href="'.DOL_URL_ROOT.'/comm/action/card.php?action=create';
|
||||
if (get_class($object) == 'Societe') $out.='&socid='.$object->id;
|
||||
$out.=(! empty($objcon->id)?'&contactid='.$objcon->id:'').'&backtopage=1&percentage=-1">';
|
||||
$out.=$langs->trans("AddAnAction").' ';
|
||||
$out.=img_picto($langs->trans("AddAnAction"),'filenew');
|
||||
$out.="</a>";
|
||||
}
|
||||
$out.='</td>';
|
||||
$out.='</tr>';
|
||||
|
||||
$sql = "SELECT a.id, a.label,";
|
||||
$sql.= " a.datep as dp,";
|
||||
$sql.= " a.datea as da,";
|
||||
$sql.= " a.datep2 as dp2,";
|
||||
$sql.= " a.percent,";
|
||||
$sql.= " a.fk_user_author, a.fk_contact,";
|
||||
$sql.= " a.fk_element, a.elementtype,";
|
||||
@ -970,10 +960,20 @@ function show_actions_todo($conf,$langs,$db,$object,$objcon='',$noprint=0)
|
||||
$obj = $db->fetch_object($result);
|
||||
|
||||
$datep=$db->jdate($obj->dp);
|
||||
$datep2=$db->jdate($obj->dp2);
|
||||
|
||||
$out.="<tr ".$bc[$var].">";
|
||||
|
||||
$out.='<td width="120" align="left" class="nowrap">'.dol_print_date($datep,'dayhour')."</td>\n";
|
||||
$out.='<td width="120" align="left" class="nowrap">';
|
||||
$out.=dol_print_date($datep,'dayhour');
|
||||
if ($datep2 && $datep2 != $datep)
|
||||
{
|
||||
$tmpa=dol_getdate($datep,true);
|
||||
$tmpb=dol_getdate($datep2,true);
|
||||
if ($tmpa['mday'] == $tmpb['mday'] && $tmpa['mon'] == $tmpb['mon'] && $tmpa['year'] == $tmpb['year']) $out.='-'.dol_print_date($datep2,'hour');
|
||||
else $out.='-'.dol_print_date($datep2,'dayhour');
|
||||
}
|
||||
$out.="</td>\n";
|
||||
|
||||
// Picto warning
|
||||
$out.='<td width="16">';
|
||||
@ -1103,7 +1103,7 @@ function show_actions_done($conf,$langs,$db,$object,$objcon='',$noprint=0)
|
||||
'type'=>'action',
|
||||
'id'=>$obj->id,
|
||||
'datestart'=>$db->jdate($obj->dp),
|
||||
'date'=>$db->jdate($obj->dp2),
|
||||
'dateend'=>$db->jdate($obj->dp2),
|
||||
'note'=>$obj->label,
|
||||
'percent'=>$obj->percent,
|
||||
'acode'=>$obj->acode,
|
||||
@ -1154,7 +1154,8 @@ function show_actions_done($conf,$langs,$db,$object,$objcon='',$noprint=0)
|
||||
$histo[$numaction]=array(
|
||||
'type'=>'mailing',
|
||||
'id'=>$obj->id,
|
||||
'date'=>$db->jdate($obj->da),
|
||||
'datestart'=>$db->jdate($obj->da),
|
||||
'dateend'=>$db->jdate($obj->da),
|
||||
'note'=>$obj->note,
|
||||
'percent'=>$obj->percentage,
|
||||
'acode'=>$obj->acode,
|
||||
@ -1197,16 +1198,6 @@ function show_actions_done($conf,$langs,$db,$object,$objcon='',$noprint=0)
|
||||
if (get_class($object) == 'Societe') $out.='</a>';
|
||||
$out.='</td>';
|
||||
$out.='<td colspan="5" align="right">';
|
||||
$permok=$user->rights->agenda->myactions->create;
|
||||
if ((! empty($object->id) || ! empty($objcon->id)) && $permok)
|
||||
{
|
||||
$out.='<a href="'.DOL_URL_ROOT.'/comm/action/card.php?action=create';
|
||||
if (get_class($object) == 'Societe') $out.='&socid='.$object->id;
|
||||
$out.=(! empty($objcon->id)?'&contactid='.$objcon->id:'').'&backtopage=1&percentage=-1">';
|
||||
$out.=$langs->trans("AddAnAction").' ';
|
||||
$out.=img_picto($langs->trans("AddAnAction"),'filenew');
|
||||
$out.="</a>";
|
||||
}
|
||||
$out.='</td>';
|
||||
$out.='</tr>';
|
||||
|
||||
@ -1217,8 +1208,14 @@ function show_actions_done($conf,$langs,$db,$object,$objcon='',$noprint=0)
|
||||
|
||||
// Champ date
|
||||
$out.='<td width="120" class="nowrap">';
|
||||
if ($histo[$key]['date']) $out.=dol_print_date($histo[$key]['date'],'dayhour');
|
||||
else if ($histo[$key]['datestart']) $out.=dol_print_date($histo[$key]['datestart'],'dayhour');
|
||||
$out.=dol_print_date($histo[$key]['datestart'],'dayhour');
|
||||
if ($histo[$key]['dateend'] && $histo[$key]['dateend'] != $histo[$key]['datestart'])
|
||||
{
|
||||
$tmpa=dol_getdate($histo[$key]['datestart'],true);
|
||||
$tmpb=dol_getdate($histo[$key]['dateend'],true);
|
||||
if ($tmpa['mday'] == $tmpb['mday'] && $tmpa['mon'] == $tmpb['mon'] && $tmpa['year'] == $tmpb['year']) $out.='-'.dol_print_date($histo[$key]['dateend'],'hour');
|
||||
else $out.='-'.dol_print_date($histo[$key]['dateend'],'dayhour');
|
||||
}
|
||||
$out.="</td>\n";
|
||||
|
||||
// Picto
|
||||
@ -1251,6 +1248,7 @@ function show_actions_done($conf,$langs,$db,$object,$objcon='',$noprint=0)
|
||||
// Objet lie
|
||||
// TODO uniformize
|
||||
$out.='<td>';
|
||||
//var_dump($histo[$key]['elementtype']);
|
||||
if (isset($histo[$key]['elementtype']))
|
||||
{
|
||||
if ($histo[$key]['elementtype'] == 'propal' && ! empty($conf->propal->enabled))
|
||||
@ -1259,13 +1257,13 @@ function show_actions_done($conf,$langs,$db,$object,$objcon='',$noprint=0)
|
||||
$propalstatic->id=$histo[$key]['fk_element'];
|
||||
$out.=$propalstatic->getNomUrl(1);
|
||||
}
|
||||
elseif ($histo[$key]['elementtype'] == 'commande' && ! empty($conf->commande->enabled))
|
||||
elseif (($histo[$key]['elementtype'] == 'order' || $histo[$key]['elementtype'] == 'commande') && ! empty($conf->commande->enabled))
|
||||
{
|
||||
$orderstatic->ref=$langs->trans("Order");
|
||||
$orderstatic->id=$histo[$key]['fk_element'];
|
||||
$out.=$orderstatic->getNomUrl(1);
|
||||
}
|
||||
elseif ($histo[$key]['elementtype'] == 'facture' && ! empty($conf->facture->enabled))
|
||||
elseif (($histo[$key]['elementtype'] == 'invoice' || $histo[$key]['elementtype'] == 'facture') && ! empty($conf->facture->enabled))
|
||||
{
|
||||
$facturestatic->ref=$langs->trans("Invoice");
|
||||
$facturestatic->id=$histo[$key]['fk_element'];
|
||||
|
||||
@ -1636,14 +1636,14 @@ function dol_check_secure_access_document($modulepart,$original_file,$entity,$fu
|
||||
else $original_file=$conf->facture->dir_output.'/payments/'.$original_file;
|
||||
}
|
||||
|
||||
// Wrapping pour les exports de compta
|
||||
// Wrapping for accounting exports
|
||||
else if ($modulepart == 'export_compta')
|
||||
{
|
||||
if ($fuser->rights->compta->ventilation->creer || preg_match('/^specimen/i',$original_file))
|
||||
if ($fuser->rights->accounting->ventilation->dispatch || preg_match('/^specimen/i',$original_file))
|
||||
{
|
||||
$accessallowed=1;
|
||||
}
|
||||
$original_file=$conf->compta->dir_output.'/'.$original_file;
|
||||
$original_file=$conf->accounting->dir_output.'/'.$original_file;
|
||||
}
|
||||
|
||||
// Wrapping pour les expedition
|
||||
|
||||
@ -1,11 +1,12 @@
|
||||
<?php
|
||||
/* Copyright (C) 2006-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2007 Patrick Raguin <patrick.raguin@gmail.com>
|
||||
* Copyright (C) 2010-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2010 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2012 Christophe Battarel <christophe.battarel@altairis.fr>
|
||||
* Copyright (C) 2014 Cedric GROSS <c.gross@kreiz-it.fr>
|
||||
/* Copyright (C) 2006-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2007 Patrick Raguin <patrick.raguin@gmail.com>
|
||||
* Copyright (C) 2010-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2010 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2012 Christophe Battarel <christophe.battarel@altairis.fr>
|
||||
* Copyright (C) 2014 Cedric GROSS <c.gross@kreiz-it.fr>
|
||||
* Copyright (C) 2014 Teddy Andreotti <125155@supinfo.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
|
||||
@ -166,7 +167,7 @@ function pdf_getInstance($format='',$metric='mm',$pagetype='P')
|
||||
* This class is an enhanced FPDI class that support method writeHTMLCell
|
||||
*/
|
||||
class FPDI_DolExtended extends FPDI
|
||||
{
|
||||
{
|
||||
/**
|
||||
* __call
|
||||
*
|
||||
@ -434,9 +435,9 @@ function pdf_pagehead(&$pdf,$outputlangs,$page_height)
|
||||
// Add a background image on document
|
||||
if (! empty($conf->global->MAIN_USE_BACKGROUND_ON_PDF)) // Warning, this option make TCPDF generation beeing crazy and some content disappeared behin the image
|
||||
{
|
||||
$pdf->SetAutoPageBreak(0,0); // Disable auto pagebreak before adding image
|
||||
$pdf->SetAutoPageBreak(0,0); // Disable auto pagebreak before adding image
|
||||
$pdf->Image($conf->mycompany->dir_output.'/logos/'.$conf->global->MAIN_USE_BACKGROUND_ON_PDF, (isset($conf->global->MAIN_USE_BACKGROUND_ON_PDF_X)?$conf->global->MAIN_USE_BACKGROUND_ON_PDF_X:0), (isset($conf->global->MAIN_USE_BACKGROUND_ON_PDF_Y)?$conf->global->MAIN_USE_BACKGROUND_ON_PDF_Y:0), 0, $page_height);
|
||||
$pdf->SetAutoPageBreak(1,0); // Restore pagebreak
|
||||
$pdf->SetAutoPageBreak(1,0); // Restore pagebreak
|
||||
}
|
||||
}
|
||||
|
||||
@ -498,7 +499,6 @@ function pdf_bank(&$pdf,$outputlangs,$curx,$cury,$account,$onlynumber=0,$default
|
||||
|
||||
$diffsizetitle=(empty($conf->global->PDF_DIFFSIZE_TITLE)?3:$conf->global->PDF_DIFFSIZE_TITLE);
|
||||
$diffsizecontent=(empty($conf->global->PDF_DIFFSIZE_CONTENT)?4:$conf->global->PDF_DIFFSIZE_CONTENT);
|
||||
|
||||
$pdf->SetXY($curx, $cury);
|
||||
|
||||
if (empty($onlynumber))
|
||||
@ -526,6 +526,27 @@ function pdf_bank(&$pdf,$outputlangs,$curx,$cury,$account,$onlynumber=0,$default
|
||||
$cury+=3;
|
||||
}
|
||||
|
||||
// Use correct name of bank id according to country
|
||||
$ibankey="IBANNumber";
|
||||
if ($account->getCountryCode() == 'IN') $ibankey="IFSC";
|
||||
if (! empty($account->iban))
|
||||
{
|
||||
$ibanDisplay_temp = $outputlangs->convToOutputCharset($account->iban);
|
||||
$ibanDisplay = "";
|
||||
|
||||
for($i = 0; $i < dol_strlen($ibanDisplay_temp); $i++){
|
||||
$ibanDisplay .= $ibanDisplay_temp[$i];
|
||||
if($i%4 == 3 && $i > 0){
|
||||
$ibanDisplay .= " ";
|
||||
}
|
||||
}
|
||||
|
||||
$pdf->SetFont('','B',$default_font_size - 3);
|
||||
$pdf->SetXY($curx, $cury);
|
||||
$pdf->MultiCell(100, 3, $outputlangs->transnoentities($ibankey).': ' . $ibanDisplay, 0, 'L', 0);
|
||||
$cury+=3;
|
||||
}
|
||||
|
||||
if (empty($onlynumber)) $pdf->line($curx+1, $cury+1, $curx+1, $cury+8);
|
||||
|
||||
if ($usedetailedbban == 1)
|
||||
@ -606,9 +627,7 @@ function pdf_bank(&$pdf,$outputlangs,$curx,$cury,$account,$onlynumber=0,$default
|
||||
}
|
||||
|
||||
// Use correct name of bank id according to country
|
||||
$ibankey="IBANNumber";
|
||||
$bickey="BICNumber";
|
||||
if ($account->getCountryCode() == 'IN') $ibankey="IFSC";
|
||||
if ($account->getCountryCode() == 'IN') $bickey="SWIFT";
|
||||
|
||||
$pdf->SetFont('','',$default_font_size - $diffsizecontent);
|
||||
@ -625,13 +644,6 @@ function pdf_bank(&$pdf,$outputlangs,$curx,$cury,$account,$onlynumber=0,$default
|
||||
}
|
||||
else if (! $usedetailedbban) $cury+=1;
|
||||
|
||||
if (! empty($account->iban))
|
||||
{
|
||||
$pdf->SetXY($curx, $cury);
|
||||
$pdf->MultiCell(100, 3, $outputlangs->transnoentities($ibankey).': ' . $outputlangs->convToOutputCharset($account->iban), 0, 'L', 0);
|
||||
$cury+=3;
|
||||
}
|
||||
|
||||
if (! empty($account->bic))
|
||||
{
|
||||
$pdf->SetXY($curx, $cury);
|
||||
@ -641,7 +653,6 @@ function pdf_bank(&$pdf,$outputlangs,$curx,$cury,$account,$onlynumber=0,$default
|
||||
return $pdf->getY();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Show footer of page for PDF generation
|
||||
*
|
||||
@ -671,11 +682,11 @@ function pdf_pagefoot(&$pdf,$outputlangs,$paramfreetext,$fromcompany,$marge_bass
|
||||
{
|
||||
// Make substitution
|
||||
$substitutionarray=array(
|
||||
'__FROM_NAME__' => $fromcompany->nom,
|
||||
'__FROM_EMAIL__' => $fromcompany->email,
|
||||
'__TOTAL_TTC__' => $object->total_ttc,
|
||||
'__TOTAL_HT__' => $object->total_ht,
|
||||
'__TOTAL_VAT__' => $object->total_vat
|
||||
'__FROM_NAME__' => $fromcompany->nom,
|
||||
'__FROM_EMAIL__' => $fromcompany->email,
|
||||
'__TOTAL_TTC__' => $object->total_ttc,
|
||||
'__TOTAL_HT__' => $object->total_ht,
|
||||
'__TOTAL_VAT__' => $object->total_vat
|
||||
);
|
||||
complete_substitutions_array($substitutionarray,$outputlangs,$object);
|
||||
$newfreetext=make_substitutions($conf->global->$paramfreetext,$substitutionarray);
|
||||
|
||||
@ -27,7 +27,6 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="setup"', __HANDLER__, 'left', 103__+MAX_llx_menu__, 'home', '', 100__+MAX_llx_menu__, '/admin/modules.php?leftmenu=setup', 'Modules', 1, 'admin', '', '', 2, 2, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="setup"', __HANDLER__, 'left', 104__+MAX_llx_menu__, 'home', '', 100__+MAX_llx_menu__, '/admin/boxes.php?leftmenu=setup', 'Boxes', 1, 'admin', '', '', 2, 6, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="setup"', __HANDLER__, 'left', 105__+MAX_llx_menu__, 'home', '', 100__+MAX_llx_menu__, '/admin/menus.php?leftmenu=setup', 'Menus', 1, 'admin', '', '', 2, 3, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="setup"', __HANDLER__, 'left', 114__+MAX_llx_menu__, 'home', '', 100__+MAX_llx_menu__, '/admin/fiscalyear.php?leftmenu=setup', 'Fiscalyear', 1, 'admin', '', '', 2, 5, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="setup"', __HANDLER__, 'left', 106__+MAX_llx_menu__, 'home', '', 100__+MAX_llx_menu__, '/admin/delais.php?leftmenu=setup', 'Alerts', 1, 'admin', '', '', 2, 7, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="setup"', __HANDLER__, 'left', 108__+MAX_llx_menu__, 'home', '', 100__+MAX_llx_menu__, '/admin/proxy.php?leftmenu=setup', 'Security', 1, 'admin', '', '', 2, 8, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="setup"', __HANDLER__, 'left', 110__+MAX_llx_menu__, 'home', '', 100__+MAX_llx_menu__, '/admin/limits.php?leftmenu=setup', 'MenuLimits', 1, 'admin', '', '', 2, 9, __ENTITY__);
|
||||
@ -198,6 +197,8 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->comptabilite->enabled && $conf->global->FACTURE_VENTILATION', __HANDLER__, 'left', 2406__+MAX_llx_menu__, 'accountancy', '', 2400__+MAX_llx_menu__, '/compta/export/', 'Export', 1, 'companies', '$user->rights->compta->ventilation->lire', '', 0, 3, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->comptabilite->enabled && $conf->global->FACTURE_VENTILATION', __HANDLER__, 'left', 2407__+MAX_llx_menu__, 'accountancy', '', 2406__+MAX_llx_menu__, '/compta/export/index.php', 'New', 2, 'companies', '$user->rights->compta->ventilation->lire', '', 0, 0, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->comptabilite->enabled && $conf->global->FACTURE_VENTILATION', __HANDLER__, 'left', 2408__+MAX_llx_menu__, 'accountancy', '', 2406__+MAX_llx_menu__, '/compta/export/list.php', 'List', 2, 'companies', '$user->rights->compta->ventilation->lire', '', 0, 1, __ENTITY__);
|
||||
-- Fiscal year
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled"', __HANDLER__, 'left', 114__+MAX_llx_menu__, 'home', '', 100__+MAX_llx_menu__, '/admin/fiscalyear.php?leftmenu=setup', 'Fiscalyear', 1, 'admin', '', '', 2, 5, __ENTITY__);
|
||||
-- Rapports
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->comptabilite->enabled || $conf->accounting->enabled', __HANDLER__, 'left', 2700__+MAX_llx_menu__, 'accountancy', 'ca', 6__+MAX_llx_menu__, '/compta/resultat/index.php?leftmenu=ca&mainmenu=accountancy', 'Reportings', 0, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 11, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->comptabilite->enabled || $conf->accounting->enabled', __HANDLER__, 'left', 2701__+MAX_llx_menu__, 'accountancy', '', 2700__+MAX_llx_menu__, '/compta/resultat/index.php?leftmenu=ca', 'ReportInOut', 1, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 0, __ENTITY__);
|
||||
@ -244,7 +245,7 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->projet->enabled', __HANDLER__, 'left', 3801__+MAX_llx_menu__, 'project', '', 3800__+MAX_llx_menu__, '/projet/tasks.php?leftmenu=projects&action=create&mode=mine', 'NewTask', 1, 'projects', '$user->rights->projet->creer', '', 2, 1, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->projet->enabled', __HANDLER__, 'left', 3802__+MAX_llx_menu__, 'project', '', 3800__+MAX_llx_menu__, '/projet/tasks/index.php?leftmenu=projects&mode=mine', 'List', 1, 'projects', '$user->rights->projet->lire', '', 2, 2, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->projet->enabled', __HANDLER__, 'left', 3803__+MAX_llx_menu__, 'project', '', 3800__+MAX_llx_menu__, '/projet/activity/list.php?leftmenu=projects&mode=mine', 'NewTimeSpent', 1, 'projects', '$user->rights->projet->lire', '', 2, 3, __ENTITY__);
|
||||
|
||||
-- Tools
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->mailing->enabled', __HANDLER__, 'left', 3900__+MAX_llx_menu__, 'tools', 'mailing', 8__+MAX_llx_menu__, '/comm/mailing/index.php?leftmenu=mailing', 'EMailings', 0, 'mails', '$user->rights->mailing->lire', '', 0, 0, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->mailing->enabled', __HANDLER__, 'left', 3901__+MAX_llx_menu__, 'tools', '', 3900__+MAX_llx_menu__, '/comm/mailing/card.php?leftmenu=mailing&action=create', 'NewMailing', 1, 'mails', '$user->rights->mailing->creer', '', 0, 0, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->mailing->enabled', __HANDLER__, 'left', 3902__+MAX_llx_menu__, 'tools', '', 3900__+MAX_llx_menu__, '/comm/mailing/list.php?leftmenu=mailing', 'List', 1, 'mails', '$user->rights->mailing->lire', '', 0, 1, __ENTITY__);
|
||||
|
||||
@ -872,13 +872,13 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
|
||||
$langs->load("accountancy");
|
||||
|
||||
$newmenu->add("/accountancy/customer/index.php?leftmenu=ventil_customer",$langs->trans("CustomersVentilation"),0,$user->rights->accounting->ventilation->read, '', $mainmenu, 'ventil_customer');
|
||||
if (empty($leftmenu) || $leftmenu=="ventil_customer") $newmenu->add("/accountancy/customer/list.php",$langs->trans("ToDispatch"),1,$user->rights->accounting->ventilation->read);
|
||||
if (empty($leftmenu) || $leftmenu=="ventil_customer") $newmenu->add("/accountancy/customer/list.php",$langs->trans("ToDispatch"),1,$user->rights->accounting->ventilation->dispatch);
|
||||
if (empty($leftmenu) || $leftmenu=="ventil_customer") $newmenu->add("/accountancy/customer/lines.php",$langs->trans("Dispatched"),1,$user->rights->accounting->ventilation->read);
|
||||
|
||||
if (! empty($conf->fournisseur->enabled))
|
||||
{
|
||||
$newmenu->add("/accountancy/supplier/index.php?leftmenu=ventil_supplier",$langs->trans("SuppliersVentilation"),0,$user->rights->accounting->ventilation->read, '', $mainmenu, 'ventil_supplier');
|
||||
if (empty($leftmenu) || $leftmenu=="ventil_supplier") $newmenu->add("/accountancy/supplier/list.php",$langs->trans("ToDispatch"),1,$user->rights->accounting->ventilation->read);
|
||||
if (empty($leftmenu) || $leftmenu=="ventil_supplier") $newmenu->add("/accountancy/supplier/list.php",$langs->trans("ToDispatch"),1,$user->rights->accounting->ventilation->dispatch);
|
||||
if (empty($leftmenu) || $leftmenu=="ventil_supplier") $newmenu->add("/accountancy/supplier/lines.php",$langs->trans("Dispatched"),1,$user->rights->accounting->ventilation->read);
|
||||
}
|
||||
}
|
||||
|
||||
@ -93,30 +93,6 @@ class modComptabilite extends DolibarrModules
|
||||
$this->rights[$r][3] = 1;
|
||||
$this->rights[$r][4] = 'resultat';
|
||||
$this->rights[$r][5] = 'lire';
|
||||
|
||||
$r++;
|
||||
$this->rights[$r][0] = 96;
|
||||
$this->rights[$r][1] = 'Parametrer la ventilation';
|
||||
$this->rights[$r][2] = 'r';
|
||||
$this->rights[$r][3] = 0;
|
||||
$this->rights[$r][4] = 'ventilation';
|
||||
$this->rights[$r][5] = 'parametrer';
|
||||
|
||||
$r++;
|
||||
$this->rights[$r][0] = 97;
|
||||
$this->rights[$r][1] = 'Lire les ventilations de factures';
|
||||
$this->rights[$r][2] = 'r';
|
||||
$this->rights[$r][3] = 1;
|
||||
$this->rights[$r][4] = 'ventilation';
|
||||
$this->rights[$r][5] = 'lire';
|
||||
|
||||
$r++;
|
||||
$this->rights[$r][0] = 98;
|
||||
$this->rights[$r][1] = 'Ventiler les lignes de factures';
|
||||
$this->rights[$r][2] = 'r';
|
||||
$this->rights[$r][3] = 0;
|
||||
$this->rights[$r][4] = 'ventilation';
|
||||
$this->rights[$r][5] = 'creer';
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -19,7 +19,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/core/modules/project/pdf/doc_generic_project_odt.modules.php
|
||||
* \file htdocs/core/modules/project/doc/doc_generic_project_odt.modules.php
|
||||
* \ingroup project
|
||||
* \brief File of class to build ODT documents for third parties
|
||||
*/
|
||||
@ -17,7 +17,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/core/modules/project/pdf/pdf_baleine.modules.php
|
||||
* \file htdocs/core/modules/project/doc/pdf_baleine.modules.php
|
||||
* \ingroup project
|
||||
* \brief Fichier de la classe permettant de generer les projets au modele Baleine
|
||||
* \author Regis Houssin
|
||||
@ -1,28 +1,28 @@
|
||||
<?php
|
||||
/* Copyright (C) 2010-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2012 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2013 Florian Henry <florian.henry@ope-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
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
* or see http://www.gnu.org/
|
||||
*/
|
||||
* Copyright (C) 2013 Florian Henry <florian.henry@ope-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
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
* or see http://www.gnu.org/
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/core/modules/project/task/pdf/doc_generic_task_odt.modules.php
|
||||
* \file htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php
|
||||
* \ingroup project
|
||||
* \brief File of class to build ODT documents for third parties
|
||||
*/
|
||||
*/
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/modules/project/modules_project.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/modules/project/task/modules_task.php';
|
||||
@ -304,7 +304,7 @@ class doc_generic_task_odt extends ModelePDFTask
|
||||
$texte = $this->description.".<br>\n";
|
||||
$texte.= '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
||||
$texte.= '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
$texte.= '<input type="hidden" name="action" value="setModuleOptionsTask">';
|
||||
$texte.= '<input type="hidden" name="action" value="setModuleOptions">';
|
||||
$texte.= '<input type="hidden" name="param1" value="PROJECT_TASK_ADDON_PDF_ODT_PATH">';
|
||||
$texte.= '<table class="nobordernopadding" width="100%">';
|
||||
|
||||
@ -367,7 +367,7 @@ class doc_generic_task_odt extends ModelePDFTask
|
||||
*/
|
||||
function write_file($object,$outputlangs,$srctemplatepath)
|
||||
{
|
||||
global $user,$langs,$conf,$mysoc;
|
||||
global $user,$langs,$conf,$mysoc,$hookmanager;
|
||||
|
||||
if (empty($srctemplatepath))
|
||||
{
|
||||
@ -819,8 +819,8 @@ class doc_generic_task_odt extends ModelePDFTask
|
||||
// Call the beforeODTSave hook
|
||||
$parameters=array('odfHandler'=>&$odfHandler,'file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs);
|
||||
$reshook=$hookmanager->executeHooks('beforeODTSave',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks
|
||||
|
||||
|
||||
|
||||
|
||||
// Write new file
|
||||
if (!empty($conf->global->MAIN_ODT_AS_PDF)) {
|
||||
try {
|
||||
@ -838,9 +838,9 @@ class doc_generic_task_odt extends ModelePDFTask
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$reshook=$hookmanager->executeHooks('afterODTCreation',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks
|
||||
|
||||
|
||||
if (! empty($conf->global->MAIN_UMASK))
|
||||
@chmod($file, octdec($conf->global->MAIN_UMASK));
|
||||
|
||||
@ -4,6 +4,7 @@
|
||||
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2010 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2010-2014 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2014 Jean Heimburger <jean@tiaris.info>
|
||||
*
|
||||
* 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
|
||||
@ -48,6 +49,9 @@ $result = restrictedArea($user, 'societe&fournisseur', $id, '&societe');
|
||||
|
||||
$object = new Fournisseur($db);
|
||||
|
||||
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
|
||||
$hookmanager->initHooks(array('suppliercard'));
|
||||
|
||||
/*
|
||||
* Action
|
||||
*/
|
||||
@ -426,60 +430,66 @@ if ($object->fetch($id))
|
||||
/*
|
||||
* Barre d'actions
|
||||
*/
|
||||
|
||||
print '<div class="tabsAction">';
|
||||
|
||||
if ($user->rights->fournisseur->commande->creer)
|
||||
$parameters = array();
|
||||
$reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been
|
||||
// modified by hook
|
||||
if (empty($reshook))
|
||||
{
|
||||
$langs->load("orders");
|
||||
print '<a class="butAction" href="'.DOL_URL_ROOT.'/fourn/commande/card.php?action=create&socid='.$object->id.'">'.$langs->trans("AddOrder").'</a>';
|
||||
|
||||
print '<div class="tabsAction">';
|
||||
|
||||
if ($user->rights->fournisseur->commande->creer)
|
||||
{
|
||||
$langs->load("orders");
|
||||
print '<a class="butAction" href="'.DOL_URL_ROOT.'/fourn/commande/card.php?action=create&socid='.$object->id.'">'.$langs->trans("AddOrder").'</a>';
|
||||
}
|
||||
|
||||
if ($user->rights->fournisseur->facture->creer)
|
||||
{
|
||||
$langs->load("bills");
|
||||
print '<a class="butAction" href="'.DOL_URL_ROOT.'/fourn/facture/card.php?action=create&socid='.$object->id.'">'.$langs->trans("AddBill").'</a>';
|
||||
}
|
||||
|
||||
// Add action
|
||||
if (! empty($conf->agenda->enabled) && ! empty($conf->global->MAIN_REPEATTASKONEACHTAB))
|
||||
{
|
||||
if ($user->rights->agenda->myactions->create)
|
||||
{
|
||||
print '<a class="butAction" href="'.DOL_URL_ROOT.'/comm/action/card.php?action=create&socid='.$object->id.'">'.$langs->trans("AddAction").'</a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<a class="butAction" title="'.dol_escape_js($langs->trans("NotAllowed")).'" href="#">'.$langs->trans("AddAction").'</a>';
|
||||
}
|
||||
}
|
||||
|
||||
print '</div>';
|
||||
print '<br>';
|
||||
|
||||
if (! empty($conf->global->MAIN_REPEATCONTACTONEACHTAB))
|
||||
{
|
||||
print '<br>';
|
||||
// List of contacts
|
||||
show_contacts($conf,$langs,$db,$object,$_SERVER["PHP_SELF"].'?socid='.$object->id);
|
||||
}
|
||||
|
||||
// Addresses list
|
||||
if (! empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) && ! empty($conf->global->MAIN_REPEATADDRESSONEACHTAB))
|
||||
{
|
||||
$result=show_addresses($conf,$langs,$db,$object,$_SERVER["PHP_SELF"].'?socid='.$object->id);
|
||||
}
|
||||
|
||||
if (! empty($conf->global->MAIN_REPEATTASKONEACHTAB))
|
||||
{
|
||||
print load_fiche_titre($langs->trans("ActionsOnCompany"),'','');
|
||||
|
||||
// List of todo actions
|
||||
show_actions_todo($conf,$langs,$db,$object);
|
||||
|
||||
// List of done actions
|
||||
show_actions_done($conf,$langs,$db,$object);
|
||||
}
|
||||
}
|
||||
|
||||
if ($user->rights->fournisseur->facture->creer)
|
||||
{
|
||||
$langs->load("bills");
|
||||
print '<a class="butAction" href="'.DOL_URL_ROOT.'/fourn/facture/card.php?action=create&socid='.$object->id.'">'.$langs->trans("AddBill").'</a>';
|
||||
}
|
||||
|
||||
// Add action
|
||||
if (! empty($conf->agenda->enabled) && ! empty($conf->global->MAIN_REPEATTASKONEACHTAB))
|
||||
{
|
||||
if ($user->rights->agenda->myactions->create)
|
||||
{
|
||||
print '<a class="butAction" href="'.DOL_URL_ROOT.'/comm/action/card.php?action=create&socid='.$object->id.'">'.$langs->trans("AddAction").'</a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<a class="butAction" title="'.dol_escape_js($langs->trans("NotAllowed")).'" href="#">'.$langs->trans("AddAction").'</a>';
|
||||
}
|
||||
}
|
||||
|
||||
print '</div>';
|
||||
print '<br>';
|
||||
|
||||
if (! empty($conf->global->MAIN_REPEATCONTACTONEACHTAB))
|
||||
{
|
||||
print '<br>';
|
||||
// List of contacts
|
||||
show_contacts($conf,$langs,$db,$object,$_SERVER["PHP_SELF"].'?socid='.$object->id);
|
||||
}
|
||||
|
||||
// Addresses list
|
||||
if (! empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) && ! empty($conf->global->MAIN_REPEATADDRESSONEACHTAB))
|
||||
{
|
||||
$result=show_addresses($conf,$langs,$db,$object,$_SERVER["PHP_SELF"].'?socid='.$object->id);
|
||||
}
|
||||
|
||||
if (! empty($conf->global->MAIN_REPEATTASKONEACHTAB))
|
||||
{
|
||||
print load_fiche_titre($langs->trans("ActionsOnCompany"),'','');
|
||||
|
||||
// List of todo actions
|
||||
show_actions_todo($conf,$langs,$db,$object);
|
||||
|
||||
// List of done actions
|
||||
show_actions_done($conf,$langs,$db,$object);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -1821,98 +1821,104 @@ elseif (! empty($object->id))
|
||||
/**
|
||||
* Boutons actions
|
||||
*/
|
||||
if ($user->societe_id == 0 && $action != 'edit_line' && $action != 'delete')
|
||||
$parameters = array();
|
||||
$reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been
|
||||
// modified by hook
|
||||
if (empty($reshook))
|
||||
{
|
||||
print '<div class="tabsAction">';
|
||||
|
||||
// Validate
|
||||
if ($object->statut == 0 && $num > 0)
|
||||
if ($user->societe_id == 0 && $action != 'edit_line' && $action != 'delete')
|
||||
{
|
||||
if ($user->rights->fournisseur->commande->valider)
|
||||
print '<div class="tabsAction">';
|
||||
|
||||
// Validate
|
||||
if ($object->statut == 0 && $num > 0)
|
||||
{
|
||||
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=valid"';
|
||||
print '>'.$langs->trans('Validate').'</a>';
|
||||
if ($user->rights->fournisseur->commande->valider)
|
||||
{
|
||||
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=valid"';
|
||||
print '>'.$langs->trans('Validate').'</a>';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Modify
|
||||
if ($object->statut == 1)
|
||||
{
|
||||
if ($user->rights->fournisseur->commande->commander)
|
||||
|
||||
// Modify
|
||||
if ($object->statut == 1)
|
||||
{
|
||||
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=reopen">'.$langs->trans("Modify").'</a>';
|
||||
if ($user->rights->fournisseur->commande->commander)
|
||||
{
|
||||
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=reopen">'.$langs->trans("Modify").'</a>';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Approve
|
||||
if ($object->statut == 1)
|
||||
{
|
||||
if ($user->rights->fournisseur->commande->approuver)
|
||||
|
||||
// Approve
|
||||
if ($object->statut == 1)
|
||||
{
|
||||
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=approve">'.$langs->trans("ApproveOrder").'</a>';
|
||||
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=refuse">'.$langs->trans("RefuseOrder").'</a>';
|
||||
if ($user->rights->fournisseur->commande->approuver)
|
||||
{
|
||||
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=approve">'.$langs->trans("ApproveOrder").'</a>';
|
||||
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=refuse">'.$langs->trans("RefuseOrder").'</a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<a class="butActionRefused" href="#">'.$langs->trans("ApproveOrder").'</a>';
|
||||
print '<a class="butActionRefused" href="#">'.$langs->trans("RefuseOrder").'</a>';
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
// Send
|
||||
if (in_array($object->statut, array(2, 3, 4, 5)))
|
||||
{
|
||||
print '<a class="butActionRefused" href="#">'.$langs->trans("ApproveOrder").'</a>';
|
||||
print '<a class="butActionRefused" href="#">'.$langs->trans("RefuseOrder").'</a>';
|
||||
if ($user->rights->fournisseur->commande->commander)
|
||||
{
|
||||
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=presend&mode=init">'.$langs->trans('SendByMail').'</a>';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Send
|
||||
if (in_array($object->statut, array(2, 3, 4, 5)))
|
||||
{
|
||||
if ($user->rights->fournisseur->commande->commander)
|
||||
|
||||
// Reopen
|
||||
if (in_array($object->statut, array(2, 5, 6, 7, 9)))
|
||||
{
|
||||
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=presend&mode=init">'.$langs->trans('SendByMail').'</a>';
|
||||
if ($user->rights->fournisseur->commande->commander)
|
||||
{
|
||||
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=reopen">'.$langs->trans("ReOpen").'</a>';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Reopen
|
||||
if (in_array($object->statut, array(2, 5, 6, 7, 9)))
|
||||
{
|
||||
if ($user->rights->fournisseur->commande->commander)
|
||||
|
||||
// Create bill
|
||||
if (! empty($conf->fournisseur->enabled) && $object->statut >= 2) // 2 means accepted
|
||||
{
|
||||
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=reopen">'.$langs->trans("ReOpen").'</a>';
|
||||
if ($user->rights->fournisseur->facture->creer)
|
||||
{
|
||||
print '<a class="butAction" href="'.DOL_URL_ROOT.'/fourn/facture/card.php?action=create&origin='.$object->element.'&originid='.$object->id.'&socid='.$object->socid.'">'.$langs->trans("CreateBill").'</a>';
|
||||
}
|
||||
|
||||
//if ($user->rights->fournisseur->commande->creer && $object->statut > 2)
|
||||
//{
|
||||
// print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=classifybilled">'.$langs->trans("ClassifyBilled").'</a>';
|
||||
//}
|
||||
}
|
||||
}
|
||||
|
||||
// Create bill
|
||||
if (! empty($conf->fournisseur->enabled) && $object->statut >= 2) // 2 means accepted
|
||||
{
|
||||
if ($user->rights->fournisseur->facture->creer)
|
||||
|
||||
// Cancel
|
||||
if ($object->statut == 2)
|
||||
{
|
||||
print '<a class="butAction" href="'.DOL_URL_ROOT.'/fourn/facture/card.php?action=create&origin='.$object->element.'&originid='.$object->id.'&socid='.$object->socid.'">'.$langs->trans("CreateBill").'</a>';
|
||||
if ($user->rights->fournisseur->commande->commander)
|
||||
{
|
||||
print '<a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=cancel">'.$langs->trans("CancelOrder").'</a>';
|
||||
}
|
||||
}
|
||||
|
||||
//if ($user->rights->fournisseur->commande->creer && $object->statut > 2)
|
||||
//{
|
||||
// print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=classifybilled">'.$langs->trans("ClassifyBilled").'</a>';
|
||||
//}
|
||||
}
|
||||
|
||||
// Cancel
|
||||
if ($object->statut == 2)
|
||||
{
|
||||
if ($user->rights->fournisseur->commande->commander)
|
||||
|
||||
// Clone
|
||||
if ($user->rights->fournisseur->commande->creer)
|
||||
{
|
||||
print '<a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=cancel">'.$langs->trans("CancelOrder").'</a>';
|
||||
print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&socid='.$object->socid.'&action=clone&object=order">'.$langs->trans("ToClone").'</a>';
|
||||
}
|
||||
|
||||
// Delete
|
||||
if ($user->rights->fournisseur->commande->supprimer)
|
||||
{
|
||||
print '<a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=delete">'.$langs->trans("Delete").'</a>';
|
||||
}
|
||||
|
||||
print "</div>";
|
||||
}
|
||||
|
||||
// Clone
|
||||
if ($user->rights->fournisseur->commande->creer)
|
||||
{
|
||||
print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&socid='.$object->socid.'&action=clone&object=order">'.$langs->trans("ToClone").'</a>';
|
||||
}
|
||||
|
||||
// Delete
|
||||
if ($user->rights->fournisseur->commande->supprimer)
|
||||
{
|
||||
print '<a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=delete">'.$langs->trans("Delete").'</a>';
|
||||
}
|
||||
|
||||
print "</div>";
|
||||
}
|
||||
print "<br>";
|
||||
|
||||
|
||||
@ -1125,3 +1125,5 @@ create table llx_payment_loan
|
||||
fk_user_creat integer,
|
||||
fk_user_modif integer
|
||||
)ENGINE=innodb;
|
||||
|
||||
ALTER TABLE llx_contrat ADD COLUMN model_pdf varchar(255) DEFAULT NULL AFTER note_public;
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
-- ============================================================================
|
||||
-- Copyright (C) 2002-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
-- Copyright (C) 2004-2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
-- Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
-- Copyright (C) 2005-2014 Regis Houssin <regis.houssin@capnetworks.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
|
||||
@ -40,6 +40,7 @@ create table llx_contrat
|
||||
fk_user_cloture integer,
|
||||
note_private text,
|
||||
note_public text,
|
||||
model_pdf varchar(255),
|
||||
import_key varchar(14),
|
||||
extraparams varchar(255)
|
||||
|
||||
|
||||
@ -582,9 +582,6 @@ Permission92=إنشاء / تعديل المساهمات الاجتماعية و
|
||||
Permission93=حذف المساهمات الاجتماعية وضريبة القيمة المضافة
|
||||
Permission94=تصدير المساهمات الاجتماعية
|
||||
Permission95=قراءة تقارير
|
||||
Permission96=ارسال الإعداد
|
||||
Permission97=قراءة ارسال الفواتير والمحاسبة
|
||||
Permission98=ارسال الفاتورة 'sخطوط المحاسبة
|
||||
Permission101=قراءة الإرسال
|
||||
Permission102=إنشاء / تعديل الإرسال
|
||||
Permission104=صحة الإرسال
|
||||
|
||||
@ -582,9 +582,6 @@ Permission92=Създаване / промяна на социалните вн
|
||||
Permission93=Изтриване на социалноосигурителните вноски и ДДС
|
||||
Permission94=Експортиране на социалноосигурителните вноски
|
||||
Permission95=Прочети доклада
|
||||
Permission96=Настройка на експедиция
|
||||
Permission97=Фактура за счетоводството експедиция
|
||||
Permission98=Изпращането фактура линии счетоводни
|
||||
Permission101=Прочети sendings
|
||||
Permission102=Създаване / промяна sendings
|
||||
Permission104=Проверка на sendings
|
||||
|
||||
@ -582,9 +582,6 @@ Permission92=Create/modify social contributions and vat
|
||||
Permission93=Delete social contributions and vat
|
||||
Permission94=Export social contributions
|
||||
Permission95=Read reports
|
||||
Permission96=Otpremanje postavki
|
||||
Permission97=Read invoice accountancy dispatching
|
||||
Permission98=Dispatch invoice accountancy lines
|
||||
Permission101=Read sendings
|
||||
Permission102=Create/modify sendings
|
||||
Permission104=Validate sendings
|
||||
|
||||
@ -582,9 +582,6 @@ Permission92=Crear/modificar impostos i IVA
|
||||
Permission93=Eliminar impostos i IVA
|
||||
Permission94=Exporta impostos
|
||||
Permission95=Consultar balanços i resultats
|
||||
Permission96=Parametritzar desglossament
|
||||
Permission97=Llegir línies de factures
|
||||
Permission98=Desglossar línies de factures
|
||||
Permission101=Consultar expedicions
|
||||
Permission102=Crear/modificar expedicions
|
||||
Permission104=Validar expedicions
|
||||
|
||||
@ -582,9 +582,6 @@ Permission92=Vytvořit / upravit příspěvky na sociální zabezpečení a dan
|
||||
Permission93=Odstranění sociální příspěvky a daně z přidané hodnoty
|
||||
Permission94=Export příspěvky na sociální zabezpečení
|
||||
Permission95=Přečtěte si zprávy
|
||||
Permission96=Nastavení zasílání
|
||||
Permission97=Přečtěte si faktury účetnictví dispečink
|
||||
Permission98=Po odeslání faktury účetní linky
|
||||
Permission101=Přečtěte si sendings
|
||||
Permission102=Vytvořit / upravit sendings
|
||||
Permission104=Ověřit sendings
|
||||
|
||||
@ -582,9 +582,6 @@ Permission92=Opret / ændre sociale bidrag og moms
|
||||
Permission93=Slet sociale bidrag og moms
|
||||
Permission94=Eksporter sociale bidrag
|
||||
Permission95=Læs rapporter
|
||||
Permission96=Setup lastfordelingen
|
||||
Permission97=Læs faktura regnskabspool lastfordelingen
|
||||
Permission98=Ekspeditionscentre faktura's regnskabslinjer
|
||||
Permission101=Læs sendings
|
||||
Permission102=Opret / ændre sendings
|
||||
Permission104=Valider sendings
|
||||
|
||||
@ -582,9 +582,6 @@ Permission92=Steuern/Sozialbeiträge erstellen/bearbeiten
|
||||
Permission93=Steuern/Sozialbeiträge löschen
|
||||
Permission94=Sozialbeiträge exportieren
|
||||
Permission95=Berichte einsehen
|
||||
Permission96=Verbuchung einstellen
|
||||
Permission97=Rechnungszuweisung einsehen
|
||||
Permission98=Zuweisung der Rechnungszeilen
|
||||
Permission101=Sendungen einsehen
|
||||
Permission102=Sendungen erstellen/bearbeiten
|
||||
Permission104=Sendungen freigeben
|
||||
|
||||
@ -582,9 +582,6 @@ Permission92=Create/modify social contributions and vat
|
||||
Permission93=Delete social contributions and vat
|
||||
Permission94=Export social contributions
|
||||
Permission95=Read reports
|
||||
Permission96=Setup dispatching
|
||||
Permission97=Read invoice accountancy dispatching
|
||||
Permission98=Dispatch invoice accountancy lines
|
||||
Permission101=Read sendings
|
||||
Permission102=Create/modify sendings
|
||||
Permission104=Validate sendings
|
||||
|
||||
@ -219,6 +219,7 @@ AutomaticIfJavascriptDisabled=Automatic if Javascript is disabled
|
||||
AvailableOnlyIfJavascriptNotDisabled=Available only if JavaScript is not disabled
|
||||
AvailableOnlyIfJavascriptAndAjaxNotDisabled=Available only if JavaScript is not disabled
|
||||
Required=Required
|
||||
UsedOnlyWithTypeOption=Used by some agenda option only
|
||||
Security=Security
|
||||
Passwords=Passwords
|
||||
DoNotStoreClearPassword=Do no store clear passwords in database but store only encrypted value (Activated recommended)
|
||||
@ -584,9 +585,6 @@ Permission92=Create/modify social contributions and vat
|
||||
Permission93=Delete social contributions and vat
|
||||
Permission94=Export social contributions
|
||||
Permission95=Read reports
|
||||
Permission96=Setup dispatching
|
||||
Permission97=Read invoice accountancy dispatching
|
||||
Permission98=Dispatch invoice accountancy lines
|
||||
Permission101=Read sendings
|
||||
Permission102=Create/modify sendings
|
||||
Permission104=Validate sendings
|
||||
|
||||
@ -88,4 +88,5 @@ ExtSiteUrlAgenda=URL to access .ical file
|
||||
ExtSiteNoLabel=No Description
|
||||
WorkingTimeRange=Working time range
|
||||
WorkingDaysRange=Working days range
|
||||
AddEvent=Create event
|
||||
AddEvent=Create event
|
||||
MyAvailability=Ma disponibilité
|
||||
@ -584,9 +584,6 @@ Permission92=Crear/modificar impuestos e IVA
|
||||
Permission93=Eliminar impuestos e IVA
|
||||
Permission94=Exportar impuestos
|
||||
Permission95=Consultar balances y resultados
|
||||
Permission96=Parametrizar desglose
|
||||
Permission97=Leer líneas de facturas
|
||||
Permission98=Desglosar líneas de facturas
|
||||
Permission101=Consultar expediciones
|
||||
Permission102=Crear/modificar expediciones
|
||||
Permission104=Validar expediciones
|
||||
|
||||
@ -582,9 +582,6 @@ Permission92=Sotsiaal- ja käibemaksu loomine/muutmine
|
||||
Permission93=Sotsiaal- ja käibemaksu kustutamine
|
||||
Permission94=Sotsiaalmaksu eksport
|
||||
Permission95=Aruannete vaatamine
|
||||
Permission96=Saatmise seadistamine
|
||||
Permission97=Arvete raamatupidamisse saatmise vaatamine
|
||||
Permission98=Arvete raamatupidamisse saatmise read
|
||||
Permission101=Saatmiste vaatamine
|
||||
Permission102=Saatmiste loomine/muutmine
|
||||
Permission104=Saatmiste kinnitamine
|
||||
|
||||
@ -582,9 +582,6 @@ Permission92=Create/modify social contributions and vat
|
||||
Permission93=Delete social contributions and vat
|
||||
Permission94=Export social contributions
|
||||
Permission95=Read reports
|
||||
Permission96=Setup dispatching
|
||||
Permission97=Read invoice accountancy dispatching
|
||||
Permission98=Dispatch invoice accountancy lines
|
||||
Permission101=Read sendings
|
||||
Permission102=Create/modify sendings
|
||||
Permission104=Validate sendings
|
||||
|
||||
@ -582,9 +582,6 @@ Permission92=ایجاد / تغییر مشارکتهای اجتماعی و مال
|
||||
Permission93=حذف کمک های اجتماعی و مالیات بر ارزش افزوده
|
||||
Permission94=کمک های اجتماعی صادرات
|
||||
Permission95=دفعات بازدید: گزارش
|
||||
Permission96=راه اندازی اعزام
|
||||
Permission97=خوانده شده فاکتور اعزام حسابداری
|
||||
Permission98=خطوط حسابداری فاکتور اعزام
|
||||
Permission101=خوانده شده sendings
|
||||
Permission102=ایجاد / تغییر sendings
|
||||
Permission104=اعتبارسنجی sendings
|
||||
|
||||
@ -582,9 +582,6 @@ Permission92=Luoda / muuttaa sosiaaliturvamaksut ja alv
|
||||
Permission93=Poista sosiaaliturvamaksut ja alv
|
||||
Permission94=Vienti sosiaaliturvamaksut
|
||||
Permission95=Lue raportit
|
||||
Permission96=Setup lähetyskeskukset
|
||||
Permission97=Lue laskun kirjanpitotietojen lähetyskeskukset
|
||||
Permission98=Lähetysvaihetta laskun n kirjanpitotapahtumaa
|
||||
Permission101=Lue sendings
|
||||
Permission102=Luoda / muuttaa sendings
|
||||
Permission104=Validate sendings
|
||||
|
||||
@ -584,9 +584,6 @@ Permission92=Créer/modifier les charges et la TVA
|
||||
Permission93=Supprimer les charges et la TVA
|
||||
Permission94=Exporter les charges
|
||||
Permission95=Consulter CA, bilans et résultats
|
||||
Permission96=Paramétrer la ventilation
|
||||
Permission97=Lire les lignes de factures
|
||||
Permission98=Ventiler les lignes de factures
|
||||
Permission101=Consulter les expéditions
|
||||
Permission102=Créer/modifier les expéditions
|
||||
Permission104=Valider les expéditions
|
||||
|
||||
@ -164,9 +164,6 @@ NotUsedForGoods=Non utilisé pour les biens
|
||||
ProposalStats=Statistiques sur les propales
|
||||
OrderStats=Statistiques sur les commandes
|
||||
InvoiceStats=Statistiques sur les factures
|
||||
Dispatch=Ventilation
|
||||
Dispatched=Ventilés
|
||||
ToDispatch=A ventiler
|
||||
ThirdPartyMustBeEditAsCustomer=Le tiers doit être défini comme client
|
||||
SellsJournal=Journal des ventes
|
||||
PurchasesJournal=Journal des achats
|
||||
|
||||
@ -582,9 +582,6 @@ Permission92=צור / לשנות לביטוח הלאומי ומס ערך מוס
|
||||
Permission93=מחק לביטוח הלאומי ומס ערך מוסף
|
||||
Permission94=ייצוא הפרשות סוציאליות
|
||||
Permission95=לקרוא דוחות
|
||||
Permission96=הגדרת שיגור
|
||||
Permission97=קרא את חשבון חשבונית שיגור
|
||||
Permission98=שדר הקווים חשבונאות של חשבוניות
|
||||
Permission101=לקרוא sendings
|
||||
Permission102=צור / לשנות sendings
|
||||
Permission104=אמת sendings
|
||||
|
||||
@ -582,9 +582,6 @@ Permission92=Create/modify social contributions and vat
|
||||
Permission93=Delete social contributions and vat
|
||||
Permission94=Export social contributions
|
||||
Permission95=Read reports
|
||||
Permission96=Setup dispatching
|
||||
Permission97=Read invoice accountancy dispatching
|
||||
Permission98=Dispatch invoice accountancy lines
|
||||
Permission101=Read sendings
|
||||
Permission102=Create/modify sendings
|
||||
Permission104=Validate sendings
|
||||
|
||||
@ -582,9 +582,6 @@ Permission92=Létrehozza / módosítja a társadalombiztosítási járulékok é
|
||||
Permission93=Törlés társadalombiztosítási járulékok és az áfa
|
||||
Permission94=Export társadalombiztosítási járulékok
|
||||
Permission95=Olvassa jelentések
|
||||
Permission96=Setup szállítási
|
||||
Permission97=Olvassa el szállítási nyilvántartási számla
|
||||
Permission98=A számla elküldése számviteli vonalak
|
||||
Permission101=Olvassa küldések
|
||||
Permission102=Létrehozza / módosítja küldések
|
||||
Permission104=Érvényesítés küldések
|
||||
|
||||
@ -582,9 +582,6 @@ Permission92=Create/modify social contributions and vat
|
||||
Permission93=Delete social contributions and vat
|
||||
Permission94=Export social contributions
|
||||
Permission95=Read reports
|
||||
Permission96=Setup dispatching
|
||||
Permission97=Read invoice accountancy dispatching
|
||||
Permission98=Dispatch invoice accountancy lines
|
||||
Permission101=Read sendings
|
||||
Permission102=Create/modify sendings
|
||||
Permission104=Validate sendings
|
||||
|
||||
@ -582,9 +582,6 @@ Permission92=Búa til / breyta félagslegum framlögum og VSK
|
||||
Permission93=Eyða félagsleg framlög og VSK
|
||||
Permission94=Útflutningur tryggingagjöld
|
||||
Permission95=Lesa skýrslur
|
||||
Permission96=Skipulag dispatching
|
||||
Permission97=Lesa Reikningar bókhalds dispatching
|
||||
Permission98=bókhalds línur Sending Reikningar's
|
||||
Permission101=Lesa sendings
|
||||
Permission102=Búa til / breyta sendings
|
||||
Permission104=Staðfesta sendings
|
||||
|
||||
@ -582,9 +582,6 @@ Permission92=Creare/modificare contributi e iva
|
||||
Permission93=Eliminare contributi e iva
|
||||
Permission94=Esportare contributi
|
||||
Permission95=Vedere report
|
||||
Permission96=Impostazioni della contabilità
|
||||
Permission97=Vedere la contabilità delle fatture
|
||||
Permission98=Contabilità linee delle fatture
|
||||
Permission101=Vedere invii
|
||||
Permission102=Creare/modificare spedizioni
|
||||
Permission104=Convalidare spedizioni
|
||||
|
||||
@ -582,9 +582,6 @@ Permission92=社会貢献とバットを作成/変更
|
||||
Permission93=社会貢献とバットを削除します。
|
||||
Permission94=社会貢献をエクスポートします。
|
||||
Permission95=レポートを読む
|
||||
Permission96=派遣セットアップ
|
||||
Permission97=派遣請求書会計を読む
|
||||
Permission98=請求書の会計の行を派遣
|
||||
Permission101=sendingsを読む
|
||||
Permission102=sendingsを作成/変更
|
||||
Permission104=sendingsを検証する
|
||||
|
||||
@ -582,9 +582,6 @@ Permission92=Create/modify social contributions and vat
|
||||
Permission93=Delete social contributions and vat
|
||||
Permission94=Export social contributions
|
||||
Permission95=Read reports
|
||||
Permission96=Setup dispatching
|
||||
Permission97=Read invoice accountancy dispatching
|
||||
Permission98=Dispatch invoice accountancy lines
|
||||
Permission101=Read sendings
|
||||
Permission102=Create/modify sendings
|
||||
Permission104=Validate sendings
|
||||
|
||||
@ -582,9 +582,6 @@ Permission92=Sukurti/keisti socialines įmokas ir PVM
|
||||
Permission93=Ištrinti socialines įmokas ir PVM
|
||||
Permission94=Eksportuoti socialinės įmokas
|
||||
Permission95=Skaityti ataskaitas
|
||||
Permission96=Atlikimo/įvykdymo nustatymai
|
||||
Permission97=Skaityti sąskaitų apskaitos atlikimą
|
||||
Permission98=Atlikti sąskaitos apskaitos eilutes
|
||||
Permission101=Skaityti siuntinius
|
||||
Permission102=Sukurti/keisti siuntinius
|
||||
Permission104=Patvirtinti siuntinius
|
||||
|
||||
@ -582,9 +582,6 @@ Permission92=Izveidot/labot sociālās iemaksas un PVN
|
||||
Permission93=Dzēst sociālās iemaksas un PVN
|
||||
Permission94=Eksportēt sociālās iemaksas
|
||||
Permission95=Lasīt atskaites
|
||||
Permission96=Nosūtīšanas iestatīšana
|
||||
Permission97=Lasīt rēķina grāmatvedību nosūtīšana
|
||||
Permission98=Nosūtīšanas rēķinu grāmatvedības līnijas
|
||||
Permission101=Lasīt sūtījumus
|
||||
Permission102=Izveidot/mainīt sūtījumus
|
||||
Permission104=Apstiprināt sūtījumus
|
||||
|
||||
@ -582,9 +582,6 @@ Permission92=Create/modify social contributions and vat
|
||||
Permission93=Delete social contributions and vat
|
||||
Permission94=Export social contributions
|
||||
Permission95=Read reports
|
||||
Permission96=Setup dispatching
|
||||
Permission97=Read invoice accountancy dispatching
|
||||
Permission98=Dispatch invoice accountancy lines
|
||||
Permission101=Read sendings
|
||||
Permission102=Create/modify sendings
|
||||
Permission104=Validate sendings
|
||||
|
||||
@ -582,9 +582,6 @@ Permission92=Lage/endre avgifter og MVA
|
||||
Permission93=Slette avgifter og MVA
|
||||
Permission94=Eksporter sosiale bidrag
|
||||
Permission95=Vise rapporter
|
||||
Permission96=Setup dispatching
|
||||
Permission97=Read invoice accountancy dispatching
|
||||
Permission98=Dispatch invoice's accountancy lines
|
||||
Permission101=Vise forsendelser
|
||||
Permission102=Lage/endre forsendelser
|
||||
Permission104=Godjenne forsendelser
|
||||
|
||||
@ -582,9 +582,6 @@ Permission92=Creëer / wijzig sociale bijdragen en BTW
|
||||
Permission93=Verwijder sociale bijdragen en BTW
|
||||
Permission94=Exporteer sociale bijdragen
|
||||
Permission95=Bekijk de verslagen
|
||||
Permission96=Verzendingsinstellingen
|
||||
Permission97=Bekijk factuur boekhouding verzending
|
||||
Permission98=Verzending van de factuur boekhoudkundige regel
|
||||
Permission101=Bekijk verzendingen
|
||||
Permission102=Creëer / wijzig verzendingen
|
||||
Permission104=Valideer verzendingen
|
||||
|
||||
@ -582,9 +582,6 @@ Permission92=Tworzenie / modyfikacji składek na ubezpieczenia społeczne i poda
|
||||
Permission93=Usuń składek na ubezpieczenia społeczne i podatku VAT
|
||||
Permission94=Eksport składek na ubezpieczenia społeczne
|
||||
Permission95=Przeczytaj raporty
|
||||
Permission96=Konfiguracja wysyłek
|
||||
Permission97=Czytaj faktury rachunkowych wysyłkowe
|
||||
Permission98=Wysłanie faktury w księgowości linie
|
||||
Permission101=Czytaj sendings
|
||||
Permission102=Utwórz / Modyfikuj sendings
|
||||
Permission104=Validate sendings
|
||||
|
||||
@ -575,9 +575,6 @@ Permission92=Criar/Modificar Impostos e ICMS
|
||||
Permission93=Eliminar Impostos e ICMS
|
||||
Permission94=Exportar Impostos Sociais
|
||||
Permission95=Consultar balanços e resultados
|
||||
Permission96=Parametrizar repartição
|
||||
Permission97=Ler linhas de faturas
|
||||
Permission98=Repartir linhas de faturas
|
||||
Permission101=Consultar Expedições
|
||||
Permission102=Criar/Modificar Expedições
|
||||
Permission104=Confirmar Expedições
|
||||
|
||||
@ -582,9 +582,6 @@ Permission92=Criar/Modificar Impostos e IVA
|
||||
Permission93=Eliminar Impostos e IVA
|
||||
Permission94=Exportar Impostos Sociais
|
||||
Permission95=Consultar balanços e resultados
|
||||
Permission96=Parametrizar repartição
|
||||
Permission97=Leer linhas de facturas
|
||||
Permission98=Repartir linhas de facturas
|
||||
Permission101=Consultar Expedições
|
||||
Permission102=Criar/Modificar Expedições
|
||||
Permission104=Confirmar Expedições
|
||||
|
||||
@ -582,9 +582,6 @@ Permission92=Creare / Modificare a contribuţiilor sociale şi a TVA-ului
|
||||
Permission93=Ştergere a contribuţiilor sociale şi a TVA-ului
|
||||
Permission94=Export contribuţiilor sociale
|
||||
Permission95=Citeşte rapoarte
|
||||
Permission96=Setup expediţie
|
||||
Permission97=Citeşte contabilitate factura de expediţie
|
||||
Permission98=Expedierii facturii de contabilitate linii
|
||||
Permission101=Citeşte sendings
|
||||
Permission102=Creare / Modificare Livrare
|
||||
Permission104=Validează livrari
|
||||
|
||||
@ -582,9 +582,6 @@ Permission92=Создать / изменить социальных отчисл
|
||||
Permission93=Удалить социального взноса и налога на добавленную стоимость
|
||||
Permission94=Экспорт социальных взносов
|
||||
Permission95=Читать сообщения
|
||||
Permission96=Установка диспетчерского
|
||||
Permission97=Читать счета бухгалтерского диспетчерского
|
||||
Permission98=Отправка счета в бухгалтерских линий
|
||||
Permission101=Читать отправок
|
||||
Permission102=Создать / изменить отправок
|
||||
Permission104=Проверка отправок
|
||||
|
||||
@ -582,9 +582,6 @@ Permission92=Vytvoriť / upraviť príspevky na sociálne zabezpečenie a dane z
|
||||
Permission93=Odstránenie sociálne príspevky a dane z pridanej hodnoty
|
||||
Permission94=Export príspevky na sociálne zabezpečenie
|
||||
Permission95=Prečítajte si správy
|
||||
Permission96=Nastavenie zasielania
|
||||
Permission97=Prečítajte si faktúry účtovníctva dispečing
|
||||
Permission98=Po odoslaní faktúry účtovné linky
|
||||
Permission101=Prečítajte si sendings
|
||||
Permission102=Vytvoriť / upraviť sendings
|
||||
Permission104=Overiť sendings
|
||||
|
||||
@ -582,9 +582,6 @@ Permission92=Kreiranje/spreminjanje socialnih prispevkov in DDV
|
||||
Permission93=Brisanje socialnih prispevkov in DDV
|
||||
Permission94=Izvoz socialnih prispevkov
|
||||
Permission95=Branje poročil
|
||||
Permission96=Nastavitve odpreme
|
||||
Permission97=Branje odposlanih računovodskih listin
|
||||
Permission98=Branje postavk računovodskih listin
|
||||
Permission101=Branje pošiljk
|
||||
Permission102=Kreiranje/spreminjanje pošiljk
|
||||
Permission104=Potrjevanje pošiljk
|
||||
|
||||
@ -582,9 +582,6 @@ Permission92=Create/modify social contributions and vat
|
||||
Permission93=Delete social contributions and vat
|
||||
Permission94=Export social contributions
|
||||
Permission95=Read reports
|
||||
Permission96=Setup dispatching
|
||||
Permission97=Read invoice accountancy dispatching
|
||||
Permission98=Dispatch invoice accountancy lines
|
||||
Permission101=Read sendings
|
||||
Permission102=Create/modify sendings
|
||||
Permission104=Validate sendings
|
||||
|
||||
@ -582,9 +582,6 @@ Permission92=Skapa / ändra sociala avgifter och moms
|
||||
Permission93=Ta bort sociala avgifter och moms
|
||||
Permission94=Export sociala avgifter
|
||||
Permission95=Läs rapporter
|
||||
Permission96=Setup avsändning
|
||||
Permission97=Läs faktura bokföring expedierar
|
||||
Permission98=Dispatch fakturornas bokföringsposter
|
||||
Permission101=Läs sendings
|
||||
Permission102=Skapa / ändra sendings
|
||||
Permission104=Validate sendings
|
||||
|
||||
@ -582,9 +582,6 @@ Permission92=Create/modify social contributions and vat
|
||||
Permission93=Delete social contributions and vat
|
||||
Permission94=Export social contributions
|
||||
Permission95=Read reports
|
||||
Permission96=Setup dispatching
|
||||
Permission97=Read invoice accountancy dispatching
|
||||
Permission98=Dispatch invoice accountancy lines
|
||||
Permission101=Read sendings
|
||||
Permission102=Create/modify sendings
|
||||
Permission104=Validate sendings
|
||||
|
||||
@ -582,9 +582,6 @@ Permission92=Sosyal katkı payı ve KDV oluştur/düzenle
|
||||
Permission93=Sosyal katkı payı ve KDV sil
|
||||
Permission94=Sosyal katkı payı dışaaktar
|
||||
Permission95=Rapor oku
|
||||
Permission96=Dağıtım ayarla
|
||||
Permission97=Fatura kayıtları dağıtımlarını oku
|
||||
Permission98=Faturaların muhasebesel satırlarını dağıt
|
||||
Permission101=Gönderilenleri oku
|
||||
Permission102=Gönderilenleri oluştur/düzenle
|
||||
Permission104=Gönderilenleri doğrula
|
||||
|
||||
@ -582,9 +582,6 @@ Permission92=Create/modify social contributions and vat
|
||||
Permission93=Delete social contributions and vat
|
||||
Permission94=Export social contributions
|
||||
Permission95=Read reports
|
||||
Permission96=Setup dispatching
|
||||
Permission97=Read invoice accountancy dispatching
|
||||
Permission98=Dispatch invoice accountancy lines
|
||||
Permission101=Read sendings
|
||||
Permission102=Create/modify sendings
|
||||
Permission104=Validate sendings
|
||||
|
||||
@ -582,9 +582,6 @@ Permission92=Create/modify social contributions and vat
|
||||
Permission93=Delete social contributions and vat
|
||||
Permission94=Export social contributions
|
||||
Permission95=Read reports
|
||||
Permission96=Setup dispatching
|
||||
Permission97=Read invoice accountancy dispatching
|
||||
Permission98=Dispatch invoice accountancy lines
|
||||
Permission101=Read sendings
|
||||
Permission102=Create/modify sendings
|
||||
Permission104=Validate sendings
|
||||
|
||||
@ -582,9 +582,6 @@ Permission92=Create/modify social contributions and vat
|
||||
Permission93=Delete social contributions and vat
|
||||
Permission94=Export social contributions
|
||||
Permission95=Read reports
|
||||
Permission96=Setup dispatching
|
||||
Permission97=Read invoice accountancy dispatching
|
||||
Permission98=Dispatch invoice accountancy lines
|
||||
Permission101=Read sendings
|
||||
Permission102=Create/modify sendings
|
||||
Permission104=Validate sendings
|
||||
|
||||
@ -582,9 +582,6 @@ Permission92=建立/修改的社会贡献和增值税
|
||||
Permission93=删除社会贡献和增值税
|
||||
Permission94=导出社会贡献
|
||||
Permission95=阅读报告
|
||||
Permission96=设置调度
|
||||
Permission97=Read invoice accountancy dispatching
|
||||
Permission98=Dispatch invoice accountancy lines
|
||||
Permission101=读取发货资讯
|
||||
Permission102=建立/修改发货单
|
||||
Permission104=确认发货单
|
||||
|
||||
@ -582,9 +582,6 @@ Permission92=建立/修改的社會貢獻和增值稅
|
||||
Permission93=刪除的社會貢獻和增值稅
|
||||
Permission94=出口社會貢獻
|
||||
Permission95=閲讀報告
|
||||
Permission96=安裝調度
|
||||
Permission97=瞭解會計調度發票
|
||||
Permission98=調度發票的會計行
|
||||
Permission101=讀取出貨資訊
|
||||
Permission102=建立/修改出貨單
|
||||
Permission104=驗證出貨單
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
<?php
|
||||
/* Copyright (C) 2010 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2011-2012 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2011-2013 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||
/* Copyright (C) 2010-2014 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2011-2012 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2011-2013 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2013 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
|
||||
@ -99,7 +99,7 @@ else if ($action == 'specimen')
|
||||
$dirmodels=array_merge(array('/'),(array) $conf->modules_parts['models']);
|
||||
foreach($dirmodels as $reldir)
|
||||
{
|
||||
$file=dol_buildpath($reldir."core/modules/project/pdf/pdf_".$modele.".modules.php",0);
|
||||
$file=dol_buildpath($reldir."core/modules/project/doc/pdf_".$modele.".modules.php",0);
|
||||
if (file_exists($file))
|
||||
{
|
||||
$filefound=1;
|
||||
@ -144,7 +144,7 @@ else if ($action == 'specimentask')
|
||||
$dirmodels=array_merge(array('/'),(array) $conf->modules_parts['models']);
|
||||
foreach($dirmodels as $reldir)
|
||||
{
|
||||
$file=dol_buildpath($reldir."core/modules/project/task/pdf/pdf_".$modele.".modules.php",0);
|
||||
$file=dol_buildpath($reldir."core/modules/project/task/doc/pdf_".$modele.".modules.php",0);
|
||||
if (file_exists($file))
|
||||
{
|
||||
$filefound=1;
|
||||
@ -177,6 +177,35 @@ else if ($action == 'specimentask')
|
||||
}
|
||||
}
|
||||
|
||||
// Define constants for submodules that contains parameters (forms with param1, param2, ... and value1, value2, ...)
|
||||
if ($action == 'setModuleOptions')
|
||||
{
|
||||
$post_size=count($_POST);
|
||||
|
||||
$db->begin();
|
||||
|
||||
for($i=0;$i < $post_size;$i++)
|
||||
{
|
||||
if (array_key_exists('param'.$i,$_POST))
|
||||
{
|
||||
$param=GETPOST("param".$i,'alpha');
|
||||
$value=GETPOST("value".$i,'alpha');
|
||||
if ($param) $res = dolibarr_set_const($db,$param,$value,'chaine',0,'',$conf->entity);
|
||||
if (! $res > 0) $error++;
|
||||
}
|
||||
}
|
||||
if (! $error)
|
||||
{
|
||||
$db->commit();
|
||||
setEventMessage($langs->trans("SetupSaved"));
|
||||
}
|
||||
else
|
||||
{
|
||||
$db->rollback();
|
||||
setEventMessage($langs->trans("Error"),'errors');
|
||||
}
|
||||
}
|
||||
|
||||
// Activate a model
|
||||
else if ($action == 'set')
|
||||
{
|
||||
@ -256,26 +285,10 @@ else if ($action == 'setmodtask')
|
||||
dolibarr_set_const($db, "PROJECT_TASK_ADDON",$value,'chaine',0,'',$conf->entity);
|
||||
}
|
||||
|
||||
else if ($action=='setModuleOptions') {
|
||||
if (dolibarr_set_const($db, "PROJECT_ADDON_PDF_ODT_PATH",GETPOST('value1'),'chaine',0,'',$conf->entity))
|
||||
{
|
||||
// La constante qui a ete lue en avant du nouveau set
|
||||
// on passe donc par une variable pour avoir un affichage coherent
|
||||
$conf->global->PROJECT_ADDON_PDF_ODT_PATH = GETPOST('value1');
|
||||
}
|
||||
}
|
||||
|
||||
else if ($action=='setModuleOptionsTask') {
|
||||
if (dolibarr_set_const($db, "PROJECT_TASK_ADDON_PDF_ODT_PATH",GETPOST('value1'),'chaine',0,'',$conf->entity))
|
||||
{
|
||||
// La constante qui a ete lue en avant du nouveau set
|
||||
// on passe donc par une variable pour avoir un affichage coherent
|
||||
$conf->global->PROJECT_TASK_ADDON_PDF_ODT_PATH = GETPOST('value1');
|
||||
}
|
||||
}
|
||||
/*
|
||||
* View
|
||||
*/
|
||||
*/
|
||||
|
||||
$dirmodels=array_merge(array('/'),(array) $conf->modules_parts['models']);
|
||||
|
||||
@ -542,99 +555,108 @@ clearstatcache();
|
||||
$var=true;
|
||||
foreach ($dirmodels as $reldir)
|
||||
{
|
||||
$dir = dol_buildpath($reldir."core/modules/project/pdf/");
|
||||
|
||||
if (is_dir($dir))
|
||||
foreach (array('','/doc') as $valdir)
|
||||
{
|
||||
$handle=opendir($dir);
|
||||
if (is_resource($handle))
|
||||
$dir = dol_buildpath($reldir."core/modules/project/".$valdir);
|
||||
|
||||
if (is_dir($dir))
|
||||
{
|
||||
while (($file = readdir($handle))!==false)
|
||||
$handle=opendir($dir);
|
||||
if (is_resource($handle))
|
||||
{
|
||||
if (preg_match('/\.modules\.php$/i',$file) && preg_match('/^(pdf_|doc_)/',$file))
|
||||
while (($file = readdir($handle))!==false)
|
||||
{
|
||||
if (file_exists($dir.'/'.$file))
|
||||
$filelist[]=$file;
|
||||
}
|
||||
closedir($handle);
|
||||
arsort($filelist);
|
||||
|
||||
foreach($filelist as $file)
|
||||
{
|
||||
if (preg_match('/\.modules\.php$/i',$file) && preg_match('/^(pdf_|doc_)/',$file))
|
||||
{
|
||||
$name = substr($file, 4, dol_strlen($file) -16);
|
||||
$classname = substr($file, 0, dol_strlen($file) -12);
|
||||
|
||||
require_once $dir.'/'.$file;
|
||||
$module = new $classname($db);
|
||||
|
||||
$modulequalified=1;
|
||||
if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) $modulequalified=0;
|
||||
if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) $modulequalified=0;
|
||||
|
||||
if ($modulequalified)
|
||||
if (file_exists($dir.'/'.$file))
|
||||
{
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td width="100">';
|
||||
print (empty($module->name)?$name:$module->name);
|
||||
print "</td><td>\n";
|
||||
if (method_exists($module,'info')) print $module->info($langs);
|
||||
else print $module->description;
|
||||
print "</td>\n";
|
||||
$name = substr($file, 4, dol_strlen($file) -16);
|
||||
$classname = substr($file, 0, dol_strlen($file) -12);
|
||||
|
||||
// Active
|
||||
if (in_array($name, $def))
|
||||
{
|
||||
print "<td align=\"center\">\n";
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&value='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'">';
|
||||
print img_picto($langs->trans("Enabled"),'switch_on');
|
||||
print '</a>';
|
||||
print "</td>";
|
||||
}
|
||||
else
|
||||
{
|
||||
print "<td align=\"center\">\n";
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&value='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
|
||||
print "</td>";
|
||||
}
|
||||
require_once $dir.'/'.$file;
|
||||
$module = new $classname($db);
|
||||
|
||||
// Default
|
||||
print "<td align=\"center\">";
|
||||
if ($conf->global->PROJECT_ADDON_PDF == "$name")
|
||||
{
|
||||
print img_picto($langs->trans("Default"),'on');
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&value='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'off').'</a>';
|
||||
}
|
||||
print '</td>';
|
||||
$modulequalified=1;
|
||||
if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) $modulequalified=0;
|
||||
if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) $modulequalified=0;
|
||||
|
||||
// Info
|
||||
$htmltooltip = ''.$langs->trans("Name").': '.$module->name;
|
||||
$htmltooltip.='<br>'.$langs->trans("Type").': '.($module->type?$module->type:$langs->trans("Unknown"));
|
||||
if ($module->type == 'pdf')
|
||||
if ($modulequalified)
|
||||
{
|
||||
$htmltooltip.='<br>'.$langs->trans("Width").'/'.$langs->trans("Height").': '.$module->page_largeur.'/'.$module->page_hauteur;
|
||||
}
|
||||
$htmltooltip.='<br><br><u>'.$langs->trans("FeaturesSupported").':</u>';
|
||||
$htmltooltip.='<br>'.$langs->trans("Logo").': '.yn($module->option_logo,1,1);
|
||||
|
||||
print '<td align="center">';
|
||||
print $form->textwithpicto('',$htmltooltip,1,0);
|
||||
print '</td>';
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td width="100">';
|
||||
print (empty($module->name)?$name:$module->name);
|
||||
print "</td><td>\n";
|
||||
if (method_exists($module,'info')) print $module->info($langs);
|
||||
else print $module->description;
|
||||
print "</td>\n";
|
||||
|
||||
// Preview
|
||||
print '<td align="center">';
|
||||
if ($module->type == 'pdf')
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=specimen&module='.$name.'">'.img_object($langs->trans("Preview"),'bill').'</a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print img_object($langs->trans("PreviewNotAvailable"),'generic');
|
||||
}
|
||||
print '</td>';
|
||||
// Active
|
||||
if (in_array($name, $def))
|
||||
{
|
||||
print "<td align=\"center\">\n";
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&value='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'">';
|
||||
print img_picto($langs->trans("Enabled"),'switch_on');
|
||||
print '</a>';
|
||||
print "</td>";
|
||||
}
|
||||
else
|
||||
{
|
||||
print "<td align=\"center\">\n";
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&value='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
|
||||
print "</td>";
|
||||
}
|
||||
|
||||
print "</tr>\n";
|
||||
}
|
||||
// Default
|
||||
print "<td align=\"center\">";
|
||||
if ($conf->global->PROJECT_ADDON_PDF == "$name")
|
||||
{
|
||||
print img_picto($langs->trans("Default"),'on');
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&value='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'off').'</a>';
|
||||
}
|
||||
print '</td>';
|
||||
|
||||
// Info
|
||||
$htmltooltip = ''.$langs->trans("Name").': '.$module->name;
|
||||
$htmltooltip.='<br>'.$langs->trans("Type").': '.($module->type?$module->type:$langs->trans("Unknown"));
|
||||
if ($module->type == 'pdf')
|
||||
{
|
||||
$htmltooltip.='<br>'.$langs->trans("Width").'/'.$langs->trans("Height").': '.$module->page_largeur.'/'.$module->page_hauteur;
|
||||
}
|
||||
$htmltooltip.='<br><br><u>'.$langs->trans("FeaturesSupported").':</u>';
|
||||
$htmltooltip.='<br>'.$langs->trans("Logo").': '.yn($module->option_logo,1,1);
|
||||
|
||||
print '<td align="center">';
|
||||
print $form->textwithpicto('',$htmltooltip,1,0);
|
||||
print '</td>';
|
||||
|
||||
// Preview
|
||||
print '<td align="center">';
|
||||
if ($module->type == 'pdf')
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=specimen&module='.$name.'">'.img_object($langs->trans("Preview"),'bill').'</a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print img_object($langs->trans("PreviewNotAvailable"),'generic');
|
||||
}
|
||||
print '</td>';
|
||||
|
||||
print "</tr>\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
closedir($handle);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -688,98 +710,107 @@ clearstatcache();
|
||||
$var=true;
|
||||
foreach ($dirmodels as $reldir)
|
||||
{
|
||||
$dir = dol_buildpath($reldir."core/modules/project/task/pdf/");
|
||||
|
||||
if (is_dir($dir))
|
||||
foreach (array('','/doc') as $valdir)
|
||||
{
|
||||
$handle=opendir($dir);
|
||||
if (is_resource($handle))
|
||||
$dir = dol_buildpath($reldir."core/modules/project/task/".$valdir);
|
||||
|
||||
if (is_dir($dir))
|
||||
{
|
||||
while (($file = readdir($handle))!==false)
|
||||
$handle=opendir($dir);
|
||||
if (is_resource($handle))
|
||||
{
|
||||
if (preg_match('/\.modules\.php$/i',$file) && preg_match('/^(pdf_|doc_)/',$file))
|
||||
while (($file = readdir($handle))!==false)
|
||||
{
|
||||
if (file_exists($dir.'/'.$file))
|
||||
$filelist[]=$file;
|
||||
}
|
||||
closedir($handle);
|
||||
arsort($filelist);
|
||||
|
||||
foreach($filelist as $file)
|
||||
{
|
||||
if (preg_match('/\.modules\.php$/i',$file) && preg_match('/^(pdf_|doc_)/',$file))
|
||||
{
|
||||
$name = substr($file, 4, dol_strlen($file) -16);
|
||||
$classname = substr($file, 0, dol_strlen($file) -12);
|
||||
|
||||
require_once $dir.'/'.$file;
|
||||
$module = new $classname($db);
|
||||
|
||||
$modulequalified=1;
|
||||
if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) $modulequalified=0;
|
||||
if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) $modulequalified=0;
|
||||
|
||||
if ($modulequalified)
|
||||
if (file_exists($dir.'/'.$file))
|
||||
{
|
||||
$var = !$var;
|
||||
print '<tr '.$bc[$var].'><td width="100">';
|
||||
print (empty($module->name)?$name:$module->name);
|
||||
print "</td><td>\n";
|
||||
if (method_exists($module,'info')) print $module->info($langs);
|
||||
else print $module->description;
|
||||
print "</td>\n";
|
||||
$name = substr($file, 4, dol_strlen($file) -16);
|
||||
$classname = substr($file, 0, dol_strlen($file) -12);
|
||||
|
||||
// Active
|
||||
if (in_array($name, $def))
|
||||
{
|
||||
print "<td align=\"center\">\n";
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=deltask&value='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'">';
|
||||
print img_picto($langs->trans("Enabled"),'switch_on');
|
||||
print '</a>';
|
||||
print "</td>";
|
||||
}
|
||||
else
|
||||
{
|
||||
print "<td align=\"center\">\n";
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=settask&value='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
|
||||
print "</td>";
|
||||
}
|
||||
require_once $dir.'/'.$file;
|
||||
$module = new $classname($db);
|
||||
|
||||
// Defaut
|
||||
print "<td align=\"center\">";
|
||||
if ($conf->global->PROJECT_TASK_ADDON_PDF == "$name")
|
||||
{
|
||||
print img_picto($langs->trans("Default"),'on');
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoctask&value='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'off').'</a>';
|
||||
}
|
||||
print '</td>';
|
||||
$modulequalified=1;
|
||||
if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) $modulequalified=0;
|
||||
if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) $modulequalified=0;
|
||||
|
||||
// Info
|
||||
$htmltooltip = ''.$langs->trans("Name").': '.$module->name;
|
||||
$htmltooltip.='<br>'.$langs->trans("Type").': '.($module->type?$module->type:$langs->trans("Unknown"));
|
||||
if ($module->type == 'pdf')
|
||||
if ($modulequalified)
|
||||
{
|
||||
$htmltooltip.='<br>'.$langs->trans("Width").'/'.$langs->trans("Height").': '.$module->page_largeur.'/'.$module->page_hauteur;
|
||||
}
|
||||
$htmltooltip.='<br><br><u>'.$langs->trans("FeaturesSupported").':</u>';
|
||||
$htmltooltip.='<br>'.$langs->trans("Logo").': '.yn($module->option_logo,1,1);
|
||||
|
||||
print '<td align="center">';
|
||||
print $form->textwithpicto('',$htmltooltip,1,0);
|
||||
print '</td>';
|
||||
$var = !$var;
|
||||
print '<tr '.$bc[$var].'><td width="100">';
|
||||
print (empty($module->name)?$name:$module->name);
|
||||
print "</td><td>\n";
|
||||
if (method_exists($module,'info')) print $module->info($langs);
|
||||
else print $module->description;
|
||||
print "</td>\n";
|
||||
|
||||
// Preview
|
||||
print '<td align="center">';
|
||||
if ($module->type == 'pdf')
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=specimentask&module='.$name.'">'.img_object($langs->trans("Preview"),'bill').'</a>';
|
||||
// Active
|
||||
if (in_array($name, $def))
|
||||
{
|
||||
print "<td align=\"center\">\n";
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=deltask&value='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'">';
|
||||
print img_picto($langs->trans("Enabled"),'switch_on');
|
||||
print '</a>';
|
||||
print "</td>";
|
||||
}
|
||||
else
|
||||
{
|
||||
print "<td align=\"center\">\n";
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=settask&value='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
|
||||
print "</td>";
|
||||
}
|
||||
|
||||
// Defaut
|
||||
print "<td align=\"center\">";
|
||||
if ($conf->global->PROJECT_TASK_ADDON_PDF == "$name")
|
||||
{
|
||||
print img_picto($langs->trans("Default"),'on');
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoctask&value='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'off').'</a>';
|
||||
}
|
||||
print '</td>';
|
||||
|
||||
// Info
|
||||
$htmltooltip = ''.$langs->trans("Name").': '.$module->name;
|
||||
$htmltooltip.='<br>'.$langs->trans("Type").': '.($module->type?$module->type:$langs->trans("Unknown"));
|
||||
if ($module->type == 'pdf')
|
||||
{
|
||||
$htmltooltip.='<br>'.$langs->trans("Width").'/'.$langs->trans("Height").': '.$module->page_largeur.'/'.$module->page_hauteur;
|
||||
}
|
||||
$htmltooltip.='<br><br><u>'.$langs->trans("FeaturesSupported").':</u>';
|
||||
$htmltooltip.='<br>'.$langs->trans("Logo").': '.yn($module->option_logo,1,1);
|
||||
|
||||
print '<td align="center">';
|
||||
print $form->textwithpicto('',$htmltooltip,1,0);
|
||||
print '</td>';
|
||||
|
||||
// Preview
|
||||
print '<td align="center">';
|
||||
if ($module->type == 'pdf')
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=specimentask&module='.$name.'">'.img_object($langs->trans("Preview"),'bill').'</a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print img_object($langs->trans("PreviewNotAvailable"),'generic');
|
||||
}
|
||||
print '</td>';
|
||||
print "</tr>\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
print img_object($langs->trans("PreviewNotAvailable"),'generic');
|
||||
}
|
||||
print '</td>';
|
||||
print "</tr>\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
closedir($handle);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1368,7 +1368,7 @@ class Project extends CommonObject
|
||||
}
|
||||
}
|
||||
|
||||
$modelpath = "core/modules/project/pdf/";
|
||||
$modelpath = "core/modules/project/doc/";
|
||||
|
||||
return $this->commonGenerateDocument($modelpath, $modele, $outputlangs, $hidedetails, $hidedesc, $hideref);
|
||||
}
|
||||
|
||||
@ -1343,7 +1343,7 @@ class Task extends CommonObject
|
||||
}
|
||||
}
|
||||
|
||||
$modelpath = "core/modules/project/task/pdf/";
|
||||
$modelpath = "core/modules/project/task/doc/";
|
||||
|
||||
return $this->commonGenerateDocument($modelpath, $modele, $outputlangs, $hidedetails, $hidedesc, $hideref);
|
||||
}
|
||||
|
||||
@ -171,7 +171,22 @@ if ($socid)
|
||||
|
||||
print '<br>';
|
||||
|
||||
print load_fiche_titre($langs->trans("ActionsOnCompany"),'','');
|
||||
$objthirdparty=$soc;
|
||||
$objcon=new stdClass();
|
||||
|
||||
$out='';
|
||||
$permok=$user->rights->agenda->myactions->create;
|
||||
if ((! empty($objthirdparty->id) || ! empty($objcon->id)) && $permok)
|
||||
{
|
||||
$out.='<a href="'.DOL_URL_ROOT.'/comm/action/card.php?action=create';
|
||||
if (get_class($objthirdparty) == 'Societe') $out.='&socid='.$objthirdparty->id;
|
||||
$out.=(! empty($objcon->id)?'&contactid='.$objcon->id:'').'&backtopage=1&percentage=-1">';
|
||||
$out.=$langs->trans("AddAnAction").' ';
|
||||
$out.=img_picto($langs->trans("AddAnAction"),'filenew');
|
||||
$out.="</a>";
|
||||
}
|
||||
|
||||
print load_fiche_titre($langs->trans("ActionsOnCompany"),$out,'');
|
||||
|
||||
// List of todo actions
|
||||
show_actions_todo($conf,$langs,$db,$soc);
|
||||
|
||||
@ -136,7 +136,9 @@ $server->wsdl->addComplexType(
|
||||
'minOccurs' => '0',
|
||||
'maxOccurs' => 'unbounded'
|
||||
)
|
||||
)
|
||||
),
|
||||
null,
|
||||
'tns:line'
|
||||
);
|
||||
|
||||
|
||||
@ -197,7 +199,9 @@ $server->wsdl->addComplexType(
|
||||
'minOccurs' => '0',
|
||||
'maxOccurs' => 'unbounded'
|
||||
)
|
||||
)
|
||||
),
|
||||
null,
|
||||
'tns:invoice'
|
||||
);
|
||||
|
||||
|
||||
|
||||
@ -42,7 +42,7 @@ require_once dirname(__FILE__).'/../../htdocs/core/lib/pdf.lib.php';
|
||||
require_once dirname(__FILE__).'/../../htdocs/core/modules/facture/doc/pdf_crabe.modules.php';
|
||||
require_once dirname(__FILE__).'/../../htdocs/core/modules/propale/doc/pdf_azur.modules.php';
|
||||
require_once dirname(__FILE__).'/../../htdocs/core/modules/commande/doc/pdf_einstein.modules.php';
|
||||
require_once dirname(__FILE__).'/../../htdocs/core/modules/project/pdf/pdf_baleine.modules.php';
|
||||
require_once dirname(__FILE__).'/../../htdocs/core/modules/project/doc/pdf_baleine.modules.php';
|
||||
require_once dirname(__FILE__).'/../../htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php';
|
||||
require_once dirname(__FILE__).'/../../htdocs/core/modules/expedition/doc/pdf_merou.modules.php';
|
||||
require_once dirname(__FILE__).'/../../htdocs/core/modules/expedition/doc/pdf_rouget.modules.php';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user