template direct print rawbt pada aplikasi penjualan appsheet ekisfamily - xwijaya

Tidak menemukan artikel? cari disini



template direct print rawbt pada aplikasi penjualan appsheet ekisfamily


kali ini saya akan bagikan code direct print dengan rawbt menggunakan appsheet, ini adalah contoh nota pada aplikasi penjualan di video YouTube ekisfamily di bawah ini


pada video di atas print menggunakan template php dan html, di bawah ini adalah template direct print nya tanpa preview, dan tanpa menggunakan localhost maupun hosting  

untuk lebih jelasnya silahkan tonton video pembuatan direct print dengan text sederhana ini terlebih dahulu




simak dan pelajari codenya , sedikit sy jelaskan, karena pada appshet tidak mendukung looping array maka list produk terjual menggunakan list index , jadi template ini contoh maksimal produk dalam nota adalah 12 detail transaksi, bisa di tambah lagi dengan menambah bagian, perhatikan angka index pada detail transaksi pada template di bawah hanya sampai 12, jika toko terasa max pertransaksi melebihi 12 barang dalam satu transaksi, bisa menambah sendiri 13, 14 dst cnth 

ifs(
isnotblank(index(select(detail_transaksi[nama_produk],[no_transaksi]=[_thisrow].[no_transaksi]),13)
),concatenate (
index(select(detail_transaksi[nama_produk],[no_transaksi]=[_thisrow].[no_transaksi]),13),"
",RIGHT("        " & (index(select(detail_transaksi[harga_produk],[no_transaksi]=[_thisrow].[no_transaksi]),13)) ,8)," x ",index(select(detail_transaksi[qty],[no_transaksi]=[_thisrow].[no_transaksi]),13),"            ",RIGHT("        " & ( index(select(detail_transaksi[sub_total],[no_transaksi]=[_thisrow].[no_transaksi]),13)) ,8),"
"))
 
ifs di gunakan ketika index transaksi produk kosong maka tidak ter print, meskipun template sampai 100produk jika penjualan hanya 1 transaksi maka tetap hanya 1 yg tertera pada print


concatenate ("
           xwijaya.com
   l.mojopahit no 6 prabumuih 
        telp. 087123456789
--------------------------------
Id transaksi : ",[no_transaksi],"
Tanggal    : ",[tanggal],"
--------------------------------
Item                   Sub Total
",
ifs(
isnotblank(index(select(detail_transaksi[nama_produk],[no_transaksi]=[_thisrow].[no_transaksi]),1)
),concatenate (
index(select(detail_transaksi[nama_produk],[no_transaksi]=[_thisrow].[no_transaksi]),1),"
",RIGHT("        " & (index(select(detail_transaksi[harga_produk],[no_transaksi]=[_thisrow].[no_transaksi]),1)) ,8)," x ",index(select(detail_transaksi[qty],[no_transaksi]=[_thisrow].[no_transaksi]),1),"            ",RIGHT("        " & ( index(select(detail_transaksi[sub_total],[no_transaksi]=[_thisrow].[no_transaksi]),1)) ,8),"
"))
,"",ifs(
isnotblank(index(select(detail_transaksi[nama_produk],[no_transaksi]=[_thisrow].[no_transaksi]),2)
),concatenate (
index(select(detail_transaksi[nama_produk],[no_transaksi]=[_thisrow].[no_transaksi]),2),"
",RIGHT("        " & (index(select(detail_transaksi[harga_produk],[no_transaksi]=[_thisrow].[no_transaksi]),2)) ,8)," x ",index(select(detail_transaksi[qty],[no_transaksi]=[_thisrow].[no_transaksi]),2),"            ",RIGHT("        " & ( index(select(detail_transaksi[sub_total],[no_transaksi]=[_thisrow].[no_transaksi]),2)) ,8),"
"))
,"",ifs(
isnotblank(index(select(detail_transaksi[nama_produk],[no_transaksi]=[_thisrow].[no_transaksi]),3)
),concatenate (
index(select(detail_transaksi[nama_produk],[no_transaksi]=[_thisrow].[no_transaksi]),3),"
",RIGHT("        " & (index(select(detail_transaksi[harga_produk],[no_transaksi]=[_thisrow].[no_transaksi]),3)) ,8)," x ",index(select(detail_transaksi[qty],[no_transaksi]=[_thisrow].[no_transaksi]),3),"            ",RIGHT("        " & ( index(select(detail_transaksi[sub_total],[no_transaksi]=[_thisrow].[no_transaksi]),3)) ,8),"
"))
,"",ifs(
isnotblank(index(select(detail_transaksi[nama_produk],[no_transaksi]=[_thisrow].[no_transaksi]),4)
),concatenate (
index(select(detail_transaksi[nama_produk],[no_transaksi]=[_thisrow].[no_transaksi]),4),"
",RIGHT("        " & (index(select(detail_transaksi[harga_produk],[no_transaksi]=[_thisrow].[no_transaksi]),4)) ,8)," x ",index(select(detail_transaksi[qty],[no_transaksi]=[_thisrow].[no_transaksi]),4),"            ",RIGHT("        " & ( index(select(detail_transaksi[sub_total],[no_transaksi]=[_thisrow].[no_transaksi]),4)) ,8),"
"))
,"",ifs(
isnotblank(index(select(detail_transaksi[nama_produk],[no_transaksi]=[_thisrow].[no_transaksi]),5)
),concatenate (
index(select(detail_transaksi[nama_produk],[no_transaksi]=[_thisrow].[no_transaksi]),5),"
",RIGHT("        " & (index(select(detail_transaksi[harga_produk],[no_transaksi]=[_thisrow].[no_transaksi]),5)) ,8)," x ",index(select(detail_transaksi[qty],[no_transaksi]=[_thisrow].[no_transaksi]),5),"            ",RIGHT("        " & ( index(select(detail_transaksi[sub_total],[no_transaksi]=[_thisrow].[no_transaksi]),5)) ,8),"
"))
,"",ifs(
isnotblank(index(select(detail_transaksi[nama_produk],[no_transaksi]=[_thisrow].[no_transaksi]),6)
),concatenate (
index(select(detail_transaksi[nama_produk],[no_transaksi]=[_thisrow].[no_transaksi]),6),"
",RIGHT("        " & (index(select(detail_transaksi[harga_produk],[no_transaksi]=[_thisrow].[no_transaksi]),6)) ,8)," x ",index(select(detail_transaksi[qty],[no_transaksi]=[_thisrow].[no_transaksi]),6),"            ",RIGHT("        " & ( index(select(detail_transaksi[sub_total],[no_transaksi]=[_thisrow].[no_transaksi]),6)) ,8),"
"))
,"",ifs(
isnotblank(index(select(detail_transaksi[nama_produk],[no_transaksi]=[_thisrow].[no_transaksi]),6)
),concatenate (
index(select(detail_transaksi[nama_produk],[no_transaksi]=[_thisrow].[no_transaksi]),6),"
",RIGHT("        " & (index(select(detail_transaksi[harga_produk],[no_transaksi]=[_thisrow].[no_transaksi]),6)) ,8)," x ",index(select(detail_transaksi[qty],[no_transaksi]=[_thisrow].[no_transaksi]),6),"            ",RIGHT("        " & ( index(select(detail_transaksi[sub_total],[no_transaksi]=[_thisrow].[no_transaksi]),6)) ,8),"
"))
,"",ifs(
isnotblank(index(select(detail_transaksi[nama_produk],[no_transaksi]=[_thisrow].[no_transaksi]),7)
),concatenate (
index(select(detail_transaksi[nama_produk],[no_transaksi]=[_thisrow].[no_transaksi]),7),"
",RIGHT("        " & (index(select(detail_transaksi[harga_produk],[no_transaksi]=[_thisrow].[no_transaksi]),7)) ,8)," x ",index(select(detail_transaksi[qty],[no_transaksi]=[_thisrow].[no_transaksi]),7),"            ",RIGHT("        " & ( index(select(detail_transaksi[sub_total],[no_transaksi]=[_thisrow].[no_transaksi]),7)) ,8),"
"))
,"",ifs(
isnotblank(index(select(detail_transaksi[nama_produk],[no_transaksi]=[_thisrow].[no_transaksi]),8)
),concatenate (
index(select(detail_transaksi[nama_produk],[no_transaksi]=[_thisrow].[no_transaksi]),8),"
",RIGHT("        " & (index(select(detail_transaksi[harga_produk],[no_transaksi]=[_thisrow].[no_transaksi]),8)) ,8)," x ",index(select(detail_transaksi[qty],[no_transaksi]=[_thisrow].[no_transaksi]),8),"            ",RIGHT("        " & ( index(select(detail_transaksi[sub_total],[no_transaksi]=[_thisrow].[no_transaksi]),8)) ,8),"
"))
,"",ifs(
isnotblank(index(select(detail_transaksi[nama_produk],[no_transaksi]=[_thisrow].[no_transaksi]),9)
),concatenate (
index(select(detail_transaksi[nama_produk],[no_transaksi]=[_thisrow].[no_transaksi]),9),"
",RIGHT("        " & (index(select(detail_transaksi[harga_produk],[no_transaksi]=[_thisrow].[no_transaksi]),9)) ,8)," x ",index(select(detail_transaksi[qty],[no_transaksi]=[_thisrow].[no_transaksi]),9),"            ",RIGHT("        " & ( index(select(detail_transaksi[sub_total],[no_transaksi]=[_thisrow].[no_transaksi]),9)) ,8),"
"))
,"",ifs(
isnotblank(index(select(detail_transaksi[nama_produk],[no_transaksi]=[_thisrow].[no_transaksi]),10)
),concatenate (
index(select(detail_transaksi[nama_produk],[no_transaksi]=[_thisrow].[no_transaksi]),10),"
",RIGHT("        " & (index(select(detail_transaksi[harga_produk],[no_transaksi]=[_thisrow].[no_transaksi]),10)) ,8)," x ",index(select(detail_transaksi[qty],[no_transaksi]=[_thisrow].[no_transaksi]),10),"            ",RIGHT("        " & ( index(select(detail_transaksi[sub_total],[no_transaksi]=[_thisrow].[no_transaksi]),10)) ,8),"
"))
,"",ifs(
isnotblank(index(select(detail_transaksi[nama_produk],[no_transaksi]=[_thisrow].[no_transaksi]),11)
),concatenate (
index(select(detail_transaksi[nama_produk],[no_transaksi]=[_thisrow].[no_transaksi]),11),"
",RIGHT("        " & (index(select(detail_transaksi[harga_produk],[no_transaksi]=[_thisrow].[no_transaksi]),11)) ,8)," x ",index(select(detail_transaksi[qty],[no_transaksi]=[_thisrow].[no_transaksi]),11),"            ",RIGHT("        " & ( index(select(detail_transaksi[sub_total],[no_transaksi]=[_thisrow].[no_transaksi]),11)) ,8),"
"))
,"",ifs(
isnotblank(index(select(detail_transaksi[nama_produk],[no_transaksi]=[_thisrow].[no_transaksi]),12)
),concatenate (
index(select(detail_transaksi[nama_produk],[no_transaksi]=[_thisrow].[no_transaksi]),12),"
",RIGHT("        " & (index(select(detail_transaksi[harga_produk],[no_transaksi]=[_thisrow].[no_transaksi]),12)) ,8)," x ",index(select(detail_transaksi[qty],[no_transaksi]=[_thisrow].[no_transaksi]),12),"            ",RIGHT("        " & ( index(select(detail_transaksi[sub_total],[no_transaksi]=[_thisrow].[no_transaksi]),12)) ,8),"
"))
,"
                 Total :",RIGHT("        " & ( [total]) ,8),"
                 Tunai :",RIGHT("        " & ( [tunai]) ,8),"
               Kembali :",RIGHT("        " & ( [kembali]) ,8),"
--------------------------------
           terima kasih"
)


demikian sharing dari saya lain waktu akan saya beri tutorial pada video, jangan lupa subscribe youtube ekisfamily di https://youtube.com/EKisFamily 
ya teman. terimakasih

Tidak ada komentar