ลบสินค้า (Delete Product)

การลบสินค้า

การลบสินค้าจะเป็นการลบสินค้าออกจากฐานข้อมูล

หมายเหตุ: การลบนี้จะไม่ทำงานหากสินค้ามีธุรกรรมบางอย่างที่เกี่ยวข้อง การทำธุรกรรมอาจเป็นการเปิดสต็อก การซื้อ การขาย หรือการโอนสต็อกสินค้า มันจะแสดงข้อผิดพลาดบางอย่างเช่น:

  • ไม่สามารถลบสินค้าได้เนื่องจากมีการซื้อที่เกี่ยวข้องกับสินค้านี้อยู่
  • ไม่สามารถลบสินค้าบางอย่างได้เนื่องจากมีธุรกรรมที่เกี่ยวข้องกัน

ลบสินค้าที่ละรายการ

ลบสินค้าหลายรายการเป็นกลุ่ม

ลบข้อผิดพลาดของสินค้า:

ไม่สามารถลบสินค้าบางอย่างได้เนื่องจากมีธุรกรรมที่เกี่ยวข้อง:

เมื่อสินค้ามีรายการใดๆ จะไม่สามารถลบได้

ธุรกรรมอาจเป็นได้ทั้งการขาย การซื้อ หรือการเพิ่มสต็อคที่เปิดอยู่

วิธีที่ดีที่สุดในการหลีกเลี่ยงสินค้าดังกล่าวคือการปิดการใช้งานสินค้าเหล่านั้น


 

Deleting Products

Deleting of a product will remove the products from the database.

NOTE: This delete will not work if the product have some transactions related to it. Transaction can be Opening Stock, Purchase, Sales or Stock transfer of the product. It will show some error like:

  • Product can’t be deleted because purchases related to this product exist
  • Some products couldn’t be deleted because it has transaction related to it.

Deleting individual product

Bulk Delete multiple products

Delete product Errors:

Some products couldn’t be deleted because it has transaction related to it:

When a product has any transactions it cannot be deleted.

Transactions can be either Sales, Purchase, or Adding opening stock.

The best way to avoid such products is by deactivation them