leon 01/06/22 13:51:50
Modified: freetrade2/modules/database/mysql billing invoice
Log:
Fixing table references based on schema changes
Revision Changes Path
1.4 +10 -7 freetrade/freetrade2/modules/database/mysql/billing
Index: billing
===================================================================
RCS file: /home/cvs/freetrade/freetrade2/modules/database/mysql/billing,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- billing 2000/11/08 00:54:28 1.3
+++ billing 2001/06/22 20:51:49 1.4
@@ -2,13 +2,16 @@
/*
** File: billing
** Description: functions for dealing with billing records
- ** Version: $Revision: 1.3 $
+ ** Version: $Revision: 1.4 $
** Created: 12/21/1999
** Author: Leon Atkinson
** Email: [EMAIL PROTECTED]
** CVS Author: $Author: leon $
- ** Last Revised: $Date: 2000/11/08 00:54:28 $
+ ** Last Revised: $Date: 2001/06/22 20:51:49 $
** Log : $Log: billing,v $
+ ** Log : Revision 1.4 2001/06/22 20:51:49 leon
+ ** Log : Fixing table references based on schema changes
+ ** Log :
** Log : Revision 1.3 2000/11/08 00:54:28 leon
** Log : *** empty log message ***
** Log :
@@ -51,7 +54,7 @@
if($AddressID = insertAddress($address))
{
//create billing row
- $Query = "INSERT INTO billing ";
+ $Query = "INSERT INTO invoice_billing ";
$Query .= "(Invoice, Address, Method, ";
$Query .= "CreditCardOwner, CreditCardNumber,
CreditCardExpiration) ";
$Query .= "VALUES ( ";
@@ -107,7 +110,7 @@
//query db
$Query = "SELECT Address ";
- $Query .= "FROM billing ";
+ $Query .= "FROM invoice_billing ";
$Query .= "WHERE Invoice = $invoice ";
if(!($DatabaseResult = mysql_query($Query, $DatabaseLink)))
{
@@ -141,7 +144,7 @@
/*
** Delete the billing records, if any
*/
- $Query = "DELETE FROM billing ";
+ $Query = "DELETE FROM invoice_billing ";
$Query .= "WHERE Invoice = $invoice ";
if(!mysql_query($Query, $DatabaseLink))
{
@@ -172,7 +175,7 @@
$Query = "SELECT ID, Address, Method, CreditCardOwner, " .
"CreditCardNumber, CreditCardExpiration,
CreditCardVerification " .
- "FROM billing " .
+ "FROM invoice_billing " .
"WHERE Invoice = $invoice ";
if(!($DatabaseResult = mysql_query($Query, $DatabaseLink)))
{
@@ -188,4 +191,4 @@
}
-?>
\ No newline at end of file
+?>
1.11 +15 -12 freetrade/freetrade2/modules/database/mysql/invoice
Index: invoice
===================================================================
RCS file: /home/cvs/freetrade/freetrade2/modules/database/mysql/invoice,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- invoice 2000/11/08 00:54:29 1.10
+++ invoice 2001/06/22 20:51:49 1.11
@@ -5,8 +5,11 @@
** Created: 5/27/2000
** Author: Shannon -jj Behrens, Andres Salomon (dilinger)
** Email: [EMAIL PROTECTED], [EMAIL PROTECTED]
- ** Last Revised: $Date: 2000/11/08 00:54:29 $
+ ** Last Revised: $Date: 2001/06/22 20:51:49 $
** Log : $Log: invoice,v $
+ ** Log : Revision 1.11 2001/06/22 20:51:49 leon
+ ** Log : Fixing table references based on schema changes
+ ** Log :
** Log : Revision 1.10 2000/11/08 00:54:29 leon
** Log : *** empty log message ***
** Log :
@@ -203,7 +206,7 @@
$AddressList = "0";
$Query = "SELECT Address ";
- $Query .= "FROM shipping ";
+ $Query .= "FROM invoice_shipping ";
$Query .= "WHERE Invoice = $invoice ";
if(!($DatabaseResult = mysql_query($Query, $DatabaseLink)))
{
@@ -217,7 +220,7 @@
}
$Query = "SELECT Address ";
- $Query .= "FROM billing ";
+ $Query .= "FROM invoice_billing ";
$Query .= "WHERE Invoice = $invoice ";
if(!($DatabaseResult = mysql_query($Query, $DatabaseLink)))
{
@@ -241,7 +244,7 @@
//delete shipping
- $Query = "DELETE FROM shipping ";
+ $Query = "DELETE FROM invoice_shipping ";
$Query .= "WHERE Invoice = $invoice ";
if(!mysql_query($Query, $DatabaseLink))
{
@@ -250,7 +253,7 @@
}
//delete billing
- $Query = "DELETE FROM billing ";
+ $Query = "DELETE FROM invoice_billing ";
$Query .= "WHERE Invoice = $invoice ";
if(!mysql_query($Query, $DatabaseLink))
{
@@ -617,7 +620,7 @@
//billing record
$Query = "SELECT Address " .
- "FROM billing b, address a " .
+ "FROM invoice_billing b, address a " .
"WHERE b.Invoice=$invoice " .
"AND b.Address = a.ID ";
@@ -681,7 +684,7 @@
//shipping record
$Query = "SELECT Address ";
- $Query .= "FROM shipping s, address a ";
+ $Query .= "FROM invoice_shipping s, address a ";
$Query .= "WHERE s.Invoice=$invoice ";
$Query .= "AND s.Address = a.ID ";
@@ -1344,7 +1347,7 @@
$message = addslashes(substr($Message,0,255));
- $Query = "UPDATE shipping SET " .
+ $Query = "UPDATE invoice_shipping SET " .
"Method = $method, " .
"Message = '$message' " .
"WHERE ID = $id ";
@@ -1407,7 +1410,7 @@
{
global $DatabaseLink;
- $Query = "INSERT INTO shipping VALUES (0, ";
+ $Query = "INSERT INTO invoiceshipping VALUES (0, ";
$Query .= "$invoice, ";
$Query .= "$address, ";
$Query .= "$method, ";
@@ -1461,7 +1464,7 @@
}
$Query = "SELECT Address ";
- $Query .= "FROM billing ";
+ $Query .= "FROM ionvoice_billing ";
$Query .= "WHERE Invoice = $invoice ";
$DatabaseResult = mysql_query($Query, $DatabaseLink);
while($DatabaseRow = mysql_fetch_row($DatabaseResult))
@@ -1480,7 +1483,7 @@
//delete shipping
- $Query = "DELETE FROM shipping ";
+ $Query = "DELETE FROM invoice_shipping ";
$Query .= "WHERE Invoice = $invoice ";
if(!mysql_query($Query, $DatabaseLink))
{
@@ -1489,7 +1492,7 @@
}
//delete billing
- $Query = "DELETE FROM billing ";
+ $Query = "DELETE FROM invoice_billing ";
$Query .= "WHERE Invoice = $invoice ";
if(!mysql_query($Query, $DatabaseLink))
{
_______________________________________________
FreeTrade-dev mailing list
[EMAIL PROTECTED]
http://share.whichever.com/mailman/listinfo/freetrade-dev