mysql query help, take total sum from a table, and based on discount value on another table calcula
- by vegatron
hi
I have a table called invoices:
CREATE TABLE IF NOT EXISTS `si_invoices` (
`id` int(10) NOT NULL AUTO_INCREMENT,
`biller_id` int(10) NOT NULL DEFAULT '0',
`customer_id` int(10) NOT NULL DEFAULT '0',
`type_id` int(10) NOT NULL DEFAULT '0',
`inv_tax_id` int(10) NOT NULL,
`date` date NOT NULL DEFAULT '0000-00-00',
`unreg_customer`…