';
@@ -528,6 +527,9 @@ if ($result) {
while ($i < min($num_lines, $limit)) {
$objp = $db->fetch_object($result);
+ // product_type: 0 = service, 1 = product
+ // if product does not exist we use the value of product_type provided in facturedet to define if this is a product or service
+ // issue : if we change product_type value in product DB it should differ from the value stored in facturedet DB !
$code_sell_l = '';
$code_sell_p = '';
@@ -662,7 +664,7 @@ if ($result) {
// Vat rate
$code_vat_differ = '';
- if ($product_static->tva_tx !== $facture_static_det->tva_tx && !empty($product_static->tva_tx) && !empty($facture_static_det->tva_tx)) { // Note: having a vat rate of 0 is often the normal case when sells is intra b2b or to export
+ if ($product_static->tva_tx !== $facture_static_det->tva_tx && price2num($product_static->tva_tx) && price2num($facture_static_det->tva_tx)) { // Note: having a vat rate of 0 is often the normal case when sells is intra b2b or to export
$code_vat_differ = 'warning bold';
}
print '
';
@@ -731,12 +733,13 @@ if ($result) {
// Column with checkbox
print '
';
print '';
diff --git a/htdocs/accountancy/supplier/list.php b/htdocs/accountancy/supplier/list.php
index b8fdfc6e0c5..a189727494c 100644
--- a/htdocs/accountancy/supplier/list.php
+++ b/htdocs/accountancy/supplier/list.php
@@ -529,11 +529,12 @@ if ($result) {
while ($i < min($num_lines, $limit)) {
$objp = $db->fetch_object($result);
- // product_type: 0 = service ? 1 = product
+ // product_type: 0 = service, 1 = product
// if product does not exist we use the value of product_type provided in facturedet to define if this is a product or service
// issue : if we change product_type value in product DB it should differ from the value stored in facturedet DB !
$objp->code_buy_l = '';
$objp->code_buy_p = '';
+ $objp->aarowid_suggest = ''; // Will be set later
$thirdpartystatic->id = $objp->socid;
$thirdpartystatic->name = $objp->name;
@@ -575,10 +576,6 @@ if ($result) {
$facturefourn_static_det->product_type = $objp->type_l;
$facturefourn_static_det->desc = $objp->description;
- $code_buy_p_notset = '';
- $code_buy_t_notset = '';
- $objp->aarowid_suggest = ''; // Will be set later
-
$accountingAccountArray = array(
'dom'=>$objp->aarowid,
'intra'=>$objp->aarowid_intra,
@@ -601,6 +598,9 @@ if ($result) {
}
//var_dump($return);
+ // Level 3: Search suggested account for this thirdparty (similar code exists in page index.php to make automatic binding)
+ // Not supported for suppliers
+
if (!empty($code_buy_p)) {
// Value was defined previously
} else {
@@ -655,7 +655,7 @@ if ($result) {
// Vat rate
$code_vat_differ = '';
- if ($objp->vat_tx_l != $objp->vat_tx_p && !empty($objp->vat_tx_p) && !empty($objp->vat_tx_l)) { // Note: having a vat rate of 0 is often the normal case when sells is intra b2b or to export
+ if ($objp->vat_tx_l != $objp->vat_tx_p && price2num($objp->vat_tx_p) && price2num($objp->vat_tx_l)) { // Note: having a vat rate of 0 is often the normal case when sells is intra b2b or to export
$code_vat_differ = 'warning bold';
}
print '