|
From: <te...@us...> - 2013-10-19 06:21:12
|
Revision: 6362
http://sourceforge.net/p/web-erp/reponame/6362
Author: tehonu
Date: 2013-10-19 06:21:08 +0000 (Sat, 19 Oct 2013)
Log Message:
-----------
Maintenance of ShopPaypalCommissionAccount setting for webSHOP
Modified Paths:
--------------
trunk/ShopParameters.php
trunk/sql/mysql/upgrade4.11-4.12.sql
Modified: trunk/ShopParameters.php
===================================================================
--- trunk/ShopParameters.php 2013-10-19 02:23:53 UTC (rev 6361)
+++ trunk/ShopParameters.php 2013-10-19 06:21:08 UTC (rev 6362)
@@ -107,6 +107,9 @@
if ($_SESSION['ShopPayPalBankAccount'] != $_POST['X_ShopPayPalBankAccount'] ) {
$SQL[] = "UPDATE config SET confvalue = '".$_POST['X_ShopPayPalBankAccount']."' WHERE confname = 'ShopPayPalBankAccount'";
}
+ if ($_SESSION['ShopPayPalCommissionAccount'] != $_POST['X_ShopPayPalCommissionAccount'] ) {
+ $SQL[] = "UPDATE config SET confvalue = '".$_POST['X_ShopPayPalCommissionAccount']."' WHERE confname = 'ShopPayPalCommissionAccount'";
+ }
if ($_SESSION['ShopFreightMethod'] != $_POST['X_ShopFreightMethod'] ) {
$SQL[] = "UPDATE config SET confvalue = '".$_POST['X_ShopFreightMethod']."' WHERE confname = 'ShopFreightMethod'";
}
@@ -432,7 +435,28 @@
<td>' . _('Select the webERP bank account to use for receipts processed by Pay Pal') . '</td>
</tr>';
+
echo '<tr>
+ <td>' . _('Pay Pal Commission Account') . ':</td>
+ <td><select name="X_ShopPayPalCommissionAccount">';
+$AccountsResult = DB_query("SELECT accountcode,
+ accountname
+ FROM chartmaster INNER JOIN accountgroups
+ ON chartmaster.group_=accountgroups.groupname
+ WHERE accountgroups.pandl=1
+ ORDER BY chartmaster.accountcode",$db);
+while ($AccountRow = DB_fetch_array($AccountsResult)){
+ if ($_SESSION['ShopPayPalCommissionAccount'] == $AccountRow['accountcode']) {
+ echo '<option selected="selected" value="' . $AccountRow['accountcode'] . '">' . $AccountRow['accountname'] . '</option>';
+ } else {
+ echo '<option value="' . $AccountRow['accountcode'] . '">' . $AccountRow['accountname'] . '</option>';
+ }
+}
+echo '</select></td>
+ <td>' . _('Select the webERP P/L account to use for commissions (transaction fees) charged by Pay Pal') . '</td>
+ </tr>';
+
+echo '<tr>
<td>' . _('PayPal Surcharge') . ':</td>
<td><input type="text" class="number" size="5" maxlength="5" name="X_ShopPayPalSurcharge" value="' . $_SESSION['ShopPayPalSurcharge'] . '" /></td>
<td>' . _('The PayPal surcharge') . '</td>
Modified: trunk/sql/mysql/upgrade4.11-4.12.sql
===================================================================
--- trunk/sql/mysql/upgrade4.11-4.12.sql 2013-10-19 02:23:53 UTC (rev 6361)
+++ trunk/sql/mysql/upgrade4.11-4.12.sql 2013-10-19 06:21:08 UTC (rev 6362)
@@ -1,6 +1,7 @@
INSERT INTO scripts VALUES ('Z_UpdateSalesAnalysisWithLatestCustomerData.php','15','Update sales analysis with latest customer and branch salesperson sales area and salestype irrespective of what these settings were when the sale was made');
INSERT INTO scripts VALUES ('PurchaseByPrefSupplier.php','2','Purchase ordering by preferred supplier');
ALTER TABLE `suppliers` ADD COLUMN `url` varchar(50) NOT NULL DEFAULT '';
-INSERT INTO config VALUES ('ShopFreightMethod','webERPDefault');
+INSERT INTO config VALUES ('ShopFreightMethod','webERPCalculation');
+INSERT INTO config VALUES ('ShopPaypalCommissionAccount', '7220');
#--UPDATE config SET confvalue='4.11.0' WHERE confname='VersionNumber';
|