Skip to content

Commit

Permalink
Remove pdf_append/ and appendfile column.
Browse files Browse the repository at this point in the history
Elimination proposed in forums by Paul Becker.
http://www.weberp.org/forum/showthread.php?tid=8206
  • Loading branch information
TurboPT committed Sep 9, 2018
1 parent 9ff9166 commit e0daaed
Show file tree
Hide file tree
Showing 8 changed files with 3 additions and 24 deletions.
2 changes: 0 additions & 2 deletions CopyBOM.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@
discountcategory,
taxcatid,
serialised,
appendfile,
perishable,
digitals,
nextserialno,
Expand Down Expand Up @@ -82,7 +81,6 @@
discountcategory,
taxcatid,
serialised,
appendfile,
perishable,
digitals,
nextserialno,
Expand Down
6 changes: 2 additions & 4 deletions Z_ImportStocks.php
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,7 @@
barcode,
discountcategory,
taxcatid,
decimalplaces,
appendfile)
decimalplaces)
VALUES (
'$StockID',
'" . $myrow[1] . "',
Expand All @@ -224,8 +223,7 @@
'" . $myrow[13] . "',
'" . $myrow[14] . "',
" . $myrow[15] . ",
" . $myrow[16] . ",
'" . $myrow[17] . "'
" . $myrow[16] . "
);
";

Expand Down
1 change: 0 additions & 1 deletion api/api_errorcodes.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@
Define('IncorrectDiscountCategory', 1060);
Define('TaxCategoriesDoesntExist', 1061);
Define('InvalidSerialised', 1062);
Define('IncorrectAppendFile', 1063);
Define('InvalidPerishable', 1064);
Define('InvalidDecmalPlaces', 1065);
Define('IncorrectLongStockDescriptionLength', 1066);
Expand Down
14 changes: 0 additions & 14 deletions api/api_stock.php
Original file line number Diff line number Diff line change
Expand Up @@ -232,14 +232,6 @@ function VerifySerialised($Serialised, $i, $Errors) {
return $Errors;
}

/* Check that the appendfile is 40 characters or less long */
function VerifyAppendFile($appendfile, $i, $Errors) {
if (mb_strlen($appendfile)>40) {
$Errors[$i] = IncorrectAppendFile;
}
return $Errors;
}

/* Verify that the Perishable flag is a 1 or 0 */
function VerifyPerishable($Perishable, $i, $Errors) {
if ($Perishable!=0 and $Perishable!=1) {
Expand Down Expand Up @@ -348,9 +340,6 @@ function InsertStockItem($StockItemDetails, $user, $password) {
if (isset($StockItemDetails['serialised'])){
$Errors=VerifySerialised($StockItemDetails['serialised'], sizeof($Errors), $Errors);
}
if (isset($StockItemDetails['appendfile'])){
$Errors=VerifyAppendFile($StockItemDetails['apendfile'], sizeof($Errors), $Errors);
}
if (isset($StockItemDetails['perishable'])){
$Errors=VerifyPerishable($StockItemDetails['perishable'], sizeof($Errors), $Errors);
}
Expand Down Expand Up @@ -468,9 +457,6 @@ function ModifyStockItem($StockItemDetails, $user, $password) {
if (isset($StockItemDetails['serialised'])){
$Errors=VerifySerialised($StockItemDetails['serialised'], sizeof($Errors), $Errors);
}
if (isset($StockItemDetails['appendfile'])){
$Errors=VerifyApendFile($StockItemDetails['apendfile'], sizeof($Errors), $Errors);
}
if (isset($StockItemDetails['perishable'])){
$Errors=VerifyPerishable($StockItemDetails['perishable'], sizeof($Errors), $Errors);
}
Expand Down
1 change: 0 additions & 1 deletion install/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,6 @@
$Result = mkdir($CompanyDir . '/part_pics');
$Result = mkdir($CompanyDir . '/reports');
$Result = mkdir($CompanyDir . '/reportwriter');
$Result = mkdir($CompanyDir . '/pdf_append');

copy ($Path_To_Root . '/companies/weberpdemo/FormDesigns/FGLabel.xml', $CompanyDir . '/FormDesigns/FGLabel.xml');
copy ($Path_To_Root . '/companies/weberpdemo/FormDesigns/GoodsReceived.xml', $CompanyDir . '/FormDesigns/GoodsReceived.xml');
Expand Down
1 change: 0 additions & 1 deletion sql/mysql/country_sql/default.sql
Original file line number Diff line number Diff line change
Expand Up @@ -2821,7 +2821,6 @@ CREATE TABLE `stockmaster` (
`discountcategory` char(2) NOT NULL DEFAULT '',
`taxcatid` tinyint(4) NOT NULL DEFAULT '1',
`serialised` tinyint(4) NOT NULL DEFAULT '0',
`appendfile` varchar(40) NOT NULL DEFAULT 'none',
`perishable` tinyint(1) NOT NULL DEFAULT '0',
`decimalplaces` tinyint(4) NOT NULL DEFAULT '0',
`pansize` double NOT NULL DEFAULT '0',
Expand Down
1 change: 0 additions & 1 deletion sql/mysql/country_sql/demo.sql
Original file line number Diff line number Diff line change
Expand Up @@ -2823,7 +2823,6 @@ CREATE TABLE `stockmaster` (
`discountcategory` char(2) NOT NULL DEFAULT '',
`taxcatid` tinyint(4) NOT NULL DEFAULT '1',
`serialised` tinyint(4) NOT NULL DEFAULT '0',
`appendfile` varchar(40) NOT NULL DEFAULT 'none',
`perishable` tinyint(1) NOT NULL DEFAULT '0',
`decimalplaces` tinyint(4) NOT NULL DEFAULT '0',
`pansize` double NOT NULL DEFAULT '0',
Expand Down
1 change: 1 addition & 0 deletions sql/mysql/upgrade4.15-4.15.1.sql
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ ALTER TABLE `suppliers` ADD COLUMN `defaultgl` VARCHAR(20) NOT NULL DEFAULT '1'
ALTER TABLE `suppliers` ADD COLUMN `defaultshipper` INT(11) NOT NULL DEFAULT '0' AFTER `url`;
INSERT INTO `scripts` (`script`, `pagesecurity`, `description`) VALUES ('Z_FixGLTransPeriods', '15', 'Fixes periods where GL transactions were not created correctly');

ALTER TABLE `stockmaster` DROP COLUMN `appendfile`;

-- THIS IS THE LAST SQL QUERY. Updates database version number:
UPDATE config SET confvalue='4.15.1' WHERE confname='VersionNumber';

0 comments on commit e0daaed

Please sign in to comment.