forked from Wavyzz/dolibarr
Merge branch '15.0' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
@@ -36,6 +36,14 @@ if (!$user->admin) {
|
||||
}
|
||||
|
||||
$action = GETPOST('action', 'aZ09');
|
||||
$sortfield = GETPOST('sortfield', 'aZ09');
|
||||
$sortorder = GETPOST('sortorder', 'aZ09');
|
||||
if (empty($sortfield)) {
|
||||
$sortfield = 'date';
|
||||
}
|
||||
if (empty($sortorder)) {
|
||||
$sortorder = 'desc';
|
||||
}
|
||||
|
||||
$upload_dir = $conf->admin->dir_temp;
|
||||
|
||||
@@ -73,8 +81,6 @@ if ($action == 'updateform') {
|
||||
} else {
|
||||
setEventMessages($langs->trans("ErrorFailToDeleteFile", GETPOST('urlfile', 'alpha')), null, 'errors');
|
||||
}
|
||||
Header('Location: '.$_SERVER["PHP_SELF"]);
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
@@ -190,7 +196,7 @@ $formfile = new FormFile($db);
|
||||
$formfile->form_attach_new_file($_SERVER['PHP_SELF'], $langs->trans("FormToTestFileUploadForm"), 0, 0, 1, 50, '', '', 1, '', 0);
|
||||
|
||||
// List of document
|
||||
$filearray = dol_dir_list($upload_dir, "files", 0, '', '', 'name', SORT_ASC, 1);
|
||||
$filearray = dol_dir_list($upload_dir, "files", 0, '', '', $sortfield, $sortorder == 'desc' ? SORT_DESC : SORT_ASC, 1);
|
||||
$formfile->list_of_documents($filearray, null, 'admin_temp', '');
|
||||
|
||||
// End of page
|
||||
|
||||
@@ -4818,6 +4818,7 @@ if ($action == 'create') {
|
||||
|
||||
// List of previous situation invoices
|
||||
if (($object->situation_cycle_ref > 0) && !empty($conf->global->INVOICE_USE_SITUATION)) {
|
||||
print '<!-- List of situation invoices -->';
|
||||
print '<table class="noborder situationstable" width="100%">';
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
@@ -4956,15 +4957,16 @@ if ($action == 'create') {
|
||||
|
||||
// List of payments already done
|
||||
|
||||
print '<!-- List of payments already done -->';
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table class="noborder paymenttable centpercent">';
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td class="liste_titre">'.($object->type == Facture::TYPE_CREDIT_NOTE ? $langs->trans("PaymentsBack") : $langs->trans('Payments')).'</td>';
|
||||
print '<td class="liste_titre">'.$langs->trans('Date').'</td>';
|
||||
print '<td class="liste_titre">'.$langs->trans('Type').'</td>';
|
||||
print '<td class="liste_titre"><span class="hideonsmartphone">'.$langs->trans('Date').'</span></td>';
|
||||
print '<td class="liste_titre"><span class="hideonsmartphone">'.$langs->trans('Type').'</span></td>';
|
||||
if (!empty($conf->banque->enabled)) {
|
||||
print '<td class="liste_titre">'.$langs->trans('BankAccount').'</td>';
|
||||
print '<td class="liste_titre"><span class="hideonsmartphone">'.$langs->trans('BankAccount').'</span></td>';
|
||||
}
|
||||
print '<td class="liste_titre right">'.$langs->trans('Amount').'</td>';
|
||||
print '<td class="liste_titre" width="18"> </td>';
|
||||
|
||||
@@ -45,7 +45,7 @@ foreach ($linkedObjectBlock as $key => $objectlink) {
|
||||
$trclass .= ' liste_sub_total';
|
||||
}
|
||||
print '<tr class="'.$trclass.'" data-element="'.$objectlink->element.'" data-id="'.$objectlink->id.'" >';
|
||||
print '<td class="linkedcol-element">';
|
||||
print '<td class="linkedcol-element tdoverflowmax100">';
|
||||
switch ($objectlink->type) {
|
||||
case Facture::TYPE_REPLACEMENT:
|
||||
echo $langs->trans("InvoiceReplacement");
|
||||
|
||||
@@ -46,7 +46,7 @@ foreach ($linkedObjectBlock as $key => $objectlink) {
|
||||
}
|
||||
?>
|
||||
<tr class="<?php echo $trclass; ?>" >
|
||||
<td class="linkedcol-element"><?php echo $langs->trans("RepeatableInvoice"); ?></td>
|
||||
<td class="linkedcol-element tdoverflowmax100"><?php echo $langs->trans("RepeatableInvoice"); ?></td>
|
||||
<td class="linkedcol-name"><!-- nowraponall because ref is a label --><?php echo $objectlink->getNomUrl(1); ?></td>
|
||||
<td class="linkedcol-ref" align="center"></td>
|
||||
<td class="linkedcol-date" align="center"><?php echo dol_print_date($objectlink->date_when, 'day'); ?></td>
|
||||
|
||||
@@ -1506,7 +1506,7 @@ class FormFile
|
||||
if (!empty($conf->global->MAIN_ECM_DISABLE_JS)) {
|
||||
$useajax = 0;
|
||||
}
|
||||
print '<a href="'.((($useinecm && $useinecm != 6) && $useajax) ? '#' : ($url.'?action=deletefile&token='.newToken().'&urlfile='.urlencode($filepath).$param)).'" class="'.($useajax ? 'reposition ' : '').'deletefilelink" rel="'.$filepath.'">'.img_delete().'</a>';
|
||||
print '<a href="'.((($useinecm && $useinecm != 6) && $useajax) ? '#' : ($url.'?action=deletefile&token='.newToken().'&urlfile='.urlencode($filepath).$param)).'" class="reposition deletefilelink" rel="'.$filepath.'">'.img_delete().'</a>';
|
||||
}
|
||||
print "</td>";
|
||||
|
||||
|
||||
@@ -1187,7 +1187,7 @@ $(document).ready(function() {
|
||||
});
|
||||
<?php } ?>
|
||||
|
||||
// Force to hide menus when page is inside an iFrame
|
||||
// Force to hide menus when page is inside an iFrame so we can show any page into a dialog popup
|
||||
$(document).ready(function() {
|
||||
if (window.location !== window.parent.location ) {
|
||||
console.log("Page is detected to be into an iframe, we hide by CSS the menus");
|
||||
|
||||
@@ -369,7 +369,7 @@ class EcmFiles extends CommonObject
|
||||
* @param string $ref Hash of file name (filename+filepath). Not always defined on some version.
|
||||
* @param string $relativepath Relative path of file from document directory. Example: 'path/path2/file' or 'path/path2/*'
|
||||
* @param string $hashoffile Hash of file content. Take the first one found if same file is at different places. This hash will also change if file content is changed.
|
||||
* @param string $hashforshare Hash of file sharing.
|
||||
* @param string $hashforshare Hash of file sharing or 'shared'
|
||||
* @param string $src_object_type src_object_type to search (value of object->table_element)
|
||||
* @param string $src_object_id src_object_id to search
|
||||
* @return int <0 if KO, 0 if not found, >0 if OK
|
||||
@@ -425,12 +425,16 @@ class EcmFiles extends CommonObject
|
||||
$sql .= " AND t.label = '".$this->db->escape($hashoffile)."'";
|
||||
$sql .= " AND t.entity = ".$conf->entity; // unique key include the entity so each company has its own index
|
||||
} elseif (!empty($hashforshare)) {
|
||||
if ($hashforshare != 'shared') {
|
||||
$sql .= " AND t.share = '".$this->db->escape($hashforshare)."'";
|
||||
} else {
|
||||
$sql .= " AND t.share IS NOT NULL AND t.share <> ''";
|
||||
}
|
||||
//$sql .= " AND t.entity = ".$conf->entity; // hashforshare already unique
|
||||
} elseif ($src_object_type && $src_object_id) {
|
||||
// Warning: May return several record, and only first one is returned !
|
||||
$sql .= " AND t.src_object_type = '".$this->db->escape($src_object_type)."' AND t.src_object_id = ".((int) $src_object_id);
|
||||
$sql .= " AND t.entity = ".$conf->entity;
|
||||
$sql .= " AND t.entity = ".((int) $conf->entity);
|
||||
} else {
|
||||
$sql .= ' AND t.rowid = '.((int) $id); // rowid already unique
|
||||
}
|
||||
|
||||
@@ -106,7 +106,7 @@ class Partnership extends CommonObject
|
||||
'rowid' => array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>'1', 'position'=>1, 'notnull'=>1, 'visible'=>0, 'noteditable'=>'1', 'index'=>1, 'css'=>'left', 'comment'=>"Id"),
|
||||
'ref' => array('type'=>'varchar(128)', 'label'=>'Ref', 'enabled'=>'1', 'position'=>10, 'notnull'=>1, 'visible'=>4, 'noteditable'=>'1', 'default'=>'(PROV)', 'index'=>1, 'searchall'=>1, 'showoncombobox'=>'1', 'comment'=>"Reference of object"),
|
||||
'entity' => array('type' => 'integer', 'label' => 'Entity', 'default' => 1, 'enabled' => 1, 'visible' => -2, 'notnull' => 1, 'position' => 15, 'index' => 1),
|
||||
'fk_type' => array('type' => 'integer:PartnershipType:partnership/class/partnership_type.class.php', 'label' => 'Type', 'notnull'=>1, 'enabled' => 1, 'visible' => 1, 'position' => 20),
|
||||
'fk_type' => array('type' => 'integer:PartnershipType:partnership/class/partnership_type.class.php:0:active=1', 'label' => 'Type', 'notnull'=>1, 'enabled' => 1, 'visible' => 1, 'position' => 20),
|
||||
'note_public' => array('type'=>'html', 'label'=>'NotePublic', 'enabled'=>'1', 'position'=>61, 'notnull'=>0, 'visible'=>0,),
|
||||
'note_private' => array('type'=>'html', 'label'=>'NotePrivate', 'enabled'=>'1', 'position'=>62, 'notnull'=>0, 'visible'=>0,),
|
||||
'date_creation' => array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>'1', 'position'=>500, 'notnull'=>1, 'visible'=>-2,),
|
||||
@@ -201,7 +201,7 @@ class Partnership extends CommonObject
|
||||
if (!empty($conf->global->PARTNERSHIP_IS_MANAGED_FOR) && $conf->global->PARTNERSHIP_IS_MANAGED_FOR == 'member') {
|
||||
$this->fields['fk_member'] = array('type'=>'integer:Adherent:adherents/class/adherent.class.php:1', 'label'=>'Member', 'enabled'=>'1', 'position'=>50, 'notnull'=>-1, 'visible'=>1, 'index'=>1, 'picto'=>'member', 'csslist'=>'tdoverflowmax150');
|
||||
} else {
|
||||
$this->fields['fk_soc'] = array('type'=>'integer:Societe:societe/class/societe.class.php:1:status=1 AND entity IN (__SHARED_ENTITIES__)', 'label'=>'ThirdParty', 'enabled'=>'1', 'position'=>50, 'notnull'=>-1, 'visible'=>1, 'index'=>1, 'picto'=>'company', 'csslist'=>'tdoverflowmax150');
|
||||
$this->fields['fk_soc'] = array('type'=>'integer:Societe:societe/class/societe.class.php:1:status=1 AND entity IN (__SHARED_ENTITIES__)', 'label'=>'ThirdParty', 'enabled'=>'1', 'position'=>50, 'notnull'=>-1, 'visible'=>1, 'index'=>1, 'picto'=>'company', 'css'=>'maxwidth500', 'csslist'=>'tdoverflowmax150');
|
||||
}
|
||||
|
||||
if (empty($conf->global->MAIN_SHOW_TECHNICAL_ID) && isset($this->fields['rowid'])) {
|
||||
|
||||
@@ -69,7 +69,7 @@ class PartnershipType extends CommonObject
|
||||
public $fields=array(
|
||||
'rowid' =>array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>10),
|
||||
'entity' =>array('type'=>'integer', 'label'=>'Entity', 'default'=>1, 'enabled'=>1, 'visible'=>-2, 'notnull'=>1, 'position'=>15, 'index'=>1),
|
||||
'code' =>array('type'=>'varchar(32)', 'label'=>'Code', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>20, 'showoncombobox'=>1),
|
||||
'code' =>array('type'=>'varchar(32)', 'label'=>'Code', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>20),
|
||||
'label' =>array('type'=>'varchar(64)', 'label'=>'Label', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>25, 'showoncombobox'=>1),
|
||||
'active' =>array('type'=>'integer', 'label'=>'Active', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>30),
|
||||
);
|
||||
|
||||
@@ -7455,6 +7455,21 @@ div.clipboardCPValue.hidewithsize {
|
||||
.a-mesure, .a-mesure-disabled {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
|
||||
div.fichehalfright {
|
||||
margin-top: 30px;
|
||||
}
|
||||
|
||||
.valuefield.fieldname_type span.badgeneutral {
|
||||
margin-top: 5px;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
tr.trextrafieldseparator td, tr.trextrafields_collapse_last td {
|
||||
/* border-bottom: 2px solid var(--colorbackhmenu1) !important; */
|
||||
border-bottom: 1px solid var(--colortopbordertitle1) !important;
|
||||
}
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 320px)
|
||||
|
||||
Reference in New Issue
Block a user