Ahadmart / ap3

AhadPOS 3 - Software POS (point of sales) berbasis web. Lisensi open source (GPL v2)
57 stars 48 forks source link

Error saat lihat detail barang karena set kode toko dengan huruf #28

Closed aryasuryawan closed 7 years ago

aryasuryawan commented 7 years ago

Assalamu'alaikum warohmatullohi wabarokatuh

Pak, izin mendokumentasikan bugs yang kami temui di toko kami di padang Masalahnya saat lihat data Barang di Config Barang , lalu lihat detail barang dengan klik link barangnya [error terlampir]

Error: CDbException

CDbCommand failed to execute the SQL statement: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'dc01011705000001' in 'where clause'. The SQL statement executed was: SELECT * FROM pembelian t WHERE nomor=dc01011705000001 LIMIT 1

/var/www/html/ap3/framework/db/CDbCommand.php(543)

Setelah dicek, ternyata penyebabnya karena kode toko diset dengan huruf, dalam hal ini dc.

karena masih awam, jadi taunya cuma ubah manual saja di tabel terkait (pembelian dan inventory balance) dengan query sederhana

UPDATE inventory_balance SET nomor_dokumen = replace(nomor_dokumen, 'no_dokumenlama', 'no_dokumenbaru')

UPDATE pembelian SET nomor = replace(nomor, 'no_dokumenlama', 'no_dokumenbaru')

screenshot from 2017-07-15 06-52-42

AbuMuhammad commented 7 years ago

Kode toko harus angka

On 15 Jul 2017 07:15, "abukamila" notifications@github.com wrote:

Assalamu'alaikum warohmatullohi wabarokatuh

Pak, izin mendokumentasikan bugs yang kami temui di toko kami di padang Masalahnya saat lihat data Barang di Config Barang , lalu lihat detail barang dengan klik link barangnya [error terlampir]

Error: CDbException

CDbCommand failed to execute the SQL statement: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'dc01011705000001' in 'where clause'. The SQL statement executed was: SELECT * FROM pembelian t WHERE nomor=dc01011705000001 LIMIT 1

/var/www/html/ap3/framework/db/CDbCommand.php(543)

Setelah dicek, ternyata penyebabnya karena kode toko diset dengan huruf, dalam hal ini dc.

karena masih awam, jadi taunya cuma ubah manual saja di tabel terkait (pembelian dan inventory balance) dengan query sederhana

UPDATE inventory_balance SET nomor_dokumen = replace(nomor_dokumen, 'no_dokumenlama', 'no_dokumenbaru')

UPDATE pembelian SET nomor = replace(nomor, 'no_dokumenlama', 'no_dokumenbaru')

[image: screenshot from 2017-07-15 06-52-42] https://user-images.githubusercontent.com/28218735/28234481-3d45cb08-692a-11e7-9b8a-52629265795a.png

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/AbuMuhammad/ap3/issues/28, or mute the thread https://github.com/notifications/unsubscribe-auth/ADR4sOROtiXzvZN4K4bDyNOiVVBm2z_lks5sOASugaJpZM4OY26A .

AbuMuhammad commented 7 years ago

Dan.. itu bukan bug. Kode toko harus dua digit (desimal)

aryasuryawan commented 7 years ago

Sip, syukron pak

Pada tanggal 15 Jul 2017 1.16 PM, "Abu Muhammad" notifications@github.com menulis:

Closed #28 https://github.com/AbuMuhammad/ap3/issues/28.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/AbuMuhammad/ap3/issues/28#event-1165203420, or mute the thread https://github.com/notifications/unsubscribe-auth/Aa6Vb78t7Ui9J6R691ouGuLpaD05eBIiks5sOFlWgaJpZM4OY26A .