Merge branch '13.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts: build/generate_filelist_xml.php htdocs/comm/propal/card.php htdocs/commande/card.php htdocs/compta/facture/card.php htdocs/core/class/commonobject.class.php htdocs/core/lib/modulebuilder.lib.php htdocs/fourn/commande/card.php htdocs/fourn/facture/card.php htdocs/supplier_proposal/card.php htdocs/ticket/list.php
This commit is contained in:
commit
42329b10c9
@ -52,6 +52,7 @@ if (empty($argv[1])) {
|
||||
print "Example: ".$script_file." release=6.0.0 includecustom=1 includeconstant=FR:INVOICE_CAN_ALWAYS_BE_REMOVED:0 includeconstant=all:MAILING_NO_USING_PHPMAIL:1\n";
|
||||
exit -1;
|
||||
}
|
||||
|
||||
parse_str($argv[1]);
|
||||
|
||||
$i=0;
|
||||
@ -60,9 +61,9 @@ while ($i < $argc) {
|
||||
parse_str($argv[$i]);
|
||||
}
|
||||
if (preg_match('/includeconstant=/', $argv[$i])) {
|
||||
$tmp=explode(':', $includeconstant, 3);
|
||||
$tmp=explode(':', $includeconstant, 3); // $includeconstant has been set with previous parse_str()
|
||||
if (count($tmp) != 3) {
|
||||
print "Error: Bad parameter includeconstant ".$includeconstant."\n";
|
||||
print "Error: Bad parameter includeconstant=".$includeconstant."\n";
|
||||
exit -1;
|
||||
}
|
||||
$includeconstants[$tmp[0]][$tmp[1]] = $tmp[2];
|
||||
@ -157,7 +158,7 @@ $iterator1 = new RecursiveIteratorIterator($dir_iterator1);
|
||||
$files = new RegexIterator($iterator1, '#^(?:[A-Z]:)?(?:/(?!(?:'.($includecustom?'':'custom\/|').'documents\/|conf\/|install\/))[^/]+)+/[^/]+\.(?:php|css|html|js|json|tpl|jpg|png|gif|sql|lang)$#i');
|
||||
*/
|
||||
$regextoinclude='\.(php|php3|php4|php5|phtml|phps|phar|inc|css|scss|html|xml|js|json|tpl|jpg|jpeg|png|gif|ico|sql|lang|txt|yml|md|mp3|mp4|wav|mkv|z|gz|zip|rar|tar|less|svg|eot|woff|woff2|ttf|manifest)$';
|
||||
$regextoexclude='('.($includecustom?'':'custom|').'documents|conf|install|public\/test|sabre\/sabre\/.*\/tests|Shared\/PCLZip|nusoap\/lib\/Mail|php\/example|php\/test|geoip\/sample.*\.php|ckeditor\/samples|ckeditor\/adapters)$'; // Exclude dirs
|
||||
$regextoexclude='('.($includecustom?'':'custom|').'documents|conf|install|dejavu-fonts-ttf-.*|public\/test|sabre\/sabre\/.*\/tests|Shared\/PCLZip|nusoap\/lib\/Mail|php\/example|php\/test|geoip\/sample.*\.php|ckeditor\/samples|ckeditor\/adapters)$'; // Exclude dirs
|
||||
$files = dol_dir_list(DOL_DOCUMENT_ROOT, 'files', 1, $regextoinclude, $regextoexclude, 'fullname');
|
||||
|
||||
$dir='';
|
||||
|
||||
@ -390,6 +390,9 @@ if ($nboftargetok) {
|
||||
$olddir=getcwd();
|
||||
chdir("$SOURCE");
|
||||
|
||||
print "Clean $SOURCE/htdocs\n";
|
||||
$ret=`rm -f $SOURCE/htdocs/includes/autoload.php`;
|
||||
|
||||
$ret=`git ls-files . --exclude-standard --others`;
|
||||
if ($ret)
|
||||
{
|
||||
@ -613,7 +616,6 @@ if ($nboftargetok) {
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/nnnick/chartjs/test`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/nusoap/lib/Mail`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/nusoap/samples`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/parsedown/LICENSE.txt`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/php-iban/docs`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/sabre/sabre/*/tests`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/stripe/tests`;
|
||||
@ -623,7 +625,6 @@ if ($nboftargetok) {
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/tcpdf/fonts/freefont-*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/tcpdf/fonts/ae_fonts_*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/tcpdf/fonts/utils`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/tcpdf/LICENSE.TXT`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/tcpdf/tools`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/vendor`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/webmozart`;
|
||||
|
||||
@ -88,7 +88,8 @@ $tables=array(
|
||||
'commande_fournisseur'=>array(0=>'date_commande', 1=>'date_valid', 3=>'date_creation', 4=>'date_approve', 5=>'date_approve2', 6=>'date_livraison'),
|
||||
'supplier_proposal'=>array(0=>'datec', 1=>'date_valid', 2=>'date_cloture'),
|
||||
'expensereport'=>array(0=>'date_debut', 1=>'date_fin', 2=>'date_create', 3=>'date_valid', 4=>'date_approve', 5=>'date_refuse', 6=>'date_cancel'),
|
||||
'holiday'=>array(0=>'date_debut', 1=>'date_fin', 2=>'date_create', 3=>'date_valid', 5=>'date_refuse', 6=>'date_cancel')
|
||||
'holiday'=>array(0=>'date_debut', 1=>'date_fin', 2=>'date_create', 3=>'date_valid', 5=>'date_refuse', 6=>'date_cancel'),
|
||||
'ticket'=>array(0=>'datec', 1=>'date_read', 2=>'date_close')
|
||||
);
|
||||
|
||||
$year=2010;
|
||||
|
||||
@ -1334,7 +1334,7 @@ if (empty($reshook)) {
|
||||
$result = $object->setMulticurrencyCode(GETPOST('multicurrency_code', 'alpha'));
|
||||
} elseif ($action == 'setmulticurrencyrate' && $usercancreate) {
|
||||
// Multicurrency rate
|
||||
$result = $object->setMulticurrencyRate(price2num(GETPOST('multicurrency_tx')));
|
||||
$result = $object->setMulticurrencyRate(price2num(GETPOST('multicurrency_tx')), GETPOST('calculation_mode', 'int'));
|
||||
} elseif ($action == 'setbankaccount' && $usercancreate) {
|
||||
// bank account
|
||||
$result = $object->setBankAccount(GETPOST('fk_account', 'int'));
|
||||
|
||||
@ -540,7 +540,7 @@ if (empty($reshook)) {
|
||||
$result = $object->setMulticurrencyCode(GETPOST('multicurrency_code', 'alpha'));
|
||||
} elseif ($action == 'setmulticurrencyrate' && $usercancreate) {
|
||||
// Multicurrency rate
|
||||
$result = $object->setMulticurrencyRate(price2num(GETPOST('multicurrency_tx')));
|
||||
$result = $object->setMulticurrencyRate(price2num(GETPOST('multicurrency_tx')), GETPOST('calculation_mode', 'int'));
|
||||
} elseif ($action == 'setavailability' && $usercancreate) {
|
||||
$result = $object->availability(GETPOST('availability_id'));
|
||||
if ($result < 0) {
|
||||
|
||||
@ -386,7 +386,7 @@ if (empty($reshook)) {
|
||||
} elseif ($action == 'setinvoicedate' && $usercancreate) {
|
||||
$object->fetch($id);
|
||||
$old_date_lim_reglement = $object->date_lim_reglement;
|
||||
$date = dol_mktime(12, 0, 0, $_POST['invoicedatemonth'], $_POST['invoicedateday'], $_POST['invoicedateyear']);
|
||||
$date = dol_mktime(12, 0, 0, GETPOST('invoicedatemonth', 'int'), GETPOST('invoicedateday', 'int'), GETPOST('invoicedateyear', 'int'));
|
||||
if (empty($date)) {
|
||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Date")), null, 'errors');
|
||||
header('Location: '.$_SERVER["PHP_SELF"].'?facid='.$id.'&action=editinvoicedate');
|
||||
|
||||
@ -1181,6 +1181,7 @@ class Facture extends CommonInvoice
|
||||
foreach ($object->lines as $i => $line) {
|
||||
if (($object->lines[$i]->info_bits & 0x02) == 0x02) { // We do not clone line of discounts
|
||||
unset($object->lines[$i]);
|
||||
continue;
|
||||
}
|
||||
|
||||
// Bloc to update dates of service (month by month only if previously filled and similare to start and end of month)
|
||||
@ -1207,7 +1208,7 @@ class Facture extends CommonInvoice
|
||||
}
|
||||
}
|
||||
|
||||
$object->lines[$i]->ref_ext = ''; // Do not clone ref_ext
|
||||
$object->lines[$i]->ref_ext = ''; // Do not clone ref_ext
|
||||
}
|
||||
|
||||
// Create clone
|
||||
|
||||
@ -6365,6 +6365,7 @@ abstract class CommonObject
|
||||
|
||||
$out = '';
|
||||
$type = '';
|
||||
$isDependList=0;
|
||||
$param = array();
|
||||
$param['options'] = array();
|
||||
$reg = array();
|
||||
@ -6403,6 +6404,7 @@ abstract class CommonObject
|
||||
$type = $this->fields[$key]['type'];
|
||||
}
|
||||
|
||||
|
||||
$label = $this->fields[$key]['label'];
|
||||
//$elementtype=$this->fields[$key]['elementtype']; // Seems not used
|
||||
$default = $this->fields[$key]['default'];
|
||||
@ -6551,7 +6553,6 @@ abstract class CommonObject
|
||||
// 4 : where clause filter on column or table extrafield, syntax field='value' or extra.field=value
|
||||
$keyList = (empty($InfoFieldList[2]) ? 'rowid' : $InfoFieldList[2].' as rowid');
|
||||
|
||||
|
||||
if (count($InfoFieldList) > 4 && !empty($InfoFieldList[4])) {
|
||||
if (strpos($InfoFieldList[4], 'extra.') !== false) {
|
||||
$keyList = 'main.'.$InfoFieldList[2].' as rowid';
|
||||
@ -6655,6 +6656,7 @@ abstract class CommonObject
|
||||
|
||||
if (!empty($InfoFieldList[3]) && $parentField) {
|
||||
$parent = $parentName.':'.$obj->{$parentField};
|
||||
$isDependList=1;
|
||||
}
|
||||
|
||||
$out .= '<option value="'.$obj->rowid.'"';
|
||||
@ -6809,6 +6811,7 @@ abstract class CommonObject
|
||||
|
||||
if (!empty($InfoFieldList[3]) && $parentField) {
|
||||
$parent = $parentName.':'.$obj->{$parentField};
|
||||
$isDependList=1;
|
||||
}
|
||||
|
||||
$data[$obj->rowid] = $labeltoshow;
|
||||
@ -6897,6 +6900,10 @@ abstract class CommonObject
|
||||
if (!empty($hidden)) {
|
||||
$out = '<input type="hidden" value="'.$value.'" name="'.$keyprefix.$key.$keysuffix.'" id="'.$keyprefix.$key.$keysuffix.'"/>';
|
||||
}
|
||||
|
||||
if ($isDependList==1) {
|
||||
$out .= $this->getJSListDependancies('_common');
|
||||
}
|
||||
/* Add comments
|
||||
if ($type == 'date') $out.=' (YYYY-MM-DD)';
|
||||
elseif ($type == 'datetime') $out.=' (YYYY-MM-DD HH:MM:SS)';
|
||||
@ -7494,10 +7501,28 @@ abstract class CommonObject
|
||||
$out .= "\n";
|
||||
// Add code to manage list depending on others
|
||||
if (!empty($conf->use_javascript_ajax)) {
|
||||
$out .= '
|
||||
$out .= getJSListDependancies();
|
||||
}
|
||||
|
||||
$out .= '<!-- /showOptionals --> '."\n";
|
||||
}
|
||||
}
|
||||
|
||||
$out .= $hookmanager->resPrint;
|
||||
|
||||
return $out;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $type Type for prefix
|
||||
* @return string Javacript code to manage dependency
|
||||
*/
|
||||
public function getJSListDependancies($type = '_extra')
|
||||
{
|
||||
$out .= '
|
||||
<script>
|
||||
jQuery(document).ready(function() {
|
||||
function showOptions(child_list, parent_list, orig_select)
|
||||
function showOptions'.$type.'(child_list, parent_list, orig_select)
|
||||
{
|
||||
var val = $("select[name=\""+parent_list+"\"]").val();
|
||||
var parentVal = parent_list + ":" + val;
|
||||
@ -7521,7 +7546,7 @@ abstract class CommonObject
|
||||
$("select[name=\""+child_list+"\"]").append(options);
|
||||
}
|
||||
}
|
||||
function setListDependencies() {
|
||||
function setListDependencies'.$type.'() {
|
||||
jQuery("select option[parent]").parent().each(function() {
|
||||
var orig_select = {};
|
||||
var child_list = $(this).attr("name");
|
||||
@ -7546,7 +7571,7 @@ abstract class CommonObject
|
||||
|
||||
//When we change parent list
|
||||
$("select[name=\""+parent_list+"\"]").change(function() {
|
||||
showOptions(child_list, parent_list, orig_select[child_list]);
|
||||
showOptions'.$type.'(child_list, parent_list, orig_select[child_list]);
|
||||
//Select the value 0 on child list after a change on the parent list
|
||||
$("#"+child_list).val(0).trigger("change");
|
||||
//Hide child lists if the parent value is set to 0
|
||||
@ -7556,21 +7581,13 @@ abstract class CommonObject
|
||||
});
|
||||
});
|
||||
}
|
||||
setListDependencies();
|
||||
|
||||
setListDependencies'.$type.'();
|
||||
});
|
||||
</script>'."\n";
|
||||
}
|
||||
|
||||
$out .= '<!-- /showOptionals --> '."\n";
|
||||
}
|
||||
}
|
||||
|
||||
$out .= $hookmanager->resPrint;
|
||||
|
||||
return $out;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns the rights used for this class
|
||||
* @return stdClass
|
||||
|
||||
@ -5305,8 +5305,8 @@ class Form
|
||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
print '<input type="text" class="maxwidth100" name="'.$htmlname.'" value="'.(!empty($rate) ? price(price2num($rate, 'CU')) : 1).'" /> ';
|
||||
print '<select name="calculation_mode">';
|
||||
print '<option value="1">'.$currency.' > '.$conf->currency.'</option>';
|
||||
print '<option value="2">'.$conf->currency.' > '.$currency.'</option>';
|
||||
print '<option value="1">Change '.$langs->trans("PriceUHT").' of lines</option>';
|
||||
print '<option value="2">Change '.$langs->trans("PriceUHTCurrency").' of lines</option>';
|
||||
print '</select> ';
|
||||
print '<input type="submit" class="button smallpaddingimp valignmiddle" value="'.$langs->trans("Modify").'">';
|
||||
print '</form>';
|
||||
|
||||
@ -22,8 +22,6 @@
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Regenerate files .class.php
|
||||
*
|
||||
@ -54,7 +52,7 @@ function rebuildObjectClass($destdir, $module, $objectname, $newmask, $readdir =
|
||||
}
|
||||
|
||||
// Check parameters
|
||||
if (count($addfieldentry) > 0) {
|
||||
if (is_array($addfieldentry) && count($addfieldentry) > 0) {
|
||||
if (empty($addfieldentry['name'])) {
|
||||
setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv("Name")), null, 'errors');
|
||||
return -2;
|
||||
|
||||
@ -279,6 +279,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
||||
$pdf->SetAutoPageBreak(1, 0);
|
||||
|
||||
$heightforinfotot = 50 + (4 * $nbpayments); // Height reserved to output the info and total part and payment part
|
||||
if($heightforinfotot > 220) $heightforinfotot = 220;
|
||||
$heightforfreetext = (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT) ? $conf->global->MAIN_PDF_FREETEXT_HEIGHT : 5); // Height reserved to output the free text on last page
|
||||
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
|
||||
if (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS)) {
|
||||
|
||||
@ -1081,4 +1081,21 @@ class Don extends CommonObject
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Function used to replace a thirdparty id with another one.
|
||||
*
|
||||
* @param DoliDB $db Database handler
|
||||
* @param int $origin_id Old third-party id
|
||||
* @param int $dest_id New third-party id
|
||||
* @return bool
|
||||
*/
|
||||
public static function replaceThirdparty(DoliDB $db, $origin_id, $dest_id)
|
||||
{
|
||||
$tables = array(
|
||||
'don'
|
||||
);
|
||||
|
||||
return CommonObject::commonReplaceThirdparty($db, $origin_id, $dest_id, $tables);
|
||||
}
|
||||
}
|
||||
|
||||
@ -199,4 +199,21 @@ class Fournisseur extends Societe
|
||||
}
|
||||
return $arr;
|
||||
}
|
||||
|
||||
/**
|
||||
* Function used to replace a thirdparty id with another one.
|
||||
*
|
||||
* @param DoliDB $db Database handler
|
||||
* @param int $origin_id Old third-party id
|
||||
* @param int $dest_id New third-party id
|
||||
* @return bool
|
||||
*/
|
||||
public static function replaceThirdparty(DoliDB $db, $origin_id, $dest_id)
|
||||
{
|
||||
$tables = array(
|
||||
'facture_fourn'
|
||||
);
|
||||
|
||||
return CommonObject::commonReplaceThirdparty($db, $origin_id, $dest_id, $tables);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1250,7 +1250,7 @@ class FactureFournisseur extends CommonInvoice
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||
|
||||
$ref = dol_sanitizeFileName($this->ref);
|
||||
$dir = $conf->fournisseur->facture->dir_output.'/'.get_exdir($this->id, 2, 0, 0, $this, 'invoive_supplier').$ref;
|
||||
$dir = $conf->fournisseur->facture->dir_output.'/'.get_exdir($this->id, 2, 0, 0, $this, 'invoice_supplier').$ref;
|
||||
$file = $dir."/".$ref.".pdf";
|
||||
if (file_exists($file)) {
|
||||
if (!dol_delete_file($file, 0, 0, 0, $this)) { // For triggers
|
||||
|
||||
@ -201,7 +201,7 @@ if (empty($reshook)) {
|
||||
$result = $object->setMulticurrencyCode(GETPOST('multicurrency_code', 'alpha'));
|
||||
} elseif ($action == 'setmulticurrencyrate' && $usercancreate) {
|
||||
// Multicurrency rate
|
||||
$result = $object->setMulticurrencyRate(price2num(GETPOST('multicurrency_tx')));
|
||||
$result = $object->setMulticurrencyRate(price2num(GETPOST('multicurrency_tx')), GETPOST('calculation_mode', 'int'));
|
||||
}
|
||||
|
||||
// bank account
|
||||
|
||||
@ -362,7 +362,7 @@ if (empty($reshook)) {
|
||||
$result = $object->setMulticurrencyCode(GETPOST('multicurrency_code', 'alpha'));
|
||||
} elseif ($action == 'setmulticurrencyrate' && $usercancreate) {
|
||||
// Multicurrency rate
|
||||
$result = $object->setMulticurrencyRate(price2num(GETPOST('multicurrency_tx', 'alpha')));
|
||||
$result = $object->setMulticurrencyRate(price2num(GETPOST('multicurrency_tx', 'alpha')), GETPOST('calculation_mode', 'int'));
|
||||
} elseif ($action == 'setbankaccount' && $usercancreate) {
|
||||
// bank account
|
||||
$result = $object->setBankAccount(GETPOST('fk_account', 'int'));
|
||||
|
||||
@ -361,7 +361,7 @@ UnitPriceHTCurrency=Unit price (excl.) (currency)
|
||||
UnitPriceTTC=Unit price
|
||||
PriceU=U.P.
|
||||
PriceUHT=U.P. (net)
|
||||
PriceUHTCurrency=U.P (currency)
|
||||
PriceUHTCurrency=U.P (net) (currency)
|
||||
PriceUTTC=U.P. (inc. tax)
|
||||
Amount=Amount
|
||||
AmountInvoice=Invoice amount
|
||||
|
||||
@ -361,7 +361,7 @@ UnitPriceHTCurrency=Prix unitaire (HT) (devise)
|
||||
UnitPriceTTC=Prix unitaire TTC
|
||||
PriceU=P.U.
|
||||
PriceUHT=P.U. HT
|
||||
PriceUHTCurrency=P.U. (devise)
|
||||
PriceUHTCurrency=P.U. HT (devise)
|
||||
PriceUTTC=P.U TTC
|
||||
Amount=Montant
|
||||
AmountInvoice=Montant facture
|
||||
|
||||
@ -4427,6 +4427,10 @@ class Product extends CommonObject
|
||||
{
|
||||
global $alreadyfound;
|
||||
|
||||
if (empty($id)) {
|
||||
return array();
|
||||
}
|
||||
|
||||
$sql = "SELECT p.rowid, p.ref, p.label as label, p.fk_product_type,";
|
||||
$sql .= " pa.qty as qty, pa.fk_product_fils as id, pa.incdec";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."product as p,";
|
||||
|
||||
@ -247,6 +247,7 @@ if (empty($reshook)) {
|
||||
// TODO Mutualise the list into object societe.class.php
|
||||
$objects = array(
|
||||
'Adherent' => '/adherents/class/adherent.class.php',
|
||||
'Don' => '/don/class/don.class.php',
|
||||
'Societe' => '/societe/class/societe.class.php',
|
||||
//'Categorie' => '/categories/class/categorie.class.php',
|
||||
'ActionComm' => '/comm/action/class/actioncomm.class.php',
|
||||
@ -278,6 +279,7 @@ if (empty($reshook)) {
|
||||
if (!$error && !$object_name::replaceThirdparty($db, $soc_origin->id, $object->id)) {
|
||||
$error++;
|
||||
setEventMessages($db->lasterror(), null, 'errors');
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1007,7 +1007,7 @@ if (empty($reshook)) {
|
||||
$result = $object->setMulticurrencyCode(GETPOST('multicurrency_code', 'alpha'));
|
||||
} elseif ($action == 'setmulticurrencyrate' && $usercancreate) {
|
||||
// Multicurrency rate
|
||||
$result = $object->setMulticurrencyRate(price2num(GETPOST('multicurrency_tx')));
|
||||
$result = $object->setMulticurrencyRate(price2num(GETPOST('multicurrency_tx')), GETPOST('calculation_mode', 'int'));
|
||||
} elseif ($action == 'update_extras') {
|
||||
$object->oldcopy = dol_clone($object);
|
||||
|
||||
|
||||
@ -254,7 +254,7 @@ class Ticket extends CommonObject
|
||||
'entity' => array('type'=>'integer', 'label'=>'Entity', 'visible'=>0, 'enabled'=>1, 'position'=>5, 'notnull'=>1, 'index'=>1),
|
||||
'ref' => array('type'=>'varchar(128)', 'label'=>'Ref', 'visible'=>1, 'enabled'=>1, 'position'=>10, 'notnull'=>1, 'index'=>1, 'searchall'=>1, 'comment'=>"Reference of object", 'css'=>''),
|
||||
'track_id' => array('type'=>'varchar(255)', 'label'=>'TicketTrackId', 'visible'=>-2, 'enabled'=>1, 'position'=>11, 'notnull'=>-1, 'searchall'=>1, 'help'=>"Help text"),
|
||||
'fk_user_create' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'Author', 'visible'=>1, 'enabled'=>1, 'position'=>15, 'notnull'=>1, 'css'=>'tdoverflowmax150 maxwidth150onsmartphone'),
|
||||
'fk_user_create' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'Author', 'visible'=>1, 'enabled'=>1, 'position'=>15, 'notnull'=>1, 'css'=>'tdoverflowmax125 maxwidth150onsmartphone'),
|
||||
'origin_email' => array('type'=>'mail', 'label'=>'OriginEmail', 'visible'=>-2, 'enabled'=>1, 'position'=>16, 'notnull'=>1, 'index'=>1, 'searchall'=>1, 'comment'=>"Reference of object", 'css'=>'tdoverflowmax150'),
|
||||
'subject' => array('type'=>'varchar(255)', 'label'=>'Subject', 'visible'=>1, 'enabled'=>1, 'position'=>18, 'notnull'=>-1, 'searchall'=>1, 'help'=>"", 'css'=>'maxwidth200 tdoverflowmax200', 'autofocusoncreate'=>1),
|
||||
'type_code' => array('type'=>'varchar(32)', 'label'=>'Type', 'visible'=>1, 'enabled'=>1, 'position'=>20, 'notnull'=>-1, 'help'=>"", 'css'=>'maxwidth125 tdoverflowmax50'),
|
||||
@ -266,7 +266,7 @@ class Ticket extends CommonObject
|
||||
'timing' => array('type'=>'varchar(20)', 'label'=>'Timing', 'visible'=>-1, 'enabled'=>1, 'position'=>42, 'notnull'=>-1, 'help'=>""),
|
||||
'datec' => array('type'=>'datetime', 'label'=>'DateCreation', 'visible'=>1, 'enabled'=>1, 'position'=>500, 'notnull'=>1),
|
||||
'date_read' => array('type'=>'datetime', 'label'=>'TicketReadOn', 'visible'=>-1, 'enabled'=>1, 'position'=>501, 'notnull'=>1),
|
||||
'fk_user_assign' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'AssignedTo', 'visible'=>1, 'enabled'=>1, 'position'=>505, 'notnull'=>1, 'css'=>'tdoverflowmax150'),
|
||||
'fk_user_assign' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'AssignedTo', 'visible'=>1, 'enabled'=>1, 'position'=>505, 'notnull'=>1, 'css'=>'tdoverflowmax125'),
|
||||
'date_close' => array('type'=>'datetime', 'label'=>'TicketCloseOn', 'visible'=>-1, 'enabled'=>1, 'position'=>510, 'notnull'=>1),
|
||||
'tms' => array('type'=>'timestamp', 'label'=>'DateModification', 'visible'=>-1, 'enabled'=>1, 'position'=>520, 'notnull'=>1),
|
||||
'message' => array('type'=>'text', 'label'=>'Message', 'visible'=>-2, 'enabled'=>1, 'position'=>540, 'notnull'=>-1,),
|
||||
|
||||
@ -392,7 +392,9 @@ if ($search_all) {
|
||||
if ($search_societe) {
|
||||
$sql .= natural_search('s.nom', $search_societe);
|
||||
}
|
||||
//if ($search_fk_project) $sql .= natural_search('fk_project', $search_fk_project, 2);
|
||||
if ($search_fk_project > 0) {
|
||||
$sql .= natural_search('fk_project', $search_fk_project, 2);
|
||||
}
|
||||
if ($search_date_start) {
|
||||
$sql .= " AND t.datec >= '".$db->idate($search_date_start)."'";
|
||||
}
|
||||
@ -755,7 +757,7 @@ foreach ($object->fields as $key => $val) {
|
||||
print '</td>';
|
||||
} elseif ($key == 'fk_user_assign' || $key == 'fk_user_create') {
|
||||
print '<td class="liste_titre'.($cssforfield ? ' '.$cssforfield : '').'">';
|
||||
print $form->select_dolusers($search[$key], 'search_'.$key, 1, null, 0, '', '', '0', 0, 0, '', 0, '', ($val['css'] ? $val['css'] : 'maxwidth150'));
|
||||
print $form->select_dolusers($search[$key], 'search_'.$key, 1, null, 0, '', '', '0', 0, 0, '', 0, '', ($val['css'] ? $val['css'] : 'maxwidth125'));
|
||||
print '</td>';
|
||||
} elseif ($key == 'fk_statut') {
|
||||
$arrayofstatus = array();
|
||||
@ -772,7 +774,7 @@ foreach ($object->fields as $key => $val) {
|
||||
if ($search[$key]) {
|
||||
$selectedarray = array_values($search[$key]);
|
||||
}
|
||||
print Form::multiselectarray('search_fk_statut', $arrayofstatus, $selectedarray, 0, 0, 'minwidth150', 1, 0, '', '', '');
|
||||
print Form::multiselectarray('search_fk_statut', $arrayofstatus, $selectedarray, 0, 0, 'minwidth100 maxwidth150', 1, 0, '', '', '');
|
||||
print '</td>';
|
||||
} elseif ($key == "fk_soc") {
|
||||
print '<td class="liste_titre'.($cssforfield ? ' '.$cssforfield : '').'"><input type="text" class="flat maxwidth75" name="search_societe" value="'.dol_escape_htmltag($search_societe).'"></td>';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user