Commit a8bc6a94 by suri

perbaikan join target agar tidak double

1 parent d54f1990
...@@ -129,7 +129,7 @@ class eis(BaseView): ...@@ -129,7 +129,7 @@ class eis(BaseView):
func.sum(ChartItem.value_1+ChartItem.value_2+ChartItem.value_3+ChartItem.value_4+\ func.sum(ChartItem.value_1+ChartItem.value_2+ChartItem.value_3+ChartItem.value_4+\
ChartItem.value_5+ChartItem.value_6+ChartItem.value_7+ChartItem.value_8+ChartItem.value_9+\ ChartItem.value_5+ChartItem.value_6+ChartItem.value_7+ChartItem.value_8+ChartItem.value_9+\
ChartItem.value10+ChartItem.value11+ChartItem.value12))*100,2),String).label('persen')).\ ChartItem.value10+ChartItem.value11+ChartItem.value12))*100,2),String).label('persen')).\
join(ChartItem, func.trim(ChartItem.rekening_kd)==func.trim(Eis.kode)).\ join(ChartItem, and_(func.trim(ChartItem.rekening_kd)==func.trim(Eis.kode),ChartItem.source_type=='target')).\
join(Chart, and_(Chart.id == ChartItem.chart_id, Chart.chart_type == 'line')).\ join(Chart, and_(Chart.id == ChartItem.chart_id, Chart.chart_type == 'line')).\
filter(Eis.tahun==max_tahun).\ filter(Eis.tahun==max_tahun).\
group_by(Eis.kode,Eis.nama,Eis.tahun).order_by(Eis.kode).subquery() group_by(Eis.kode,Eis.nama,Eis.tahun).order_by(Eis.kode).subquery()
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!