FIX Date of payment of subscription must not be set to 1970-01-01.
Fix look and feel v14
This commit is contained in:
parent
983d7e5177
commit
a25346e302
@ -1822,7 +1822,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
|||||||
$result = $company->fetch($object->socid);
|
$result = $company->fetch($object->socid);
|
||||||
print $company->getNomUrl(1);
|
print $company->getNomUrl(1);
|
||||||
} else {
|
} else {
|
||||||
print $langs->trans("NoThirdPartyAssociatedToMember");
|
print '<span class="opacitymedium">'.$langs->trans("NoThirdPartyAssociatedToMember").'</span>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
@ -1846,7 +1846,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
|||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
//VCard
|
// VCard
|
||||||
print '<tr><td>';
|
print '<tr><td>';
|
||||||
print $langs->trans("VCard").'</td><td colspan="3">';
|
print $langs->trans("VCard").'</td><td colspan="3">';
|
||||||
print '<a href="'.DOL_URL_ROOT.'/adherents/vcard.php?id='.$object->id.'">';
|
print '<a href="'.DOL_URL_ROOT.'/adherents/vcard.php?id='.$object->id.'">';
|
||||||
|
|||||||
@ -209,7 +209,7 @@ if ($user->rights->adherent->cotisation->creer && $action == 'subscription' && !
|
|||||||
// Subscription informations
|
// Subscription informations
|
||||||
$datesubscription = 0;
|
$datesubscription = 0;
|
||||||
$datesubend = 0;
|
$datesubend = 0;
|
||||||
$paymentdate = 0;
|
$paymentdate = ''; // Do not use 0 here, default value is '' that means not filled where 0 means 1970-01-01
|
||||||
if (GETPOST("reyear", "int") && GETPOST("remonth", "int") && GETPOST("reday", "int")) {
|
if (GETPOST("reyear", "int") && GETPOST("remonth", "int") && GETPOST("reday", "int")) {
|
||||||
$datesubscription = dol_mktime(0, 0, 0, GETPOST("remonth", "int"), GETPOST("reday", "int"), GETPOST("reyear", "int"));
|
$datesubscription = dol_mktime(0, 0, 0, GETPOST("remonth", "int"), GETPOST("reday", "int"), GETPOST("reyear", "int"));
|
||||||
}
|
}
|
||||||
@ -602,7 +602,7 @@ if ($rowid > 0) {
|
|||||||
$result = $company->fetch($object->fk_soc);
|
$result = $company->fetch($object->fk_soc);
|
||||||
print $company->getNomUrl(1);
|
print $company->getNomUrl(1);
|
||||||
} else {
|
} else {
|
||||||
print $langs->trans("NoThirdPartyAssociatedToMember");
|
print '<span class="opacitymedium">'.$langs->trans("NoThirdPartyAssociatedToMember").'</span>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
@ -628,7 +628,7 @@ if ($rowid > 0) {
|
|||||||
if ($object->user_id) {
|
if ($object->user_id) {
|
||||||
$form->form_users($_SERVER['PHP_SELF'].'?rowid='.$object->id, $object->user_id, 'none');
|
$form->form_users($_SERVER['PHP_SELF'].'?rowid='.$object->id, $object->user_id, 'none');
|
||||||
} else {
|
} else {
|
||||||
print $langs->trans("NoDolibarrAccess");
|
print '<span class="opacitymedium">'.$langs->trans("NoDolibarrAccess").'</span>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
@ -970,17 +970,18 @@ if ($rowid > 0) {
|
|||||||
print '<tr><td class="tdtop fieldrequired">'.$langs->trans('MoreActions');
|
print '<tr><td class="tdtop fieldrequired">'.$langs->trans('MoreActions');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
print '<input type="radio" class="moreaction" id="none" name="paymentsave" value="none"'.(empty($bankdirect) && empty($invoiceonly) && empty($bankviainvoice) ? ' checked' : '').'> '.$langs->trans("None").'<br>';
|
print '<input type="radio" class="moreaction" id="none" name="paymentsave" value="none"'.(empty($bankdirect) && empty($invoiceonly) && empty($bankviainvoice) ? ' checked' : '').'>';
|
||||||
|
print '<label for="none"> '.$langs->trans("None").'</label><br>';
|
||||||
// Add entry into bank accoun
|
// Add entry into bank accoun
|
||||||
if (!empty($conf->banque->enabled)) {
|
if (!empty($conf->banque->enabled)) {
|
||||||
print '<input type="radio" class="moreaction" id="bankdirect" name="paymentsave" value="bankdirect"'.(!empty($bankdirect) ? ' checked' : '');
|
print '<input type="radio" class="moreaction" id="bankdirect" name="paymentsave" value="bankdirect"'.(!empty($bankdirect) ? ' checked' : '');
|
||||||
print '> '.$langs->trans("MoreActionBankDirect").'<br>';
|
print '><label for="bankdirect"> '.$langs->trans("MoreActionBankDirect").'</label><br>';
|
||||||
}
|
}
|
||||||
// Add invoice with no payments
|
// Add invoice with no payments
|
||||||
if (!empty($conf->societe->enabled) && !empty($conf->facture->enabled)) {
|
if (!empty($conf->societe->enabled) && !empty($conf->facture->enabled)) {
|
||||||
print '<input type="radio" class="moreaction" id="invoiceonly" name="paymentsave" value="invoiceonly"'.(!empty($invoiceonly) ? ' checked' : '');
|
print '<input type="radio" class="moreaction" id="invoiceonly" name="paymentsave" value="invoiceonly"'.(!empty($invoiceonly) ? ' checked' : '');
|
||||||
//if (empty($object->fk_soc)) print ' disabled';
|
//if (empty($object->fk_soc)) print ' disabled';
|
||||||
print '> '.$langs->trans("MoreActionInvoiceOnly");
|
print '><label for="invoiceonly"> '.$langs->trans("MoreActionInvoiceOnly");
|
||||||
if ($object->fk_soc) {
|
if ($object->fk_soc) {
|
||||||
print ' ('.$langs->trans("ThirdParty").': '.$company->getNomUrl(1).')';
|
print ' ('.$langs->trans("ThirdParty").': '.$company->getNomUrl(1).')';
|
||||||
} else {
|
} else {
|
||||||
@ -1004,13 +1005,13 @@ if ($rowid > 0) {
|
|||||||
}
|
}
|
||||||
print '. '.$langs->transnoentitiesnoconv("ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS", $prodtmp->getNomUrl(1)); // must use noentitiesnoconv to avoid to encode html into getNomUrl of product
|
print '. '.$langs->transnoentitiesnoconv("ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS", $prodtmp->getNomUrl(1)); // must use noentitiesnoconv to avoid to encode html into getNomUrl of product
|
||||||
}
|
}
|
||||||
print '<br>';
|
print '</label><br>';
|
||||||
}
|
}
|
||||||
// Add invoice with payments
|
// Add invoice with payments
|
||||||
if (!empty($conf->banque->enabled) && !empty($conf->societe->enabled) && !empty($conf->facture->enabled)) {
|
if (!empty($conf->banque->enabled) && !empty($conf->societe->enabled) && !empty($conf->facture->enabled)) {
|
||||||
print '<input type="radio" class="moreaction" id="bankviainvoice" name="paymentsave" value="bankviainvoice"'.(!empty($bankviainvoice) ? ' checked' : '');
|
print '<input type="radio" class="moreaction" id="bankviainvoice" name="paymentsave" value="bankviainvoice"'.(!empty($bankviainvoice) ? ' checked' : '');
|
||||||
//if (empty($object->fk_soc)) print ' disabled';
|
//if (empty($object->fk_soc)) print ' disabled';
|
||||||
print '> '.$langs->trans("MoreActionBankViaInvoice");
|
print '><label for="bankviainvoice"> '.$langs->trans("MoreActionBankViaInvoice");
|
||||||
if ($object->fk_soc) {
|
if ($object->fk_soc) {
|
||||||
print ' ('.$langs->trans("ThirdParty").': '.$company->getNomUrl(1).')';
|
print ' ('.$langs->trans("ThirdParty").': '.$company->getNomUrl(1).')';
|
||||||
} else {
|
} else {
|
||||||
@ -1034,7 +1035,7 @@ if ($rowid > 0) {
|
|||||||
}
|
}
|
||||||
print '. '.$langs->transnoentitiesnoconv("ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS", $prodtmp->getNomUrl(1)); // must use noentitiesnoconv to avoid to encode html into getNomUrl of product
|
print '. '.$langs->transnoentitiesnoconv("ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS", $prodtmp->getNomUrl(1)); // must use noentitiesnoconv to avoid to encode html into getNomUrl of product
|
||||||
}
|
}
|
||||||
print '<br>';
|
print '</label><br>';
|
||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
|
|||||||
@ -272,6 +272,19 @@ function societe_prepare_head(Societe $object)
|
|||||||
$h++;
|
$h++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (getDolGlobalString('PARTNERSHIP_IS_MANAGED_FOR') == 'thirdparty') {
|
||||||
|
if (!empty($user->rights->partnership->read)) {
|
||||||
|
$nbPartnership = is_array($object->partnerships) ? count($object->partnerships) : 0;
|
||||||
|
$head[$h][0] = DOL_URL_ROOT.'/societe/partnership.php?socid='.$object->id;
|
||||||
|
$head[$h][1] = $langs->trans("Partnership");
|
||||||
|
$head[$h][2] = 'partnership';
|
||||||
|
if ($nbPartnership > 0) {
|
||||||
|
$head[$h][1] .= '<span class="badge marginleftonlyshort">'.$nbPartnership.'</span>';
|
||||||
|
}
|
||||||
|
$h++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Show more tabs from modules
|
// Show more tabs from modules
|
||||||
// Entries must be declared in modules descriptor with line
|
// Entries must be declared in modules descriptor with line
|
||||||
// $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab
|
// $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab
|
||||||
|
|||||||
@ -63,9 +63,7 @@ function member_prepare_head(Adherent $object)
|
|||||||
$h++;
|
$h++;
|
||||||
}
|
}
|
||||||
|
|
||||||
$tabtoadd = (!empty(getDolGlobalString('PARTNERSHIP_IS_MANAGED_FOR')) && getDolGlobalString('PARTNERSHIP_IS_MANAGED_FOR') == 'member') ? 'member' : 'thirdparty';
|
if (getDolGlobalString('PARTNERSHIP_IS_MANAGED_FOR') == 'member') {
|
||||||
|
|
||||||
if ($tabtoadd == 'member') {
|
|
||||||
if (!empty($user->rights->partnership->read)) {
|
if (!empty($user->rights->partnership->read)) {
|
||||||
$nbPartnership = is_array($object->partnerships) ? count($object->partnerships) : 0;
|
$nbPartnership = is_array($object->partnerships) ? count($object->partnerships) : 0;
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/adherents/partnership.php?rowid='.$object->id;
|
$head[$h][0] = DOL_URL_ROOT.'/adherents/partnership.php?rowid='.$object->id;
|
||||||
@ -76,20 +74,8 @@ function member_prepare_head(Adherent $object)
|
|||||||
}
|
}
|
||||||
$h++;
|
$h++;
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
if (!empty($user->rights->partnership->read)) {
|
|
||||||
$nbPartnership = is_array($object->partnerships) ? count($object->partnerships) : 0;
|
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/societe/partnership.php?socid='.$object->id;
|
|
||||||
$head[$h][1] = $langs->trans("Partnership");
|
|
||||||
$head[$h][2] = 'partnership';
|
|
||||||
if ($nbPartnership > 0) {
|
|
||||||
$head[$h][1] .= '<span class="badge marginleftonlyshort">'.$nbPartnership.'</span>';
|
|
||||||
}
|
|
||||||
$h++;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Show more tabs from modules
|
// Show more tabs from modules
|
||||||
// Entries must be declared in modules descriptor with line
|
// Entries must be declared in modules descriptor with line
|
||||||
// $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab
|
// $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab
|
||||||
|
|||||||
@ -50,6 +50,9 @@ $backtopageforcancel = GETPOST('backtopageforcancel', 'alpha');
|
|||||||
$socid = GETPOST('socid', 'int');
|
$socid = GETPOST('socid', 'int');
|
||||||
if (!empty($user->socid)) {
|
if (!empty($user->socid)) {
|
||||||
$socid = $user->socid;
|
$socid = $user->socid;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (empty($id) && $socid && (empty($conf->global->PARTNERSHIP_IS_MANAGED_FOR) || $conf->global->PARTNERSHIP_IS_MANAGED_FOR == 'thirdparty')) {
|
||||||
$id = $socid;
|
$id = $socid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user