Commit f9e31bca by yasir

update

1 parent d4217b53
......@@ -45,7 +45,9 @@ def query_csv(request, status):
')'
]).label('Nama_Customer'),
vendor.nama.label('Nama_Vendor'),
PartnerPay.amt_sell.label('Harga'),
PartnerPay.amt_buy.label('Harga_Beli'),
PartnerPay.amt_sell.label('Harga_Jual'),
PartnerPay.fee.label('Fee'),
case(
[
(PartnerPay.status <= 0, 0)
......@@ -103,7 +105,8 @@ class ViewData(BaseView):
dict(title = "Tanggal"),
dict(title="Customer"),
dict(title="Vendor"),
dict(title="Amount"),
dict(title="Harga Beli"),
dict(title="Harga Jual"),
dict(title="Fee"),
dict(title="Status"),
],
......@@ -113,9 +116,10 @@ class ViewData(BaseView):
dict(data = "created"),
dict(data="customer"),
dict(data="vendor"),
dict(data="amount", width="100px"),
dict(data="fee", width="100px"),
dict(data="status", width="100px"),
dict(data="amount_buy", width="70px"),
dict(data="amount", width="70px"),
dict(data="fee", width="70px"),
dict(data="status", width="70px"),
],
'buttons': [
dict(id="btn_view", cls="btn btn btn-primary", title="View"),
......@@ -174,7 +178,7 @@ class ViewData(BaseView):
mData='customer'
),
ColumnDT(vendor.nama, mData='vendor'),
ColumnDT(PartnerPay.amt_buy, mData='amount_buy'),
ColumnDT(PartnerPay.amt_sell, mData='amount'),
ColumnDT(PartnerPay.fee, mData='fee'),
ColumnDT(case(
......@@ -209,7 +213,9 @@ class ViewData(BaseView):
'Tanggal',
'Nama_Customer',
'Nama_Vendor',
'Harga',
'Harga_Beli',
'Harga_Jual',
'Fee',
'Status'
]
else:
......
......@@ -41,10 +41,12 @@ def query_csv(request, status):
customer = aliased(Partner, name='customer')
query = DBSession.query(H2hArInvoice.cust_inv_no.label('Nomor_Invoice'),
H2hArInvoice.created.label('Tanggal'),
H2hArInvoiceDet.id_pel.label('ID.Pel'),
customer.nama.label('Nama_Customer'),
vendor.nama.label('Nama_Vendor'),
Produk.nama.label('Nama_Produk'),
H2hArInvoiceDet.amt_sell.label('Harga'),
H2hArInvoiceDet.amt_buy.label('Harga_Beli'),
H2hArInvoiceDet.amt_sell.label('Harga_Jual'),
case(
[
(H2hArInvoiceDet.status <= 0, 0)
......@@ -115,7 +117,8 @@ class ViewData(BaseView):
dict(title="Customer"),
dict(title="Vendor"),
dict(title="Produk"),
dict(title="Harga"),
dict(title="Harga Beli"),
dict(title="Harga Jual"),
dict(title="Status"),
],
'column_data': [
......@@ -126,6 +129,7 @@ class ViewData(BaseView):
dict(data="customer"),
dict(data="vendor"),
dict(data="produk"),
dict(data="harga_beli", width="100px"),
dict(data="harga", width="100px"),
dict(data="status", width="100px"),
],
......@@ -171,6 +175,7 @@ class ViewData(BaseView):
ColumnDT(customer.nama, mData='customer'),
ColumnDT(vendor.nama, mData='vendor'),
ColumnDT(Produk.nama, mData='produk'),
ColumnDT(H2hArInvoiceDet.amt_buy, mData='harga_beli'),
ColumnDT(H2hArInvoiceDet.amt_sell, mData='harga'),
ColumnDT(case(
[
......@@ -205,9 +210,11 @@ class ViewData(BaseView):
header = [
'Nomor_Invoice',
'Tanggal',
'ID.Pel',
'Nama_Customer',
'Nama_Produk',
'Harga',
'Harga_Beli',
'Harga_Jual',
'Status'
]
else:
......
......@@ -116,11 +116,12 @@
{'data': 'id', 'width': '0px'},
{'data': 'nomor', 'width': '150px'},
{'data': 'tanggal', 'width': '85px'},
{'data': 'customer'},
{'data': 'vendor'},
{'data': 'amount', 'width': '100px'},
{'data': 'fee', 'width': '100px'},
{'data': 'status', 'width': '100px',
{'data': 'customer', 'width': '80px'},
{'data': 'vendor', 'width': '80px'},
{'data': 'amount_buy', 'width': '70px'},
{'data': 'amount', 'width': '70px'},
{'data': 'fee', 'width': '70px'},
{'data': 'status', 'width': '70px',
'render': function(data, type, full, meta) {
var st = ${params.status_payment};
return st[data];
......
......@@ -115,13 +115,14 @@
columns: [
{'data': 'id', 'width': '0px'},
{'data': 'nomor', 'width': '150px'},
{'data': 'tanggal', 'width': '85px'},
{'data': 'tanggal', 'width': '60px'},
{'data': 'id_pel', 'width': '150px'},
{'data': 'customer'},
{'data': 'vendor'},
{'data': 'produk'},
{'data': 'harga', 'width': '100px'},
{'data': 'status', 'width': '100px',
{'data': 'customer', 'width': '80px'},
{'data': 'vendor', 'width': '80px'},
{'data': 'produk', 'width': '150px'},
{'data': 'harga_beli', 'width': '70px'},
{'data': 'harga', 'width': '70px'},
{'data': 'status', 'width': '70px',
'render': function(data, type, full, meta) {
var st = ${params.status_purchase};
return st[data];
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!