Commit 3d893f3b by musthofa

customer invoice

1 parent 69d4e70b
......@@ -49,3 +49,10 @@ api-integrated-delete,/api/integrated/{id}/delete,Delete Api Integrated Payment,
api-integrated-view,/api/integrated/{id}/view,View Api Integrated Payment,1,0
api-integrated-doc,/api/integrated/doc,Doc Api Integrated Payment,1,0
api-integrated-notify,/api/integrated/{name}/notify,Api Integrated Payment Notify,1,0
api-customer-list,/api/customer/list,List Customer,1,0
api-customer-act,/api/customer/{act}/act,Act Customer,1,0
api-customer-view,/api/customer/{id}/view,View Customer,1,0
api-customer-add,/api/customer/add,Add Customer,1,0
api-customer-edit,/api/customer/{id}/edit,Edit Customer,1,0
api-customer-delete,/api/customer/{id}/delete,Delete Customer,1,0
\ No newline at end of file
......@@ -48,39 +48,52 @@ class ViewData(BaseView):
# dict(title="Customer"),
dict(title="Vendor"),
dict(title="Nama Produk"),
dict(title="TRX Customer"),
dict(title="TRX Vendor"),
dict(title="ID Pelanggan"),
dict(title="TRX Vendor"),
dict(title="Nilai Beli"),
dict(title="Nilai Jual"),
dict(title="Amount Oth 1"),
dict(title="Amount Oth 2"),
dict(title="Amount Oth 3"),
dict(title="Amount Oth 4"),
dict(title="Amount Oth 5"),
dict(title="Sub Total"),
dict(title="Discount"),
dict(title="Nilai Jual"),
],
'column_data': [dict(data="id", width="0px"),
# dict(data="customer"),
dict(data="vendor"),
dict(data="produk_nama"),
dict(data="cust_trx"),
dict(data="vend_trx"),
dict(data="bill_no"),
dict(data="id_pel"),
dict(data="vend_inv_no"),
dict(data="amt_buy"),
dict(data="amt_sell"),
dict(data="amt_oth1"),
dict(data="amt_oth2"),
dict(data="amt_oth3"),
dict(data="amt_oth4"),
dict(data="amt_oth5"),
dict(data="subtotal"),
dict(data="discount"),
dict(data="amt_sell"),
],
'buttons': [
dict(id="btn_view", cls="btn btn btn-info", title="Detail"),
dict(id="btn_delete", cls="btn btn btn-primary", title="Hapus"),
dict(id="btn_close", cls="btn btn-danger", title="Tutup"),
],
'route': "/api/vendor",
'scripts': """
$('#btn_view').click(function() {
if (mID) window.location = oTableUri + '/' + mID + '/view';
else
$.SmartMessageBox({
title : "Detail",
content : "Pilih Baris yang akan di lihat...",
buttons : '[Oke]'
});;
});
$('#btn_delete').click(function() {
if (mID) window.location = oTableUri + '/' + mID + '/delete';
else
......@@ -120,16 +133,17 @@ class ViewData(BaseView):
# ColumnDT(Partner.nama, mData='customer'),
ColumnDT(Partner.nama, mData='vendor'),
ColumnDT(Produk.nama, mData='produk_nama'),
ColumnDT(PartnerLog.cust_trx, mData='cust_trx'),
ColumnDT(PartnerLog.vend_trx, mData='vend_trx'),
ColumnDT(PartnerLog.bill_no, mData='bill_no'),
ColumnDT(PartnerLog.id_pel, mData='id_pel'),
ColumnDT(PartnerLog.vend_inv_no, mData='vend_inv_no'),
ColumnDT(PartnerLog.amt_buy, mData='amt_buy'),
ColumnDT(PartnerLog.amt_sell, mData='amt_sell'),
ColumnDT(PartnerLog.amt_oth1, mData='amt_oth1'),
ColumnDT(PartnerLog.amt_oth2, mData='amt_oth2'),
ColumnDT(PartnerLog.amt_oth3, mData='amt_oth3'),
ColumnDT(PartnerLog.amt_oth4, mData='amt_oth4'),
ColumnDT(PartnerLog.amt_oth5, mData='amt_oth5'),
ColumnDT(PartnerLog.subtotal, mData='subtotal'),
ColumnDT(PartnerLog.discount, mData='discount'),
ColumnDT(PartnerLog.amt_sell, mData='amt_sell'),
]
query = DBSession.query().select_from(PartnerLog).join(Produk, Produk.id == PartnerLog.produk_id).join(Partner, Partner.id == PartnerLog.vendor_id).\
......
......@@ -43,6 +43,12 @@
<span class="menu-item-parent">Integrated Test</span>
</a>
</li>
<li>
<a href="${request._host}/api/customer/list">
<i class="fa fa-lg fa-fw fa-home"></i>
<span class="menu-item-parent">Customer Invoice</span>
</a>
</li>
</ul>
</html>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!