From 7ad91f34d0d0c0cdaf922b816f3fc22112b86d20 Mon Sep 17 00:00:00 2001
From: ftimme <ft@falkotimme.com>
Date: Fri, 24 Feb 2012 12:07:34 +0000
Subject: [PATCH] - Added bank detail fields to the client form.

---
 install/sql/incremental/upd_0030.sql          |  1 +
 install/sql/ispconfig3.sql                    |  5 ++
 interface/web/client/form/client.tform.php    | 55 +++++++++++++++++++
 interface/web/client/lib/lang/de_client.lng   |  5 ++
 interface/web/client/lib/lang/en_client.lng   |  5 ++
 .../client/templates/client_edit_address.htm  | 20 +++++++
 6 files changed, 91 insertions(+)
 create mode 100644 install/sql/incremental/upd_0030.sql

diff --git a/install/sql/incremental/upd_0030.sql b/install/sql/incremental/upd_0030.sql
new file mode 100644
index 0000000000..eb2348972e
--- /dev/null
+++ b/install/sql/incremental/upd_0030.sql
@@ -0,0 +1 @@
+ALTER TABLE `client` ADD `bank_account_number` VARCHAR( 255 ) NULL DEFAULT NULL AFTER `notes` , ADD `bank_code` VARCHAR( 255 ) NULL DEFAULT NULL AFTER `bank_account_number` , ADD `bank_name` VARCHAR( 255 ) NULL DEFAULT NULL AFTER `bank_code` , ADD `bank_account_iban` VARCHAR( 255 ) NULL DEFAULT NULL AFTER `bank_name` , ADD `bank_account_swift` VARCHAR( 255 ) NULL DEFAULT NULL AFTER `bank_account_iban`;
\ No newline at end of file
diff --git a/install/sql/ispconfig3.sql b/install/sql/ispconfig3.sql
index c09a600bbd..8055d8277e 100644
--- a/install/sql/ispconfig3.sql
+++ b/install/sql/ispconfig3.sql
@@ -93,6 +93,11 @@ CREATE TABLE `client` (
   `internet` varchar(255) NOT NULL,
   `icq` varchar(16) DEFAULT NULL,
   `notes` text,
+  `bank_account_number` varchar(255) DEFAULT NULL,
+  `bank_code` varchar(255) DEFAULT NULL,
+  `bank_name` varchar(255) DEFAULT NULL,
+  `bank_account_iban` varchar(255) DEFAULT NULL,
+  `bank_account_swift` varchar(255) DEFAULT NULL,
   `default_mailserver` int(11) unsigned NOT NULL DEFAULT '1',
   `limit_maildomain` int(11) NOT NULL DEFAULT '-1',
   `limit_mailbox` int(11) NOT NULL DEFAULT '-1',
diff --git a/interface/web/client/form/client.tform.php b/interface/web/client/form/client.tform.php
index 6e76992504..66eba4f519 100644
--- a/interface/web/client/form/client.tform.php
+++ b/interface/web/client/form/client.tform.php
@@ -316,6 +316,61 @@ $form["tabs"]['address'] = array (
 			'rows'		=> '',
 			'cols'		=> ''
 		),
+		'bank_account_number' => array (
+			'datatype'	=> 'VARCHAR',
+			'formtype'	=> 'TEXT',
+			'default'	=> '',
+			'value'		=> '',
+			'separator'	=> '',
+			'width'		=> '30',
+			'maxlength'	=> '255',
+			'rows'		=> '',
+			'cols'		=> ''
+		),
+		'bank_code' => array (
+			'datatype'	=> 'VARCHAR',
+			'formtype'	=> 'TEXT',
+			'default'	=> '',
+			'value'		=> '',
+			'separator'	=> '',
+			'width'		=> '30',
+			'maxlength'	=> '255',
+			'rows'		=> '',
+			'cols'		=> ''
+		),
+		'bank_name' => array (
+			'datatype'	=> 'VARCHAR',
+			'formtype'	=> 'TEXT',
+			'default'	=> '',
+			'value'		=> '',
+			'separator'	=> '',
+			'width'		=> '30',
+			'maxlength'	=> '255',
+			'rows'		=> '',
+			'cols'		=> ''
+		),
+		'bank_account_iban' => array (
+			'datatype'	=> 'VARCHAR',
+			'formtype'	=> 'TEXT',
+			'default'	=> '',
+			'value'		=> '',
+			'separator'	=> '',
+			'width'		=> '30',
+			'maxlength'	=> '255',
+			'rows'		=> '',
+			'cols'		=> ''
+		),
+		'bank_account_swift' => array (
+			'datatype'	=> 'VARCHAR',
+			'formtype'	=> 'TEXT',
+			'default'	=> '',
+			'value'		=> '',
+			'separator'	=> '',
+			'width'		=> '30',
+			'maxlength'	=> '255',
+			'rows'		=> '',
+			'cols'		=> ''
+		),
 		'notes' => array (
 			'datatype'	=> 'TEXT',
 			'formtype'	=> 'TEXTAREA',
diff --git a/interface/web/client/lib/lang/de_client.lng b/interface/web/client/lib/lang/de_client.lng
index 2dca1c7d63..df326f6afc 100644
--- a/interface/web/client/lib/lang/de_client.lng
+++ b/interface/web/client/lib/lang/de_client.lng
@@ -106,4 +106,9 @@ $wb['limit_openvz_vm_template_id_txt'] = 'Force virtual server template';
 $wb['limit_openvz_vm_error_notint'] = 'The virtual server limit must be a number.';
 $wb['web_php_options_notempty'] = 'No PHP option(s) selected. Select at least one PHP option.';
 $wb['ssh_chroot_notempty'] = 'No SSH chroot option selected. Select at least one SSH option.';
+$wb['bank_account_number_txt'] = 'Kontonr.';
+$wb['bank_code_txt'] = 'BLZ';
+$wb['bank_name_txt'] = 'Bank';
+$wb['bank_account_iban_txt'] = 'IBAN';
+$wb['bank_account_swift_txt'] = 'BIC';
 ?>
diff --git a/interface/web/client/lib/lang/en_client.lng b/interface/web/client/lib/lang/en_client.lng
index ce4805ef60..4981afa3f8 100644
--- a/interface/web/client/lib/lang/en_client.lng
+++ b/interface/web/client/lib/lang/en_client.lng
@@ -109,4 +109,9 @@ $wb["limit_openvz_vm_template_id_txt"] = 'Force virtual server template';
 $wb["limit_openvz_vm_error_notint"] = 'The virtual server limit must be a number.';
 $wb["web_php_options_notempty"] = 'No PHP option(s) selected. Select at least one PHP option.';
 $wb["ssh_chroot_notempty"] = 'No SSH chroot option selected. Select at least one SSH option.';
+$wb["bank_account_number_txt"] = 'Bank account no.';
+$wb["bank_code_txt"] = 'Bank code';
+$wb["bank_name_txt"] = 'Bank name';
+$wb["bank_account_iban_txt"] = 'IBAN';
+$wb["bank_account_swift_txt"] = 'BIC / Swift';
 ?>
diff --git a/interface/web/client/templates/client_edit_address.htm b/interface/web/client/templates/client_edit_address.htm
index 850804637b..ec752f84fe 100644
--- a/interface/web/client/templates/client_edit_address.htm
+++ b/interface/web/client/templates/client_edit_address.htm
@@ -96,6 +96,26 @@
       	<label for="company_id">{tmpl_var name='company_id_txt'}</label>
         <input name="company_id" id="company_id" value="{tmpl_var name='company_id'}" size="30" maxlength="255" type="text" class="textInput" />
 	  </div>
+	  <div class="ctrlHolder">
+      	<label for="bank_account_number">{tmpl_var name='bank_account_number_txt'}</label>
+        <input name="bank_account_number" id="bank_account_number" value="{tmpl_var name='bank_account_number'}" size="30" maxlength="255" type="text" class="textInput" />
+			</div>
+      <div class="ctrlHolder">
+      	<label for="bank_code">{tmpl_var name='bank_code_txt'}</label>
+        <input name="bank_code" id="bank_code" value="{tmpl_var name='bank_code'}" size="30" maxlength="255" type="text" class="textInput" />
+			</div>
+      <div class="ctrlHolder">
+      	<label for="bank_name">{tmpl_var name='bank_name_txt'}</label>
+        <input name="bank_name" id="bank_name" value="{tmpl_var name='bank_name'}" size="30" maxlength="255" type="text" class="textInput" />
+			</div>
+      <div class="ctrlHolder">
+      	<label for="bank_account_iban">{tmpl_var name='bank_account_iban_txt'}</label>
+        <input name="bank_account_iban" id="bank_account_iban" value="{tmpl_var name='bank_account_iban'}" size="30" maxlength="255" type="text" class="textInput" />
+			</div>
+      <div class="ctrlHolder">
+      	<label for="bank_account_swift">{tmpl_var name='bank_account_swift_txt'}</label>
+        <input name="bank_account_swift" id="bank_account_swift" value="{tmpl_var name='bank_account_swift'}" size="30" maxlength="255" type="text" class="textInput" />
+			</div>
       <div class="ctrlHolder">
       	<label for="notes">{tmpl_var name='notes_txt'}</label>
         <textarea name="notes" id="notes" rows='10' cols='30'>{tmpl_var name='notes'}</textarea>
-- 
GitLab