ป้อนข้อมูลขึ้น error

ได้ลอง app account โดยปรับเพิ่มข้อมูลไฟล์ app_customer โดยเพิ่ม field และทำการแก้ไขไฟล์ customer.php, customers.php ทั้งใน Controller, Model, View แล้วลองรัน สามารถป้อนข้อมูลได้ปกติ แต่พอกดบันทึกแล้ว ไม่มีหน้าจอตอบรับการป้อนข้อมูล กดบันทึก 3-4 ครั้ง จะขึ้นว่า "ไม่สามารถทำรายการนี้ได้" ผิดพลาด หรือ ต้องแก้ไขตรงส่วนไหนเพิ่มเติมครับ
0SHAREFacebookLINE it!

ลองเปิดใช้งาน debug ดูครับ
https://kotchasan.com/...dule=forum&wbid=3787
#1

ผมผิดพลาดเองเรื่องตัวแปรต่างๆ แต่ตอนนี้สามารถบันทึกข้อมูลแล้ว แต่พบ error อีกแบบคือ
เมื่อกด edit จะขึ้น form show แต่ไม่มีข้อมูลข้างในเลยที่จะแก้ไข
ลองเลือกและกดลบข้อมูล ๆ ไม่ถูกลบออก
ไม่ทราบว่าต้องแก้ไขตรงไหนบ้างครับ
#2

ดูที่ตัวแปรที่ส่งค่าให้ input แต่ละตัวสิครับ ว่าได้ส่งมาหรือไม่ หรือว่ามีหรือไม่ เช่น
'value' => $index->order_no

https://github.com/...y/views/sell.php#L81
#3

ผมได้เช็คแล้วว่าข้อมูลที่คีย์เข้า ฟิลด์ ถูกต้อง ตามรายละเอียดข้างล่าง โดยข้อมูลที่แก้ไขคือ customer โดยเพิ่มฟิลด์ เข้าไปจาก ดาต้าเบสเดิม ครับ ผมงงว่าได้แก้ไขแค่รูปแบบใน ไฟล์ customer.php , customers.php ที่อยู่ใน module/inventory/... ทั้ง controller, model, views นอกจากในส่วนของ customer ที่แก้ไขไม่ได้, Search ไม่ได้ ยังกระทบการแก้ไขทั้งในส่วน sell และ buy ด้วย (ในส่วนของการป้อนข้อมูลป้อนได้ปกติ)

// Prefixname
$groups->add('text', array(
'id' => 'register_prefixname',
'itemClass' => 'width50',
'labelClass' => 'g-input icon-office',
'label' => '{LNG_Prefix} {LNG_Name}',
// 'comment' => '{LNG_Prefix}{LNG_Name}',
'maxlength' => 25,
'value' => $customer['prefixname']
));
// เลขบัตรประชาชน
$groups->add('number', array(
'id' => 'register_idcard',
'itemClass' => 'width50',
'labelClass' => 'g-input icon-profile',
'label' => '{LNG_Personal ID} 13 {LNG_Digit}',
// 'comment' => '{LNG_Person_ID} 13 {LNG_Digit}',
'value' => $customer['idcard']
));

$groups = $fieldset->add('groups');

// Name
$groups->add('text', array(
'id' => 'register_name',
'itemClass' => 'width50',
'labelClass' => 'g-input icon-customer',
'label' => '{LNG_Name}',
'maxlength' => 50,
'value' => $customer['name']
));

// Surname
$groups->add('text', array(
'id' => 'register_surname',
'itemClass' => 'width50',
'labelClass' => 'g-input icon-customer',
'label' => '{LNG_Surname}',
'maxlength' => 50,
'value' => $customer['surname']
));

// เว้นบรรทัด
$groups = $fieldset->add('groups');

// address1
$fieldset->add('text', array(
'id' => 'register_address1',
'itemClass' => 'item',
'label' => '{LNG_Address} 1',
'labelClass' => 'g-input icon-home',
'maxlength' => 150,
'value' => $customer['address1']
));
$groups = $fieldset->add('groups', array(
'comment' => '{LNG_Address details} {LNG_show on receipt}',
));

// เว้นบรรทัด
$groups = $fieldset->add('groups');

// address2
$fieldset->add('text', array(
'id' => 'register_address2',
'itemClass' => 'item',
'label' => '{LNG_Address} 2',
'labelClass' => 'g-input icon-home',
'maxlength' => 150,
'value' => $customer['address2']
));
$groups = $fieldset->add('groups', array(
// 'comment' => '{LNG_Address details} {LNG_show on receipt}',
));

// phone
$groups->add('number', array(
'id' => 'register_phone',
'itemClass' => 'width15',
'labelClass' => 'g-input icon-phone',
'label' => '{LNG_Phone}',
'value' => $customer['phone']
));

// mobile no
$groups->add('number', array(
'id' => 'register_mobile',
'itemClass' => 'width15',
'labelClass' => 'g-input icon-phone',
'label' => '{LNG_Mobile_no}',
'value' => $customer['mobile']
));

// blood group
$groups->add('number', array(
'id' => 'register_blood',
'itemClass' => 'width15',
'labelClass' => 'g-input icon-customer',
'label' => '{LNG_Blood}',
'value' => $customer['blood']
));
$groups = $fieldset->add('groups');

//Birth_date
$groups->add('date', array(
'id' => 'register_birthdate',
'labelClass' => 'g-input icon-calendar',
'itemClass' => 'width15',
'label' => '{LNG_Birth_Date}',
// 'value' => explode(' ', $index->customer_birthdate)[0]
));

// Member Start date
$groups->add('date', array(
'id' => 'register_startdate',
'labelClass' => 'g-input icon-calendar',
'itemClass' => 'width15',
'label' => '{LNG_Start date} {LNG_Member}',
// 'value' => explode(' ', $index->customer_startdate)[0]
));

// Type of member
$groups->add('number', array(
'id' => 'register_membertype',
'itemClass' => 'width15',
'labelClass' => 'g-input icon-customer',
'label' => '{LNG_Type of member}',
'value' => $customer['membertype']
));

$groups = $fieldset->add('groups');

// email
$groups->add('email', array(
'id' => 'register_email',
'itemClass' => 'width50',
'labelClass' => 'g-input icon-email',
'label' => '{LNG_Email}',
// 'comment' => '{LNG_The contact email Used to send documents by email}',
'maxlength' => 50,
'value' => $customer['email'],
'validator' => array('keyup,change', 'checkEmail')
));
#4

อธิบายได้งงมาก ไม่รู้ว่าคำถามคืออะไร
ถ้าหมายถึงข้อมูลไม่แสดงในฟอร์ม ลอง var_dump($customer); ออกมาดูว่ามีข้อมูลส่งมาหรือไม่
ปกติแล้วตอน Query ข้อมูลผมมักจะเลือกฟิลด์ที่ต้องการด้วยทุกครั้ง ถ้าเฉพาะข้อมูลที่เพิ่มใหม่ไม่มี อาจเป็นเพราะไม่ได้เลือกข้อมูลออกมา ให้ไปดูที่ Model เอาฟิลด์ที่ต้องการออกมาแสดงด้วย
#5

ไม่ทราบว่าสะดวกให้ถามทางอีเมล์ไม๊ครับ รบกวนขออีเมล์ด้วยครับ
#6

อ้างอิงจาก ความคิดเห็น #6ไม่ทราบว่าสะดวกให้ถามทางอีเมล์ไม๊ครับ รบกวนขออีเมล์ด้วยครับ

admin@goragod.com

แต่แนะนำให้ถามผ่านบอร์ดนี่แหละครับ เผื่อคนอื่นไม่เข้าใจเหมือนๆกันจะได้รู้ไปด้วย แต่ถ้าเป็นความลับ ทางอีเมล์ก็ได้
#7

ป้อนข้อมูลขึ้น error
สอบถามหน่อยครับ ผม มีปัญหาการส่ง mail ไม่ได้ มันฟ้อง Error ว่า unable send email ในระบบยืม-คืน พัสดุ ออนไลน์ ไม่ทราบว่า ผม ตั้งค่าแบบนี้ถูกหรือเปล่าครับ ตามรูปภาพนี้ไหมครับ
#8

ดูคร่าวๆก็น่าจะถูกนะครับ ถ้าข้อมูลต่างๆที่กรอก ถูกต้อง
ลองตรวจสอบ log ของ server ว่ามี error อะไรเพิ่มเติมหรือไม่ หรือ ลองตรวจสอบการตั้งค่าที่ gmail ว่าถูกต้องหรือไม่ ถ้าเคยส่งได้ แม้แต่ครั้งเดียว อาจเป็นไปได้ว่า มีการส่งครบโควตาแล้ว เลยส่งไม่ได้อีก
#9
ความคิดเห็น
ไฟล์อัปโหลด ชนิด jpg, jpeg, png ขนาดไฟล์ไม่เกิน 1024