Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
604633afd1
@ -502,7 +502,7 @@ if (empty($reshook))
|
||||
// Check parameters
|
||||
if (empty($morphy) || $morphy == "-1") {
|
||||
$error++;
|
||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Nature")), null, 'errors');
|
||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("MemberNature")), null, 'errors');
|
||||
}
|
||||
// Tests if the login already exists
|
||||
if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED))
|
||||
@ -941,7 +941,7 @@ else
|
||||
// Morphy
|
||||
$morphys["phy"] = $langs->trans("Physical");
|
||||
$morphys["mor"] = $langs->trans("Moral");
|
||||
print '<tr><td class="fieldrequired">'.$langs->trans("Nature")."</td><td>\n";
|
||||
print '<tr><td class="fieldrequired">'.$langs->trans("MemberNature")."</td><td>\n";
|
||||
print $form->selectarray("morphy", $morphys, GETPOST('morphy', 'alpha')?GETPOST('morphy', 'alpha'):$object->morphy, 1);
|
||||
print "</td>\n";
|
||||
|
||||
@ -1182,7 +1182,7 @@ else
|
||||
// Morphy
|
||||
$morphys["phy"] = $langs->trans("Physical");
|
||||
$morphys["mor"] = $langs->trans("Morale");
|
||||
print '<tr><td><span class="fieldrequired">'.$langs->trans("Nature").'</span></td><td>';
|
||||
print '<tr><td><span class="fieldrequired">'.$langs->trans("MemberNature").'</span></td><td>';
|
||||
print $form->selectarray("morphy", $morphys, (GETPOSTISSET("morphy")?GETPOST("morphy", 'alpha'):$object->morphy));
|
||||
print "</td></tr>";
|
||||
|
||||
@ -1613,7 +1613,7 @@ else
|
||||
print '<tr><td class="titlefield">'.$langs->trans("Type").'</td><td class="valeur">'.$adht->getNomUrl(1)."</td></tr>\n";
|
||||
|
||||
// Morphy
|
||||
print '<tr><td>'.$langs->trans("Nature").'</td><td class="valeur" >'.$object->getmorphylib().'</td>';
|
||||
print '<tr><td>'.$langs->trans("MemberNature").'</td><td class="valeur" >'.$object->getmorphylib().'</td>';
|
||||
print '</tr>';
|
||||
|
||||
// Gender
|
||||
|
||||
@ -127,7 +127,7 @@ if ($id > 0)
|
||||
print '<tr><td>'.$langs->trans("Type").'</td><td class="valeur">'.$membert->getNomUrl(1)."</td></tr>\n";
|
||||
|
||||
// Morphy
|
||||
print '<tr><td class="titlefield">'.$langs->trans("Nature").'</td><td class="valeur" >'.$object->getmorphylib().'</td>';
|
||||
print '<tr><td class="titlefield">'.$langs->trans("MemberNature").'</td><td class="valeur" >'.$object->getmorphylib().'</td>';
|
||||
/*print '<td rowspan="'.$rowspan.'" class="center" valign="middle" width="25%">';
|
||||
print $form->showphoto('memberphoto',$object);
|
||||
print '</td>';*/
|
||||
|
||||
@ -92,7 +92,7 @@ if ($id)
|
||||
print '<tr><td>'.$langs->trans("Type").'</td><td class="valeur">'.$adht->getNomUrl(1)."</td></tr>\n";
|
||||
|
||||
// Morphy
|
||||
print '<tr><td class="titlefield">'.$langs->trans("Nature").'</td><td class="valeur" >'.$object->getmorphylib().'</td>';
|
||||
print '<tr><td class="titlefield">'.$langs->trans("MemberNature").'</td><td class="valeur" >'.$object->getmorphylib().'</td>';
|
||||
/*print '<td rowspan="'.$rowspan.'" class="center" valign="middle" width="25%">';
|
||||
print $form->showphoto('memberphoto',$member);
|
||||
print '</td>';*/
|
||||
|
||||
@ -490,7 +490,7 @@ if ($rowid > 0)
|
||||
print '<tr><td class="titlefield">'.$langs->trans("Type").'</td><td class="valeur">'.$adht->getNomUrl(1)."</td></tr>\n";
|
||||
|
||||
// Morphy
|
||||
print '<tr><td>'.$langs->trans("Nature").'</td><td class="valeur" >'.$object->getmorphylib().'</td>';
|
||||
print '<tr><td>'.$langs->trans("MemberNature").'</td><td class="valeur" >'.$object->getmorphylib().'</td>';
|
||||
print '</tr>';
|
||||
|
||||
// Company
|
||||
|
||||
@ -258,7 +258,7 @@ if (! $rowid && $action != 'create' && $action != 'edit')
|
||||
print '<tr class="liste_titre">';
|
||||
print '<th>'.$langs->trans("Ref").'</th>';
|
||||
print '<th>'.$langs->trans("Label").'</th>';
|
||||
print '<th class="center">'.$langs->trans("Nature").'</th>';
|
||||
print '<th class="center">'.$langs->trans("MemberNature").'</th>';
|
||||
print '<th class="center">'.$langs->trans("SubscriptionRequired").'</th>';
|
||||
print '<th class="center">'.$langs->trans("VoteAllowed").'</th>';
|
||||
print '<th class="center">'.$langs->trans("Status").'</th>';
|
||||
@ -338,12 +338,12 @@ if ($action == 'create')
|
||||
print '<tr><td>'.$langs->trans("Status").'</td><td>';
|
||||
print $form->selectarray('statut', array('0'=>$langs->trans('ActivityCeased'),'1'=>$langs->trans('InActivity')), 1);
|
||||
print '</td></tr>';
|
||||
|
||||
|
||||
// Morphy
|
||||
$morphys[""] = $langs->trans("Physical & Morale");
|
||||
$morphys[""] = $langs->trans("MorPhy");
|
||||
$morphys["phy"] = $langs->trans("Physical");
|
||||
$morphys["mor"] = $langs->trans("Morale");
|
||||
print '<tr><td><span>'.$langs->trans("Nature").'</span></td><td>';
|
||||
print '<tr><td><span>'.$langs->trans("MemberNature").'</span></td><td>';
|
||||
print $form->selectarray("morphy", $morphys, isset($_POST["morphy"])?$_POST["morphy"]:$object->morphy);
|
||||
print "</td></tr>";
|
||||
|
||||
@ -427,9 +427,9 @@ if ($rowid > 0)
|
||||
print img_picto($langs->trans('TypeStatusInactive'), 'statut5').' '.$langs->trans("ActivityCeased");
|
||||
}
|
||||
print '</tr>';
|
||||
|
||||
|
||||
// Morphy
|
||||
print '<tr><td>'.$langs->trans("Nature").'</td><td class="valeur" >'.$object->getmorphylib($object->morphy).'</td>';
|
||||
print '<tr><td>'.$langs->trans("MemberNature").'</td><td class="valeur" >'.$object->getmorphylib($object->morphy).'</td>';
|
||||
print '</tr>';
|
||||
|
||||
print '<tr><td class="titlefield">'.$langs->trans("SubscriptionRequired").'</td><td>';
|
||||
@ -630,7 +630,7 @@ if ($rowid > 0)
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre("NameSlashCompany", $_SERVER["PHP_SELF"], "d.lastname", $param, "", "", $sortfield, $sortorder);
|
||||
print_liste_field_titre("Login", $_SERVER["PHP_SELF"], "d.login", $param, "", "", $sortfield, $sortorder);
|
||||
print_liste_field_titre("Nature", $_SERVER["PHP_SELF"], "d.morphy", $param, "", "", $sortfield, $sortorder);
|
||||
print_liste_field_titre("MemberNature", $_SERVER["PHP_SELF"], "d.morphy", $param, "", "", $sortfield, $sortorder);
|
||||
print_liste_field_titre("EMail", $_SERVER["PHP_SELF"], "d.email", $param, "", "", $sortfield, $sortorder);
|
||||
print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "d.statut,d.datefin", $param, "", "", $sortfield, $sortorder);
|
||||
print_liste_field_titre("EndSubscription", $_SERVER["PHP_SELF"], "d.datefin", $param, "", 'align="center"', $sortfield, $sortorder);
|
||||
@ -771,12 +771,12 @@ if ($rowid > 0)
|
||||
print '<tr><td>'.$langs->trans("Status").'</td><td>';
|
||||
print $form->selectarray('statut', array('0'=>$langs->trans('ActivityCeased'),'1'=>$langs->trans('InActivity')), $object->statut);
|
||||
print '</td></tr>';
|
||||
|
||||
|
||||
// Morphy
|
||||
$morphys[""] = $langs->trans("Physical & Morale");
|
||||
$morphys[""] = $langs->trans("MorPhy");
|
||||
$morphys["phy"] = $langs->trans("Physical");
|
||||
$morphys["mor"] = $langs->trans("Morale");
|
||||
print '<tr><td><span>'.$langs->trans("Nature").'</span></td><td>';
|
||||
print '<tr><td><span>'.$langs->trans("MemberNature").'</span></td><td>';
|
||||
print $form->selectarray("morphy", $morphys, isset($_POST["morphy"])?$_POST["morphy"]:$object->morphy);
|
||||
print "</td></tr>";
|
||||
|
||||
|
||||
@ -227,6 +227,15 @@ class DiscountAbsolute
|
||||
return -1;
|
||||
}
|
||||
|
||||
$userid = $user->id;
|
||||
if (! ($userid > 0)) // For example when record is saved into an anonymous context with a not loaded object $user.
|
||||
{
|
||||
include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
||||
$tmpinvoice = new Facture($this->db);
|
||||
$tmpinvoice->fetch($this->fk_facture_source);
|
||||
$userid = $tmpinvoice->fk_user_author; // We use the author of invoice
|
||||
}
|
||||
|
||||
// Insert request
|
||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."societe_remise_except";
|
||||
$sql.= " (entity, datec, fk_soc, discount_type, fk_user, description,";
|
||||
@ -234,7 +243,7 @@ class DiscountAbsolute
|
||||
$sql.= " multicurrency_amount_ht, multicurrency_amount_tva, multicurrency_amount_ttc,";
|
||||
$sql.= " fk_facture_source, fk_invoice_supplier_source";
|
||||
$sql.= ")";
|
||||
$sql.= " VALUES (".$conf->entity.", '".$this->db->idate($this->datec!=''?$this->datec:dol_now())."', ".$this->fk_soc.", ".(empty($this->discount_type)?0:intval($this->discount_type)).", ".$user->id.", '".$this->db->escape($this->description)."',";
|
||||
$sql.= " VALUES (".$conf->entity.", '".$this->db->idate($this->datec!=''?$this->datec:dol_now())."', ".$this->fk_soc.", ".(empty($this->discount_type)?0:intval($this->discount_type)).", ".$userid.", '".$this->db->escape($this->description)."',";
|
||||
$sql.= " ".$this->amount_ht.", ".$this->amount_tva.", ".$this->amount_ttc.", ".$this->tva_tx.",";
|
||||
$sql.= " ".$this->multicurrency_amount_ht.", ".$this->multicurrency_amount_tva.", ".$this->multicurrency_amount_ttc.", ";
|
||||
$sql.= " ".($this->fk_facture_source ? "'".$this->db->escape($this->fk_facture_source)."'":"null").",";
|
||||
|
||||
@ -171,7 +171,7 @@ MembersStatisticsDesc=Choose statistics you want to read...
|
||||
MenuMembersStats=Statistics
|
||||
LastMemberDate=Latest member date
|
||||
LatestSubscriptionDate=Latest subscription date
|
||||
Nature=Nature
|
||||
MemberNature=Nature of member
|
||||
Public=Information are public
|
||||
NewMemberbyWeb=New member added. Awaiting approval
|
||||
NewMemberForm=New member form
|
||||
|
||||
@ -159,7 +159,7 @@ SuppliersPrices=Vendor prices
|
||||
SuppliersPricesOfProductsOrServices=Vendor prices (of products or services)
|
||||
CustomCode=Customs / Commodity / HS code
|
||||
CountryOrigin=Origin country
|
||||
Nature=Product Type (material/finished)
|
||||
Nature=Nature of produt (material/finished)
|
||||
ShortLabel=Short label
|
||||
Unit=Unit
|
||||
p=u.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user