[freeside-commits] branch master updated. 508756cf10352b6cf54a32fbce18ec57121214ce

Ivan ivan at 420.am
Fri May 17 15:09:14 PDT 2013


The branch, master has been updated
       via  508756cf10352b6cf54a32fbce18ec57121214ce (commit)
       via  67a2ec7e476c9a78092f451cc1d1f2e09ac39700 (commit)
      from  a1a1fbca688fda6c737bf016f6f3565b5192497b (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 508756cf10352b6cf54a32fbce18ec57121214ce
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Fri May 17 15:09:13 2013 -0700

    add contract_end to Package age condition, RT#23171

diff --git a/FS/FS/part_event/Condition/pkg_age.pm b/FS/FS/part_event/Condition/pkg_age.pm
index 4a85387..24a73e2 100644
--- a/FS/FS/part_event/Condition/pkg_age.pm
+++ b/FS/FS/part_event/Condition/pkg_age.pm
@@ -23,16 +23,18 @@ sub option_fields {
                },
     'field' => { 'label'   => 'Compare date',
                  'type'    => 'select',
-                 'options' =>
-                   [qw( setup last_bill bill adjourn susp expire cancel )],
+                 'options' => [qw(
+                   setup last_bill bill adjourn susp expire cancel contract_end
+                 )],
                  'labels'  => {
-                   'setup'     => 'Setup date',
-                   'last_bill' => 'Last bill date',
-                   'bill'      => 'Next bill date',
-                   'adjourn'   => 'Adjournment date',
-                   'susp'      => 'Suspension date',
-                   'expire'    => 'Expiration date',
-                   'cancel'    => 'Cancellation date',
+                   'setup'        => 'Setup date',
+                   'last_bill'    => 'Last bill date',
+                   'bill'         => 'Next bill date',
+                   'adjourn'      => 'Adjournment date',
+                   'susp'         => 'Suspension date',
+                   'expire'       => 'Expiration date',
+                   'cancel'       => 'Cancellation date',
+                   'contract_end' => 'Contract end date',
                  },
                },
   );

commit 67a2ec7e476c9a78092f451cc1d1f2e09ac39700
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Fri May 17 13:22:37 2013 -0700

    history_user -> history_usernum

diff --git a/FS/FS/Record.pm b/FS/FS/Record.pm
index 3886c33..cdbcae0 100644
--- a/FS/FS/Record.pm
+++ b/FS/FS/Record.pm
@@ -1907,10 +1907,10 @@ sub _h_statement {
   my @values = map { _quote( $self->getfield($_), $self->table, $_) } @fields;
 
   "INSERT INTO h_". $self->table. " ( ".
-      join(', ', qw(history_date history_user history_action), @fields ).
+      join(', ', qw(history_date history_usernum history_action), @fields ).
     ") VALUES (".
       join(', ', $time,
-                 dbh->quote( $FS::CurrentUser::CurrentUser->username ),
+                 $FS::CurrentUser::CurrentUser->usernum,
                  dbh->quote($action),
                  @values
       ).
diff --git a/FS/FS/Schema.pm b/FS/FS/Schema.pm
index 1da302d..5f1611c 100644
--- a/FS/FS/Schema.pm
+++ b/FS/FS/Schema.pm
@@ -267,12 +267,20 @@ sub dbdef_dist {
           DBIx::DBSchema::Column->new( {
             'name'    => 'history_user',
             'type'    => 'varchar',
-            'null'    => 'NOT NULL',
+            'null'    => 'NULL',
             'length'  => '80',
             'default' => '',
             'local'   => '',
           } ),
           DBIx::DBSchema::Column->new( {
+            'name'    => 'history_usernum',
+            'type'    => 'int',
+            'null'    => 'NULL',
+            'length'  => '',
+            'default' => '',
+            'local'   => '',
+          } ),
+          DBIx::DBSchema::Column->new( {
             'name'    => 'history_action',
             'type'    => 'varchar',
             'null'    => 'NOT NULL',

-----------------------------------------------------------------------

Summary of changes:
 FS/FS/Record.pm                       |    4 ++--
 FS/FS/Schema.pm                       |   10 +++++++++-
 FS/FS/part_event/Condition/pkg_age.pm |   20 +++++++++++---------
 3 files changed, 22 insertions(+), 12 deletions(-)




More information about the freeside-commits mailing list