Warehouses

List All Warehouses

All pages and components use BasicDB classes.

BasicDB Parameters

Property

Desc

for warehouse

select

Select any table from database

warehouses

insert

Insert any record a table

warehouses

update

Update any record a table

warehouses

delete

Delete any record a table

warehouses

where

SQL Where command and use 2 parameters

company_id, session('COMPANY_ID')

orderby

SQL Orderby command and use 2 parameters

name, ASC

run

Execute sql command

If send true only 1 rows affected, else all rows return

Get warehouses

VeterinerPro use DataTable plugin all pages.

List warehouses item by item inside a table

Create a warehouse

/app/view/warehouses.php has a modal by id: newModal

ajaxForm class

Ajax requests are inside a file (app/controller/ajax.php) decomposition from type parameter.

This request send app/ajax/newwarehouse.ajax.php

This file (app/ajax/newwarehouse.ajax.php) has 4 properties.

  • name

  • address

  • contact_phone

  • contact_name

Contact name is required field.

app/ajax/newwarehouse.ajax.php

Update A Warehouse

This file is (app/gets/warehouseupdate.php) is a modal page.

This file has a property: ID.

Identifier help find true warehouse.

app/gets/warehouseupdate.php

This file has ajaxForm class and send app/ajax/updatewarehouse.ajax.php.

Updatewarehouse.ajax.php has 5 property:

  • Id

  • Name

  • Address

  • Contact Phone

  • Contact Name

Updatewarehouse.ajax.php

Identifier help find true warehouse.

Delete Warehouse

Delete process started in view/warehouses.php

view/warehouses.php

Delete call /ajax/warehousedelete.ajax.php

Warehousedelete.ajax.php has 1 property

  • ID

Identifier help find true warehouse.

BasicDB delete method call sql "DELETE FROM tablename"

Last updated

Was this helpful?