Merge remote-tracking branch 'Upstream/develop' into develop-ER_project
This commit is contained in:
commit
c502dabd76
@ -1,10 +1,10 @@
|
||||
<?php
|
||||
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
|
||||
* Copyright (C) 2013-2014 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
||||
* Copyright (C) 2013-2015 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
||||
* Copyright (C) 2014 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.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,8 +48,8 @@ $list = array (
|
||||
'ACCOUNTING_SELL_JOURNAL',
|
||||
'ACCOUNTING_PURCHASE_JOURNAL',
|
||||
'ACCOUNTING_SOCIAL_JOURNAL',
|
||||
'ACCOUNTING_CASH_JOURNAL',
|
||||
'ACCOUNTING_MISCELLANEOUS_JOURNAL'
|
||||
'ACCOUNTING_MISCELLANEOUS_JOURNAL',
|
||||
'ACCOUNTING_EXPENSEREPORT_JOURNAL'
|
||||
);
|
||||
|
||||
/*
|
||||
|
||||
@ -543,7 +543,7 @@ if ($action == 'edit' || $action == 'updateedit')
|
||||
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td width="35%"><label for="fiscalmonthstart">'.$langs->trans("FiscalMonthStart").'</label></td><td>';
|
||||
print $formother->select_month($conf->global->SOCIETE_FISCAL_MONTH_START,'fiscalmonthstart',1) . '</td></tr>';
|
||||
print $formother->select_month($conf->global->SOCIETE_FISCAL_MONTH_START,'fiscalmonthstart',0,1) . '</td></tr>';
|
||||
|
||||
print "</table>";
|
||||
|
||||
|
||||
@ -1539,7 +1539,7 @@ class Commande extends CommonOrder
|
||||
|
||||
if ($this->statut == self::STATUS_DRAFT) $this->brouillon = 1;
|
||||
|
||||
// Retreive all extrafield for invoice
|
||||
// Retrieve all extrafields for invoice
|
||||
// fetch optionals attributes and labels
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
|
||||
$extrafields=new ExtraFields($this->db);
|
||||
|
||||
@ -37,8 +37,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/contract.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/modules/contract/modules_contract.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formfile.class.php';
|
||||
if (! empty($conf->produit->enabled) || ! empty($conf->service->enabled)) require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
|
||||
if (! empty($conf->propal->enabled)) require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php';
|
||||
if (! empty($conf->projet->enabled)) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
|
||||
@ -1279,9 +1279,7 @@ else
|
||||
* Lines of contracts
|
||||
*/
|
||||
|
||||
if ($conf->product->enabled || $conf->service->enabled) {
|
||||
$productstatic=new Product($db);
|
||||
}
|
||||
$productstatic=new Product($db);
|
||||
|
||||
$usemargins=0;
|
||||
if (! empty($conf->margin->enabled) && ! empty($object->element) && in_array($object->element,array('facture','propal','commande'))) $usemargins=1;
|
||||
@ -1343,19 +1341,28 @@ else
|
||||
$productstatic->id=$objp->fk_product;
|
||||
$productstatic->type=$objp->ptype;
|
||||
$productstatic->ref=$objp->pref;
|
||||
print $productstatic->getNomUrl(1,'',20);
|
||||
$text = $productstatic->getNomUrl(1,'',20);
|
||||
if ($objp->label)
|
||||
{
|
||||
print ' - ';
|
||||
$text .= ' - ';
|
||||
$productstatic->ref=$objp->label;
|
||||
print $productstatic->getNomUrl(0,'',16);
|
||||
$text .= $productstatic->getNomUrl(0,'',16);
|
||||
}
|
||||
if (! empty($conf->global->PRODUIT_DESC_IN_FORM) && !empty($objp->description))
|
||||
print '<br>'.dol_nl2br($objp->description);
|
||||
$description = $objp->description;
|
||||
|
||||
// Add description in form
|
||||
if (! empty($conf->global->PRODUIT_DESC_IN_FORM))
|
||||
{
|
||||
$text .= (! empty($objp->description) && $objp->description!=$objp->product_label)?'<br>'.dol_htmlentitiesbr($objp->description):'';
|
||||
$description = ''; // Already added into main visible desc
|
||||
}
|
||||
|
||||
echo $form->textwithtooltip($text,$description,3,'','',$cursorline,0,(!empty($line->fk_parent_line)?img_picto('', 'rightarrow'):''));
|
||||
|
||||
print '</td>';
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
print '<td>'.dol_htmlentitiesbr($objp->description)."</td>\n";
|
||||
}
|
||||
// TVA
|
||||
|
||||
@ -237,8 +237,8 @@ class Contrat extends CommonObject
|
||||
/**
|
||||
* Activate a contract line
|
||||
*
|
||||
* @param User $user Objet User qui active le contrat
|
||||
* @param int $line_id Id de la ligne de detail a activer
|
||||
* @param User $user Objet User who activate contract
|
||||
* @param int $line_id Id of line to activate
|
||||
* @param int $date Date d'ouverture
|
||||
* @param int|string $date_end Date fin prevue
|
||||
* @param string $comment A comment typed by user
|
||||
@ -284,9 +284,9 @@ class Contrat extends CommonObject
|
||||
/**
|
||||
* Close a contract line
|
||||
*
|
||||
* @param User $user Objet User qui active le contrat
|
||||
* @param int $line_id Id de la ligne de detail a activer
|
||||
* @param int $date_end Date fin
|
||||
* @param User $user Objet User who close contract
|
||||
* @param int $line_id Id of line to close
|
||||
* @param int $date_end Date end
|
||||
* @param string $comment A comment typed by user
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
@ -576,7 +576,7 @@ class Contrat extends CommonObject
|
||||
$result=$this->fetch_lines();
|
||||
if ($result < 0)
|
||||
{
|
||||
$this->error=$this->db->error();
|
||||
$this->error=$this->db->lasterror();
|
||||
return -3;
|
||||
}
|
||||
|
||||
@ -599,7 +599,7 @@ class Contrat extends CommonObject
|
||||
}
|
||||
|
||||
/**
|
||||
* Load lignes array into this->lines
|
||||
* Load lines array into this->lines
|
||||
*
|
||||
* @return ContratLigne[] Return array of contract lines
|
||||
*/
|
||||
@ -624,7 +624,7 @@ class Contrat extends CommonObject
|
||||
$this->lines=array();
|
||||
|
||||
// Selectionne les lignes contrats liees a un produit
|
||||
$sql = "SELECT p.label, p.description as product_desc, p.ref,";
|
||||
$sql = "SELECT p.label as product_label, p.description as product_desc, p.ref as product_ref,";
|
||||
$sql.= " d.rowid, d.fk_contrat, d.statut, d.description, d.price_ht, d.tva_tx, d.localtax1_tx, d.localtax2_tx, d.qty, d.remise_percent, d.subprice, d.fk_product_fournisseur_price as fk_fournprice, d.buy_price_ht as pa_ht,";
|
||||
$sql.= " d.total_ht,";
|
||||
$sql.= " d.total_tva,";
|
||||
@ -684,10 +684,12 @@ class Contrat extends CommonObject
|
||||
$line->fk_user_cloture = $objp->fk_user_cloture;
|
||||
$line->fk_unit = $objp->fk_unit;
|
||||
|
||||
$line->ref = $objp->ref;
|
||||
$line->libelle = $objp->label; // Label produit
|
||||
$line->label = $objp->label; // For backward compatibility
|
||||
$line->product_desc = $objp->product_desc; // Description produit
|
||||
$line->ref = $objp->product_ref; // deprecated
|
||||
$line->label = $objp->product_label; // deprecated
|
||||
$line->libelle = $objp->product_label; // deprecated
|
||||
$line->product_ref = $objp->product_ref; // Ref product
|
||||
$line->product_desc = $objp->product_desc; // Description product
|
||||
$line->product_label = $objp->product_label; // Label product
|
||||
|
||||
$line->description = $objp->description;
|
||||
|
||||
@ -2339,7 +2341,10 @@ class ContratLigne extends CommonObjectLine
|
||||
$sql.= " t.fk_contrat,";
|
||||
$sql.= " t.fk_product,";
|
||||
$sql.= " t.statut,";
|
||||
$sql.= " t.label,";
|
||||
$sql.= " t.label,"; // This field is not used. Only label of product
|
||||
$sql.= " p.ref as product_ref,";
|
||||
$sql.= " p.label as product_label,";
|
||||
$sql.= " p.description as product_desc,";
|
||||
$sql.= " t.description,";
|
||||
$sql.= " t.date_commande,";
|
||||
$sql.= " t.date_ouverture_prevue as date_ouverture_prevue,";
|
||||
@ -2368,7 +2373,7 @@ class ContratLigne extends CommonObjectLine
|
||||
$sql.= " t.fk_user_cloture,";
|
||||
$sql.= " t.commentaire,";
|
||||
$sql.= " t.fk_unit";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."contratdet as t";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."contratdet as t LEFT JOIN ".MAIN_DB_PREFIX."product as p ON p.rowid = t.fk_product";
|
||||
if ($id) $sql.= " WHERE t.rowid = ".$id;
|
||||
if ($ref) $sql.= " WHERE t.rowid = '".$this->db->escape($ref)."'";
|
||||
|
||||
@ -2387,7 +2392,10 @@ class ContratLigne extends CommonObjectLine
|
||||
$this->fk_contrat = $obj->fk_contrat;
|
||||
$this->fk_product = $obj->fk_product;
|
||||
$this->statut = $obj->statut;
|
||||
$this->label = $obj->label;
|
||||
$this->product_ref = $obj->product_ref;
|
||||
$this->product_label = $obj->product_label;
|
||||
$this->product_description = $obj->product_description;
|
||||
$this->label = $obj->label; // deprecated. We do not use this field. Only ref and label of product, and description of contract line
|
||||
$this->description = $obj->description;
|
||||
$this->date_commande = $this->db->jdate($obj->date_commande);
|
||||
$this->date_ouverture_prevue = $this->db->jdate($obj->date_ouverture_prevue);
|
||||
|
||||
@ -107,7 +107,7 @@ class ExtraFields
|
||||
* @param string $label label of attribute
|
||||
* @param int $type Type of attribute ('int', 'text', 'varchar', 'date', 'datehour')
|
||||
* @param int $pos Position of attribute
|
||||
* @param int $size Size/length of attribute
|
||||
* @param string $size Size/length of attribute
|
||||
* @param string $elementtype Element type ('member', 'product', 'thirdparty', ...)
|
||||
* @param int $unique Is field unique or not
|
||||
* @param int $required Is field required or not
|
||||
@ -128,7 +128,7 @@ class ExtraFields
|
||||
// Create field into database except for separator type which is not stored in database
|
||||
if ($type != 'separate')
|
||||
{
|
||||
$result=$this->create($attrname,$type,$size,$elementtype, $unique, $required, $default_value, $param, $perms, $list);
|
||||
$result=$this->create($attrname, $type, $size, $elementtype, $unique, $required, $default_value, $param, $perms, $list);
|
||||
}
|
||||
$err1=$this->errno;
|
||||
if ($result > 0 || $err1 == 'DB_ERROR_COLUMN_ALREADY_EXISTS' || $type == 'separate')
|
||||
@ -156,7 +156,7 @@ class ExtraFields
|
||||
*
|
||||
* @param string $attrname code of attribute
|
||||
* @param int $type Type of attribute ('int', 'text', 'varchar', 'date', 'datehour')
|
||||
* @param int $length Size/length of attribute
|
||||
* @param string $length Size/length of attribute ('5', '24,8', ...)
|
||||
* @param string $elementtype Element type ('member', 'product', 'thirdparty', 'contact', ...)
|
||||
* @param int $unique Is field unique or not
|
||||
* @param int $required Is field required or not
|
||||
@ -233,7 +233,7 @@ class ExtraFields
|
||||
* @param string $label label of attribute
|
||||
* @param int $type Type of attribute ('int', 'text', 'varchar', 'date', 'datehour', 'float')
|
||||
* @param int $pos Position of attribute
|
||||
* @param int $size Size/length of attribute
|
||||
* @param string $size Size/length of attribute ('5', '24,8', ...)
|
||||
* @param string $elementtype Element type ('member', 'product', 'thirdparty', ...)
|
||||
* @param int $unique Is field unique or not
|
||||
* @param int $required Is field required or not
|
||||
|
||||
@ -773,20 +773,22 @@ class FormOther
|
||||
}
|
||||
|
||||
/**
|
||||
* Return HTML combo list of month
|
||||
* Return HTML combo list of month
|
||||
*
|
||||
* @param string $selected Preselected value
|
||||
* @param string $htmlname Nom de la zone select
|
||||
* @param int $useempty Affiche valeur vide dans liste
|
||||
* @return string
|
||||
* @param string $selected Preselected value
|
||||
* @param string $htmlname Name of HTML select object
|
||||
* @param int $useempty Show empty in list
|
||||
* @param int $longlabel Show long label
|
||||
* @return string
|
||||
*/
|
||||
function select_month($selected='',$htmlname='monthid',$useempty=0)
|
||||
function select_month($selected='',$htmlname='monthid',$useempty=0,$longlabel=0)
|
||||
{
|
||||
global $langs;
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||
|
||||
$montharray = monthArray($langs, 1); // Get array
|
||||
if ($longlabel) $montharray = monthArray($langs, 0); // Get array
|
||||
else $montharray = monthArray($langs, 1);
|
||||
|
||||
$select_month = '<select class="flat" name="'.$htmlname.'" id="'.$htmlname.'">';
|
||||
if ($useempty)
|
||||
|
||||
@ -30,6 +30,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/modules/contract/modules_contract.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
|
||||
|
||||
|
||||
/**
|
||||
@ -253,6 +254,7 @@ class pdf_strato extends ModelePDFContract
|
||||
$objectligne = $object->lines[$i];
|
||||
|
||||
$valide = $objectligne->id ? $objectligne->fetch($objectligne->id) : 0;
|
||||
|
||||
if ($valide > 0 || $object->specimen)
|
||||
{
|
||||
$curX = $this->posxdesc-1;
|
||||
@ -278,12 +280,20 @@ class pdf_strato extends ModelePDFContract
|
||||
$durationi = $langs->trans("Unknown");
|
||||
}
|
||||
|
||||
$txtpredefinedservice='';
|
||||
$txtpredefinedservice = $objectligne->product_ref;
|
||||
if ($objectligne->product_label)
|
||||
{
|
||||
$txtpredefinedservice .= ' - ';
|
||||
$txtpredefinedservice .= $objectligne->product_label;
|
||||
}
|
||||
|
||||
$txt='<strong>'.dol_htmlentitiesbr($outputlangs->transnoentities("Date")." : ".$datei." - ".$outputlangs->transnoentities("Duration")." : ".$durationi,1,$outputlangs->charset_output).'</strong>';
|
||||
$desc=dol_htmlentitiesbr($objectligne->desc,1);
|
||||
|
||||
$pdf->writeHTMLCell(0, 0, $curX, $curY, dol_concatdesc($txt,$desc), 0, 1, 0);
|
||||
$pdf->writeHTMLCell(0, 0, $curX, $curY, dol_concatdesc($txt,dol_concatdesc($txtpredefinedservice,$desc)), 0, 1, 0);
|
||||
|
||||
$nexY = $pdf->GetY();
|
||||
$nexY = $pdf->GetY() + 2;
|
||||
$pageposafter=$pdf->getPage();
|
||||
$pdf->setPage($pageposbefore);
|
||||
$pdf->setTopMargin($this->marge_haute);
|
||||
|
||||
@ -69,7 +69,7 @@ class modAccounting extends DolibarrModules
|
||||
$this->requiredby = array(); // List of modules id to disable if this one is disabled
|
||||
$this->conflictwith = array("modComptabilite"); // List of modules are in conflict with this module
|
||||
$this->phpmin = array(5, 3); // Minimum version of PHP required by module
|
||||
$this->need_dolibarr_version = array(3, 6); // Minimum version of Dolibarr required by module
|
||||
$this->need_dolibarr_version = array(3, 7); // Minimum version of Dolibarr required by module
|
||||
$this->langfiles = array("accountancy");
|
||||
|
||||
// Constants
|
||||
@ -191,6 +191,11 @@ class modAccounting extends DolibarrModules
|
||||
"yesno",
|
||||
"1"
|
||||
);
|
||||
$this->const[22] = array(
|
||||
"ACCOUNTING_EXPENSEREPORT_JOURNAL",
|
||||
"chaine",
|
||||
"ER"
|
||||
);
|
||||
|
||||
// Tabs
|
||||
$this->tabs = array();
|
||||
|
||||
@ -292,11 +292,9 @@ class modProjet extends DolibarrModules
|
||||
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'projet_extrafields as extra ON p.rowid = extra.fk_object';
|
||||
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX."projet_task as pt ON p.rowid = pt.fk_projet";
|
||||
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'projet_task_extrafields as extra2 ON pt.rowid = extra2.fk_object';
|
||||
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX."projet_task_time as ptt ON pt.rowid = ptt.fk_task,";
|
||||
$this->export_sql_end[$r] .=' '.MAIN_DB_PREFIX.'societe as s';
|
||||
$this->export_sql_end[$r] .=' WHERE p.fk_soc = s.rowid';
|
||||
$this->export_sql_end[$r] .=' AND p.entity IN ('.getEntity('project',1).')';
|
||||
|
||||
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX."projet_task_time as ptt ON pt.rowid = ptt.fk_task";
|
||||
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'societe as s ON p.fk_soc = s.rowid';
|
||||
$this->export_sql_end[$r] .=' WHERE p.entity = '.$conf->entity;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
|
||||
* Copyright (C) 2015 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -164,7 +165,7 @@ if ($action == 'update' && $user->rights->expensereport->creer)
|
||||
$result = $object->update($user);
|
||||
if ($result > 0)
|
||||
{
|
||||
header("Location: ".$_SEVER["PHP_SELF"]."?id=".$_POST['id']);
|
||||
header("Location: ".$_SERVER["PHP_SELF"]."?id=".$_POST['id']);
|
||||
exit;
|
||||
}
|
||||
else
|
||||
@ -217,7 +218,7 @@ if ($action == "confirm_save" && GETPOST("confirm") == "yes" && $id > 0 && $user
|
||||
$subject = $langs->trans("ExpenseReportWaitingForApproval");
|
||||
|
||||
// CONTENT
|
||||
$link = $urlwithroot.'/expenserecord/card.php?id='.$object->id;
|
||||
$link = $urlwithroot.'/expensereport/card.php?id='.$object->id;
|
||||
$message = $langs->trans("ExpenseReportWaitingForApprovalMessage", $expediteur->getFullName($langs), get_date_range($object->date_debut,$object->date_fin,'',$langs), $link);
|
||||
|
||||
// Rebuild pdf
|
||||
@ -244,7 +245,7 @@ if ($action == "confirm_save" && GETPOST("confirm") == "yes" && $id > 0 && $user
|
||||
{
|
||||
$mesg=$langs->trans('MailSuccessfulySent',$mailfile->getValidAddress($emailFrom,2),$mailfile->getValidAddress($emailTo,2));
|
||||
setEventMessage($mesg);
|
||||
header("Location: ".$_SEVER["PHP_SELF"]."?id=".$id);
|
||||
header("Location: ".$_SERVER["PHP_SELF"]."?id=".$id);
|
||||
exit;
|
||||
}
|
||||
else
|
||||
@ -349,7 +350,7 @@ if ($action == "confirm_save_from_refuse" && GETPOST("confirm") == "yes" && $id
|
||||
// SEND
|
||||
$result=$mailfile->sendfile();
|
||||
if ($result):
|
||||
Header("Location: ".$_SEVER["PHP_SELF"]."?id=".$id);
|
||||
Header("Location: ".$_SERVER["PHP_SELF"]."?id=".$id);
|
||||
exit;
|
||||
endif;
|
||||
|
||||
@ -454,7 +455,7 @@ if ($action == "confirm_approve" && GETPOST("confirm") == "yes" && $id > 0 && $u
|
||||
$result=$mailfile->sendfile();
|
||||
if ($result):
|
||||
setEventMessage($langs->trans("MailSuccessfulySent",$emailFrom,$emailTo));
|
||||
Header("Location: ".$_SEVER["PHP_SELF"]."?id=".$id);
|
||||
Header("Location: ".$_SERVER["PHP_SELF"]."?id=".$id);
|
||||
exit;
|
||||
else:
|
||||
setEventMessage($langs->trans("ErrorFailedToSendMail",$emailFrom,$emailTo),'errors');
|
||||
@ -540,7 +541,7 @@ if ($action == "confirm_refuse" && GETPOST('confirm')=="yes" && $id > 0 && $user
|
||||
if ($result)
|
||||
{
|
||||
setEventMessage($langs->trans("MailSuccessfulySent",$emailFrom,$emailTo));
|
||||
Header("Location: ".$_SEVER["PHP_SELF"]."?id=".$id);
|
||||
Header("Location: ".$_SERVER["PHP_SELF"]."?id=".$id);
|
||||
exit;
|
||||
}
|
||||
else
|
||||
@ -624,7 +625,7 @@ if ($action == "confirm_cancel" && GETPOST('confirm')=="yes" && GETPOST('detail_
|
||||
$result=$mailfile->sendfile();
|
||||
if ($result)
|
||||
{
|
||||
header("Location: ".$_SEVER["PHP_SELF"]."?id=".$id);
|
||||
header("Location: ".$_SERVER["PHP_SELF"]."?id=".$id);
|
||||
exit;
|
||||
}
|
||||
else
|
||||
@ -793,7 +794,7 @@ if ($action == "confirm_brouillonner" && GETPOST('confirm')=="yes" && $id > 0 &&
|
||||
|
||||
if ($result > 0)
|
||||
{
|
||||
header("Location: ".$_SEVER["PHP_SELF"]."?id=".$id);
|
||||
header("Location: ".$_SERVER["PHP_SELF"]."?id=".$id);
|
||||
exit;
|
||||
}
|
||||
else
|
||||
@ -1324,27 +1325,27 @@ else
|
||||
dol_fiche_head($head, 'card', $langs->trans("TripCard"), 0, 'trip');
|
||||
|
||||
if ($action == 'save'):
|
||||
$ret=$form->form_confirm($_SEVER["PHP_SELF"]."?id=".$id,$langs->trans("SaveTrip"),$langs->trans("ConfirmSaveTrip"),"confirm_save","","",1);
|
||||
$ret=$form->form_confirm($_SERVER["PHP_SELF"]."?id=".$id,$langs->trans("SaveTrip"),$langs->trans("ConfirmSaveTrip"),"confirm_save","","",1);
|
||||
if ($ret == 'html') print '<br>';
|
||||
endif;
|
||||
|
||||
if ($action == 'save_from_refuse'):
|
||||
$ret=$form->form_confirm($_SEVER["PHP_SELF"]."?id=".$id,$langs->trans("SaveTrip"),$langs->trans("ConfirmSaveTrip"),"confirm_save_from_refuse","","",1);
|
||||
$ret=$form->form_confirm($_SERVER["PHP_SELF"]."?id=".$id,$langs->trans("SaveTrip"),$langs->trans("ConfirmSaveTrip"),"confirm_save_from_refuse","","",1);
|
||||
if ($ret == 'html') print '<br>';
|
||||
endif;
|
||||
|
||||
if ($action == 'delete'):
|
||||
$ret=$form->form_confirm($_SEVER["PHP_SELF"]."?id=".$id,$langs->trans("DeleteTrip"),$langs->trans("ConfirmDeleteTrip"),"confirm_delete","","",1);
|
||||
$ret=$form->form_confirm($_SERVER["PHP_SELF"]."?id=".$id,$langs->trans("DeleteTrip"),$langs->trans("ConfirmDeleteTrip"),"confirm_delete","","",1);
|
||||
if ($ret == 'html') print '<br>';
|
||||
endif;
|
||||
|
||||
if ($action == 'validate'):
|
||||
$ret=$form->form_confirm($_SEVER["PHP_SELF"]."?id=".$id,$langs->trans("ValideTrip"),$langs->trans("ConfirmValideTrip"),"confirm_approve","","",1);
|
||||
$ret=$form->form_confirm($_SERVER["PHP_SELF"]."?id=".$id,$langs->trans("ValideTrip"),$langs->trans("ConfirmValideTrip"),"confirm_approve","","",1);
|
||||
if ($ret == 'html') print '<br>';
|
||||
endif;
|
||||
|
||||
if ($action == 'paid'):
|
||||
$ret=$form->form_confirm($_SEVER["PHP_SELF"]."?id=".$id,$langs->trans("PaidTrip"),$langs->trans("ConfirmPaidTrip"),"confirm_paid","","",1);
|
||||
$ret=$form->form_confirm($_SERVER["PHP_SELF"]."?id=".$id,$langs->trans("PaidTrip"),$langs->trans("ConfirmPaidTrip"),"confirm_paid","","",1);
|
||||
if ($ret == 'html') print '<br>';
|
||||
endif;
|
||||
|
||||
@ -1356,20 +1357,20 @@ else
|
||||
}
|
||||
|
||||
if ($action == 'brouillonner'):
|
||||
$ret=$form->form_confirm($_SEVER["PHP_SELF"]."?id=".$id,$langs->trans("BrouillonnerTrip"),$langs->trans("ConfirmBrouillonnerTrip"),"confirm_brouillonner","","",1);
|
||||
$ret=$form->form_confirm($_SERVER["PHP_SELF"]."?id=".$id,$langs->trans("BrouillonnerTrip"),$langs->trans("ConfirmBrouillonnerTrip"),"confirm_brouillonner","","",1);
|
||||
if ($ret == 'html') print '<br>';
|
||||
endif;
|
||||
|
||||
if ($action == 'refuse') // Deny
|
||||
{
|
||||
$array_input = array('text'=>$langs->trans("ConfirmRefuseTrip"), array('type'=>"text",'label'=>$langs->trans("Comment"),'name'=>"detail_refuse",'size'=>"50",'value'=>""));
|
||||
$ret=$form->form_confirm($_SEVER["PHP_SELF"]."?id=".$id,$langs->trans("Deny"),'',"confirm_refuse",$array_input,"yes",1);
|
||||
$ret=$form->form_confirm($_SERVER["PHP_SELF"]."?id=".$id,$langs->trans("Deny"),'',"confirm_refuse",$array_input,"yes",1);
|
||||
if ($ret == 'html') print '<br>';
|
||||
}
|
||||
|
||||
if ($action == 'delete_line')
|
||||
{
|
||||
$ret=$form->form_confirm($_SEVER["PHP_SELF"]."?id=".$id."&rowid=".$_GET['rowid'],$langs->trans("DeleteLine"),$langs->trans("ConfirmDeleteLine"),"confirm_delete_line",'','yes',1);
|
||||
$ret=$form->form_confirm($_SERVER["PHP_SELF"]."?id=".$id."&rowid=".$_GET['rowid'],$langs->trans("DeleteLine"),$langs->trans("ConfirmDeleteLine"),"confirm_delete_line",'','yes',1);
|
||||
if ($ret == 'html') print '<br>';
|
||||
}
|
||||
|
||||
@ -1805,18 +1806,18 @@ if ($action != 'create' && $action != 'edit')
|
||||
if ($object->fk_user_author == $user->id)
|
||||
{
|
||||
// Modifier
|
||||
print '<a class="butAction" href="'.$_SEVER["PHP_SELF"].'?action=edit&id='.$id.'">'.$langs->trans('ModifyInfoGen').'</a>';
|
||||
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=edit&id='.$id.'">'.$langs->trans('Modify').'</a>';
|
||||
|
||||
// Validate
|
||||
if (count($object->lines) > 0 || count($object->lignes) > 0)
|
||||
{
|
||||
print '<a class="butAction" href="'.$_SEVER["PHP_SELF"].'?action=save&id='.$id.'">'.$langs->trans('ValidateAndSubmit').'</a>';
|
||||
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=save&id='.$id.'">'.$langs->trans('ValidateAndSubmit').'</a>';
|
||||
}
|
||||
|
||||
if ($user->rights->expensereport->supprimer)
|
||||
{
|
||||
// Supprimer
|
||||
print '<a class="butActionDelete" href="'.$_SEVER["PHP_SELF"].'?action=delete&id='.$id.'">'.$langs->trans('Delete').'</a>';
|
||||
print '<a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?action=delete&id='.$id.'">'.$langs->trans('Delete').'</a>';
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1831,12 +1832,12 @@ if ($action != 'create' && $action != 'edit')
|
||||
if ($user->id == $object->fk_user_author || $user->id == $object->fk_user_valid)
|
||||
{
|
||||
// Modifier
|
||||
print '<a class="butAction" href="'.$_SEVER["PHP_SELF"].'?action=edit&id='.$id.'">'.$langs->trans('ModifyInfoGen').'</a>';
|
||||
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=edit&id='.$id.'">'.$langs->trans('Modify').'</a>';
|
||||
|
||||
// Brouillonner (le statut refusée est identique à brouillon)
|
||||
//print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=brouillonner&id='.$id.'">'.$langs->trans('BROUILLONNER').'</a>';
|
||||
// Enregistrer depuis le statut "Refusée"
|
||||
print '<a class="butAction" href="'.$_SEVER["PHP_SELF"].'?action=save_from_refuse&id='.$id.'">'.$langs->trans('ValidateAndSubmit').'</a>';
|
||||
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=save_from_refuse&id='.$id.'">'.$langs->trans('ValidateAndSubmit').'</a>';
|
||||
|
||||
if ($user->rights->expensereport->supprimer)
|
||||
{
|
||||
|
||||
@ -1,6 +1,13 @@
|
||||
# Dolibarr language file - en_US - Accounting Expert
|
||||
CHARSET=UTF-8
|
||||
|
||||
ACCOUNTING_EXPORT_SEPARATORCSV=Column separator for export file
|
||||
ACCOUNTING_EXPORT_DATE=Date format for export file
|
||||
ACCOUNTING_EXPORT_PIECE=Export the number of piece ?
|
||||
ACCOUNTING_EXPORT_GLOBAL_ACCOUNT=Export with global account ?
|
||||
ACCOUNTING_EXPORT_LABEL=Export the label ?
|
||||
ACCOUNTING_EXPORT_AMOUNT=Export the amount ?
|
||||
ACCOUNTING_EXPORT_DEVISE=Export the devise ?
|
||||
|
||||
Accounting=Accounting
|
||||
Globalparameters=Global parameters
|
||||
Chartofaccounts=Chart of accounts
|
||||
@ -81,9 +88,8 @@ ACCOUNTING_LENGTH_AACCOUNT=Length of the third party accounts
|
||||
|
||||
ACCOUNTING_SELL_JOURNAL=Sell journal
|
||||
ACCOUNTING_PURCHASE_JOURNAL=Purchase journal
|
||||
ACCOUNTING_BANK_JOURNAL=Bank journal
|
||||
ACCOUNTING_CASH_JOURNAL=Cash journal
|
||||
ACCOUNTING_MISCELLANEOUS_JOURNAL=Miscellaneous journal
|
||||
ACCOUNTING_EXPENSEREPORT_JOURNAL=Expense report journal
|
||||
ACCOUNTING_SOCIAL_JOURNAL=Social journal
|
||||
|
||||
ACCOUNTING_ACCOUNT_TRANSFER_CASH=Account of transfer
|
||||
|
||||
@ -121,7 +121,7 @@ $thirdparty_fields= array(
|
||||
'vat_used' => array('name'=>'vat_used','type'=>'xsd:string'),
|
||||
'vat_number' => array('name'=>'vat_number','type'=>'xsd:string'));
|
||||
|
||||
//Retreive all extrafield for thirdsparty
|
||||
// Retrieve all extrafields for thirdsparty
|
||||
// fetch optionals attributes and labels
|
||||
$extrafields=new ExtraFields($db);
|
||||
$extralabels=$extrafields->fetch_name_optionals_label('societe',true);
|
||||
@ -329,7 +329,7 @@ function getThirdParty($authentication,$id='',$ref='',$ref_ext='')
|
||||
'note_private' => $thirdparty->note_private,
|
||||
'note_public' => $thirdparty->note_public);
|
||||
|
||||
//Retreive all extrafield for thirdsparty
|
||||
// Retrieve all extrafields for thirdsparty
|
||||
// fetch optionals attributes and labels
|
||||
$extrafields=new ExtraFields($db);
|
||||
$extralabels=$extrafields->fetch_name_optionals_label('societe',true);
|
||||
@ -445,7 +445,7 @@ function createThirdParty($authentication,$thirdparty)
|
||||
$newobject->canvas=$thirdparty['canvas'];
|
||||
$newobject->particulier=$thirdparty['individual'];
|
||||
|
||||
//Retreive all extrafield for thirdsparty
|
||||
// Retrieve all extrafields for thirdsparty
|
||||
// fetch optionals attributes and labels
|
||||
$extrafields=new ExtraFields($db);
|
||||
$extralabels=$extrafields->fetch_name_optionals_label('societe',true);
|
||||
@ -576,7 +576,7 @@ function updateThirdParty($authentication,$thirdparty)
|
||||
|
||||
$object->canvas=$thirdparty['canvas'];
|
||||
|
||||
//Retreive all extrafield for thirdsparty
|
||||
// Retrieve all extrafields for thirdsparty
|
||||
// fetch optionals attributes and labels
|
||||
$extrafields=new ExtraFields($db);
|
||||
$extralabels=$extrafields->fetch_name_optionals_label('societe',true);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user