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

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



Revision: 4986
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=4986&view=rev
Author:   einhverfr
Date:     2012-07-14 10:45:58 +0000 (Sat, 14 Jul 2012)
Log Message:
-----------
Adding accidently omitted files

Added Paths:
-----------
    trunk/LedgerSMB/ScriptLib/Company_Colombia.pm
    trunk/LedgerSMB/Scripts/budget_reports.pm
    trunk/UI/Contact/divs/files.html
    trunk/UI/Contact/divs/user.html
    trunk/UI/Reports/filters/purchase_history.html
    trunk/UI/Reports/filters/unapproved.html

Added: trunk/LedgerSMB/ScriptLib/Company_Colombia.pm
===================================================================
--- trunk/LedgerSMB/ScriptLib/Company_Colombia.pm	                        (rev 0)
+++ trunk/LedgerSMB/ScriptLib/Company_Colombia.pm	2012-07-14 10:45:58 UTC (rev 4986)
@@ -0,0 +1,4 @@
+
+package LedgerSMB::ScriptLib::Company_Colombia;
+
+use base qw(LedgerSMB::ScriptLib::Company);

Added: trunk/LedgerSMB/Scripts/budget_reports.pm
===================================================================
--- trunk/LedgerSMB/Scripts/budget_reports.pm	                        (rev 0)
+++ trunk/LedgerSMB/Scripts/budget_reports.pm	2012-07-14 10:45:58 UTC (rev 4986)
@@ -0,0 +1,54 @@
+=head1 NAME
+
+LedgerSMB::Scripts::budget_reports - Budget search and reporting workflows.
+
+=head1 METHODS
+
+=cut
+
+package LedgerSMB::Scripts::budget_reports;
+our $VERSION = '1.0';
+
+use LedgerSMB;
+use LedgerSMB::Template;
+use LedgerSMB::DBObject::Report::Budget::Search;
+use LedgerSMB::DBObject::Report::Budget::Variance;
+use strict;
+
+=over
+
+=item search
+
+Searches for budgets.  See LedgerSMB::DBObject::Report::Budget::Search for 
+more.
+
+=cut
+
+sub search {
+    my ($request) = @_;
+    LedgerSMB::DBObject::Report::Budget::Search->prepare_criteria($request);
+    my $report = LedgerSMB::DBObject::Report::Budget::Search->new(%$request);
+    $report->run_report;
+    $report->render($request);
+}
+
+=item variance_report
+
+This runs a variance report.  Requires that id be set.  Shows amounts budgetted
+vs amounts used.
+
+=cut
+
+sub variance_report {
+    my ($request) = @_;
+    my $id = $request->{id};
+    my $report = LedgerSMB::DBObject::Report::Budget::Variance->for_budget_id($id);
+    $report->run_report;
+    $report->render($request);
+}
+
+=back
+
+=cut
+
+1;

Added: trunk/UI/Contact/divs/files.html
===================================================================
--- trunk/UI/Contact/divs/files.html	                        (rev 0)
+++ trunk/UI/Contact/divs/files.html	2012-07-14 10:45:58 UTC (rev 4986)
@@ -0,0 +1,54 @@
+<div class="container" id="files_div">
+<?lsmb callback="contact.pl?action=get&id=" _ entity_id _
+                "&credit_id=" _ credit_act.id; 
+columns = [{ col_id = 'file_name', name = text('File name'), #'
+               type = 'href', href_base="file.pl&action=get"}
+           { col_id = 'mime_type_text', name = text('File Type'), #'
+               type = 'text'}
+           { col_id = 'attached_at', name = text('Attached At'), #'
+               type = 'text'}
+           { col_id = 'attached_by', name = text('Attached By'), #'
+               type = 'text'}]; ?>
+<div class="listtop"><?lsmb text('Files attached to Entity') ?></div>
+<?lsmb 
+  FOREACH COL IN columns;
+         IF COL.col_id == file_name;
+                  COL.href_base='file.pl&action=get&file_class=4&id=';
+         END;
+  END;
+  FOREACH ROW IN entity_files;
+       ROW.row_id = ROW.id;
+  END;
+
+INCLUDE dynatable
+      columns = columns
+      attributes = {id = 'entity-files', width = '100%'}
+      tbody = {rows = entity_files };
+?>
+<?lsmb IF credit_act.id ?>
+<div class="listtop"><?lsmb text('Files attached to Credit Account') ?></div>
+<?lsmb 
+  FOREACH COL IN columns;
+         IF COL.col_id == file_name;
+                  COL.href_base='file.pl&action=get&file_class=5&id=';
+         END;
+  END;
+  FOREACH ROW IN credit_files;
+       ROW.row_id = ROW.id;
+  END;
+
+INCLUDE dynatable
+      columns = columns
+      attributes = {id = 'eca-files', width = '100%'}
+      tbody = {rows = eca_files };
+END;
+?>
+<a href="file.pl?action=show_attachment_screen&ref_key=<?lsmb entity_id 
+         ?>&file_class=4&callback=<?lsmb tt_url(callback) ?>"
+>[<?lsmb text('Attach to Entity') ?>]</a>
+<?lsmb IF credit_act.id ?>
+<a href="file.pl?action=show_attachment_screen&ref_key=<?lsmb credit_act.id
+    ?>&file_class=5&callback=<?lsmb tt_url(callback) ?>"
+>[<?lsmb text('Attach to Credit Account') ?>]</a>
+<?lsmb END ?>
+</div>

Added: trunk/UI/Contact/divs/user.html
===================================================================
--- trunk/UI/Contact/divs/user.html	                        (rev 0)
+++ trunk/UI/Contact/divs/user.html	2012-07-14 10:45:58 UTC (rev 4986)
@@ -0,0 +1,142 @@
+<?lsmb PROCESS 'elements.html' ?>
+<div id="user_div" class="container">
+	<div class="listtop">
+            <?lsmb 
+               IF request.import;
+                       text('Importing User');
+                       action = 'save_user';
+                ELSIF user.username;
+                      text('Editing User');
+                      action = 'edit_user';
+                ELSE;
+                      text('New User');
+                      action = 'save_user';
+                END ?>
+        </div>
+    
+    <form method="POST" action="admin.pl">
+        <input type="hidden" name="entity_id" value="<?lsmb entity_id ?>"/>
+        <table>
+
+            <?lsmb IF user.username?>
+            <tr>
+                <td><?lsmb text('Username') ?></td>
+                <td>
+                    <?lsmb user.username;
+                    INCLUDE input element_data = {
+                            name  = 'username'
+                            type  = 'hidden'
+                            value = user.username
+                    } ?>
+                </td>
+            </tr>
+            
+            <?lsmb ELSE ?>
+            <tr>
+                <td><?lsmb text('Username') ?></td>
+                <td>
+                    <input type="text" name="username" value="<?lsmb user.username ?>"/>
+                </td>
+            </tr>
+            <?lsmb END?>
+            <?lsmb UNLESS request.import ?>
+            <tr>
+                <td><?lsmb text('Password') ?></td>
+                <td>
+                    <input type="password" name="password" value="<?lsmb user.user.password ?>"/>
+                </td>
+            </tr>
+            <?lsmb END ?>
+            <?lsmb IF (request.import == 1) OR !user.username ?>
+            <tr>
+                <td><?lsmb text('Import') ?></td>
+                <?lsmb 
+                  IF request.import;
+                      importc1 = 'CHECKED';
+                      importc0 = '';
+                  ELSE;
+                      importc1 = '';
+                      importc0 = 'CHECKED';
+                  END; ?> 
+                <td><?lsmb INCLUDE input element_data = {
+                           label   = 'Yes'
+                           value   = '1'
+                           checked = importc1
+                           name    = 'import'
+                           type    = 'radio'
+                   };
+                   INCLUDE input element_data = {
+                           label   = 'No'
+                           value   = '0'
+                           checked = importc0
+                           name    = 'import'
+                           type    = 'radio'
+                   } ?>
+            </tr>
+            <?lsmb END # unless employee.entity_id ?>
+        </table>
+           <?lsmb IF user.username;
+                PROCESS button element_data  = {
+                         text = text('Reset Password') #'
+                         name = 'action'
+                         type = 'submit'
+                        class = 'submit'
+                        value = 'reset_password'
+                };
+           ELSE; 
+                PROCESS button element_data  = {
+                         text = text('Add User') #'
+                         name = 'action'
+                         type = 'submit'
+                        class = 'submit'
+                        value = 'create_user'
+                };
+           END;
+    ?>
+    </form>
+    <?lsmb IF user.username AND request.import != 1 ?>
+        <hr /> 
+        <form name="groups" method="POST" action="admin.pl">
+            <?lsmb PROCESS input element_data = {
+               type="hidden"
+               name="user_id"
+               value= user.user.id 
+           } ?>
+            <table>
+                <!-- Groups section -->
+                <tr>
+                <?lsmb FOREACH role IN roles ?>
+                <?lsmb IF loop.count % 2 == 0?>
+                </tr>
+                <tr>
+                <?lsmb END?>
+                    <td>
+                        <?lsmb rolcheck = undef; 
+                           IF user.role_list.grep(role.rolname).size;
+                              rolcheck = "checked";
+                           END ?>
+                        <?lsmb PROCESS input element_data = {
+                               type = "checkbox"
+                               label = role.rolname
+                               value = 1
+                               name = role.rolname
+                               checked = rolcheck
+                         }, label_pos = 1 ?>
+                    </td>
+                <?lsmb END?>
+                </tr>
+            </table>
+        
+            <table>
+                <tr>
+                    <td><?lsmb PROCESS button element_data = {
+                          text = text('Save Groups') #'
+                          class = "submit"
+                          name = "action"
+                          value = "save_roles"
+                    } ?></td>
+                </tr>
+            </table>
+        </form>   
+<?lsmb END?>
+</div>

Added: trunk/UI/Reports/filters/purchase_history.html
===================================================================
--- trunk/UI/Reports/filters/purchase_history.html	                        (rev 0)
+++ trunk/UI/Reports/filters/purchase_history.html	2012-07-14 10:45:58 UTC (rev 4986)
@@ -0,0 +1,357 @@
+<?lsmb INCLUDE "ui-header.html" 
+       stylesheet = stylesheet
+       # include_stylesheet = ['UI/Contact/history.css'] ?>
+<?lsmb PROCESS 'elements.html';
+       PROCESS 'report_base.html'; ?>
+ 
+<body> 
+ 
+<form method="get" action="contact_reports.pl"> 
+<table width=100%> 
+  <tr> 
+   <th class=listtop><?lsmb text('Purchase History') ?></th> 
+  </tr> 
+  <tr height="5"></tr> 
+  <tr valign=top> 
+    <td> 
+      <table> 
+	<tr valign=top> 
+	  <td> 
+	    <table> 
+              <?lsmb PROCESS entity_class ?>
+	      <tr> 
+		<th align=right nowrap><?lsmb text('Company Name') ?></th> 
+		<td><?lsmb INCLUDE input element_data = {
+                           size = 32,
+                           name = "name",
+                           type = "text"
+                    } ?></td> 
+	      </tr> 
+	      <tr> 
+		<th align=right nowrap><?lsmb text('Contact Info') ?></th> 
+		<td><?lsmb INCLUDE input element_data = {
+                           size = 32
+                           name = "contact_info"
+                           type = "text"
+                     } ?></td> 
+	      </tr> 
+ 	  <th align=right nowrap>Salesperson</th> 
+	  <td><?lsmb INCLUDE input element_data = {
+                           size = 32
+                           name = "salesperson"
+                           type = "text"
+              } ?></td> 
+ 
+	      </tr> <!--
+	      <tr> 
+		<th align=right nowrap>Notes</th> 
+		<td colspan=3><textarea name=notes rows=3 cols=32></textarea></td> 
+	      </tr>  -->
+	    </table> 
+	  </td> 
+ 
+	  <td> 
+	    <table> 
+	      <tr> 
+                <?lsmb IF account_class == 1;
+                          number_desc = text('Vendor Number'); #'
+                       ELSE;
+                          number_desc = text('Customer Number'); #'
+                       END;
+                 ?>
+		<th align=right nowrap><?lsmb number_desc ?></th> 
+		<td><?lsmb INCLUDE input element_data = {
+                         name = "meta_number",
+                         size = "32",
+                         type = "text"
+                    } ?></td> 
+	      </tr> 
+	      <tr> 
+		<th align=right nowrap><?lsmb text('Address') ?></th> 
+		<td><?lsmb INCLUDE input element_data = {
+                         name = "address_line",
+                         size = "32",
+                         type = "text"
+                    } ?> </td> 
+	      </tr> 
+	      <tr> 
+		<th align=right nowrap><?lsmb text('City') ?></th> 
+		<td><?lsmb INCLUDE input element_data = {
+                         name = "city",
+                         size = "32",
+                         type = "text"
+                    } ?></td> 
+	      </tr> 
+	      <tr> 
+		<th align=right nowrap><?lsmb text('State/Province') ?></th> 
+		<td><?lsmb INCLUDE input element_data = {
+                         name = "state",
+                         size = "32",
+                         type = "text"
+                    } ?></td> 
+	      </tr> 
+	      <tr> 
+		<th align=right nowrap><?lsmb text('Zip/Postal Code') ?></th> 
+		<td><?lsmb INCLUDE input element_data = {
+                         name = "zip",
+                         size = "10",
+                         type = "text"
+                    } ?></td> 
+	      </tr> 
+	      <tr> 
+		<th align=right nowrap><?lsmb text('Country') ?></th> 
+		<td><?lsmb country_list.unshift({});
+                     INCLUDE select element_data = {
+                         name = "country_id",
+                         text_attr = 'name',
+                         value_attr = 'id',
+                         options = country_list,
+                    } ?></td>
+	      </tr> 
+	      <tr> 
+		<th align=right nowrap><?lsmb text('Startdate') ?></th> 
+		<td><?lsmb INCLUDE input element_data = {
+                         name = "startdate_from",
+                         size = "11",
+                         type = "text",
+                         class = "date",
+                         title = user.dateformat,
+                         label = text('From')
+                    };
+                    INCLUDE input element_data = {
+                         name = "startdate_to",
+                         size = "11",
+                         type = "text",
+                         class = "date",
+                         title = user.dateformat,
+                         label = text('To') 
+                  } ?></td>
+                   </tr>
+ 
+		    <tr> 
+		      <th><?lsmb text('Transaction Date') ?></th> 
+		      <td> <?lsmb
+                     INCLUDE input element_data = {
+                         name = "from_date",
+                         size = "11",
+                         type = "text",
+                         class = "date",
+                         title = user.dateformat,
+                         label = text('From') 
+                  } ;
+                     INCLUDE input element_data = {
+                         name = "to_date",
+                         size = "11",
+                         type = "text",
+                         class = "date",
+                         title = user.dateformat,
+                         label = text('To') 
+                  } ?></td>
+		    </tr> 
+	    </table> 
+	  </td> 
+	</tr> 
+      </table> 
+    </td> 
+  </tr> 
+ 
+  <tr> 
+    <td> 
+      <table class="criteria"> 
+	<tr> 
+	  <th align="right" nowrap rowspan="9">
+               <?lsmb text('Include in Report') ?></th> 
+        </tr>
+		    <tr> 
+		      <td>
+                         <?lsmb INCLUDE input element_data = {
+                                checked = 'CHECKED',
+                                name    = 'type',
+                                type    = 'radio',
+                                class   = 'radio',
+                                value   = 'i'
+                                label   = text('Invoices'), 
+                         } ?></td>
+		    <td> 
+                         <?lsmb INCLUDE input element_data = {
+                                name    = 'type',
+                                type    = 'radio',
+                                class   = 'radio',
+                                value   = 'o'
+                                label   = text('Orders'), 
+                         } ?></td>
+                    <td> 
+                         <?lsmb INCLUDE input element_data = {
+                                name    = 'type',
+                                type    = 'radio',
+                                class   = 'radio',
+                                value   = 'q'
+                                label   = text('Quotations'), 
+                         } ?></td>
+
+		    </tr> 
+		    <tr> 
+		      <td> 
+                      <?lsmb
+                      INCLUDE input element_data = {
+                              type = 'checkbox',
+                              name = 'inc_open',
+                              value = '1',
+                              label = text('Open'),
+                              class = 'checkbox',
+                              checked = 'CHECKED'
+                      } ?></td>
+                      <td> <?lsmb
+                      INCLUDE input element_data = {
+                              type = 'checkbox',
+                              name = 'inc_closed',
+                              value = '1',
+                              label = text('Closed'),
+                              class = 'checkbox',
+                              checked = 'CHECKED'
+                      }; ?>
+		      </td> 
+		    </tr> 
+	      <tr> 
+		<td><?lsmb
+                     INCLUDE input element_data= {
+                             label = text('Summary'),
+                             name  = 'report_type'
+                             type  = 'radio',
+                             value = 'summary',
+                             class = 'radio',
+                           checked = 'CHECKED'
+                    } ?></td>
+		<td><?lsmb
+                     INCLUDE input element_data= {
+                             label = text('Detail'),
+                             name  = 'report_type',
+                             type  = 'radio',
+                             value = 'detail',
+                             class = 'radio',
+                    } ?></td>
+	      </tr> 
+              <tr><td colspan=3><hr /></td></tr>
+	      <tr> 
+		<td><?lsmb
+                       INCLUDE input element_data = {
+                              type = 'checkbox',
+                              name = 'l_partnumber',
+                              value = '1',
+                              label = text('Part Number'), #'
+                              class = 'checkbox',
+                              checked = 'CHECKED'
+                      }; ?>
+		</td> 
+		<td><?lsmb
+                       INCLUDE input element_data = {
+                              type = 'checkbox',
+                              name = 'l_description',
+                              value = '1',
+                              label = text('Description'), 
+                              class = 'checkbox',
+                              checked = 'CHECKED'
+                      }; ?>
+		</td> 
+		<td><?lsmb
+                       INCLUDE input element_data = {
+                              type = 'checkbox',
+                              name = 'l_sellprice',
+                              value = '1',
+                              label = text('Sell Price'), #' 
+                              class = 'checkbox',
+                      }; ?>
+		</td> 
+		<td><?lsmb
+                       INCLUDE input element_data = {
+                              type = 'checkbox',
+                              name = 'l_curr',
+                              value = '1',
+                              label = text('Currency'), 
+                              class = 'checkbox',
+                      }; ?>
+		</td> 
+	      </tr> 
+	      <tr> 
+		<td><?lsmb
+                       INCLUDE input element_data = {
+                              type = 'checkbox',
+                              name = 'l_qty',
+                              value = '1',
+                              label = text('Qty'), 
+                              class = 'checkbox',
+                            checked = 'CHECKED'
+                      }; ?>
+		</td> 
+		<td><?lsmb
+                       INCLUDE input element_data = {
+                              type = 'checkbox',
+                              name = 'l_unit',
+                              value = '1',
+                              label = text('Unit'), 
+                              class = 'checkbox',
+                            checked = 'CHECKED'
+                      }; ?>
+		</td> 
+		<td><?lsmb
+                       INCLUDE input element_data = {
+                              type = 'checkbox',
+                              name = 'l_discount',
+                              value = '1',
+                              label = text('Discount'), 
+                              class = 'checkbox',
+                      }; ?>
+		</td> 
+	      <tr> 
+	      </tr> 
+		<td><?lsmb
+                       INCLUDE input element_data = {
+                              type = 'checkbox',
+                              name = 'l_deliverydate',
+                              value = '1',
+                              label = text('Delivery Date'), #' 
+                              class = 'checkbox',
+                      }; ?>
+		</td> 
+		<td><?lsmb
+                       INCLUDE input element_data = {
+                              type = 'checkbox',
+                              name = 'l_projectnumber',
+                              value = '1',
+                              label = text('Project Number'), #' 
+                              class = 'checkbox',
+                      }; ?>
+		</td> 
+		<td><?lsmb
+                       INCLUDE input element_data = {
+                              type = 'checkbox',
+                              name = 'l_serialnumber',
+                              value = '1',
+                              label = text('Serial Number'), #' 
+                              class = 'checkbox',
+                      }; ?>
+		</td> 
+	      </tr> 
+ 
+      </table> 
+    </td> 
+  </tr> 
+ 
+  <tr> 
+    <td><hr size=3 noshade></td> 
+  </tr> 
+</table> 
+ 
+ 
+<br> 
+<?lsmb INCLUDE button element_data = {
+       text = text('Continue'),
+       value = 'history',
+       type  = 'submit',
+       class = 'submit',
+       name = 'action'
+} ?>
+</form> 
+ 
+</body> 
+</html> 

Added: trunk/UI/Reports/filters/unapproved.html
===================================================================
--- trunk/UI/Reports/filters/unapproved.html	                        (rev 0)
+++ trunk/UI/Reports/filters/unapproved.html	2012-07-14 10:45:58 UTC (rev 4986)
@@ -0,0 +1,82 @@
+<?lsmb INCLUDE "ui-header.html"
+        stylesheet = stylesheet
+	include_stylesheet = [
+		"css/global.css"
+	]
+	titlebar = text('Batch Selection'); #'
+PROCESS "elements.html";
+PROCESS 'report_base.html';
+
+IF search_type == 'drafts';
+   class_types = [
+       { text = text('AP'), value = 'ap'},
+       { text = text('AR'), value = 'ar'},
+       { text = text('GL'), value = 'gl'},
+   ];
+   script = 'drafts.pl';
+END;
+
+ ?>
+<body>
+<form action="<?lsmb script ?>" method="post">
+<div class="listtop" id="title_div"><?lsmb text('Search Unapproved Transactions') ?></div>
+<div class="input" id="batch_class_div">
+	<?lsmb INCLUDE select element_data = {
+		label = text('Transaction Type') # '
+		options = class_types
+		value_attr = "value"
+		text_attr = "text"
+		name = "type"
+		default_values = [class_id]
+	} ?>
+</div>
+<!-- 
+Commenting this section out.  Does not seem to be used by API. -CT
+
+<div class="input" id="entered_by_div">
+	<?lsmb INCLUDE select element_data = {
+		label = text('Created By') # '
+		options = users
+		value_attr = "entity_id"
+		text_attr = "username"
+		name = "created_by_eid"
+		default_values = [created_by]
+	} ?></div> -->
+<div class="input" id="reference_div">
+	<?lsmb INCLUDE input element_data = {
+		label = text('Reference/Invoice Number') #'
+		size = 20
+		value = reference
+		name = "reference"
+	} ?>
+	</div>
+<div class="input" id="amounts_div">
+	<?lsmb INCLUDE input element_data = {
+		label = "Minimum Value"
+		name = "amount_gt"
+		class = "numeric"
+		size = 20
+		value = amount_gt
+		type = "text"
+	} ?>
+	<?lsmb INCLUDE input element_data = {
+		label = "Maximum Value"
+		name = "amount_lt"
+		value = amount_lt
+		size = 20
+		class = "numeric"
+		type = "text"
+	} ?>
+	</div>
+<div class="input" id="buttons_div">
+	<?lsmb INCLUDE button element_data = {
+		text = text('Search')
+		name = "action"
+		value = "list_drafts"
+		class = "submit"
+		type = "submit"
+	} ?> </div>
+</form>
+</body>
+
+</html>

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