diff --git a/public/banklogo.png b/public/banklogo.png new file mode 100755 index 00000000..90b6a8c8 Binary files /dev/null and b/public/banklogo.png differ diff --git a/resources/assets/js/pages/admin/booking/supplierReport.vue b/resources/assets/js/pages/admin/booking/supplierReport.vue index dcc391aa..3b29933a 100644 --- a/resources/assets/js/pages/admin/booking/supplierReport.vue +++ b/resources/assets/js/pages/admin/booking/supplierReport.vue @@ -201,6 +201,7 @@ +
Download Now
@@ -222,7 +223,7 @@ - Edit + Edit Done @@ -309,6 +310,12 @@ link.href = dataString; link.click(); }, + goToSupplierBooking(){ + this.$router.push({ + name: 'booking.admin.supplier', + params: this.$route.params.id + }) + }, completeReport() { // TODO : send request to change status this.loading_btn = true @@ -402,7 +409,7 @@ ctx.fillText("Full Payment", column3X, rowHeight[5] - 5); //// Row 5 ctx.fillText("Payment Method :", column1X, rowHeight[6] - 5); - ctx.fillText("CASH", column3X, rowHeight[6] - 5); + ctx.fillText(binding.value.payment_method, column3X, rowHeight[6] - 5); //// Row 6 ctx.fillText("Remark :", column1X, rowHeight[7] - 10); //// Row 7 @@ -411,17 +418,17 @@ ctx.fillText("MYR/RM :", column1X, rowHeight[9] - 5); ctx.fillText("MYR", column2X, rowHeight[9] - 5); ctx.font = "bold 14px Arial"; - ctx.fillText("4830.68", column3X, rowHeight[9] - 5); + ctx.fillText(binding.value.transfer_amount, column3X, rowHeight[9] - 5); ctx.font = "13px Arial"; //// Row 8 ctx.fillText("* RATE :", column1X, rowHeight[10] - 5); - ctx.fillText("1.550", column3X, rowHeight[10] - 5); + ctx.fillText(binding.value.rate, column3X, rowHeight[10] - 5); //// Row 9 // Empty //// Row 10 ctx.font = "bold 14px Arial"; ctx.fillText("CNY", column2X, rowHeight[12] - 5); - ctx.fillText("7467.55", column3X, rowHeight[12] - 5); + ctx.fillText(binding.value.amountInRMB, column3X, rowHeight[12] - 5); ctx.font = "13px Arial"; //line ctx.beginPath(); @@ -441,11 +448,11 @@ //// Row 12 ctx.fillText("Billing(1.0%) :", column1X, rowHeight[15] - 5); ctx.fillText("MYR", column2X, rowHeight[15] - 5); - ctx.fillText("62.46", column3X, rowHeight[15] - 5); + ctx.fillText(binding.value.billing_amount, column3X, rowHeight[15] - 5); //// Row 13 ctx.fillText("+ SALES TAX (10%) :", column1X, rowHeight[16] - 5); ctx.fillText("MYR", column2X, rowHeight[16] - 5); - ctx.fillText("483.07", column3X, rowHeight[16] - 5); + ctx.fillText(binding.value.salestax_amount, column3X, rowHeight[16] - 5); //// Row 14 ctx.fillText("+ GST 6% :", column1X, rowHeight[17] - 15); ctx.fillText("MYR", column2X, rowHeight[17] - 15); @@ -455,7 +462,7 @@ ctx.fillText("Customer Bank In Amount :", column1X, rowHeight[18] - 5); ctx.fillStyle = "#0070D5"; ctx.fillText("MYR", column2X, rowHeight[18] - 5); - ctx.fillText("5676.05", column3X, rowHeight[18] - 5); + ctx.fillText(binding.value.amountInRMB, column3X, rowHeight[18] - 5); ctx.fillStyle = "#000000"; ctx.font = "13px Arial"; //line @@ -489,17 +496,16 @@ //// Row 18 //// Row 19 var img = new Image(); - img.src = "banklogo.png"; + img.src = "/banklogo.png"; img.crossOrigin = "anonymous"; var maxwidth = 70; var ratio = maxwidth / img.width; var offset = ((rowHeight[22] - rowHeight[21]) / 2) - (img.height * ratio / 2); var y = rowHeight[21] + offset; // to make it always center - img.onload = function () { - ctx.drawImage(img, 110, y, img.width * ratio, img.height * ratio); - to_image(); - }; + img.onload=function(){ + ctx.drawImage(img, 50, 530, 80, 50); + }; // text ctx.font = "bold 14px Arial";