Fix autocheck if vat rate seems wrong
This commit is contained in:
parent
5b5f41606a
commit
67d69e5cd6
@ -249,13 +249,13 @@ if ($action == 'validatehistory') {
|
|||||||
if (!is_array($return) && $return<0) {
|
if (!is_array($return) && $return<0) {
|
||||||
setEventMessage($accountingAccount->error, 'errors');
|
setEventMessage($accountingAccount->error, 'errors');
|
||||||
} else {
|
} else {
|
||||||
$suggestedid=$return['suggestedid'];
|
$suggestedid = $return['suggestedid'];
|
||||||
$suggestedaccountingaccountfor=$return['suggestedaccountingaccountfor'];
|
$suggestedaccountingaccountfor = $return['suggestedaccountingaccountfor'];
|
||||||
|
|
||||||
if (!empty($suggestedid) && $suggestedaccountingaccountfor<>'') {
|
if (!empty($suggestedid) && $suggestedaccountingaccountfor != '' && $suggestedaccountingaccountfor != 'eecwithoutvatnumber') {
|
||||||
$suggestedid=$return['suggestedid'];
|
$suggestedid = $return['suggestedid'];
|
||||||
} else {
|
} else {
|
||||||
$suggestedid=0;
|
$suggestedid = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -734,10 +734,8 @@ if ($result) {
|
|||||||
// Column with checkbox
|
// Column with checkbox
|
||||||
print '<td class="center">';
|
print '<td class="center">';
|
||||||
$ischecked = 0;
|
$ischecked = 0;
|
||||||
if (!empty($suggestedid) && $suggestedaccountingaccountfor <> '') {
|
if (!empty($suggestedid) && $suggestedaccountingaccountfor != '' && $suggestedaccountingaccountfor != 'eecwithoutvatnumber') {
|
||||||
$ischecked = 1;
|
$ischecked = 1;
|
||||||
} elseif ($suggestedaccountingaccountfor == 'eecwithoutvatnumber') {
|
|
||||||
$ischecked = 0;
|
|
||||||
}
|
}
|
||||||
print '<input type="checkbox" class="flat checkforselect checkforselect'.$facture_static_det->id.'" name="toselect[]" value="'.$facture_static_det->id."_".$i.'"'.($ischecked ? " checked" : "").'/>';
|
print '<input type="checkbox" class="flat checkforselect checkforselect'.$facture_static_det->id.'" name="toselect[]" value="'.$facture_static_det->id."_".$i.'"'.($ischecked ? " checked" : "").'/>';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|||||||
@ -245,13 +245,13 @@ if ($action == 'validatehistory') {
|
|||||||
if (!is_array($return) && $return<0) {
|
if (!is_array($return) && $return<0) {
|
||||||
setEventMessage($accountingAccount->error, 'errors');
|
setEventMessage($accountingAccount->error, 'errors');
|
||||||
} else {
|
} else {
|
||||||
$suggestedid=$return['suggestedid'];
|
$suggestedid = $return['suggestedid'];
|
||||||
$suggestedaccountingaccountfor=$return['suggestedaccountingaccountfor'];
|
$suggestedaccountingaccountfor = $return['suggestedaccountingaccountfor'];
|
||||||
|
|
||||||
if (!empty($suggestedid) && $suggestedaccountingaccountfor<>'') {
|
if (!empty($suggestedid) && $suggestedaccountingaccountfor != '' && $suggestedaccountingaccountfor != 'eecwithoutvatnumber') {
|
||||||
$suggestedid=$return['suggestedid'];
|
$suggestedid = $return['suggestedid'];
|
||||||
} else {
|
} else {
|
||||||
$suggestedid=0;
|
$suggestedid = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -725,10 +725,8 @@ if ($result) {
|
|||||||
// Column with checkbox
|
// Column with checkbox
|
||||||
print '<td class="center">';
|
print '<td class="center">';
|
||||||
$ischecked = 0;
|
$ischecked = 0;
|
||||||
if (!empty($suggestedid) && $suggestedaccountingaccountfor <> '') {
|
if (!empty($suggestedid) && $suggestedaccountingaccountfor != '' && $suggestedaccountingaccountfor != 'eecwithoutvatnumber') {
|
||||||
$ischecked = 1;
|
$ischecked = 1;
|
||||||
} elseif ($suggestedaccountingaccountfor == 'eecwithoutvatnumber') {
|
|
||||||
$ischecked = 0;
|
|
||||||
}
|
}
|
||||||
print '<input type="checkbox" class="flat checkforselect checkforselect'.$facturefourn_static_det->id.'" name="toselect[]" value="'.$facturefourn_static_det->id."_".$i.'"'.($ischecked ? " checked" : "").'/>';
|
print '<input type="checkbox" class="flat checkforselect checkforselect'.$facturefourn_static_det->id.'" name="toselect[]" value="'.$facturefourn_static_det->id."_".$i.'"'.($ischecked ? " checked" : "").'/>';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user