mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Fix Errors
This commit is contained in:
parent
1324f3d375
commit
ae07e511f7
|
|
@ -161,11 +161,13 @@ if (empty($reshook)) {
|
|||
}
|
||||
}
|
||||
|
||||
$fk_soc = GETPOST('fk_soc', 'int');
|
||||
if ($action == 'add' || ($action == 'update' && $object->fk_soc != $fk_soc)) {
|
||||
$fk_partner = ($managedfor == 'member') ? GETPOST('fk_member', 'int') : GETPOST('fk_soc', 'int');
|
||||
$obj_partner = ($managedfor == 'member') ? $object->fk_member : $object->fk_soc;
|
||||
|
||||
if ($action == 'add' || ($action == 'update' && $obj_partner != $fk_partner)) {
|
||||
$fpartnership = new Partnership($db);
|
||||
|
||||
$partnershipid = $fpartnership->fetch(0, "", $fk_soc);
|
||||
$partnershipid = $fpartnership->fetch(0, "", $fk_partner);
|
||||
if ($partnershipid > 0) {
|
||||
setEventMessages($langs->trans('PartnershipAlreadyExist').' : '.$fpartnership->getNomUrl(0, '', 1), '', 'errors');
|
||||
$action = ($action == 'add') ? 'create' : 'edit';
|
||||
|
|
@ -503,6 +505,8 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
|||
}*/
|
||||
$morehtmlref .= '</div>';
|
||||
|
||||
if ($managedfor == 'member') $npfilter .= " AND te.fk_member > 0 "; else $npfilter .= " AND te.fk_soc > 0 ";
|
||||
$object->next_prev_filter = $npfilter;
|
||||
|
||||
dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
|
||||
|
||||
|
|
|
|||
|
|
@ -735,9 +735,7 @@ while ($i < ($limit ? min($num, $limit) : $num)) {
|
|||
$textlate .= ' ('.$langs->trans("DateReference").' > '.$langs->trans("DateToday").' '.(ceil($conf->adherent->subscription->warning_delay / 60 / 60 / 24) >= 0 ? '+' : '').ceil($conf->adherent->subscription->warning_delay / 60 / 60 / 24).' '.$langs->trans("days").')';
|
||||
print " ".img_warning($langs->trans("SubscriptionLate").$textlate);
|
||||
}
|
||||
print '</td>';
|
||||
} else {
|
||||
print '<td class="nowrap left">';
|
||||
if ($adherent->subscription == 'yes') {
|
||||
print $langs->trans("SubscriptionNotReceived");
|
||||
if ($adherent->statut > 0) {
|
||||
|
|
@ -774,7 +772,7 @@ while ($i < ($limit ? min($num, $limit) : $num)) {
|
|||
|
||||
$i++;
|
||||
}
|
||||
$totalarray['nbfield']++; // End of subscription date
|
||||
if ($managedfor != 'member') $totalarray['nbfield']++; // End of subscription date
|
||||
|
||||
// Show total line
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/list_print_total.tpl.php';
|
||||
|
|
@ -787,7 +785,7 @@ if ($num == 0) {
|
|||
$colspan++;
|
||||
}
|
||||
}
|
||||
$colspan++; // End of subscription date
|
||||
if ($managedfor != 'member') $colspan++; // End of subscription date
|
||||
print '<tr><td colspan="'.$colspan.'" class="opacitymedium">'.$langs->trans("NoRecordFound").'</td></tr>';
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user