mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Fixing style errors.
This commit is contained in:
parent
dc90a62d90
commit
2f0ba41a53
|
|
@ -1958,15 +1958,14 @@ if ($action == 'create') {
|
|||
$notify = new Notify($db);
|
||||
$text .= '<br>';
|
||||
$text .= $notify->confirmMessage('PROPAL_VALIDATE', $object->socid, $object);
|
||||
|
||||
}
|
||||
|
||||
// mandatoryPeriod
|
||||
$nbMandated = 0;
|
||||
foreach ($object->lines as $line){
|
||||
foreach ($object->lines as $line) {
|
||||
$res = $line->fetch_product();
|
||||
if ($res > 0 ){
|
||||
if ($line->product->isService() && $line->product->isMandatoryPeriod() && (empty($line->date_start) || empty($line->date_end) )){
|
||||
if ($res > 0 ) {
|
||||
if ($line->product->isService() && $line->product->isMandatoryPeriod() && (empty($line->date_start) || empty($line->date_end) )) {
|
||||
$nbMandated++;
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1912,10 +1912,10 @@ if ($action == 'create' && $usercancreate) {
|
|||
|
||||
// mandatoryPeriod
|
||||
$nbMandated = 0;
|
||||
foreach ($object->lines as $line){
|
||||
foreach ($object->lines as $line) {
|
||||
$res = $line->fetch_product();
|
||||
if ($res > 0 ){
|
||||
if ($line->product->isService() && $line->product->isMandatoryPeriod() && (empty($line->date_start) || empty($line->date_end) )){
|
||||
if ($res > 0 ) {
|
||||
if ($line->product->isService() && $line->product->isMandatoryPeriod() && (empty($line->date_start) || empty($line->date_end) )) {
|
||||
$nbMandated++;
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4004,10 +4004,10 @@ if ($action == 'create') {
|
|||
|
||||
// mandatoryPeriod
|
||||
$nbMandated = 0;
|
||||
foreach ($object->lines as $line){
|
||||
foreach ($object->lines as $line) {
|
||||
$res = $line->fetch_product();
|
||||
if ($res > 0 ){
|
||||
if ($line->product->isService() && $line->product->isMandatoryPeriod() && (empty($line->date_start) || empty($line->date_end) )){
|
||||
if ($res > 0 ) {
|
||||
if ($line->product->isService() && $line->product->isMandatoryPeriod() && (empty($line->date_start) || empty($line->date_end) )) {
|
||||
$nbMandated++;
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -340,7 +340,7 @@ $coldisplay++;
|
|||
}
|
||||
|
||||
$res = $line->fetch_product();
|
||||
if ($res > 0 ){
|
||||
if ($res > 0 ) {
|
||||
if ($line->product->isMandatoryPeriod() && $line->product->isService()) {
|
||||
print 'jQuery("#date_start").addClass("error");';
|
||||
}
|
||||
|
|
@ -356,7 +356,7 @@ $coldisplay++;
|
|||
|
||||
$res = $line->fetch_product();
|
||||
// on doit fetch le product là !!! pour connaître le type
|
||||
if ($res > 0 ){
|
||||
if ($res > 0 ) {
|
||||
if ($line->product->isMandatoryperiod() && $line->product->isService()) {
|
||||
print 'jQuery("#date_end").addClass("error");';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -180,14 +180,13 @@ if (($line->info_bits & 2) == 2) {
|
|||
} else {
|
||||
if ($line->date_start || $line->date_end) {
|
||||
print '<br><div class="clearboth nowraponall opacitymedium">'.get_date_range($line->date_start, $line->date_end, $format).'</div>';
|
||||
|
||||
}
|
||||
if (!$line->date_start || !$line->date_end){
|
||||
if (!$line->date_start || !$line->date_end) {
|
||||
// show warning under line
|
||||
// we need to fetch product associated to line for some test
|
||||
$res = $line->fetch_product();
|
||||
if ($res > 0 ){
|
||||
if ($line->product->isService() && $line->product->isMandatoryPeriod()){
|
||||
if ($res > 0 ) {
|
||||
if ($line->product->isService() && $line->product->isMandatoryPeriod()) {
|
||||
print '<div><span class="clearboth nowraponall warning">'.$langs->trans("mandatoryPeriodNeedTobeSet").'</span></div>';
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -582,7 +582,7 @@ if (empty($reshook)) {
|
|||
} else {
|
||||
$object->accountancy_code_buy_export = $accountancy_code_buy_export;
|
||||
}
|
||||
if ($object->isService()){
|
||||
if ($object->isService()) {
|
||||
$object->mandatory_period = (!empty($checkmandatory)) ? 1 : 0 ;
|
||||
}
|
||||
|
||||
|
|
@ -1993,9 +1993,6 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
|||
print '<td><input type="checkbox" name="mandatoryperiod"'.($object->mandatory_period == 1 ? ' checked="checked"' : '').' /> ';
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
print '</table>';
|
||||
|
|
@ -2287,7 +2284,6 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
|||
print '<td class="center">';
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 0);
|
||||
print '</td></tr>';
|
||||
|
||||
} else {
|
||||
if (empty($conf->global->PRODUCT_DISABLE_NATURE)) {
|
||||
// Nature
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user