Skip to main content

Rumus Pencarian Stok Akhir dengan PHP dan membaginya kedalam beberapa bagian



Halo teman-teman sedotphp, disini saya ingin share kasus project pribadi sekaligus dokumentasi membangun aplikasi Point Of Sales beserta Manajemen Stok  yaitu menghitung stok akhir berupa satuan (bal,ikat,pcs)
perhitungan nya seperti ini

1 BAL = 240 PCS  (24 IKAT)
1 IKAT = 24PCS
1 PCS = 1PCS

nah   kasusnya seperti ini,
Stok akhir  47905 pcs, berapakah jumlah sisa dalam BAL/IKAT/PCS ?

 stok = 47905
 bal = 240
 ikat = 24
 pcs = 1

a. PENCARIAN BAL
    balnya : stok/bal = 199 bal (240pcs/bal)
    pcs_bal : balnya * bal = 47760pcs

b. PENCARIAN IKAT
    ikatnya : (stok-pcs_bal) / ikat = 145
    pcs_ikat : ikatnya * ikat = 144pcs

c. PENCARIAN PCS
    pcsnya : stok-(pcs_bal+pcs_ikat) = 1pcs

jadi yang dihasilkan dari 47905pcs adalah

199 Bal
145 Ikat
1 pcs


NOTE saya menggunakan fungsi floor() dalam pergambilan nilai akhir
contoh : floor( stok/bal)  

Comments

Popular posts from this blog

PreSonus Studio One Pro 2.6 Free Download

Download Free Software PreSonus Studio One Pro - Full Version PreSonus Studio One Pro 2.6.5.30360 (Win/Mac) SIZE: 127.88 MB/511.75 MB What's New in PreSonus Studio One 2.6.5: - SoundCloud client to support new API - Studio One 2.6.5 fixes the following issues: - [OSX] Save As dialog path is the folder again Download Links Download PreSonus Studio One Pro Free

Download Pinnacle TVCenter 6.4.9.1033 Software

Download Free Software Pinnacle TVCenter 6.4.9.1033 - Full Version Software Pinnacle TVCenter 6.4.9.1033 SIZE: 592 MB What does TVCenter 6 - Fast and compact installation - Drastically reduced system requirements - Optimized , rapid tuning - New graphical user interface - Full HD Support Download Links Pinnacle TVCenter Download

4Videosoft PDF Converter Ultimate 3.1.30 Free Download

Download Software 4Videosoft PDF Converter Ultimate 3.1.30- Full Version 4Videosoft PDF Converter Ultimate 3.1.30 Multilingual SIZE: 343 Mb Key Features: * Professional converter tool to finish the work independently Finishing the PDF conversion easily without the assistant tools like Adobe Acrobat and Reader is possible. * Supported any-language PDF files Language such as English,