Merge https://github.com/Dolibarr/dolibarr into develop
This commit is contained in:
commit
6d07bcb73e
@ -14,7 +14,7 @@ Component Version License GPL Compatible
|
||||
PHP libraries:
|
||||
AdoDb-Date 0.36 Modified BSD License Yes Date convertion (not into rpm package)
|
||||
ChromePHP 4.1.0 Apache Software License 2.0 Yes Return server log to chrome browser console
|
||||
CKEditor 4.6.2 LGPL-2.1+ Yes Editor WYSIWYG
|
||||
CKEditor 4.11.4 LGPL-2.1+ Yes Editor WYSIWYG
|
||||
PHPDebugBar 1.15.0 MIT License Yes Used only by the module "debugbar" for developers
|
||||
EvalMath 1.0 BSD Yes Safe math expressions evaluation
|
||||
Escpos-php ? MIT License Yes Thermal receipt printer library, for use with ESC/POS compatible printers
|
||||
|
||||
@ -538,7 +538,7 @@ class AccountancyExport
|
||||
//print substr(length_accountg($line->numero_compte), 0, 2) . $separator;
|
||||
print '"'.dol_trunc($line->label_operation, 40, 'right', 'UTF-8', 1).'"' . $separator;
|
||||
print '"'.dol_trunc($line->piece_num, 15, 'right', 'UTF-8', 1).'"'.$separator;
|
||||
print price2num($line->montant).$separator;
|
||||
print price2num(abs($line->montant)).$separator;
|
||||
print $line->sens.$separator;
|
||||
print $date . $separator;
|
||||
//print 'EUR';
|
||||
|
||||
@ -67,7 +67,7 @@ foreach ($object->fields as $key => $val) {
|
||||
if (empty($action) && empty($id) && empty($ref)) $action='view';
|
||||
|
||||
// Load object
|
||||
include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once // Must be include, not include_once. Include fetch and fetch_thirdparty but not fetch_optionals
|
||||
include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once.
|
||||
|
||||
// Security check - Protection if external user
|
||||
//if ($user->societe_id > 0) access_forbidden();
|
||||
@ -75,6 +75,11 @@ include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be inclu
|
||||
//$isdraft = (($object->statut == MyObject::STATUS_DRAFT) ? 1 : 0);
|
||||
//$result = restrictedArea($user, 'mymodule', $object->id, '', '', 'fk_soc', 'rowid', $isdraft);
|
||||
|
||||
$permissionnote=$user->rights->emailcollector->write; // Used by the include of actions_setnotes.inc.php
|
||||
$permissiondellink=$user->rights->emailcollector->write; // Used by the include of actions_dellink.inc.php
|
||||
$permissionedit=$user->rights->emailcollector->write; // Used by the include of actions_lineupdown.inc.php
|
||||
$permissiontoadd=$user->rights->emailcollector->write; // Used by the include of actions_addupdatedelete.inc.php
|
||||
|
||||
$debuginfo='';
|
||||
|
||||
|
||||
@ -99,7 +104,7 @@ if (empty($reshook))
|
||||
include DOL_DOCUMENT_ROOT.'/core/actions_addupdatedelete.inc.php';
|
||||
|
||||
// Actions when linking object each other
|
||||
include DOL_DOCUMENT_ROOT.'/core/actions_dellink.inc.php'; // Must be include, not include_once
|
||||
include DOL_DOCUMENT_ROOT.'/core/actions_dellink.inc.php';
|
||||
|
||||
// Actions when printing a doc from card
|
||||
include DOL_DOCUMENT_ROOT.'/core/actions_printing.inc.php';
|
||||
|
||||
@ -109,7 +109,7 @@ if (GETPOST('save', 'alpha'))
|
||||
} else {
|
||||
$error ++;
|
||||
}
|
||||
|
||||
|
||||
$fckeditor_test = GETPOST('formtestfield');
|
||||
if (! empty($fckeditor_test)) {
|
||||
if (! dolibarr_set_const($db, 'FCKEDITOR_TEST', $fckeditor_test, 'chaine', 0, '', $conf->entity)) {
|
||||
@ -156,7 +156,7 @@ else
|
||||
{
|
||||
// Si condition non remplie, on ne propose pas l'option
|
||||
if (! $conditions[$const]) continue;
|
||||
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print '<td width="16">'.img_object("", $picto[$const]).'</td>';
|
||||
print '<td>'.$langs->trans($desc).'</td>';
|
||||
@ -181,12 +181,12 @@ else
|
||||
print '<br>'."\n";
|
||||
|
||||
print '<form name="formtest" method="POST" action="'.$_SERVER["PHP_SELF"].'">'."\n";
|
||||
|
||||
|
||||
// Skins
|
||||
show_skin(null, 1);
|
||||
print '<br>'."\n";
|
||||
|
||||
$listofmodes=array('dolibarr_mailings','dolibarr_notes','dolibarr_details','dolibarr_readonly','Full');
|
||||
|
||||
$listofmodes=array('dolibarr_mailings', 'dolibarr_notes', 'dolibarr_details', 'dolibarr_readonly', 'Full', 'Full_inline');
|
||||
$linkstomode='';
|
||||
foreach($listofmodes as $newmode)
|
||||
{
|
||||
@ -200,10 +200,19 @@ else
|
||||
$linkstomode.='';
|
||||
print load_fiche_titre($langs->trans("TestSubmitForm"), $linkstomode, '');
|
||||
print '<input type="hidden" name="mode" value="'.dol_escape_htmltag($mode).'">';
|
||||
$uselocalbrowser=true;
|
||||
$readonly=($mode=='dolibarr_readonly'?1:0);
|
||||
$editor=new DolEditor('formtestfield', isset($conf->global->FCKEDITOR_TEST)?$conf->global->FCKEDITOR_TEST:'Test', '', 200, $mode, 'In', true, $uselocalbrowser, 1, 120, 8, $readonly);
|
||||
$editor->Create();
|
||||
if ($mode != 'Full_inline')
|
||||
{
|
||||
$uselocalbrowser=true;
|
||||
$readonly=($mode=='dolibarr_readonly'?1:0);
|
||||
$editor=new DolEditor('formtestfield', isset($conf->global->FCKEDITOR_TEST)?$conf->global->FCKEDITOR_TEST:'Test', '', 200, $mode, 'In', true, $uselocalbrowser, 1, 120, 8, $readonly);
|
||||
$editor->Create();
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<div style="border: 1px solid #888;" contenteditable="true">';
|
||||
print $conf->global->FCKEDITOR_TEST;
|
||||
print '</div>';
|
||||
}
|
||||
print '<br><div class="center"><input class="button" type="submit" name="save" value="'.$langs->trans("Save").'"></div>'."\n";
|
||||
print '<div id="divforlog"></div>';
|
||||
print '</form>'."\n";
|
||||
|
||||
@ -66,8 +66,12 @@ if (empty($action) && empty($id) && empty($ref)) $action='view';
|
||||
$extralabels = $extrafields->fetch_name_optionals_label($object->table_element);
|
||||
|
||||
// Load object
|
||||
include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once // Must be include, not include_once. Include fetch and fetch_thirdparty but not fetch_optionals
|
||||
include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once.
|
||||
|
||||
$permissionnote=$user->rights->asset->write; // Used by the include of actions_setnotes.inc.php
|
||||
$permissiondellink=$user->rights->asset->write; // Used by the include of actions_dellink.inc.php
|
||||
$permissionedit=$user->rights->asset->write; // Used by the include of actions_lineupdown.inc.php
|
||||
$permissiontoadd=$user->rights->asset->write; // Used by the include of actions_addupdatedelete.inc.php
|
||||
|
||||
|
||||
/*
|
||||
|
||||
@ -61,7 +61,7 @@ foreach($object->fields as $key => $val)
|
||||
if (empty($action) && empty($id) && empty($ref)) $action='view';
|
||||
|
||||
// Load object
|
||||
include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once // Must be include, not include_once. Include fetch and fetch_thirdparty but not fetch_optionals
|
||||
include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once.
|
||||
|
||||
// Security check - Protection if external user
|
||||
//if ($user->societe_id > 0) access_forbidden();
|
||||
@ -69,6 +69,11 @@ include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be inclu
|
||||
//$isdraft = (($object->statut == BillOfMaterials::STATUS_DRAFT) ? 1 : 0);
|
||||
//$result = restrictedArea($user, 'bom', $object->id, '', '', 'fk_soc', 'rowid', $isdraft);
|
||||
|
||||
$permissionnote=$user->rights->bom->write; // Used by the include of actions_setnotes.inc.php
|
||||
$permissiondellink=$user->rights->bom->write; // Used by the include of actions_dellink.inc.php
|
||||
$permissionedit=$user->rights->bom->write; // Used by the include of actions_lineupdown.inc.php
|
||||
$permissiontoadd=$user->rights->bom->write; // Used by the include of actions_addupdatedelete.inc.php
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
@ -109,7 +114,6 @@ if (empty($reshook))
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* View
|
||||
*
|
||||
|
||||
@ -452,11 +452,13 @@ while ($i < min($num, $limit))
|
||||
foreach($object->fields as $key => $val)
|
||||
{
|
||||
$cssforfield='';
|
||||
if (in_array($val['type'], array('date', 'datetime', 'timestamp'))) $cssforfield.=($cssforfield?' ':'').'center';
|
||||
if (in_array($val['type'], array('date','datetime','timestamp'))) $cssforfield.=($cssforfield?' ':'').'center';
|
||||
elseif ($key == 'status') $cssforfield.=($cssforfield?' ':'').'center';
|
||||
if (in_array($val['type'], array('timestamp'))) $cssforfield.=($cssforfield?' ':'').'nowrap';
|
||||
elseif ($key == 'ref') $cssforfield.=($cssforfield?' ':'').'nowrap';
|
||||
if (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real'))) $cssforfield.=($cssforfield?' ':'').'right';
|
||||
|
||||
if (in_array($val['type'], array('timestamp'))) $cssforfield.=($cssforfield?' ':'').'nowrap';
|
||||
elseif ($key == 'ref') $cssforfield.=($cssforfield?' ':'').'nowrap';
|
||||
|
||||
if (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real'))) $cssforfield.=($cssforfield?' ':'').'right';
|
||||
|
||||
if (! empty($arrayfields['t.'.$key]['checked']))
|
||||
{
|
||||
|
||||
@ -126,6 +126,7 @@ $usercancreatewithdrarequest = $user->rights->prelevement->bons->creer;
|
||||
$permissionnote = $usercancreate; // Used by the include of actions_setnotes.inc.php
|
||||
$permissiondellink = $usercancreate; // Used by the include of actions_dellink.inc.php
|
||||
$permissiontoedit = $usercancreate; // Used by the include of actions_lineupdonw.inc.php
|
||||
$permissiontoadd = $usercancreate; // Used by the include of actions_addupdatedelete.inc.php
|
||||
|
||||
// Security check
|
||||
$fieldid = (! empty($ref) ? 'ref' : 'rowid');
|
||||
@ -160,21 +161,21 @@ if (empty($reshook))
|
||||
include DOL_DOCUMENT_ROOT.'/core/actions_lineupdown.inc.php'; // Must be include, not include_once
|
||||
|
||||
// Action clone object
|
||||
if ($action == 'confirm_clone' && $confirm == 'yes' && $usercancreate) {
|
||||
// if (1 == 0 && empty($_REQUEST["clone_content"]) && empty($_REQUEST["clone_receivers"])) {
|
||||
// $mesgs [] = '<div class="error">' . $langs->trans("NoCloneOptionsSpecified") . '</div>';
|
||||
// } else {
|
||||
if ($object->fetch($id) > 0) {
|
||||
$result = $object->createFromClone($socid);
|
||||
if ($result > 0) {
|
||||
header("Location: " . $_SERVER['PHP_SELF'] . '?facid=' . $result);
|
||||
exit();
|
||||
} else {
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
$action = '';
|
||||
}
|
||||
}
|
||||
// }
|
||||
if ($action == 'confirm_clone' && $confirm == 'yes' && $permissiontoadd)
|
||||
{
|
||||
$objectutil = dol_clone($object, 1); // To avoid to denaturate loaded object when setting some properties for clone. We use native clone to keep this->db valid.
|
||||
|
||||
$objectutil->date = dol_mktime(12, 0, 0, GETPOST('newdatemonth', 'int'), GETPOST('newdateday', 'int'), GETPOST('newdateyear', 'int'));
|
||||
$objectutil->socid = $socid;
|
||||
$result = $objectutil->createFromClone($user, $id);
|
||||
if ($result > 0) {
|
||||
header("Location: " . $_SERVER['PHP_SELF'] . '?facid=' . $result);
|
||||
exit();
|
||||
} else {
|
||||
$langs->load("errors");
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
$action = '';
|
||||
}
|
||||
}
|
||||
|
||||
// Change status of invoice
|
||||
@ -1391,7 +1392,7 @@ if (empty($reshook))
|
||||
$desc=(! empty($lines[$i]->desc)?$lines[$i]->desc:$lines[$i]->libelle);
|
||||
if ($object->situation_counter == 1) $lines[$i]->situation_percent = 0;
|
||||
|
||||
if ($lines[$i]->subprice < 0)
|
||||
if ($lines[$i]->subprice < 0 && empty($conf->global->INVOICE_KEEP_DISCOUNT_LINES_AS_IN_ORIGIN))
|
||||
{
|
||||
// Negative line, we create a discount line
|
||||
$discount = new DiscountAbsolute($db);
|
||||
@ -2588,22 +2589,47 @@ if ($action == 'create')
|
||||
if (empty($socid))
|
||||
$soc = $objectsrc->thirdparty;
|
||||
|
||||
$cond_reglement_id = (! empty($objectsrc->cond_reglement_id)?$objectsrc->cond_reglement_id:(! empty($soc->cond_reglement_id)?$soc->cond_reglement_id:0));
|
||||
$mode_reglement_id = (! empty($objectsrc->mode_reglement_id)?$objectsrc->mode_reglement_id:(! empty($soc->mode_reglement_id)?$soc->mode_reglement_id:0));
|
||||
$fk_account = (! empty($objectsrc->fk_account)?$objectsrc->fk_account:(! empty($soc->fk_account)?$soc->fk_account:0));
|
||||
$remise_percent = (! empty($objectsrc->remise_percent)?$objectsrc->remise_percent:(! empty($soc->remise_percent)?$soc->remise_percent:0));
|
||||
$remise_absolue = (! empty($objectsrc->remise_absolue)?$objectsrc->remise_absolue:(! empty($soc->remise_absolue)?$soc->remise_absolue:0));
|
||||
$dateinvoice = (empty($dateinvoice)?(empty($conf->global->MAIN_AUTOFILL_DATE)?-1:''):$dateinvoice);
|
||||
$dateinvoice = (empty($dateinvoice)?(empty($conf->global->MAIN_AUTOFILL_DATE)?-1:''):$dateinvoice);
|
||||
|
||||
if (!empty($conf->multicurrency->enabled))
|
||||
{
|
||||
if (!empty($objectsrc->multicurrency_code)) $currency_code = $objectsrc->multicurrency_code;
|
||||
if (!empty($conf->global->MULTICURRENCY_USE_ORIGIN_TX) && !empty($objectsrc->multicurrency_tx)) $currency_tx = $objectsrc->multicurrency_tx;
|
||||
if ($element == 'expedition') {
|
||||
$ref_client = (! empty($objectsrc->ref_customer)?$objectsrc->ref_customer:'');
|
||||
|
||||
$elem = $subelem = $objectsrc->origin;
|
||||
$expeoriginid = $objectsrc->origin_id;
|
||||
dol_include_once('/'.$elem.'/class/'.$subelem.'.class.php');
|
||||
$classname = ucfirst($subelem);
|
||||
|
||||
$expesrc = new $classname($db);
|
||||
$expesrc->fetch($expeoriginid);
|
||||
|
||||
$cond_reglement_id = (! empty($expesrc->cond_reglement_id)?$expesrc->cond_reglement_id:(! empty($soc->cond_reglement_id)?$soc->cond_reglement_id:1));
|
||||
$mode_reglement_id = (! empty($expesrc->mode_reglement_id)?$expesrc->mode_reglement_id:(! empty($soc->mode_reglement_id)?$soc->mode_reglement_id:0));
|
||||
$fk_account = (! empty($expesrc->fk_account)?$expesrc->fk_account:(! empty($soc->fk_account)?$soc->fk_account:0));
|
||||
$remise_percent = (! empty($expesrc->remise_percent)?$expesrc->remise_percent:(! empty($soc->remise_percent)?$soc->remise_percent:0));
|
||||
$remise_absolue = (! empty($expesrc->remise_absolue)?$expesrc->remise_absolue:(! empty($soc->remise_absolue)?$soc->remise_absolue:0));
|
||||
|
||||
//Replicate extrafields
|
||||
$expesrc->fetch_optionals($expeoriginid);
|
||||
$object->array_options=$expesrc->array_options;
|
||||
}
|
||||
else
|
||||
{
|
||||
$cond_reglement_id = (! empty($objectsrc->cond_reglement_id)?$objectsrc->cond_reglement_id:(! empty($soc->cond_reglement_id)?$soc->cond_reglement_id:0));
|
||||
$mode_reglement_id = (! empty($objectsrc->mode_reglement_id)?$objectsrc->mode_reglement_id:(! empty($soc->mode_reglement_id)?$soc->mode_reglement_id:0));
|
||||
$fk_account = (! empty($objectsrc->fk_account)?$objectsrc->fk_account:(! empty($soc->fk_account)?$soc->fk_account:0));
|
||||
$remise_percent = (! empty($objectsrc->remise_percent)?$objectsrc->remise_percent:(! empty($soc->remise_percent)?$soc->remise_percent:0));
|
||||
$remise_absolue = (! empty($objectsrc->remise_absolue)?$objectsrc->remise_absolue:(! empty($soc->remise_absolue)?$soc->remise_absolue:0));
|
||||
|
||||
// Replicate extrafields
|
||||
$objectsrc->fetch_optionals($originid);
|
||||
$object->array_options = $objectsrc->array_options;
|
||||
if (!empty($conf->multicurrency->enabled))
|
||||
{
|
||||
if (!empty($objectsrc->multicurrency_code)) $currency_code = $objectsrc->multicurrency_code;
|
||||
if (!empty($conf->global->MULTICURRENCY_USE_ORIGIN_TX) && !empty($objectsrc->multicurrency_tx)) $currency_tx = $objectsrc->multicurrency_tx;
|
||||
}
|
||||
|
||||
// Replicate extrafields
|
||||
$objectsrc->fetch_optionals($originid);
|
||||
$object->array_options = $objectsrc->array_options;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -3606,11 +3632,11 @@ elseif ($id > 0 || ! empty($ref))
|
||||
{
|
||||
// Create an array for form
|
||||
$formquestion = array(
|
||||
// 'text' => $langs->trans("ConfirmClone"),
|
||||
// array('type' => 'checkbox', 'name' => 'clone_content', 'label' => $langs->trans("CloneMainAttributes"), 'value' => 1)
|
||||
array('type' => 'other','name' => 'socid','label' => $langs->trans("SelectThirdParty"),'value' => $form->select_company($object->socid, 'socid', '(s.client=1 OR s.client=2 OR s.client=3)', 1)));
|
||||
// Paiement incomplet. On demande si motif = escompte ou autre
|
||||
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?facid=' . $object->id, $langs->trans('ToClone'), $langs->trans('ConfirmCloneInvoice', $object->ref), 'confirm_clone', $formquestion, 'yes', 1);
|
||||
array('type' => 'other','name' => 'socid','label' => $langs->trans("SelectThirdParty"),'value' => $form->select_company($object->socid, 'socid', '(s.client=1 OR s.client=2 OR s.client=3)', 1)),
|
||||
array('type' => 'date', 'name' => 'newdate', 'label' => $langs->trans("Date"), 'value' => dol_now())
|
||||
);
|
||||
// Ask confirmatio to clone
|
||||
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?facid=' . $object->id, $langs->trans('ToClone'), $langs->trans('ConfirmCloneInvoice', $object->ref), 'confirm_clone', $formquestion, 'yes', 1, 250);
|
||||
}
|
||||
|
||||
// Call Hook formConfirm
|
||||
|
||||
@ -965,82 +965,80 @@ class Facture extends CommonInvoice
|
||||
|
||||
|
||||
/**
|
||||
* Load an object from its id and create a new one in database
|
||||
* Load an object from its id and create a new one in database
|
||||
*
|
||||
* @param int $socid Id of thirdparty
|
||||
* @return int New id of clone
|
||||
* @param User $user User that clone
|
||||
* @param int $fromid Id of object to clone
|
||||
* @return int New id of clone
|
||||
*/
|
||||
public function createFromClone($socid = 0)
|
||||
public function createFromClone(User $user, $fromid = 0)
|
||||
{
|
||||
global $user,$hookmanager, $conf;
|
||||
global $hookmanager;
|
||||
|
||||
$error=0;
|
||||
|
||||
$object=new Facture($this->db);
|
||||
|
||||
$this->db->begin();
|
||||
|
||||
// get extrafields so they will be clone
|
||||
foreach($this->lines as $line)
|
||||
$line->fetch_optionals($line->rowid);
|
||||
|
||||
// Load source object
|
||||
$objFrom = clone $this;
|
||||
$object->fetch($fromid);
|
||||
|
||||
// Change socid if needed
|
||||
if (! empty($socid) && $socid != $this->socid)
|
||||
if (! empty($this->socid) && $this->socid != $object->socid)
|
||||
{
|
||||
$objsoc = new Societe($this->db);
|
||||
|
||||
if ($objsoc->fetch($socid)>0)
|
||||
if ($objsoc->fetch($this->socid)>0)
|
||||
{
|
||||
$this->socid = $objsoc->id;
|
||||
$this->cond_reglement_id = (! empty($objsoc->cond_reglement_id) ? $objsoc->cond_reglement_id : 0);
|
||||
$this->mode_reglement_id = (! empty($objsoc->mode_reglement_id) ? $objsoc->mode_reglement_id : 0);
|
||||
$this->fk_project = '';
|
||||
$this->fk_delivery_address = '';
|
||||
$object->socid = $objsoc->id;
|
||||
$object->cond_reglement_id = (! empty($objsoc->cond_reglement_id) ? $objsoc->cond_reglement_id : 0);
|
||||
$object->mode_reglement_id = (! empty($objsoc->mode_reglement_id) ? $objsoc->mode_reglement_id : 0);
|
||||
$object->fk_project = '';
|
||||
$object->fk_delivery_address = '';
|
||||
}
|
||||
|
||||
// TODO Change product price if multi-prices
|
||||
}
|
||||
|
||||
$this->id=0;
|
||||
$this->statut= self::STATUS_DRAFT;
|
||||
$object->id=0;
|
||||
$object->statut= self::STATUS_DRAFT;
|
||||
|
||||
// Clear fields
|
||||
$this->date = dol_now(); // Date of invoice is set to current date when cloning. // TODO Best is to ask date into confirm box
|
||||
$this->user_author = $user->id;
|
||||
$this->user_valid = '';
|
||||
$this->fk_facture_source = 0;
|
||||
$this->date_creation = '';
|
||||
$this->date_modification = '';
|
||||
$this->date_validation = '';
|
||||
$this->ref_client = '';
|
||||
$this->close_code = '';
|
||||
$this->close_note = '';
|
||||
$this->products = $this->lines; // Tant que products encore utilise
|
||||
$object->date = (empty($this->date) ? dol_now() : $this->date);
|
||||
$object->user_author = $user->id;
|
||||
$object->user_valid = '';
|
||||
$object->fk_facture_source = 0;
|
||||
$object->date_creation = '';
|
||||
$object->date_modification = '';
|
||||
$object->date_validation = '';
|
||||
$object->ref_client = '';
|
||||
$object->close_code = '';
|
||||
$object->close_note = '';
|
||||
$object->products = $object->lines; // For backward compatibility
|
||||
|
||||
// Loop on each line of new invoice
|
||||
foreach($this->lines as $i => $line)
|
||||
foreach($object->lines as $i => $line)
|
||||
{
|
||||
if (($this->lines[$i]->info_bits & 0x02) == 0x02) // We do not clone line of discounts
|
||||
if (($object->lines[$i]->info_bits & 0x02) == 0x02) // We do not clone line of discounts
|
||||
{
|
||||
unset($this->lines[$i]);
|
||||
unset($this->products[$i]); // Tant que products encore utilise
|
||||
unset($object->lines[$i]);
|
||||
unset($object->products[$i]); // Tant que products encore utilise
|
||||
}
|
||||
}
|
||||
|
||||
// Create clone
|
||||
$this->context['createfromclone'] = 'createfromclone';
|
||||
$result=$this->create($user);
|
||||
$object->context['createfromclone'] = 'createfromclone';
|
||||
$result=$object->create($user);
|
||||
if ($result < 0) $error++;
|
||||
else {
|
||||
// copy internal contacts
|
||||
if ($this->copy_linked_contact($objFrom, 'internal') < 0)
|
||||
if ($object->copy_linked_contact($this, 'internal') < 0)
|
||||
$error++;
|
||||
|
||||
// copy external contacts if same company
|
||||
elseif ($objFrom->socid == $this->socid)
|
||||
elseif ($this->socid == $object->socid)
|
||||
{
|
||||
if ($this->copy_linked_contact($objFrom, 'external') < 0)
|
||||
if ($object->copy_linked_contact($this, 'external') < 0)
|
||||
$error++;
|
||||
}
|
||||
}
|
||||
@ -1050,20 +1048,20 @@ class Facture extends CommonInvoice
|
||||
// Hook of thirdparty module
|
||||
if (is_object($hookmanager))
|
||||
{
|
||||
$parameters=array('objFrom'=>$objFrom);
|
||||
$parameters=array('objFrom'=>$this);
|
||||
$action='';
|
||||
$reshook=$hookmanager->executeHooks('createFrom', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
|
||||
$reshook=$hookmanager->executeHooks('createFrom', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
|
||||
if ($reshook < 0) $error++;
|
||||
}
|
||||
}
|
||||
|
||||
unset($this->context['createfromclone']);
|
||||
unset($object->context['createfromclone']);
|
||||
|
||||
// End
|
||||
if (! $error)
|
||||
{
|
||||
$this->db->commit();
|
||||
return $this->id;
|
||||
return $object->id;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1556,7 +1554,7 @@ class Facture extends CommonInvoice
|
||||
$line->multicurrency_total_tva = $objp->multicurrency_total_tva;
|
||||
$line->multicurrency_total_ttc = $objp->multicurrency_total_ttc;
|
||||
|
||||
$line->fetch_optionals();
|
||||
$line->fetch_optionals();
|
||||
|
||||
$this->lines[$i] = $line;
|
||||
|
||||
|
||||
@ -82,6 +82,7 @@ $search_montant_localtax2=GETPOST('search_montant_localtax2', 'alpha');
|
||||
$search_montant_ttc=GETPOST('search_montant_ttc', 'alpha');
|
||||
$search_status=GETPOST('search_status', 'intcomma');
|
||||
$search_paymentmode=GETPOST('search_paymentmode', 'int');
|
||||
$search_paymentterms=GETPOST('search_paymentterms', 'int');
|
||||
$search_town=GETPOST('search_town', 'alpha');
|
||||
$search_zip=GETPOST('search_zip', 'alpha');
|
||||
$search_state=trim(GETPOST("search_state"));
|
||||
@ -162,6 +163,7 @@ $arrayfields=array(
|
||||
'country.code_iso'=>array('label'=>"Country", 'checked'=>0),
|
||||
'typent.code'=>array('label'=>"ThirdPartyType", 'checked'=>$checkedtypetiers),
|
||||
'f.fk_mode_reglement'=>array('label'=>"PaymentMode", 'checked'=>1),
|
||||
'f.fk_cond_reglement'=>array('label'=>"PaymentConditionsShort", 'checked'=>1),
|
||||
'f.total_ht'=>array('label'=>"AmountHT", 'checked'=>1),
|
||||
'f.total_vat'=>array('label'=>"AmountVAT", 'checked'=>0),
|
||||
'f.total_localtax1'=>array('label'=>$langs->transcountry("AmountLT1", $mysoc->country_code), 'checked'=>0, 'enabled'=>($mysoc->localtax1_assuj=="1")),
|
||||
@ -214,6 +216,7 @@ if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter',
|
||||
$search_montant_ttc='';
|
||||
$search_status='';
|
||||
$search_paymentmode='';
|
||||
$search_paymentterms='';
|
||||
$search_town='';
|
||||
$search_zip="";
|
||||
$search_state="";
|
||||
@ -359,7 +362,7 @@ $thirdpartystatic=new Societe($db);
|
||||
|
||||
$sql = 'SELECT';
|
||||
if ($sall || $search_product_category > 0) $sql = 'SELECT DISTINCT';
|
||||
$sql.= ' f.rowid as id, f.ref, f.ref_client, f.type, f.note_private, f.note_public, f.increment, f.fk_mode_reglement, f.total as total_ht, f.tva as total_vat, f.total_ttc,';
|
||||
$sql.= ' f.rowid as id, f.ref, f.ref_client, f.type, f.note_private, f.note_public, f.increment, f.fk_mode_reglement, f.fk_cond_reglement, f.total as total_ht, f.tva as total_vat, f.total_ttc,';
|
||||
$sql.= ' f.localtax1 as total_localtax1, f.localtax2 as total_localtax2,';
|
||||
$sql.= ' f.datef as df, f.date_lim_reglement as datelimite,';
|
||||
$sql.= ' f.paye as paye, f.fk_statut,';
|
||||
@ -451,6 +454,7 @@ if ($search_status != '-1' && $search_status != '')
|
||||
}
|
||||
}
|
||||
if ($search_paymentmode > 0) $sql .= " AND f.fk_mode_reglement = ".$db->escape($search_paymentmode);
|
||||
if ($search_paymentterms > 0) $sql .= " AND f.fk_cond_reglement = ".$db->escape($search_paymentterms);
|
||||
$sql.= dolSqlDateFilter("f.datef", $search_day, $search_month, $search_year);
|
||||
$sql.= dolSqlDateFilter("f.date_lim_reglement", $search_day_lim, $search_month_lim, $search_year_lim);
|
||||
if ($option == 'late') $sql.=" AND f.date_lim_reglement < '".$db->idate(dol_now() - $conf->facture->client->warning_delay)."'";
|
||||
@ -468,7 +472,7 @@ $sql.=$hookmanager->resPrint;
|
||||
|
||||
if (! $sall)
|
||||
{
|
||||
$sql.= ' GROUP BY f.rowid, f.ref, ref_client, f.type, f.note_private, f.note_public, f.increment, f.fk_mode_reglement, f.total, f.tva, f.total_ttc,';
|
||||
$sql.= ' GROUP BY f.rowid, f.ref, ref_client, f.type, f.note_private, f.note_public, f.increment, f.fk_mode_reglement, f.fk_cond_reglement, f.total, f.tva, f.total_ttc,';
|
||||
$sql.= ' f.localtax1, f.localtax2,';
|
||||
$sql.= ' f.datef, f.date_lim_reglement,';
|
||||
$sql.= ' f.paye, f.fk_statut,';
|
||||
@ -562,6 +566,7 @@ if ($resql)
|
||||
if ($search_montant_ttc != '') $param.='&search_montant_ttc='.urlencode($search_montant_ttc);
|
||||
if ($search_status != '') $param.='&search_status='.urlencode($search_status);
|
||||
if ($search_paymentmode > 0) $param.='&search_paymentmode='.urlencode($search_paymentmode);
|
||||
if ($search_paymentterms > 0) $param.='&search_paymentterms='.urlencode($search_paymentterms);
|
||||
if ($show_files) $param.='&show_files='.urlencode($show_files);
|
||||
if ($option) $param.="&search_option=".urlencode($option);
|
||||
if ($optioncss != '') $param.='&optioncss='.urlencode($optioncss);
|
||||
@ -776,6 +781,13 @@ if ($resql)
|
||||
$form->select_types_paiements($search_paymentmode, 'search_paymentmode', '', 0, 1, 1, 10);
|
||||
print '</td>';
|
||||
}
|
||||
// Payment terms
|
||||
if (! empty($arrayfields['f.fk_cond_reglement']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre" align="left">';
|
||||
$form->select_conditions_paiements($search_paymentterms, 'search_paymentterms', -1, 1, 1);
|
||||
print '</td>';
|
||||
}
|
||||
if (! empty($arrayfields['f.total_ht']['checked']))
|
||||
{
|
||||
// Amount
|
||||
@ -869,6 +881,7 @@ if ($resql)
|
||||
if (! empty($arrayfields['country.code_iso']['checked'])) print_liste_field_titre($arrayfields['country.code_iso']['label'], $_SERVER["PHP_SELF"], "country.code_iso", "", $param, 'align="center"', $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['typent.code']['checked'])) print_liste_field_titre($arrayfields['typent.code']['label'], $_SERVER["PHP_SELF"], "typent.code", "", $param, 'align="center"', $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['f.fk_mode_reglement']['checked'])) print_liste_field_titre($arrayfields['f.fk_mode_reglement']['label'], $_SERVER["PHP_SELF"], "f.fk_mode_reglement", "", $param, "", $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['f.fk_cond_reglement']['checked'])) print_liste_field_titre($arrayfields['f.fk_cond_reglement']['label'], $_SERVER["PHP_SELF"], "f.fk_cond_reglement", "", $param, "", $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['f.total_ht']['checked'])) print_liste_field_titre($arrayfields['f.total_ht']['label'], $_SERVER['PHP_SELF'], 'f.total', '', $param, 'class="right"', $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['f.total_vat']['checked'])) print_liste_field_titre($arrayfields['f.total_vat']['label'], $_SERVER['PHP_SELF'], 'f.tva', '', $param, 'class="right"', $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['f.total_localtax1']['checked'])) print_liste_field_titre($arrayfields['f.total_localtax1']['label'], $_SERVER['PHP_SELF'], 'f.localtax1', '', $param, 'class="right"', $sortfield, $sortorder);
|
||||
@ -1081,6 +1094,15 @@ if ($resql)
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
}
|
||||
|
||||
// Payment terms
|
||||
if (! empty($arrayfields['f.fk_cond_reglement']['checked']))
|
||||
{
|
||||
print '<td>';
|
||||
$form->form_conditions_reglement($_SERVER['PHP_SELF'], $obj->fk_cond_reglement, 'none');
|
||||
print '</td>';
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
}
|
||||
|
||||
// Amount HT
|
||||
if (! empty($arrayfields['f.total_ht']['checked']))
|
||||
{
|
||||
|
||||
@ -27,10 +27,18 @@
|
||||
require '../../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/sociales/class/chargesociales.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formsocialcontrib.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
|
||||
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array('compta', 'banks', 'bills'));
|
||||
|
||||
$action=GETPOST('action', 'alpha');
|
||||
$massaction=GETPOST('massaction', 'alpha');
|
||||
$show_files=GETPOST('show_files', 'int');
|
||||
$confirm=GETPOST('confirm', 'alpha');
|
||||
$toselect = GETPOST('toselect', 'array');
|
||||
$contextpage=GETPOST('contextpage', 'aZ')?GETPOST('contextpage', 'aZ'):'sclist';
|
||||
|
||||
// Security check
|
||||
$socid = isset($_GET["socid"])?$_GET["socid"]:'';
|
||||
if ($user->societe_id) $socid=$user->societe_id;
|
||||
@ -40,6 +48,9 @@ $search_ref = GETPOST('search_ref', 'int');
|
||||
$search_label = GETPOST('search_label', 'alpha');
|
||||
$search_amount = GETPOST('search_amount', 'alpha');
|
||||
$search_status = GETPOST('search_status', 'int');
|
||||
$search_day_lim = GETPOST('search_day_lim', 'int');
|
||||
$search_month_lim = GETPOST('search_month_lim', 'int');
|
||||
$search_year_lim = GETPOST('search_year_lim', 'int');
|
||||
|
||||
$limit = GETPOST('limit', 'int')?GETPOST('limit', 'int'):$conf->liste_limit;
|
||||
$sortfield = GETPOST("sortfield", 'alpha');
|
||||
@ -78,7 +89,11 @@ if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x'
|
||||
$search_status='';
|
||||
$search_typeid="";
|
||||
$year="";
|
||||
$month="";
|
||||
$search_day_lim='';
|
||||
$search_year_lim='';
|
||||
$search_month_lim='';
|
||||
$toselect='';
|
||||
$search_array_options=array();
|
||||
}
|
||||
|
||||
|
||||
@ -87,6 +102,7 @@ if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x'
|
||||
*/
|
||||
|
||||
$form = new Form($db);
|
||||
$formother = new FormOther($db);
|
||||
$formsocialcontrib = new FormSocialContrib($db);
|
||||
$chargesociale_static=new ChargeSociales($db);
|
||||
|
||||
@ -106,6 +122,8 @@ if ($search_ref) $sql.=" AND cs.rowid=".$db->escape($search_ref);
|
||||
if ($search_label) $sql.=natural_search("cs.libelle", $search_label);
|
||||
if ($search_amount) $sql.=natural_search("cs.amount", price2num(trim($search_amount)), 1);
|
||||
if ($search_status != '' && $search_status >= 0) $sql.=" AND cs.paye = ".$db->escape($search_status);
|
||||
$sql.= dolSqlDateFilter("cs.periode", $search_day_lim, $search_month_lim, $search_year_lim);
|
||||
//$sql.= dolSqlDateFilter("cs.periode", 0, 0, $year);
|
||||
if ($year > 0)
|
||||
{
|
||||
$sql .= " AND (";
|
||||
@ -192,19 +210,23 @@ if ($resql)
|
||||
print '<tr class="liste_titre_filter">';
|
||||
// Ref
|
||||
print '<td class="liste_titre" align="left">';
|
||||
print '<input class="flat" type="text" size="3" name="search_ref" value="'.dol_escape_htmltag($search_ref).'">';
|
||||
print '<input class="flat maxwidth75" type="text" name="search_ref" value="'.dol_escape_htmltag($search_ref).'">';
|
||||
print '</td>';
|
||||
// Label
|
||||
print '<td class="liste_titre"><input type="text" class="flat" size="8" name="search_label" value="'.dol_escape_htmltag($search_label).'"></td>';
|
||||
print '<td class="liste_titre"><input type="text" class="flat maxwidth100" name="search_label" value="'.dol_escape_htmltag($search_label).'"></td>';
|
||||
// Type
|
||||
print '<td class="liste_titre" align="left">';
|
||||
$formsocialcontrib->select_type_socialcontrib($search_typeid, 'search_typeid', 1, 0, 0, 'maxwidth100onsmartphone');
|
||||
print '</td>';
|
||||
// Period end date
|
||||
print '<td class="liste_titre"> </td>';
|
||||
print '<td class="liste_titre center">';
|
||||
if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print '<input class="flat valignmiddle" type="text" size="1" maxlength="2" name="search_day_lim" value="'.dol_escape_htmltag($search_day_lim).'">';
|
||||
print '<input class="flat valignmiddle width25" type="text" size="1" maxlength="2" name="search_month_lim" value="'.dol_escape_htmltag($search_month_lim).'">';
|
||||
$formother->select_year($search_year_lim?$search_year_lim:-1, 'search_year_lim', 1, 20, 5, 0, 0, '', 'widthauto valignmiddle');
|
||||
print '</td>';
|
||||
// Amount
|
||||
print '<td class="liste_titre right">';
|
||||
print '<input class="flat" type="text" size="6" name="search_amount" value="'.dol_escape_htmltag($search_amount).'">';
|
||||
print '<input class="flat maxwidth75" type="text" name="search_amount" value="'.dol_escape_htmltag($search_amount).'">';
|
||||
print '</td>';
|
||||
print '<td class="liste_titre"> </td>';
|
||||
// Status
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2007 Franky Van Liedekerke <franky.van.liedekerker@telenet.be>
|
||||
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
|
||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2013 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||
* Copyright (C) 2013 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
||||
@ -81,6 +81,7 @@ class Contact extends CommonObject
|
||||
|
||||
public $civility_id; // In fact we store civility_code
|
||||
public $civility_code;
|
||||
public $civility;
|
||||
public $address;
|
||||
public $zip;
|
||||
public $town;
|
||||
@ -695,6 +696,8 @@ class Contact extends CommonObject
|
||||
{
|
||||
global $langs;
|
||||
|
||||
$langs->load("dict");
|
||||
|
||||
dol_syslog(get_class($this)."::fetch id=".$id, LOG_DEBUG);
|
||||
|
||||
if (empty($id) && empty($ref_ext))
|
||||
@ -705,7 +708,7 @@ class Contact extends CommonObject
|
||||
|
||||
$langs->load("companies");
|
||||
|
||||
$sql = "SELECT c.rowid, c.entity, c.fk_soc, c.ref_ext, c.civility as civility_id, c.lastname, c.firstname,";
|
||||
$sql = "SELECT c.rowid, c.entity, c.fk_soc, c.ref_ext, c.civility as civility_code, c.lastname, c.firstname,";
|
||||
$sql.= " c.address, c.statut, c.zip, c.town,";
|
||||
$sql.= " c.fk_pays as country_id,";
|
||||
$sql.= " c.fk_departement as state_id,";
|
||||
@ -747,10 +750,12 @@ class Contact extends CommonObject
|
||||
$this->entity = $obj->entity;
|
||||
$this->ref = $obj->rowid;
|
||||
$this->ref_ext = $obj->ref_ext;
|
||||
$this->civility_id = $obj->civility_id;
|
||||
$this->civility_code = $obj->civility_id;
|
||||
$this->lastname = $obj->lastname;
|
||||
$this->firstname = $obj->firstname;
|
||||
|
||||
$this->civility_code = $obj->civility_code;
|
||||
$this->civility = $obj->civility_code?($langs->trans("Civility".$obj->civility_code) != ("Civility".$obj->civility_code) ? $langs->trans("Civility".$obj->civility_code) : $obj->civility_code):'';
|
||||
|
||||
$this->lastname = $obj->lastname;
|
||||
$this->firstname = $obj->firstname;
|
||||
$this->address = $obj->address;
|
||||
$this->zip = $obj->zip;
|
||||
$this->town = $obj->town;
|
||||
@ -766,23 +771,23 @@ class Contact extends CommonObject
|
||||
$this->country_code = $obj->country_id?$obj->country_code:'';
|
||||
$this->country = $obj->country_id?($langs->trans('Country'.$obj->country_code)!='Country'.$obj->country_code?$langs->transnoentities('Country'.$obj->country_code):$obj->country):'';
|
||||
|
||||
$this->socid = $obj->fk_soc;
|
||||
$this->socid = $obj->fk_soc;
|
||||
$this->socname = $obj->socname;
|
||||
$this->poste = $obj->poste;
|
||||
$this->poste = $obj->poste;
|
||||
$this->statut = $obj->statut;
|
||||
|
||||
$this->phone_pro = trim($obj->phone);
|
||||
$this->phone_pro = trim($obj->phone);
|
||||
$this->fax = trim($obj->fax);
|
||||
$this->phone_perso = trim($obj->phone_perso);
|
||||
$this->phone_mobile = trim($obj->phone_mobile);
|
||||
|
||||
$this->email = $obj->email;
|
||||
$this->email = $obj->email;
|
||||
$this->jabberid = $obj->jabberid;
|
||||
$this->skype = $obj->skype;
|
||||
$this->twitter = $obj->twitter;
|
||||
$this->facebook = $obj->facebook;
|
||||
$this->linkedin = $obj->linkedin;
|
||||
$this->photo = $obj->photo;
|
||||
$this->skype = $obj->skype;
|
||||
$this->twitter = $obj->twitter;
|
||||
$this->facebook = $obj->facebook;
|
||||
$this->linkedin = $obj->linkedin;
|
||||
$this->photo = $obj->photo;
|
||||
$this->priv = $obj->priv;
|
||||
$this->mail = $obj->email;
|
||||
|
||||
|
||||
@ -196,7 +196,24 @@ if ($action == 'confirm_delete' && ! empty($permissiontodelete))
|
||||
}
|
||||
|
||||
// Action clone object
|
||||
if ($action == 'confirm_clone' && $confirm == 'yes' && ! empty($permissiontoadd))
|
||||
if ($action == 'confirm_clone' && $confirm == 'yes' && $permissiontoadd)
|
||||
{
|
||||
$objectutil = dol_clone($object); // To avoid to denaturate loaded object when setting some properties for clone
|
||||
//$objectutil->date = dol_mktime(12, 0, 0, GETPOST('newdatemonth', 'int'), GETPOST('newdateday', 'int'), GETPOST('newdateyear', 'int'));
|
||||
|
||||
$result = $objectutil->createFromClone($id);
|
||||
if ($result > 0) {
|
||||
header("Location: " . $_SERVER['PHP_SELF'] . '?facid=' . $result);
|
||||
exit();
|
||||
} else {
|
||||
$langs->load("errors");
|
||||
setEventMessages($objectutil->error, $objectutil->errors, 'errors');
|
||||
$action = '';
|
||||
}
|
||||
}
|
||||
|
||||
// Action clone object
|
||||
if ($action == 'confirm_clone' && $confirm == 'yes' && $permissiontoadd)
|
||||
{
|
||||
if (1==0 && ! GETPOST('clone_content') && ! GETPOST('clone_receivers'))
|
||||
{
|
||||
@ -204,26 +221,23 @@ if ($action == 'confirm_clone' && $confirm == 'yes' && ! empty($permissiontoadd)
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($object->id > 0)
|
||||
{
|
||||
// Because createFromClone modifies the object, we must clone it so that we can restore it later if error
|
||||
$orig = clone $object;
|
||||
$objectutil = dol_clone($object, 1); // To avoid to denaturate loaded object when setting some properties for clone or if createFromClone modifies the object. We use native clone to keep this->db valid.
|
||||
//$objectutil->date = dol_mktime(12, 0, 0, GETPOST('newdatemonth', 'int'), GETPOST('newdateday', 'int'), GETPOST('newdateyear', 'int'));
|
||||
// ...
|
||||
|
||||
$result=$object->createFromClone($user, $object->id);
|
||||
if ($result > 0)
|
||||
{
|
||||
$newid = 0;
|
||||
if (is_object($result)) $newid = $result->id;
|
||||
else $newid = $result;
|
||||
header("Location: ".$_SERVER['PHP_SELF'].'?id='.$newid); // Open record of new object
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
$object = $orig;
|
||||
$action='';
|
||||
}
|
||||
$result=$objectutil->createFromClone($user, (($object->id > 0) ? $object->id : $id));
|
||||
if (is_object($result) || $result > 0)
|
||||
{
|
||||
$newid = 0;
|
||||
if (is_object($result)) $newid = $result->id;
|
||||
else $newid = $result;
|
||||
header("Location: ".$_SERVER['PHP_SELF'].'?id='.$newid); // Open record of new object
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
setEventMessages($objectutil->error, $objectutil->errors, 'errors');
|
||||
$action='';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -164,9 +164,9 @@ if (! dol_is_dir($upload_dir))
|
||||
print '<!-- ajaxdirpreview type='.$type.' -->'."\n";
|
||||
//print '<!-- Page called with mode='.dol_escape_htmltag(isset($mode)?$mode:'').' type='.dol_escape_htmltag($type).' module='.dol_escape_htmltag($module).' url='.dol_escape_htmltag($url).' '.dol_escape_htmltag($_SERVER["PHP_SELF"]).'?'.dol_escape_htmltag($_SERVER["QUERY_STRING"]).' -->'."\n";
|
||||
|
||||
$param=($sortfield?'&sortfield='.$sortfield:'').($sortorder?'&sortorder='.$sortorder:'');
|
||||
if (! empty($websitekey)) $param.='&website='.$websitekey;
|
||||
if (! empty($pageid)) $param.='&pageid='.$pageid;
|
||||
$param=($sortfield?'&sortfield='.urlencode($sortfield):'').($sortorder?'&sortorder='.urlencode($sortorder):'');
|
||||
if (! empty($websitekey)) $param.='&website='.urlencode($websitekey);
|
||||
if (! empty($pageid)) $param.='&pageid='.urlencode($pageid);
|
||||
|
||||
|
||||
// Dir scan
|
||||
|
||||
@ -6130,6 +6130,12 @@ abstract class CommonObject
|
||||
$value=price($value);
|
||||
}
|
||||
}
|
||||
elseif ($type == 'real')
|
||||
{
|
||||
if (!empty($value)) {
|
||||
$value=price($value);
|
||||
}
|
||||
}
|
||||
elseif ($type == 'boolean')
|
||||
{
|
||||
$checked='';
|
||||
|
||||
@ -602,7 +602,9 @@ class Form
|
||||
$ret.=$hookmanager->resPrint;
|
||||
|
||||
$ret.='</select>';
|
||||
$ret.=ajax_combobox('.massactionselect');
|
||||
|
||||
if (empty($conf->dol_optimize_smallscreen)) $ret.=ajax_combobox('.massactionselect');
|
||||
|
||||
// Warning: if you set submit button to disabled, post using 'Enter' will no more work if there is no another input submit. So we add a hidden button
|
||||
$ret.='<input type="submit" name="confirmmassactioninvisible" style="display: none" tabindex="-1">'; // Hidden button BEFORE so it is the one used when we submit with ENTER.
|
||||
$ret.='<input type="submit" disabled name="confirmmassaction" class="button'.(empty($conf->use_javascript_ajax)?'':' hideobject').' massaction massactionconfirmed" value="'.dol_escape_htmltag($langs->trans("Confirm")).'">';
|
||||
@ -6346,7 +6348,7 @@ class Form
|
||||
|
||||
<dl class="dropdown">
|
||||
<dt>
|
||||
<a href="#">
|
||||
<a href="#'.$htmlname.'">
|
||||
'.img_picto('', 'list').'
|
||||
</a>
|
||||
<input type="hidden" class="'.$htmlname.'" name="'.$htmlname.'" value="'.$listcheckedstring.'">
|
||||
|
||||
@ -195,15 +195,9 @@ function dol_dir_list($path, $types = "all", $recursive = 0, $filter = "", $excl
|
||||
closedir($dir);
|
||||
|
||||
// Obtain a list of columns
|
||||
if (! empty($sortcriteria))
|
||||
if (! empty($sortcriteria) && $sortorder)
|
||||
{
|
||||
$myarray=array();
|
||||
foreach ($file_list as $key => $row)
|
||||
{
|
||||
$myarray[$key] = (isset($row[$sortcriteria])?$row[$sortcriteria]:'');
|
||||
}
|
||||
// Sort the data
|
||||
if ($sortorder) array_multisort($myarray, $sortorder, $file_list);
|
||||
$file_list = dol_sort_array($file_list, $sortcriteria, ($sortorder == SORT_ASC ? 'asc' : 'desc'));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -741,18 +741,16 @@ function dol_buildpath($path, $type = 0, $returnemptyifnotfound = 0)
|
||||
|
||||
/**
|
||||
* Create a clone of instance of object (new instance with same value for properties)
|
||||
* With native = 0: Property that are reference are also new object (true clone). This means $this->db is not valid.
|
||||
* With native = 1: Use PHP clone. Property that are reference are same pointer. This means $this->db is still valid.
|
||||
* With native = 0: Property that are reference are also new object (full isolation clone). This means $this->db of new object is not valid.
|
||||
* With native = 1: Use PHP clone. Property that are reference are same pointer. This means $this->db of new object is still valid but point to same this->db than original object.
|
||||
*
|
||||
* @param object $object Object to clone
|
||||
* @param int $native Native method or true method
|
||||
* @return object Object clone
|
||||
* @param int $native Native method or full isolation method
|
||||
* @return object Clone object
|
||||
* @see https://php.net/manual/language.oop5.cloning.php
|
||||
*/
|
||||
function dol_clone($object, $native = 0)
|
||||
{
|
||||
//dol_syslog(__FUNCTION__ . " is deprecated", LOG_WARNING);
|
||||
|
||||
if (empty($native))
|
||||
{
|
||||
$myclone=unserialize(serialize($object));
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
* Copyright (C) 2012 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2016 Charlie Benke <charlie@patas-monkey.com>
|
||||
* Copyright (C) 2018 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2018-2019 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@ -47,10 +47,10 @@ class doc_generic_order_odt extends ModelePDFCommandes
|
||||
public $emetteur;
|
||||
|
||||
/**
|
||||
* @var array Minimum version of PHP required by module.
|
||||
* e.g.: PHP ≥ 5.4 = array(5, 4)
|
||||
*/
|
||||
public $phpmin = array(5, 4);
|
||||
* @var array Minimum version of PHP required by module.
|
||||
* e.g.: PHP ≥ 5.5 = array(5, 5)
|
||||
*/
|
||||
public $phpmin = array(5, 5);
|
||||
|
||||
/**
|
||||
* @var string Dolibarr version of the loaded document
|
||||
|
||||
@ -69,9 +69,9 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
|
||||
/**
|
||||
* @var array Minimum version of PHP required by module.
|
||||
* e.g.: PHP ≥ 5.4 = array(5, 4)
|
||||
* e.g.: PHP ≥ 5.5 = array(5, 5)
|
||||
*/
|
||||
public $phpmin = array(5, 4);
|
||||
public $phpmin = array(5, 5);
|
||||
|
||||
/**
|
||||
* Dolibarr version of the loaded document
|
||||
|
||||
@ -69,9 +69,9 @@ class pdf_eratosthene extends ModelePDFCommandes
|
||||
|
||||
/**
|
||||
* @var array Minimum version of PHP required by module.
|
||||
* e.g.: PHP ≥ 5.4 = array(5, 4)
|
||||
* e.g.: PHP ≥ 5.5 = array(5, 5)
|
||||
*/
|
||||
public $phpmin = array(5, 4);
|
||||
public $phpmin = array(5, 5);
|
||||
|
||||
/**
|
||||
* Dolibarr version of the loaded document
|
||||
|
||||
@ -46,9 +46,9 @@ class doc_generic_contract_odt extends ModelePDFContract
|
||||
|
||||
/**
|
||||
* @var array Minimum version of PHP required by module.
|
||||
* e.g.: PHP ≥ 5.4 = array(5, 4)
|
||||
* e.g.: PHP ≥ 5.5 = array(5, 5)
|
||||
*/
|
||||
public $phpmin = array(5, 4);
|
||||
public $phpmin = array(5, 5);
|
||||
|
||||
/**
|
||||
* Dolibarr version of the loaded document
|
||||
|
||||
@ -62,9 +62,9 @@ class pdf_strato extends ModelePDFContract
|
||||
|
||||
/**
|
||||
* @var array Minimum version of PHP required by module.
|
||||
* e.g.: PHP ≥ 5.4 = array(5, 4)
|
||||
* e.g.: PHP ≥ 5.5 = array(5, 5)
|
||||
*/
|
||||
public $phpmin = array(5, 4);
|
||||
public $phpmin = array(5, 5);
|
||||
|
||||
/**
|
||||
* Dolibarr version of the loaded document
|
||||
|
||||
@ -3,8 +3,8 @@
|
||||
* Copyright (C) 2012 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2016 Charlie Benke <charlie@patas-monkey.com>
|
||||
* Copyright (C) 2018 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2018-2019 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||
*
|
||||
* 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,9 +48,9 @@ class doc_generic_shipment_odt extends ModelePdfExpedition
|
||||
|
||||
/**
|
||||
* @var array Minimum version of PHP required by module.
|
||||
* e.g.: PHP ≥ 5.4 = array(5, 4)
|
||||
* e.g.: PHP ≥ 5.5 = array(5, 5)
|
||||
*/
|
||||
public $phpmin = array(5, 4);
|
||||
public $phpmin = array(5, 5);
|
||||
|
||||
/**
|
||||
* Dolibarr version of the loaded document
|
||||
|
||||
@ -58,9 +58,9 @@ class pdf_espadon extends ModelePdfExpedition
|
||||
|
||||
/**
|
||||
* @var array Minimum version of PHP required by module.
|
||||
* e.g.: PHP ≥ 5.4 = array(5, 4)
|
||||
* e.g.: PHP ≥ 5.5 = array(5, 5)
|
||||
*/
|
||||
public $phpmin = array(5, 4);
|
||||
public $phpmin = array(5, 5);
|
||||
|
||||
/**
|
||||
* Dolibarr version of the loaded document
|
||||
|
||||
@ -59,9 +59,9 @@ class pdf_merou extends ModelePdfExpedition
|
||||
|
||||
/**
|
||||
* @var array Minimum version of PHP required by module.
|
||||
* e.g.: PHP ≥ 5.4 = array(5, 4)
|
||||
* e.g.: PHP ≥ 5.5 = array(5, 5)
|
||||
*/
|
||||
public $phpmin = array(5, 4);
|
||||
public $phpmin = array(5, 5);
|
||||
|
||||
/**
|
||||
* Dolibarr version of the loaded document
|
||||
|
||||
@ -58,9 +58,9 @@ class pdf_rouget extends ModelePdfExpedition
|
||||
|
||||
/**
|
||||
* @var array Minimum version of PHP required by module.
|
||||
* e.g.: PHP ≥ 5.4 = array(5, 4)
|
||||
* e.g.: PHP ≥ 5.5 = array(5, 5)
|
||||
*/
|
||||
public $phpmin = array(5, 4);
|
||||
public $phpmin = array(5, 5);
|
||||
|
||||
/**
|
||||
* Dolibarr version of the loaded document
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/* Copyright (C) 2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2015 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||
* Copyright (C) 2016-2018 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2016-2019 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2018 Francis Appels <francis.appels@z-application.com>
|
||||
* Copyright (C) 2019 Markus Welters <markus@welters.de>
|
||||
@ -65,9 +65,9 @@ class pdf_standard extends ModeleExpenseReport
|
||||
|
||||
/**
|
||||
* @var array Minimum version of PHP required by module.
|
||||
* e.g.: PHP ≥ 5.4 = array(5, 4)
|
||||
* e.g.: PHP ≥ 5.5 = array(5, 5)
|
||||
*/
|
||||
public $phpmin = array(5, 4);
|
||||
public $phpmin = array(5, 5);
|
||||
|
||||
/**
|
||||
* Dolibarr version of the loaded document
|
||||
|
||||
@ -46,10 +46,10 @@ class doc_generic_invoice_odt extends ModelePDFFactures
|
||||
public $emetteur;
|
||||
|
||||
/**
|
||||
* @var array Minimum version of PHP required by module.
|
||||
* e.g.: PHP ≥ 5.4 = array(5, 4)
|
||||
*/
|
||||
public $phpmin = array(5, 4);
|
||||
* @var array Minimum version of PHP required by module.
|
||||
* e.g.: PHP ≥ 5.5 = array(5, 5)
|
||||
*/
|
||||
public $phpmin = array(5, 5);
|
||||
|
||||
/**
|
||||
* Dolibarr version of the loaded document
|
||||
|
||||
@ -70,9 +70,9 @@ class pdf_crabe extends ModelePDFFactures
|
||||
|
||||
/**
|
||||
* @var array Minimum version of PHP required by module.
|
||||
* e.g.: PHP ≥ 5.4 = array(5, 4)
|
||||
* e.g.: PHP ≥ 5.5 = array(5, 5)
|
||||
*/
|
||||
public $phpmin = array(5, 4);
|
||||
public $phpmin = array(5, 5);
|
||||
|
||||
/**
|
||||
* Dolibarr version of the loaded document
|
||||
|
||||
@ -70,9 +70,9 @@ class pdf_sponge extends ModelePDFFactures
|
||||
|
||||
/**
|
||||
* @var array Minimum version of PHP required by module.
|
||||
* e.g.: PHP ≥ 5.4 = array(5, 4)
|
||||
* e.g.: PHP ≥ 5.5 = array(5, 5)
|
||||
*/
|
||||
public $phpmin = array(5, 4);
|
||||
public $phpmin = array(5, 5);
|
||||
|
||||
/**
|
||||
* Dolibarr version of the loaded document
|
||||
|
||||
@ -60,9 +60,9 @@ class pdf_soleil extends ModelePDFFicheinter
|
||||
|
||||
/**
|
||||
* @var array Minimum version of PHP required by module.
|
||||
* e.g.: PHP ≥ 5.4 = array(5, 4)
|
||||
* e.g.: PHP ≥ 5.5 = array(5, 5)
|
||||
*/
|
||||
public $phpmin = array(5, 4);
|
||||
public $phpmin = array(5, 5);
|
||||
|
||||
/**
|
||||
* Dolibarr version of the loaded document
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
* Copyright (C) 2005-2014 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2007 Franky Van Liedekerke <franky.van.liedekerke@telenet.be>
|
||||
* Copyright (C) 2008 Chiptronik
|
||||
* Copyright (C) 2011-2018 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2011-2019 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
||||
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@ -61,9 +61,9 @@ class pdf_typhon extends ModelePDFDeliveryOrder
|
||||
|
||||
/**
|
||||
* @var array Minimum version of PHP required by module.
|
||||
* e.g.: PHP ≥ 5.4 = array(5, 4)
|
||||
* e.g.: PHP ≥ 5.5 = array(5, 5)
|
||||
*/
|
||||
public $phpmin = array(5, 4);
|
||||
public $phpmin = array(5, 5);
|
||||
|
||||
/**
|
||||
* Dolibarr version of the loaded document
|
||||
|
||||
@ -335,7 +335,7 @@ class modSociete extends DolibarrModules
|
||||
'c.statut'=>"Status",
|
||||
's.rowid'=>"IdCompany",'s.nom'=>"CompanyName",'s.status'=>"Status",'s.code_client'=>"CustomerCode",'s.code_fournisseur'=>"SupplierCode",
|
||||
's.client'=>'Customer','s.fournisseur'=>'Supplier',
|
||||
's.address'=>'Address','s.phone'=>'Phone','s.email'=>"Email",
|
||||
's.address'=>'Address','s.zip'=>"Zip",'s.town'=>"Town",'s.phone'=>'Phone','s.email'=>"Email",
|
||||
't.libelle'=>"ThirdPartyType"
|
||||
);
|
||||
$this->export_examplevalues_array[$r]=array('s.client'=>'0 (no customer no prospect)/1 (customer)/2 (prospect)/3 (customer and prospect)','s.fournisseur'=>'0 (not a supplier) or 1 (supplier)');
|
||||
@ -346,13 +346,13 @@ class modSociete extends DolibarrModules
|
||||
'c.statut'=>"Status",
|
||||
's.rowid'=>"List:societe:nom::thirdparty",'s.nom'=>"Text",'s.status'=>"Status",'s.code_client'=>"Text",'s.code_fournisseur'=>"Text",
|
||||
's.client'=>"Text",'s.fournisseur'=>"Text",
|
||||
's.address'=>"Text",'s.phone'=>"Text",'s.email'=>"Text",
|
||||
's.address'=>"Text",'s.zip'=>"Text",'s.town'=>"Text",'s.phone'=>"Text",'s.email'=>"Text",
|
||||
't.libelle'=>"Text"
|
||||
);
|
||||
$this->export_entities_array[$r]=array(
|
||||
's.rowid'=>"company",'s.nom'=>"company", 's.status'=>'company', 's.code_client'=>"company",'s.code_fournisseur'=>"company", 's.client'=>"company",
|
||||
's.fournisseur'=>"company",
|
||||
's.address'=>"company", 's.phone'=>"company", 's.email'=>"company",
|
||||
's.address'=>"company", 's.zip'=>"company", 's.town'=>"company", 's.phone'=>"company", 's.email'=>"company",
|
||||
't.libelle'=>"company"
|
||||
); // We define here only fields that use another picto
|
||||
if (empty($conf->fournisseur->enabled))
|
||||
|
||||
@ -44,10 +44,10 @@ class doc_generic_product_odt extends ModelePDFProduct
|
||||
public $emetteur;
|
||||
|
||||
/**
|
||||
* @var array Minimum version of PHP required by module.
|
||||
* e.g.: PHP ≥ 5.4 = array(5, 4)
|
||||
*/
|
||||
public $phpmin = array(5, 4);
|
||||
* @var array Minimum version of PHP required by module.
|
||||
* e.g.: PHP ≥ 5.5 = array(5, 5)
|
||||
*/
|
||||
public $phpmin = array(5, 5);
|
||||
|
||||
/**
|
||||
* Dolibarr version of the loaded document
|
||||
|
||||
@ -58,9 +58,9 @@ class pdf_standard extends ModelePDFProduct
|
||||
|
||||
/**
|
||||
* @var array Minimum version of PHP required by module.
|
||||
* e.g.: PHP ≥ 5.4 = array(5, 4)
|
||||
* e.g.: PHP ≥ 5.5 = array(5, 5)
|
||||
*/
|
||||
public $phpmin = array(5, 4);
|
||||
public $phpmin = array(5, 5);
|
||||
|
||||
/**
|
||||
* Dolibarr version of the loaded document
|
||||
|
||||
@ -62,9 +62,9 @@ class doc_generic_project_odt extends ModelePDFProjects
|
||||
|
||||
/**
|
||||
* @var array Minimum version of PHP required by module.
|
||||
* e.g.: PHP ≥ 5.4 = array(5, 4)
|
||||
* e.g.: PHP ≥ 5.5 = array(5, 5)
|
||||
*/
|
||||
public $phpmin = array(5, 4);
|
||||
public $phpmin = array(5, 5);
|
||||
|
||||
/**
|
||||
* Dolibarr version of the loaded document
|
||||
|
||||
@ -60,9 +60,9 @@ class pdf_baleine extends ModelePDFProjects
|
||||
|
||||
/**
|
||||
* @var array Minimum version of PHP required by module.
|
||||
* e.g.: PHP ≥ 5.4 = array(5, 4)
|
||||
* e.g.: PHP ≥ 5.5 = array(5, 5)
|
||||
*/
|
||||
public $phpmin = array(5, 4);
|
||||
public $phpmin = array(5, 5);
|
||||
|
||||
/**
|
||||
* Dolibarr version of the loaded document
|
||||
|
||||
@ -62,10 +62,10 @@ class doc_generic_task_odt extends ModelePDFTask
|
||||
public $emetteur;
|
||||
|
||||
/**
|
||||
* @var array Minimum version of PHP required by module.
|
||||
* e.g.: PHP ≥ 5.4 = array(5, 4)
|
||||
*/
|
||||
public $phpmin = array(5, 4);
|
||||
* @var array Minimum version of PHP required by module.
|
||||
* e.g.: PHP ≥ 5.5 = array(5, 5)
|
||||
*/
|
||||
public $phpmin = array(5, 5);
|
||||
|
||||
/**
|
||||
* Dolibarr version of the loaded document
|
||||
|
||||
@ -45,9 +45,9 @@ class doc_generic_proposal_odt extends ModelePDFPropales
|
||||
|
||||
/**
|
||||
* @var array Minimum version of PHP required by module.
|
||||
* e.g.: PHP ≥ 5.4 = array(5, 4)
|
||||
* e.g.: PHP ≥ 5.5 = array(5, 5)
|
||||
*/
|
||||
public $phpmin = array(5, 4);
|
||||
public $phpmin = array(5, 5);
|
||||
|
||||
/**
|
||||
* @var string Dolibarr version of the loaded document
|
||||
|
||||
@ -68,9 +68,9 @@ class pdf_azur extends ModelePDFPropales
|
||||
|
||||
/**
|
||||
* @var array Minimum version of PHP required by module.
|
||||
* e.g.: PHP ≥ 5.4 = array(5, 4)
|
||||
* e.g.: PHP ≥ 5.5 = array(5, 5)
|
||||
*/
|
||||
public $phpmin = array(5, 4);
|
||||
public $phpmin = array(5, 5);
|
||||
|
||||
/**
|
||||
* Dolibarr version of the loaded document
|
||||
|
||||
@ -68,9 +68,9 @@ class pdf_cyan extends ModelePDFPropales
|
||||
|
||||
/**
|
||||
* @var array Minimum version of PHP required by module.
|
||||
* e.g.: PHP ≥ 5.4 = array(5, 4)
|
||||
* e.g.: PHP ≥ 5.5 = array(5, 5)
|
||||
*/
|
||||
public $phpmin = array(5, 4);
|
||||
public $phpmin = array(5, 5);
|
||||
|
||||
/**
|
||||
* Dolibarr version of the loaded document
|
||||
|
||||
@ -43,9 +43,9 @@ class doc_generic_reception_odt extends ModelePdfReception
|
||||
|
||||
/**
|
||||
* @var array Minimum version of PHP required by module.
|
||||
* e.g.: PHP ≥ 5.4 = array(5, 4)
|
||||
* e.g.: PHP ≥ 5.5 = array(5, 5)
|
||||
*/
|
||||
public $phpmin = array(5, 4); // Minimum version of PHP required by module
|
||||
public $phpmin = array(5, 5);
|
||||
|
||||
/**
|
||||
* @var string Dolibarr version of the loaded document
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/* Copyright (C) 2010-2011 Laurent Destailleur <ely@users.sourceforge.net>
|
||||
* Copyright (C) 2016 Charlie Benke <charlie@patas-monkey.com>
|
||||
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2016 Charlie Benke <charlie@patas-monkey.com>
|
||||
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||
*
|
||||
* 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
|
||||
@ -44,9 +44,9 @@ class doc_generic_odt extends ModeleThirdPartyDoc
|
||||
|
||||
/**
|
||||
* @var array Minimum version of PHP required by module.
|
||||
* e.g.: PHP ≥ 5.4 = array(5, 4)
|
||||
* e.g.: PHP ≥ 5.5 = array(5, 5)
|
||||
*/
|
||||
public $phpmin = array(5, 4);
|
||||
public $phpmin = array(5, 5);
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/* Copyright (C) 2010-2012 Laurent Destailleur <eldy@stocks.sourceforge.net>
|
||||
* Copyright (C) 2012 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||
*
|
||||
* 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
|
||||
@ -45,9 +45,9 @@ class doc_generic_stock_odt extends ModelePDFStock
|
||||
|
||||
/**
|
||||
* @var array Minimum version of PHP required by module.
|
||||
* e.g.: PHP ≥ 5.4 = array(5, 4)
|
||||
* e.g.: PHP ≥ 5.5 = array(5, 5)
|
||||
*/
|
||||
public $phpmin = array(5, 4);
|
||||
public $phpmin = array(5, 5);
|
||||
|
||||
/**
|
||||
* Dolibarr version of the loaded document
|
||||
|
||||
@ -58,9 +58,9 @@ class pdf_standard extends ModelePDFStock
|
||||
|
||||
/**
|
||||
* @var array Minimum version of PHP required by module.
|
||||
* e.g.: PHP ≥ 5.4 = array(5, 4)
|
||||
* e.g.: PHP ≥ 5.5 = array(5, 5)
|
||||
*/
|
||||
public $phpmin = array(5, 4);
|
||||
public $phpmin = array(5, 5);
|
||||
|
||||
/**
|
||||
* Dolibarr version of the loaded document
|
||||
|
||||
@ -59,9 +59,9 @@ class pdf_stdmovement extends ModelePDFMovement
|
||||
|
||||
/**
|
||||
* @var array Minimum version of PHP required by module.
|
||||
* e.g.: PHP ≥ 5.4 = array(5, 4)
|
||||
* e.g.: PHP ≥ 5.5 = array(5, 5)
|
||||
*/
|
||||
public $phpmin = array(5, 4);
|
||||
public $phpmin = array(5, 5);
|
||||
|
||||
/**
|
||||
* Dolibarr version of the loaded document
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
<?php
|
||||
/* Copyright (C) 2010-2011 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2010-2014 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||
/* Copyright (C) 2010-2011 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2010-2014 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||
*
|
||||
* 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
|
||||
@ -59,9 +59,9 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
||||
|
||||
/**
|
||||
* @var array Minimum version of PHP required by module.
|
||||
* e.g.: PHP ≥ 5.4 = array(5, 4)
|
||||
* e.g.: PHP ≥ 5.5 = array(5, 5)
|
||||
*/
|
||||
public $phpmin = array(5, 4);
|
||||
public $phpmin = array(5, 5);
|
||||
|
||||
/**
|
||||
* Dolibarr version of the loaded document
|
||||
|
||||
@ -3,9 +3,9 @@
|
||||
* Copyright (C) 2005-2011 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2007 Franky Van Liedekerke <franky.van.liedekerke@telenet.be>
|
||||
* Copyright (C) 2010-2014 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2017 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||
*
|
||||
* 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
|
||||
@ -63,9 +63,9 @@ class pdf_cornas extends ModelePDFSuppliersOrders
|
||||
|
||||
/**
|
||||
* @var array Minimum version of PHP required by module.
|
||||
* e.g.: PHP ≥ 5.4 = array(5, 4)
|
||||
* e.g.: PHP ≥ 5.5 = array(5, 5)
|
||||
*/
|
||||
public $phpmin = array(5, 4);
|
||||
public $phpmin = array(5, 5);
|
||||
|
||||
/**
|
||||
* Dolibarr version of the loaded document
|
||||
|
||||
@ -3,9 +3,9 @@
|
||||
* Copyright (C) 2005-2011 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2007 Franky Van Liedekerke <franky.van.liedekerke@telenet.be>
|
||||
* Copyright (C) 2010-2014 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2017 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||
*
|
||||
* 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
|
||||
@ -63,9 +63,9 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
||||
|
||||
/**
|
||||
* @var array Minimum version of PHP required by module.
|
||||
* e.g.: PHP ≥ 5.4 = array(5, 4)
|
||||
* e.g.: PHP ≥ 5.5 = array(5, 5)
|
||||
*/
|
||||
public $phpmin = array(5, 4);
|
||||
public $phpmin = array(5, 5);
|
||||
|
||||
/**
|
||||
* Dolibarr version of the loaded document
|
||||
|
||||
@ -60,9 +60,9 @@ class pdf_standard extends ModelePDFSuppliersPayments
|
||||
|
||||
/**
|
||||
* @var array Minimum version of PHP required by module.
|
||||
* e.g.: PHP ≥ 5.4 = array(5, 4)
|
||||
* e.g.: PHP ≥ 5.5 = array(5, 5)
|
||||
*/
|
||||
public $phpmin = array(5, 4);
|
||||
public $phpmin = array(5, 5);
|
||||
|
||||
/**
|
||||
* Dolibarr version of the loaded document
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
/* Copyright (C) 2010-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2012 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2016 Charlie Benke <charlie@patas-monkey.com>
|
||||
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||
*
|
||||
* 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
|
||||
@ -45,10 +45,10 @@ class doc_generic_supplier_proposal_odt extends ModelePDFSupplierProposal
|
||||
public $emetteur;
|
||||
|
||||
/**
|
||||
* @var array Minimum version of PHP required by module.
|
||||
* e.g.: PHP ≥ 5.4 = array(5, 4)
|
||||
*/
|
||||
public $phpmin = array(5, 4);
|
||||
* @var array Minimum version of PHP required by module.
|
||||
* e.g.: PHP ≥ 5.5 = array(5, 5)
|
||||
*/
|
||||
public $phpmin = array(5, 5);
|
||||
|
||||
/**
|
||||
* Dolibarr version of the loaded document
|
||||
|
||||
@ -3,8 +3,8 @@
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2008 Raphael Bertrand <raphael.bertrand@resultic.fr>
|
||||
* Copyright (C) 2010-2014 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2012 Christophe Battarel <christophe.battarel@altairis.fr>
|
||||
* Copyright (C) 2017 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2012 Christophe Battarel <christophe.battarel@altairis.fr>
|
||||
* Copyright (C) 2017 Ferran Marcet <fmarcet@2byte.es>
|
||||
*
|
||||
* 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
|
||||
@ -60,9 +60,9 @@ class pdf_aurore extends ModelePDFSupplierProposal
|
||||
|
||||
/**
|
||||
* @var array Minimum version of PHP required by module.
|
||||
* e.g.: PHP ≥ 5.4 = array(5, 4)
|
||||
* e.g.: PHP ≥ 5.5 = array(5, 5)
|
||||
*/
|
||||
public $phpmin = array(5, 4);
|
||||
public $phpmin = array(5, 5);
|
||||
|
||||
/**
|
||||
* Dolibarr version of the loaded document
|
||||
|
||||
@ -43,9 +43,9 @@ class doc_generic_user_odt extends ModelePDFUser
|
||||
|
||||
/**
|
||||
* @var array Minimum version of PHP required by module.
|
||||
* e.g.: PHP ≥ 5.4 = array(5, 4)
|
||||
* e.g.: PHP ≥ 5.5 = array(5, 5)
|
||||
*/
|
||||
public $phpmin = array(5, 4);
|
||||
public $phpmin = array(5, 5);
|
||||
|
||||
/**
|
||||
* Dolibarr version of the loaded document
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/* Copyright (C) 2010-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2012 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||
*
|
||||
* 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
|
||||
@ -46,9 +46,9 @@ class doc_generic_usergroup_odt extends ModelePDFUserGroup
|
||||
|
||||
/**
|
||||
* @var array Minimum version of PHP required by module.
|
||||
* e.g.: PHP ≥ 5.4 = array(5, 4)
|
||||
* e.g.: PHP ≥ 5.5 = array(5, 5)
|
||||
*/
|
||||
public $phpmin = array(5, 4);
|
||||
public $phpmin = array(5, 5);
|
||||
|
||||
/**
|
||||
* Dolibarr version of the loaded document
|
||||
|
||||
@ -145,7 +145,7 @@ if ($action == 'presend')
|
||||
{
|
||||
$fuser = new User($db);
|
||||
$fuser->fetch($object->fk_user_author);
|
||||
$liste['thirdparty'] = $fuser->getFullName($langs)." <".$fuser->email.">";
|
||||
$liste['thirdparty'] = $fuser->getFullName($outputlangs)." <".$fuser->email.">";
|
||||
}
|
||||
elseif ($object->element == 'societe')
|
||||
{
|
||||
@ -155,11 +155,11 @@ if ($action == 'presend')
|
||||
}
|
||||
elseif ($object->element == 'contact')
|
||||
{
|
||||
$liste['contact'] = $object->getFullName($langs)." <".$object->email.">";
|
||||
$liste['contact'] = $object->getFullName($outputlangs)." <".$object->email.">";
|
||||
}
|
||||
elseif ($object->element == 'user' || $object->element == 'member')
|
||||
{
|
||||
$liste['thirdparty'] = $object->getFullName($langs)." <".$object->email.">";
|
||||
$liste['thirdparty'] = $object->getFullName($outputlangs)." <".$object->email.">";
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -221,7 +221,7 @@ if ($action == 'presend')
|
||||
|
||||
foreach ($contactarr as $contact) {
|
||||
$contactstatic->fetch($contact['id']);
|
||||
$substitutionarray['__CONTACT_NAME_'.$contact['code'].'__'] = $contactstatic->getFullName($langs, 1);
|
||||
$substitutionarray['__CONTACT_NAME_'.$contact['code'].'__'] = $contactstatic->getFullName($outputlangs, 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -804,7 +804,7 @@ class EmailCollector extends CommonObject
|
||||
{
|
||||
// Nothing can be done for this param
|
||||
$errorforthisaction++;
|
||||
$this->errors = 'The extract rule to use has on an unknown source (must be HEADER, SUBJECT or BODY)';
|
||||
$this->error = 'The extract rule to use has on an unknown source (must be HEADER, SUBJECT or BODY)';
|
||||
$this->errors[] = $this->error;
|
||||
}
|
||||
}
|
||||
@ -1348,8 +1348,8 @@ class EmailCollector extends CommonObject
|
||||
else
|
||||
{
|
||||
// Nothing can be done for this param
|
||||
$errorforthisaction++;
|
||||
$this->errors = 'The extract rule to use to load thirdparty has on an unknown source (must be HEADER, SUBJECT or BODY)';
|
||||
$errorforaction++;
|
||||
$this->error = 'The extract rule to use to load thirdparty has on an unknown source (must be HEADER, SUBJECT or BODY)';
|
||||
$this->errors[] = $this->error;
|
||||
}
|
||||
}
|
||||
@ -1361,7 +1361,7 @@ class EmailCollector extends CommonObject
|
||||
}
|
||||
else
|
||||
{
|
||||
$errorforthisaction++;
|
||||
$errorforaction++;
|
||||
$this->error = 'Bad syntax for description of action parameters: '.$actionparam;
|
||||
$this->errors[] = $this->error;
|
||||
break;
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004-2019 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2015-2017 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||
* Copyright (C) 2017 Ferran Marcet <fmarcet@2byte.es>
|
||||
@ -1243,6 +1243,21 @@ if (empty($reshook))
|
||||
$object = new ExpenseReport($db);
|
||||
$object->fetch($id);
|
||||
|
||||
// First save uploaded file
|
||||
$fk_ecm_files = 0;
|
||||
if (GETPOSTISSET('attachfile'))
|
||||
{
|
||||
$arrayoffiles=GETPOST('attachfile', 'array');
|
||||
if (is_array($arrayoffiles) && ! empty($arrayoffiles[0]))
|
||||
{
|
||||
include_once DOL_DOCUMENT_ROOT.'/ecm/class/ecmfiles.class.php';
|
||||
$relativepath='expensereport/'.$object->ref.'/'.$arrayoffiles[0];
|
||||
$ecmfiles=new EcmFiles($db);
|
||||
$ecmfiles->fetch(0, '', $relativepath);
|
||||
$fk_ecm_files = $ecmfiles->id;
|
||||
}
|
||||
}
|
||||
|
||||
$rowid = $_POST['rowid'];
|
||||
$type_fees_id = GETPOST('fk_c_type_fees', 'int');
|
||||
$fk_c_exp_tax_cat = GETPOST('fk_c_exp_tax_cat', 'int');
|
||||
@ -1284,7 +1299,7 @@ if (empty($reshook))
|
||||
if (! $error)
|
||||
{
|
||||
// TODO Use update method of ExpenseReportLine
|
||||
$result = $object->updateline($rowid, $type_fees_id, $projet_id, $vatrate, $comments, $qty, $value_unit, $date, $id, $fk_c_exp_tax_cat);
|
||||
$result = $object->updateline($rowid, $type_fees_id, $projet_id, $vatrate, $comments, $qty, $value_unit, $date, $id, $fk_c_exp_tax_cat, $fk_ecm_files);
|
||||
if ($result >= 0)
|
||||
{
|
||||
if ($result > 0)
|
||||
@ -2249,6 +2264,16 @@ else
|
||||
print '</script>'."\n";
|
||||
print '</td></tr>';
|
||||
|
||||
$filenamelinked='';
|
||||
if ($line->fk_ecm_files > 0)
|
||||
{
|
||||
$result = $ecmfilesstatic->fetch($line->fk_ecm_files);
|
||||
if ($result > 0)
|
||||
{
|
||||
$filenamelinked = $ecmfilesstatic->filename;
|
||||
}
|
||||
}
|
||||
|
||||
$tredited='tredited';
|
||||
include DOL_DOCUMENT_ROOT.'/expensereport/tpl/expensereport_addfile.tpl.php';
|
||||
include DOL_DOCUMENT_ROOT.'/expensereport/tpl/expensereport_linktofile.tpl.php';
|
||||
|
||||
@ -1940,7 +1940,7 @@ class ExpenseReport extends CommonObject
|
||||
}
|
||||
|
||||
/**
|
||||
* updateline
|
||||
* Update an expense report line
|
||||
*
|
||||
* @param int $rowid Line to edit
|
||||
* @param int $type_fees_id Type payment
|
||||
@ -1951,10 +1951,11 @@ class ExpenseReport extends CommonObject
|
||||
* @param double $value_unit Value init
|
||||
* @param int $date Date
|
||||
* @param int $expensereport_id Expense report id
|
||||
* @param int $fk_c_exp_tax_cat id of category of car
|
||||
* @param int $fk_c_exp_tax_cat Id of category of car
|
||||
* @param int $fk_ecm_files Id of ECM file to link to this expensereport line
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
public function updateline($rowid, $type_fees_id, $projet_id, $vatrate, $comments, $qty, $value_unit, $date, $expensereport_id, $fk_c_exp_tax_cat = 0)
|
||||
public function updateline($rowid, $type_fees_id, $projet_id, $vatrate, $comments, $qty, $value_unit, $date, $expensereport_id, $fk_c_exp_tax_cat = 0, $fk_ecm_files = 0)
|
||||
{
|
||||
global $user, $mysoc;
|
||||
|
||||
@ -2013,6 +2014,8 @@ class ExpenseReport extends CommonObject
|
||||
$this->line->localtax1_type = $localtaxes_type[0];
|
||||
$this->line->localtax2_type = $localtaxes_type[2];
|
||||
|
||||
$this->line->fk_ecm_files = $fk_ecm_files;
|
||||
|
||||
$this->line->rowid = $rowid;
|
||||
$this->line->id = $rowid;
|
||||
|
||||
@ -2020,21 +2023,26 @@ class ExpenseReport extends CommonObject
|
||||
$sql = "SELECT c.code as code_type_fees, c.label as libelle_type_fees";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."c_type_fees as c";
|
||||
$sql.= " WHERE c.id = ".$type_fees_id;
|
||||
$result = $this->db->query($sql);
|
||||
$objp_fees = $this->db->fetch_object($result);
|
||||
$this->line->type_fees_code = $objp_fees->code_type_fees;
|
||||
$this->line->type_fees_libelle = $objp_fees->libelle_type_fees;
|
||||
$resql = $this->db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
$objp_fees = $this->db->fetch_object($resql);
|
||||
$this->line->type_fees_code = $objp_fees->code_type_fees;
|
||||
$this->line->type_fees_libelle = $objp_fees->libelle_type_fees;
|
||||
$this->db->free($resql);
|
||||
}
|
||||
|
||||
// Select des informations du projet
|
||||
$sql = "SELECT p.ref as ref_projet, p.title as title_projet";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."projet as p";
|
||||
$sql.= " WHERE p.rowid = ".$projet_id;
|
||||
$result = $this->db->query($sql);
|
||||
if ($result) {
|
||||
$objp_projet = $this->db->fetch_object($result);
|
||||
$resql = $this->db->query($sql);
|
||||
if ($resql) {
|
||||
$objp_projet = $this->db->fetch_object($resql);
|
||||
$this->line->projet_ref = $objp_projet->ref_projet;
|
||||
$this->line->projet_title = $objp_projet->title_projet;
|
||||
$this->db->free($resql);
|
||||
}
|
||||
$this->line->projet_ref = $objp_projet->ref_projet;
|
||||
$this->line->projet_title = $objp_projet->title_projet;
|
||||
|
||||
$this->applyOffset();
|
||||
$this->checkRules();
|
||||
@ -2727,7 +2735,8 @@ class ExpenseReportLine
|
||||
$sql.= ",vat_src_code='".$this->db->escape($this->vat_src_code)."'";
|
||||
$sql.= ",rule_warning_message='".$this->db->escape($this->rule_warning_message)."'";
|
||||
$sql.= ",fk_c_exp_tax_cat=".$this->db->escape($this->fk_c_exp_tax_cat);
|
||||
if ($this->fk_c_type_fees) $sql.= ",fk_c_type_fees=".$this->db->escape($this->fk_c_type_fees);
|
||||
$sql.= ",fk_ecm_files=".($this->fk_ecm_files > 0 ? $this->fk_ecm_files : 'null');
|
||||
if ($this->fk_c_type_fees) $sql.= ",fk_c_type_fees=".$this->db->escape($this->fk_c_type_fees);
|
||||
else $sql.= ",fk_c_type_fees=null";
|
||||
if ($this->fk_project > 0) $sql.= ",fk_projet=".$this->db->escape($this->fk_project);
|
||||
else $sql.= ",fk_projet=null";
|
||||
|
||||
@ -88,6 +88,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL >= 2)
|
||||
print '<br>';
|
||||
$checked='';
|
||||
//var_dump(GETPOST($file['relativename'])); var_dump($file['relativename']); var_dump($_FILES['userfile']['name']);
|
||||
// If a file was just uploaded, we check to preselect it
|
||||
foreach($_FILES['userfile']['name'] as $tmpfile)
|
||||
{
|
||||
if ($file['relativename'] == (GETPOST('savingdocmask', 'alpha') ? dol_sanitizeFileName($object->ref.'-') : '').$tmpfile)
|
||||
@ -100,6 +101,11 @@ if ($conf->global->MAIN_FEATURES_LEVEL >= 2)
|
||||
break;
|
||||
}
|
||||
}
|
||||
// If we edit a line already linked, then $filenamelinked is defined to the filename (without path) of linked file
|
||||
if (! empty($filenamelinked) && $filenamelinked == $file['relativename'])
|
||||
{
|
||||
$checked=' checked';
|
||||
}
|
||||
print '<div class="margintoponly"><input type="radio"'.$checked.' name="attachfile[]" value="'.$file['relativename'].'"> '.$file['relativename'].'</div>';
|
||||
print '</div>';
|
||||
}
|
||||
|
||||
@ -2525,13 +2525,14 @@ class FactureFournisseur extends CommonInvoice
|
||||
/**
|
||||
* Load an object from its id and create a new one in database
|
||||
*
|
||||
* @param User $user User that clone
|
||||
* @param int $fromid Id of object to clone
|
||||
* @param int $invertdetail Reverse sign of amounts for lines
|
||||
* @return int New id of clone
|
||||
*/
|
||||
public function createFromClone($fromid, $invertdetail = 0)
|
||||
public function createFromClone(User $user, $fromid, $invertdetail = 0)
|
||||
{
|
||||
global $user,$langs;
|
||||
global $langs;
|
||||
|
||||
$error=0;
|
||||
|
||||
@ -2545,13 +2546,13 @@ class FactureFournisseur extends CommonInvoice
|
||||
$object->statut=self::STATUS_DRAFT;
|
||||
|
||||
// Clear fields
|
||||
$object->ref_supplier=$langs->trans("CopyOf").' '.$object->ref_supplier;
|
||||
$object->ref_supplier = (empty($this->ref_supplier) ? $langs->trans("CopyOf").' '.$object->ref_supplier : $this->ref_supplier);
|
||||
$object->author = $user->id;
|
||||
$object->user_valid = '';
|
||||
$object->fk_facture_source = 0;
|
||||
$object->date_creation = '';
|
||||
$object->date_validation = '';
|
||||
$object->date = '';
|
||||
$object->date = (empty($this->date) ? '' : $this->date);
|
||||
$object->date_echeance = '';
|
||||
$object->ref_client = '';
|
||||
$object->close_code = '';
|
||||
|
||||
@ -101,6 +101,7 @@ $result = restrictedArea($user, 'fournisseur', $id, 'facture_fourn', 'facture',
|
||||
$permissionnote=$user->rights->fournisseur->facture->creer; // Used by the include of actions_setnotes.inc.php
|
||||
$permissiondellink=$user->rights->fournisseur->facture->creer; // Used by the include of actions_dellink.inc.php
|
||||
$permissionedit=$user->rights->fournisseur->facture->creer; // Used by the include of actions_lineupdown.inc.php
|
||||
$permissiontoadd=$user->rights->fournisseur->facture->creer; // Used by the include of actions_addupdatedelete.inc.php
|
||||
|
||||
|
||||
/*
|
||||
@ -138,27 +139,25 @@ if (empty($reshook))
|
||||
}
|
||||
|
||||
// Action clone object
|
||||
if ($action == 'confirm_clone' && $confirm == 'yes')
|
||||
if ($action == 'confirm_clone' && $confirm == 'yes' && $permissiontoadd)
|
||||
{
|
||||
// if (1==0 && empty($_REQUEST["clone_content"]) && empty($_REQUEST["clone_receivers"]))
|
||||
// {
|
||||
// $mesg='<div class="error">'.$langs->trans("NoCloneOptionsSpecified").'</div>';
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
$result=$object->createFromClone($id);
|
||||
if ($result > 0)
|
||||
{
|
||||
header("Location: ".$_SERVER['PHP_SELF'].'?action=editref_supplier&id='.$result);
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
$langs->load("errors");
|
||||
setEventMessages($langs->trans($object->error), null, 'errors');
|
||||
$action='';
|
||||
}
|
||||
// }
|
||||
$objectutil = dol_clone($object, 1); // To avoid to denaturate loaded object when setting some properties for clone. We use native clone to keep this->db valid.
|
||||
|
||||
if (GETPOST('newsupplierref', 'alphanohtml')) $objectutil->ref_supplier = GETPOST('newsupplierref', 'alphanohtml');
|
||||
$objectutil->date = dol_mktime(12, 0, 0, GETPOST('newdatemonth', 'int'), GETPOST('newdateday', 'int'), GETPOST('newdateyear', 'int'));
|
||||
|
||||
$result=$objectutil->createFromClone($user, $id);
|
||||
if ($result > 0)
|
||||
{
|
||||
header("Location: ".$_SERVER['PHP_SELF'].'?id='.$result);
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
$langs->load("errors");
|
||||
setEventMessages($objectutil->error, $objectutil->errors, 'errors');
|
||||
$action='';
|
||||
}
|
||||
}
|
||||
|
||||
elseif ($action == 'confirm_valid' && $confirm == 'yes' &&
|
||||
@ -2228,11 +2227,11 @@ else
|
||||
{
|
||||
// Create an array for form
|
||||
$formquestion=array(
|
||||
//'text' => $langs->trans("ConfirmClone"),
|
||||
//array('type' => 'checkbox', 'name' => 'clone_content', 'label' => $langs->trans("CloneMainAttributes"), 'value' => 1)
|
||||
array('type' => 'text', 'name' => 'newsupplierref', 'label' => $langs->trans("RefSupplier"), 'value' => $langs->trans("CopyOf").' '.$object->ref_supplier),
|
||||
array('type' => 'date', 'name' => 'newdate', 'label' => $langs->trans("Date"), 'value' => dol_now())
|
||||
);
|
||||
// Paiement incomplet. On demande si motif = escompte ou autre
|
||||
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ToClone'), $langs->trans('ConfirmCloneInvoice', $object->ref), 'confirm_clone', $formquestion, 'yes', 1);
|
||||
// Ask confirmation to clone
|
||||
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ToClone'), $langs->trans('ConfirmCloneInvoice', $object->ref), 'confirm_clone', $formquestion, 'yes', 1, 250);
|
||||
}
|
||||
|
||||
// Confirmation de la validation
|
||||
|
||||
@ -64,7 +64,7 @@ llxHeader();
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print load_fiche_titre($langs->trans("IFTTTSetup"), $linkback, 'title_setup');
|
||||
|
||||
print $langs->trans("IFTTTDesc")."<br>\n";
|
||||
print '<span class="opacitymedium">'.$langs->trans("IFTTTDesc")."</span><br>\n";
|
||||
print "<br>\n";
|
||||
|
||||
print '<form name="apisetupform" action="'.$_SERVER["PHP_SELF"].'" method="post">';
|
||||
@ -91,7 +91,7 @@ print '<td>'.$langs->trans("IFTTT_DOLIBARR_ENDPOINT_SECUREKEY").'</td>';
|
||||
print '<td>';
|
||||
print '<input type="text" name="IFTTT_DOLIBARR_ENDPOINT_SECUREKEY" value="'.$conf->global->IFTTT_DOLIBARR_ENDPOINT_SECUREKEY.'">';
|
||||
print '</td>';
|
||||
print '<td>'.$langs->trans("DefineAValueOfYourChoice").'</td>';
|
||||
print '<td></td>';
|
||||
print '</tr>';
|
||||
|
||||
print '</table>';
|
||||
@ -113,10 +113,11 @@ $urlwithroot=$urlwithouturlroot.DOL_URL_ROOT; // This is to use external domain
|
||||
|
||||
// Show message
|
||||
$message='';
|
||||
$url=$urlwithroot.'/ifttt/index.php?securekey='.$conf->global->IFTTT_DOLIBARR_ENDPOINT_SECUREKEY;
|
||||
$url=$urlwithroot.'/public/ifttt/index.php?securekey='.$conf->global->IFTTT_DOLIBARR_ENDPOINT_SECUREKEY;
|
||||
$message.=$langs->trans("UrlForIFTTT").':<br>';
|
||||
$message.=img_picto('', 'object_globe.png').' '.$url;
|
||||
$message.=img_picto('', 'object_globe.png').' <input type="text" class="quatrevingtpercent" id="endpointforifttt" name="endpointforifttt" value="'.$url.'">';
|
||||
print $message;
|
||||
print ajax_autoselect("endpointforifttt");
|
||||
print '<br>';
|
||||
print '<br>';
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,8 +1,8 @@
|
||||
Software License Agreement
|
||||
==========================
|
||||
|
||||
CKEditor - The text editor for Internet - http://ckeditor.com
|
||||
Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
|
||||
CKEditor - The text editor for Internet - https://ckeditor.com/
|
||||
Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
|
||||
|
||||
Licensed under the terms of any of the following licenses at your
|
||||
choice:
|
||||
@ -37,7 +37,7 @@ done by developers outside of CKSource with their express permission.
|
||||
|
||||
The following libraries are included in CKEditor under the MIT license (see Appendix D):
|
||||
|
||||
* CKSource Samples Framework (included in the samples) - Copyright (c) 2014-2017, CKSource - Frederico Knabben.
|
||||
* CKSource Samples Framework (included in the samples) - Copyright (c) 2014-2019, CKSource - Frederico Knabben.
|
||||
* PicoModal (included in `samples/js/sf.js`) - Copyright (c) 2012 James Frasca.
|
||||
* CodeMirror (included in the samples) - Copyright (C) 2014 by Marijn Haverbeke <marijnh@gmail.com> and others.
|
||||
|
||||
|
||||
@ -1,82 +1,39 @@
|
||||
CKEditor 4 - Releases
|
||||
=====================
|
||||
CKEditor 4
|
||||
==========
|
||||
|
||||
## Releases Code
|
||||
Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
|
||||
http://ckeditor.com - See LICENSE.md for license information.
|
||||
|
||||
This repository contains the official release versions of [CKEditor](http://ckeditor.com).
|
||||
|
||||
There are four versions for each release — `standard-all`, `basic`, `standard`, and `full`.
|
||||
They differ in the number of plugins that are compiled into the main `ckeditor.js` file as well as the toolbar configuration.
|
||||
|
||||
See the [comparison](http://ckeditor.com/presets) of the `basic`, `standard`, and `full` installation presets for more details.
|
||||
|
||||
The `standard-all` build includes all official CKSource plugins with only those from the `standard` installation preset compiled into the `ckeditor.js` file and enabled in the configuration.
|
||||
|
||||
All versions available in this repository were built using [CKBuilder](http://ckeditor.com/builder), so they are optimized and ready to be used in a production environment.
|
||||
CKEditor is a text editor to be used inside web pages. It's not a replacement
|
||||
for desktop text editors like Word or OpenOffice, but a component to be used as
|
||||
part of web applications and websites.
|
||||
|
||||
## Documentation
|
||||
|
||||
Developer documentation for CKEditor is available online at: <http://docs.ckeditor.com>.
|
||||
The full editor documentation is available online at the following address:
|
||||
http://docs.ckeditor.com
|
||||
|
||||
## Installation
|
||||
|
||||
### Git clone
|
||||
Installing CKEditor is an easy task. Just follow these simple steps:
|
||||
|
||||
To install one of the available releases, just clone this repository and switch to the respective branch (see next section):
|
||||
1. **Download** the latest version from the CKEditor website:
|
||||
http://ckeditor.com. You should have already completed this step, but be
|
||||
sure you have the very latest version.
|
||||
2. **Extract** (decompress) the downloaded file into the root of your website.
|
||||
|
||||
git clone -b <release branch> git://github.com/ckeditor/ckeditor-releases.git
|
||||
|
||||
### Git submodule
|
||||
|
||||
If you are using git for your project and you want to integrate CKEditor, we recommend to add this repository as a
|
||||
[submodule](http://git-scm.com/book/en/Git-Tools-Submodules).
|
||||
|
||||
git submodule add -b <release branch> git://github.com/ckeditor/ckeditor-releases.git <clone dir>
|
||||
git commit -m "Added CKEditor submodule in <clone dir> directory."
|
||||
|
||||
### Using Package Managers
|
||||
|
||||
See the [Installing CKEditor with Package Managers](http://docs.ckeditor.com/#!/guide/dev_package_managers) article for more details about installing CKEditor with [Bower](http://bower.io/), [Composer](https://getcomposer.org/) and [npm](https://www.npmjs.com/).
|
||||
|
||||
## Repository Structure
|
||||
|
||||
### Branches
|
||||
|
||||
This repository contains the following branches:
|
||||
|
||||
- `master` and `latest` – the latest release of the `standard-all` preset (including betas).
|
||||
- `stable` – the latest stable release of the `standard-all` preset (non-beta).
|
||||
- `A.B.x` (e.g. `4.3.x`) – the latest release of the `standard-all` preset in the `A.B` branch.
|
||||
- `(basic|standard|full)/stable` – the latest stable release tag point (non-beta).
|
||||
- `(basic|standard|full)/latest` – the latest release tag point (including betas).
|
||||
- `(basic|standard|full)/A.B.x` (e.g. `basic/4.0.x`) – the latest releases in the `A.B` branch.
|
||||
|
||||
### Tags
|
||||
|
||||
**Since version 4.3.3** this repository uses the following tag naming rules:
|
||||
|
||||
- `x.y.z` – contains the `standard-all` editor build, e.g. `4.3.3`, `4.4.0` etc.
|
||||
- `(basic|standard|full)/x.y.z` – contains the editor build with a given preset, e.g. `basic/4.3.3`.
|
||||
|
||||
The version numbers follow the [Semantic Versioning 2.0.0](http://semver.org/) scheme.
|
||||
|
||||
Up to version **4.3.2** the tags were released in the following form `x.y[.z]/(basic|standard|full)`.
|
||||
For example: `4.0/basic`, `4.0.1/standard`. This convention was changed in CKEditor 4.3.3 to conform to the Semantic Versioning scheme.
|
||||
**Note:** CKEditor is by default installed in the `ckeditor` folder. You can
|
||||
place the files in whichever you want though.
|
||||
|
||||
## Checking Your Installation
|
||||
|
||||
The editor comes with a sample page that can be used to verify if the installation succeeded. Take a look at the `samples` directory.
|
||||
The editor comes with a few sample pages that can be used to verify that
|
||||
installation proceeded properly. Take a look at the `samples` directory.
|
||||
|
||||
To test your installation, just call the following page for your website:
|
||||
To test your installation, just call the following page at your website:
|
||||
|
||||
http://<your site>/<CKEditor installation path>/samples/index.html
|
||||
|
||||
For example:
|
||||
|
||||
http://www.example.com/ckeditor/samples/index.html
|
||||
|
||||
### License
|
||||
|
||||
Licensed under the GPL, LGPL, and MPL licenses, at your choice.
|
||||
|
||||
Please check the `LICENSE.md` file for more information about the license.
|
||||
@ -1,6 +1,6 @@
|
||||
/*
|
||||
Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
||||
*/
|
||||
(function(a){if("undefined"==typeof a)throw Error("jQuery should be loaded before CKEditor jQuery adapter.");if("undefined"==typeof CKEDITOR)throw Error("CKEditor should be loaded before CKEditor jQuery adapter.");CKEDITOR.config.jqueryOverrideVal="undefined"==typeof CKEDITOR.config.jqueryOverrideVal?!0:CKEDITOR.config.jqueryOverrideVal;a.extend(a.fn,{ckeditorGet:function(){var a=this.eq(0).data("ckeditorInstance");if(!a)throw"CKEditor is not initialized yet, use ckeditor() with a callback.";return a},
|
||||
ckeditor:function(g,d){if(!CKEDITOR.env.isCompatible)throw Error("The environment is incompatible.");if(!a.isFunction(g)){var m=d;d=g;g=m}var k=[];d=d||{};this.each(function(){var b=a(this),c=b.data("ckeditorInstance"),f=b.data("_ckeditorInstanceLock"),h=this,l=new a.Deferred;k.push(l.promise());if(c&&!f)g&&g.apply(c,[this]),l.resolve();else if(f)c.once("instanceReady",function(){setTimeout(function(){c.element?(c.element.$==h&&g&&g.apply(c,[h]),l.resolve()):setTimeout(arguments.callee,100)},0)},
|
||||
|
||||
190
htdocs/includes/ckeditor/ckeditor/build-config.js
Normal file
190
htdocs/includes/ckeditor/ckeditor/build-config.js
Normal file
@ -0,0 +1,190 @@
|
||||
/**
|
||||
* @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
|
||||
* For licensing, see LICENSE.md or https://ckeditor.com/license
|
||||
*/
|
||||
|
||||
/**
|
||||
* This file was added automatically by CKEditor builder.
|
||||
* You may re-use it at any time to build CKEditor again.
|
||||
*
|
||||
* If you would like to build CKEditor online again
|
||||
* (for example to upgrade), visit one the following links:
|
||||
*
|
||||
* (1) https://ckeditor.com/cke4/builder
|
||||
* Visit online builder to build CKEditor from scratch.
|
||||
*
|
||||
* (2) https://ckeditor.com/cke4/builder/c3fc0dcaa9c80d707aab3e60fdcddbfb
|
||||
* Visit online builder to build CKEditor, starting with the same setup as before.
|
||||
*
|
||||
* (3) https://ckeditor.com/cke4/builder/download/c3fc0dcaa9c80d707aab3e60fdcddbfb
|
||||
* Straight download link to the latest version of CKEditor (Optimized) with the same setup as before.
|
||||
*
|
||||
* NOTE:
|
||||
* This file is not used by CKEditor, you may remove it.
|
||||
* Changing this file will not change your CKEditor configuration.
|
||||
*/
|
||||
|
||||
var CKBUILDER_CONFIG = {
|
||||
skin: 'moono-lisa',
|
||||
preset: 'full',
|
||||
ignore: [
|
||||
'.DS_Store',
|
||||
'.bender',
|
||||
'.editorconfig',
|
||||
'.gitattributes',
|
||||
'.gitignore',
|
||||
'.idea',
|
||||
'.jscsrc',
|
||||
'.jshintignore',
|
||||
'.jshintrc',
|
||||
'.mailmap',
|
||||
'.npm',
|
||||
'.travis.yml',
|
||||
'bender-err.log',
|
||||
'bender-out.log',
|
||||
'bender.ci.js',
|
||||
'bender.js',
|
||||
'dev',
|
||||
'gruntfile.js',
|
||||
'less',
|
||||
'node_modules',
|
||||
'package.json',
|
||||
'tests'
|
||||
],
|
||||
plugins : {
|
||||
'a11yhelp' : 1,
|
||||
'about' : 1,
|
||||
'basicstyles' : 1,
|
||||
'bidi' : 1,
|
||||
'blockquote' : 1,
|
||||
'clipboard' : 1,
|
||||
'colorbutton' : 1,
|
||||
'colordialog' : 1,
|
||||
'contextmenu' : 1,
|
||||
'copyformatting' : 1,
|
||||
'dialogadvtab' : 1,
|
||||
'div' : 1,
|
||||
'elementspath' : 1,
|
||||
'enterkey' : 1,
|
||||
'entities' : 1,
|
||||
'filebrowser' : 1,
|
||||
'find' : 1,
|
||||
'flash' : 1,
|
||||
'floatingspace' : 1,
|
||||
'font' : 1,
|
||||
'format' : 1,
|
||||
'forms' : 1,
|
||||
'horizontalrule' : 1,
|
||||
'htmlwriter' : 1,
|
||||
'iframe' : 1,
|
||||
'image' : 1,
|
||||
'indentblock' : 1,
|
||||
'indentlist' : 1,
|
||||
'justify' : 1,
|
||||
'language' : 1,
|
||||
'link' : 1,
|
||||
'list' : 1,
|
||||
'liststyle' : 1,
|
||||
'magicline' : 1,
|
||||
'maximize' : 1,
|
||||
'newpage' : 1,
|
||||
'pagebreak' : 1,
|
||||
'pastefromword' : 1,
|
||||
'pastetext' : 1,
|
||||
'preview' : 1,
|
||||
'print' : 1,
|
||||
'removeformat' : 1,
|
||||
'resize' : 1,
|
||||
'save' : 1,
|
||||
'scayt' : 1,
|
||||
'selectall' : 1,
|
||||
'showblocks' : 1,
|
||||
'showborders' : 1,
|
||||
'smiley' : 1,
|
||||
'sourcearea' : 1,
|
||||
'specialchar' : 1,
|
||||
'stylescombo' : 1,
|
||||
'tab' : 1,
|
||||
'table' : 1,
|
||||
'tableselection' : 1,
|
||||
'tabletools' : 1,
|
||||
'templates' : 1,
|
||||
'toolbar' : 1,
|
||||
'undo' : 1,
|
||||
'uploadimage' : 1,
|
||||
'wsc' : 1,
|
||||
'wysiwygarea' : 1
|
||||
},
|
||||
languages : {
|
||||
'af' : 1,
|
||||
'ar' : 1,
|
||||
'az' : 1,
|
||||
'bg' : 1,
|
||||
'bn' : 1,
|
||||
'bs' : 1,
|
||||
'ca' : 1,
|
||||
'cs' : 1,
|
||||
'cy' : 1,
|
||||
'da' : 1,
|
||||
'de' : 1,
|
||||
'de-ch' : 1,
|
||||
'el' : 1,
|
||||
'en' : 1,
|
||||
'en-au' : 1,
|
||||
'en-ca' : 1,
|
||||
'en-gb' : 1,
|
||||
'eo' : 1,
|
||||
'es' : 1,
|
||||
'es-mx' : 1,
|
||||
'et' : 1,
|
||||
'eu' : 1,
|
||||
'fa' : 1,
|
||||
'fi' : 1,
|
||||
'fo' : 1,
|
||||
'fr' : 1,
|
||||
'fr-ca' : 1,
|
||||
'gl' : 1,
|
||||
'gu' : 1,
|
||||
'he' : 1,
|
||||
'hi' : 1,
|
||||
'hr' : 1,
|
||||
'hu' : 1,
|
||||
'id' : 1,
|
||||
'is' : 1,
|
||||
'it' : 1,
|
||||
'ja' : 1,
|
||||
'ka' : 1,
|
||||
'km' : 1,
|
||||
'ko' : 1,
|
||||
'ku' : 1,
|
||||
'lt' : 1,
|
||||
'lv' : 1,
|
||||
'mk' : 1,
|
||||
'mn' : 1,
|
||||
'ms' : 1,
|
||||
'nb' : 1,
|
||||
'nl' : 1,
|
||||
'no' : 1,
|
||||
'oc' : 1,
|
||||
'pl' : 1,
|
||||
'pt' : 1,
|
||||
'pt-br' : 1,
|
||||
'ro' : 1,
|
||||
'ru' : 1,
|
||||
'si' : 1,
|
||||
'sk' : 1,
|
||||
'sl' : 1,
|
||||
'sq' : 1,
|
||||
'sr' : 1,
|
||||
'sr-latn' : 1,
|
||||
'sv' : 1,
|
||||
'th' : 1,
|
||||
'tr' : 1,
|
||||
'tt' : 1,
|
||||
'ug' : 1,
|
||||
'uk' : 1,
|
||||
'vi' : 1,
|
||||
'zh' : 1,
|
||||
'zh-cn' : 1
|
||||
}
|
||||
};
|
||||
2326
htdocs/includes/ckeditor/ckeditor/ckeditor.js
vendored
2326
htdocs/includes/ckeditor/ckeditor/ckeditor.js
vendored
File diff suppressed because one or more lines are too long
@ -1,38 +1,10 @@
|
||||
/**
|
||||
* @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
|
||||
* For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
* @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
|
||||
* For licensing, see https://ckeditor.com/legal/ckeditor-oss-license
|
||||
*/
|
||||
|
||||
CKEDITOR.editorConfig = function( config ) {
|
||||
// Define changes to default configuration here.
|
||||
// For complete reference see:
|
||||
// http://docs.ckeditor.com/#!/api/CKEDITOR.config
|
||||
|
||||
// The toolbar groups arrangement, optimized for two toolbar rows.
|
||||
config.toolbarGroups = [
|
||||
{ name: 'clipboard', groups: [ 'clipboard', 'undo' ] },
|
||||
{ name: 'editing', groups: [ 'find', 'selection', 'spellchecker' ] },
|
||||
{ name: 'links' },
|
||||
{ name: 'insert' },
|
||||
{ name: 'forms' },
|
||||
{ name: 'tools' },
|
||||
{ name: 'document', groups: [ 'mode', 'document', 'doctools' ] },
|
||||
{ name: 'others' },
|
||||
'/',
|
||||
{ name: 'basicstyles', groups: [ 'basicstyles', 'cleanup' ] },
|
||||
{ name: 'paragraph', groups: [ 'list', 'indent', 'blocks', 'align', 'bidi' ] },
|
||||
{ name: 'styles' },
|
||||
{ name: 'colors' },
|
||||
{ name: 'about' }
|
||||
];
|
||||
|
||||
// Remove some buttons provided by the standard plugins, which are
|
||||
// not needed in the Standard(s) toolbar.
|
||||
config.removeButtons = 'Underline,Subscript,Superscript';
|
||||
|
||||
// Set the most common block elements.
|
||||
config.format_tags = 'p;h1;h2;h3;pre';
|
||||
|
||||
// Simplify the dialog windows.
|
||||
config.removeDialogTabs = 'image:advanced;link:advanced';
|
||||
};
|
||||
// Define changes to default configuration here. For example:
|
||||
// config.language = 'fr';
|
||||
// config.uiColor = '#AADC6E';
|
||||
};
|
||||
@ -1,21 +1,22 @@
|
||||
/*
|
||||
Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
||||
*/
|
||||
|
||||
body
|
||||
{
|
||||
/* Font */
|
||||
font-family: sans-serif, Arial, Verdana, "Trebuchet MS";
|
||||
/* Emoji fonts are added to visualise them nicely in Internet Explorer. */
|
||||
font-family: sans-serif, Arial, Verdana, "Trebuchet MS", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
|
||||
font-size: 12px;
|
||||
|
||||
/* Text color */
|
||||
color: #333;
|
||||
|
||||
/* Remove the background color to make it transparent */
|
||||
/* Remove the background color to make it transparent. */
|
||||
background-color: #fff;
|
||||
|
||||
margin: 5px; /* @CHANGE DOL_LDR */
|
||||
margin: 5px;
|
||||
}
|
||||
|
||||
.cke_editable
|
||||
@ -60,7 +61,7 @@ ol,ul,dl
|
||||
{
|
||||
/* IE7: reset rtl list margin. (#7334) */
|
||||
*margin-right: 0px;
|
||||
/* preserved spaces for list items with text direction other than the list. (#6249,#8049)*/
|
||||
/* Preserved spaces for list items with text direction different than the list. (#6249,#8049)*/
|
||||
padding: 0 40px;
|
||||
}
|
||||
|
||||
@ -113,8 +114,7 @@ span[lang]
|
||||
figure
|
||||
{
|
||||
text-align: center;
|
||||
border: solid 1px #ccc;
|
||||
border-radius: 2px;
|
||||
outline: solid 1px #ccc;
|
||||
background: rgba(0,0,0,0.05);
|
||||
padding: 10px;
|
||||
margin: 10px 20px;
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
5
htdocs/includes/ckeditor/ckeditor/lang/es-mx.js
Normal file
5
htdocs/includes/ckeditor/ckeditor/lang/es-mx.js
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user