summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorstephanchrst <stephanchrst@gmail.com>2024-10-11 09:02:17 +0700
committerstephanchrst <stephanchrst@gmail.com>2024-10-11 09:02:17 +0700
commitc795b3508756c625a545e35c7329ff705a3c3c9d (patch)
tree5ed59c01302cc54cdc2cf8cc176bf021d44a8671
parent1cdb32893afe7b8360f488f58d46f71745bf7691 (diff)
add distinct in purchasing job while join sale order
-rw-r--r--indoteknik_custom/models/purchasing_job.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/indoteknik_custom/models/purchasing_job.py b/indoteknik_custom/models/purchasing_job.py
index 0c34fc3c..756b1079 100644
--- a/indoteknik_custom/models/purchasing_job.py
+++ b/indoteknik_custom/models/purchasing_job.py
@@ -65,7 +65,7 @@ class PurchasingJob(models.Model):
END AS purchase_representative_id
FROM v_procurement_monitoring_by_product pmp
LEFT JOIN purchasing_job_state pjs ON pjs.purchasing_job_id = pmp.product_id
- LEFT JOIN ( SELECT vso.product_id,
+ LEFT JOIN ( SELECT distinct vso.product_id,
sol.vendor_id
FROM v_sales_outstanding vso
LEFT JOIN sale_order_line sol ON sol.id = vso.sale_line_id) sub ON sub.product_id = pmp.product_id