! -> Note
$ -> Affected files
+26-Jan-2009 Joe Hunt
++ Added one Post option to Post options in Quick Entry Lines (amount without decrease or increase). Minor bug fixes.
+$ /gl/manage/gl_quick_entries.php
+ /includes/types.inc
+ /includes/ui/ui_view.inc
++ Added 'inactive' field in most 'catalog' tables.
+$ /sql/alter2.1.sql
+
24-Jan-2009 Janusz Dobrowolski
! Set maximum width for select to avoid broken layout in two column layout.
$ /themes/aqua/default.css
$_POST['id'] = $myrow["id"];
$_POST['description'] = $myrow["description"];
- $_POST['deposit'] = $myrow["type"];
+ $_POST['type'] = $myrow["type"];
$_POST['base_desc'] = $myrow["base_desc"];
$_POST['base_amount'] = price_format($myrow["base_amount"]);
hidden('selected_id', $selected_id);
$act_type = strtolower(substr($myrow['action'], 0, 1));
- if ($act_type == 't') {
+ if ($act_type == 't')
+ {
label_cells($myrow['tax_name'], '');
- } else {
+ }
+ else
+ {
label_cell($myrow['dest_id'].' '.$myrow['account_name']);
if ($act_type == '=')
label_cell('');
- else
- if ($act_type == '%')
- percent_cell($myrow['amount']);
+ elseif ($act_type == '%')
+ label_cell(number_format2($myrow['amount'], user_exrate_dec()), "nowrap align=right ");
else
amount_cell($myrow['amount']);
}
$actn = strtolower(substr($_POST['actn'],0,1));
- if ($actn == 't') {
+ if ($actn == 't')
+ {
item_tax_types_list_row(_("Item Tax Type").":",'dest_id', null);
- } else {
+ }
+ else
+ {
gl_all_accounts_list_row(_("Account").":", 'dest_id', null);
- if ($actn != '=') {
- if ($actn = '%')
- percent_row(_("Part").":", 'amount', percent_format(0));
+ if ($actn != '=')
+ {
+ if ($actn == '%')
+ small_amount_row(_("Part").":", 'amount', price_format(0), null, "%", user_exrate_dec());
else
amount_row(_("Amount").":", 'amount', price_format(0));
}
$quick_actions = array(
'=' => _('Remainder'), // post current base amount to GL account
- '-' => _('Amount, reduce base'), // post amount to GL account and reduce base
- '+' => _('Amount, increase base'), // post amount to GL account and increase base
+ 'a' => _('Amount'), // post amount to GL account
+ 'a+' => _('Amount, increase base'), // post amount to GL account and increase base
+ 'a-' => _('Amount, reduce base'), // post amount to GL account and reduce base
'%' => _('% amount of base'), // store acc*amount% to GL account
'%+' => _('% amount of base, increase base'), // ditto & increase base amount
'%-' => _('% amount of base, reduce base'), // ditto & reduce base amount
case "=": // post current base amount to GL account
$part = $base;
break;
- case "-": // post amount to GL account and reduce base
- $part = $qe_line['amount']; $base -= $part;
+ case "a": // post amount to GL account and reduce base
+ $part = $qe_line['amount'];
break;
- case "+": // post amount to GL account and increase base
+ case "a+": // post amount to GL account and increase base
$part = $qe_line['amount']; $base += $part;
break;
+ case "a-": // post amount to GL account and reduce base
+ $part = $qe_line['amount']; $base -= $part;
+ break;
case "%": // store acc*amount% to GL account
$part = round2($base * $qe_line['amount'] / 100, user_price_dec());
break;
$tax_total = 0;
foreach ($taxes as $index => $item_tax) {
if(substr($qe_line['action'],0,1) != 'T')
- $tax = round($base * $item_tax['rate']
+ $tax = round2($base * $item_tax['rate']
/ ($item_tax['rate'] + 100), user_price_dec());
else
- $tax = round($base * $item_tax['rate'] / 100, user_price_dec());
+ $tax = round2($base * $item_tax['rate'] / 100, user_price_dec());
$gl_code = $type != QE_DEPOSIT
? $item_tax['purchasing_gl_code'] : $item_tax['sales_gl_code'];
$cart->add_gl_item($gl_code,
$qe_line['dimension_id'], $qe_line['dimension2_id'],
$tax, $qe['description']);
- else {
+ else
+ {
$acc_name = get_gl_account_name($gl_code);
$cart->add_gl_codes_to_trans($gl_code,
$acc_name, $qe_line['dimension_id'],
if ($type != QE_SUPPINV)
$cart->add_gl_item($qe_line['dest_id'], $qe_line['dimension_id'],
$qe_line['dimension2_id'], $part, $qe['description']);
- else {
- $acc_name = get_gl_account_name($qe_line['dest_id']);
- $cart->add_gl_codes_to_trans($qe_line['dest_id'],
- $acc_name, $qe_line['dimension_id'],
- $qe_line['dimension2_id'], $part, $qe['description']);
+ else
+ {
+ $acc_name = get_gl_account_name($qe_line['dest_id']);
+ $cart->add_gl_codes_to_trans($qe_line['dest_id'],
+ $acc_name, $qe_line['dimension_id'],
+ $qe_line['dimension2_id'], $part, $qe['description']);
}
}
}
CREATE TABLE `0_groups` (
`id` smallint(6) UNSIGNED NOT NULL auto_increment,
`description` varchar(60) NOT NULL default '',
+ `inactive` tinyint(1) NOT NULL default 0,
PRIMARY KEY (`id`),
UNIQUE KEY `description` (`description`)
) TYPE=MyISAM AUTO_INCREMENT=1 ;
-INSERT INTO `0_groups` VALUES ('1', 'Small');
-INSERT INTO `0_groups` VALUES ('2', 'Medium');
-INSERT INTO `0_groups` VALUES ('3', 'Large');
+INSERT INTO `0_groups` VALUES ('1', 'Small', '0');
+INSERT INTO `0_groups` VALUES ('2', 'Medium', '0');
+INSERT INTO `0_groups` VALUES ('3', 'Large', '0');
DROP TABLE IF EXISTS `0_recurrent_invoices`;
`credit_sale` tinyint(1) NOT NULL,
`pos_location` varchar(5) NOT NULL,
`pos_account` smallint(6) UNSIGNED NOT NULL,
+ `inactive` tinyint(1) NOT NULL default 0,
PRIMARY KEY (`id`),
UNIQUE KEY(`pos_name`)
) TYPE=MyISAM AUTO_INCREMENT=1;
-INSERT INTO `0_sales_pos` VALUES ('1', 'Default', '1', '1', 'DEF', '1');
+INSERT INTO `0_sales_pos` VALUES ('1', 'Default', '1', '1', 'DEF', '1', '0');
ALTER TABLE `0_users` DROP COLUMN `pos`;
ALTER TABLE `0_users` ADD `pos` SMALLINT(6) DEFAULT '1';
`category_id` smallint(6) UNSIGNED NOT NULL,
`quantity` double NOT NULL default '1',
`is_foreign` tinyint(1) NOT NULL default 0,
+ `inactive` tinyint(1) NOT NULL default 0,
PRIMARY KEY (`id`),
UNIQUE KEY(`stock_id`, `item_code`)
) TYPE=MyISAM AUTO_INCREMENT=1;
PRIMARY KEY (`id`)
) TYPE = MyISAM;
+ALTER TABLE `0_tax_types` DROP COLUMN `out`;
+
+ALTER TABLE `0_chart_master` DROP COLUMN `inactive`;
+ALTER TABLE `0_chart_master` ADD `inactive` tinyint(1) NOT NULL DEFAULT '0';
+
+ALTER TABLE `0_currencies` DROP COLUMN `inactive`;
+ALTER TABLE `0_currencies` ADD `inactive` tinyint(1) NOT NULL DEFAULT '0';
+
+ALTER TABLE `0_bank_accounts` DROP COLUMN `inactive`;
+ALTER TABLE `0_bank_accounts` ADD `inactive` tinyint(1) NOT NULL DEFAULT '0';
+
+ALTER TABLE `0_stock_master` DROP COLUMN `inactive`;
+ALTER TABLE `0_stock_master` ADD `inactive` tinyint(1) NOT NULL DEFAULT '0';
+
+ALTER TABLE `0_workcentres` DROP COLUMN `inactive`;
+ALTER TABLE `0_workcentres` ADD `inactive` tinyint(1) NOT NULL DEFAULT '0';
+
+ALTER TABLE `0_locations` DROP COLUMN `inactive`;
+ALTER TABLE `0_locations` ADD `inactive` tinyint(1) NOT NULL DEFAULT '0';
+
+ALTER TABLE `0_sales_types` DROP COLUMN `inactive`;
+ALTER TABLE `0_sales_types` ADD `inactive` tinyint(1) NOT NULL DEFAULT '0';
+
+ALTER TABLE `0_areas` DROP COLUMN `inactive`;
+ALTER TABLE `0_areas` ADD `inactive` tinyint(1) NOT NULL DEFAULT '0';
+
+ALTER TABLE `0_salesman` DROP COLUMN `inactive`;
+ALTER TABLE `0_salesman` ADD `inactive` tinyint(1) NOT NULL DEFAULT '0';
+
+ALTER TABLE `0_shippers` DROP COLUMN `inactive`;
+ALTER TABLE `0_shippers` ADD `inactive` tinyint(1) NOT NULL DEFAULT '0';
+
+ALTER TABLE `0_credit_status` DROP COLUMN `inactive`;
+ALTER TABLE `0_credit_status` ADD `inactive` tinyint(1) NOT NULL DEFAULT '0';
+
+ALTER TABLE `0_payment_terms` DROP COLUMN `inactive`;
+ALTER TABLE `0_payment_terms` ADD `inactive` tinyint(1) NOT NULL DEFAULT '0';
+
+ALTER TABLE `0_suppliers` DROP COLUMN `inactive`;
+ALTER TABLE `0_suppliers` ADD `inactive` tinyint(1) NOT NULL DEFAULT '0';
+
+ALTER TABLE `0_stock_category` DROP COLUMN `inactive`;
+ALTER TABLE `0_stock_category` ADD `inactive` tinyint(1) NOT NULL DEFAULT '0';
+
+ALTER TABLE `0_item_units` DROP COLUMN `inactive`;
+ALTER TABLE `0_item_units` ADD `inactive` tinyint(1) NOT NULL DEFAULT '0';