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) {
|
||||
setEventMessage($accountingAccount->error, 'errors');
|
||||
} else {
|
||||
$suggestedid=$return['suggestedid'];
|
||||
$suggestedaccountingaccountfor=$return['suggestedaccountingaccountfor'];
|
||||
$suggestedid = $return['suggestedid'];
|
||||
$suggestedaccountingaccountfor = $return['suggestedaccountingaccountfor'];
|
||||
|
||||
if (!empty($suggestedid) && $suggestedaccountingaccountfor<>'') {
|
||||
$suggestedid=$return['suggestedid'];
|
||||
if (!empty($suggestedid) && $suggestedaccountingaccountfor != '' && $suggestedaccountingaccountfor != 'eecwithoutvatnumber') {
|
||||
$suggestedid = $return['suggestedid'];
|
||||
} else {
|
||||
$suggestedid=0;
|
||||
$suggestedid = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -734,10 +734,8 @@ if ($result) {
|
||||
// Column with checkbox
|
||||
print '<td class="center">';
|
||||
$ischecked = 0;
|
||||
if (!empty($suggestedid) && $suggestedaccountingaccountfor <> '') {
|
||||
if (!empty($suggestedid) && $suggestedaccountingaccountfor != '' && $suggestedaccountingaccountfor != 'eecwithoutvatnumber') {
|
||||
$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 '</td>';
|
||||
|
||||
@ -245,13 +245,13 @@ if ($action == 'validatehistory') {
|
||||
if (!is_array($return) && $return<0) {
|
||||
setEventMessage($accountingAccount->error, 'errors');
|
||||
} else {
|
||||
$suggestedid=$return['suggestedid'];
|
||||
$suggestedaccountingaccountfor=$return['suggestedaccountingaccountfor'];
|
||||
$suggestedid = $return['suggestedid'];
|
||||
$suggestedaccountingaccountfor = $return['suggestedaccountingaccountfor'];
|
||||
|
||||
if (!empty($suggestedid) && $suggestedaccountingaccountfor<>'') {
|
||||
$suggestedid=$return['suggestedid'];
|
||||
if (!empty($suggestedid) && $suggestedaccountingaccountfor != '' && $suggestedaccountingaccountfor != 'eecwithoutvatnumber') {
|
||||
$suggestedid = $return['suggestedid'];
|
||||
} else {
|
||||
$suggestedid=0;
|
||||
$suggestedid = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -725,10 +725,8 @@ if ($result) {
|
||||
// Column with checkbox
|
||||
print '<td class="center">';
|
||||
$ischecked = 0;
|
||||
if (!empty($suggestedid) && $suggestedaccountingaccountfor <> '') {
|
||||
if (!empty($suggestedid) && $suggestedaccountingaccountfor != '' && $suggestedaccountingaccountfor != 'eecwithoutvatnumber') {
|
||||
$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 '</td>';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user