[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb:[6013] trunk



Revision: 6013
          http://sourceforge.net/p/ledger-smb/code/6013
Author:   einhverfr
Date:     2013-09-13 11:24:59 +0000 (Fri, 13 Sep 2013)
Log Message:
-----------
Fixing issues from PGDate and empty string handling

Modified Paths:
--------------
    trunk/LedgerSMB/PGDate.pm

Added Paths:
-----------
    trunk/UI/Reports/filters/taxforms.html

Removed Paths:
-------------
    trunk/UI/taxform/filter.html

Modified: trunk/LedgerSMB/PGDate.pm
===================================================================
--- trunk/LedgerSMB/PGDate.pm	2013-09-13 10:40:57 UTC (rev 6012)
+++ trunk/LedgerSMB/PGDate.pm	2013-09-13 11:24:59 UTC (rev 6013)
@@ -159,7 +159,9 @@
     my $format = $LedgerSMB::App_State::User->{dateformat};
     $format ||= 'yyyy-mm-dd';
     my $dt =  _parse_string($self, $input, uc($format), $has_time);
-    return $self->new(date => $dt, dummy => !defined $dt);
+    my %prop = (date => $dt, dummy => !defined $dt);
+    delete $prop{date} unless defined $prop{date} and $prop{date} ne '';
+    return $self->new(%prop);
 }
 
 
@@ -209,7 +211,10 @@
        confess 'LedgerSMB::PGDate Invalid DB Type';
     }
     my $dt =  _parse_string($self, $input, $format, $has_time);
-    return $self->new(date => $dt, dummy => !defined $dt);
+    my %prop = (date => $dt, dummy => !defined $dt);
+    delete $prop{date} unless defined $prop{date} and $prop{date} ne '';
+
+    return $self->new(%prop);
 }
 
 =item to_db
@@ -230,7 +235,7 @@
     return $formatter->format_datetime($self->date);
 }
 
-__PACKAGE__->meta->make_immutable;
+#__PACKAGE__->meta->make_immutable;
 
 1;
 

Copied: trunk/UI/Reports/filters/taxforms.html (from rev 5980, trunk/UI/taxform/filter.html)
===================================================================
--- trunk/UI/Reports/filters/taxforms.html	                        (rev 0)
+++ trunk/UI/Reports/filters/taxforms.html	2013-09-13 11:24:59 UTC (rev 6013)
@@ -0,0 +1,74 @@
+<!--
+* tax form select box (optional)
+* date range boxes
+* optional vendor text box 
+-->
+<?lsmb INCLUDE 'ui-header.html' 
+       	include_script = ["UI/ajax/scriptaculous/lib/prototype.js","UI/ajax/scriptaculous/src/scriptaculous.js?load=builder,effects,dragdrop,controls","UI/ajax/helpers.js"]
+        PROCESS 'elements.html';
+        PROCESS 'report_base.html';
+<body>
+
+<form method="post" action="<?lsmb script ?>">
+<?lsmb PROCESS input element_data = {
+    type = "hidden"
+    name = "sort"
+    value = "transdate"
+} ?>
+
+<table width="100%">
+  <tr>
+    <th class="listtop"><?lsmb text('Tax Form Reports') ?></th>
+  </tr>
+  <tr height="5"></tr>
+  <tr>
+    <td>
+      <table>
+        <tr>
+	<th align="right"><?lsmb text('Form') ?></th>
+	<td colspan="3">
+        <?lsmb PROCESS select element_data = {
+               name = "tax_form_id"
+               options = forms
+               text_attr = "form_name"
+               value_attr = "id"
+        } ?>
+
+	</tr>
+	
+      </tr>
+	<tr>
+	  <th align="right"><?lsmb text('Vendor Number') ?></th>
+	  <td colspan="3"><?lsmb INCLUDE input element_data = {
+	                  name = "meta_number"
+	                  size = '35'
+           } ?></td>
+	</tr>
+      </table>
+    </td>
+  </tr>
+  <?lsmb PROCESS date_row ?> 
+  <tr>
+    <td><hr size=3 noshade></td>
+  </tr>
+</table>
+
+<?lsmb PROCESS input element_data = { 
+       type="hidden" 
+       name="login" 
+       value=login
+} ?>
+
+<br>
+<?lsmb PROCESS button element_data = {
+       text = text('Continue')
+       class="submit" 
+       type="submit" 
+       name="action" 
+       value="generate_report"
+} ?>
+</form>
+
+</body>
+</html>
+

Deleted: trunk/UI/taxform/filter.html
===================================================================
--- trunk/UI/taxform/filter.html	2013-09-13 10:40:57 UTC (rev 6012)
+++ trunk/UI/taxform/filter.html	2013-09-13 11:24:59 UTC (rev 6013)
@@ -1,121 +0,0 @@
-<!--
-* tax form select box (optional)
-* date range boxes
-* optional vendor text box 
--->
-<?lsmb INCLUDE 'ui-header.html' 
-       	include_script = ["UI/ajax/scriptaculous/lib/prototype.js","UI/ajax/scriptaculous/src/scriptaculous.js?load=builder,effects,dragdrop,controls","UI/ajax/helpers.js"]
-?>
-<?lsmb PROCESS 'elements.html' ?>
-<body>
-
-<form method="post" action="<?lsmb script ?>">
-<?lsmb PROCESS input element_data = {
-    type = "hidden"
-    name = "sort"
-    value = "transdate"
-} ?>
-
-<table width="100%">
-  <tr>
-    <th class="listtop"><?lsmb text('Tax Form Reports') ?></th>
-  </tr>
-  <tr height="5"></tr>
-  <tr>
-    <td>
-      <table>
-        <tr>
-	<th align="right"><?lsmb text('Form') ?></th>
-	<td colspan="3">
-        <?lsmb PROCESS select element_data = {
-               name = "tax_form_id"
-               options = forms
-               text_attr = "form_name"
-               value_attr = "id"
-        } ?>
-
-	</tr>
-	
-        <tr>
-	<th align="right"><?lsmb text('Period') ?></th>
-
-	<td>
-        <?lsmb PROCESS select element_data = {
-               name = "begin_month"
-               options = accountingmonths
-               text_attr = "text"
-               value_attr = "value"
-        } ?>
-
-        <?lsmb PROCESS select element_data = {
-               name = "begin_day"
-               options = days
-               text_attr = "text"
-               value_attr = "value"
-        } ?>
-
-	<?lsmb PROCESS select element_data = {
-               name="begin_year"
-               options = all_years
-               text_attr = "text"
-               value_attr = "value"
-        } ?>
-        </td>
-        <td>to</td>
-	<td>
-        <?lsmb PROCESS select element_data = {
-               name = "end_month"
-               options = accountingmonths
-               text_attr = "text"
-               value_attr = "value"
-        } ?>
-
-        <?lsmb PROCESS select element_data = {
-               name = "end_day"
-               options = days
-               text_attr = "text"
-               value_attr = "value"
-        } ?>
-
-	<?lsmb PROCESS select element_data = {
-               name="end_year"
-               options = all_years
-               text_attr = "text"
-               value_attr = "value"
-        } ?>
-        </td>
-      </tr>
-	<tr>
-	  <th align="right"><?lsmb text('Vendor Number') ?></th>
-	  <td colspan="3"><?lsmb INCLUDE input element_data = {
-	                  name = "meta_number"
-	                  size = '35'
-           } ?></td>
-	</tr>
-      </table>
-    </td>
-  </tr>
-  <tr>
-    <td><hr size=3 noshade></td>
-  </tr>
-</table>
-
-<?lsmb PROCESS input element_data = { 
-       type="hidden" 
-       name="login" 
-       value=login
-} ?>
-
-<br>
-<?lsmb PROCESS button element_data = {
-       text = text('Continue')
-       class="submit" 
-       type="submit" 
-       name="action" 
-       value="generate_report"
-} ?>
-</form>
-
-</body>
-</html>
-

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.


------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. Consolidate legacy IT systems to a single system of record for IT
2. Standardize and globalize service processes across IT
3. Implement zero-touch automation to replace manual, redundant tasks
http://pubads.g.doubleclick.net/gampad/clk?id=51271111&iu=/4140/ostg.clktrk
_______________________________________________
Ledger-smb-commits mailing list
..hidden..
https://lists.sourceforge.net/lists/listinfo/ledger-smb-commits