summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorJoey Hess <joey@kitenet.net>2007-12-02 22:12:57 -0500
committerJoey Hess <joey@kitenet.net>2007-12-02 22:12:57 -0500
commitb1d79117d2bb1484baaf9ef5ebfe614000bf1839 (patch)
treeca4d649a8da0cbaae81c4b5946a5ca47ec80bc52 /plugins
parent813a243d274728ac6b1a6fd12d21e7e56be7d730 (diff)
web commit by http://subvert.org.uk/~bma/: Change of url.
Diffstat (limited to 'plugins')
0 files changed, 0 insertions, 0 deletions
" class="hl"># but WITHOUT ANY WARRANTY; without even the implied warranty of
  • # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  • # GNU General Public License for more details.
  • # You should have received a copy of the GNU General Public License
  • # along with this program; if not, write to the Free Software
  • # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  • #======================================================================
  • #
  • # customer/vendor module
  • #
  • #======================================================================
  • use LedgerSMB::CT;
  • 1;
  • # end of main
  • sub add {
  • $form->{title} = "Add";
  • # $locale->text('Add Customer')
  • # $locale->text('Add Vendor')
  • $form->{callback} = "$form->{script}?action=add&db=$form->{db}&path=$form->{path}&login=$form->{login}&sessionid=$form->{sessionid}" unless $form->{callback};
  • CT->create_links(\%myconfig, \%$form);
  • &form_header;
  • &form_footer;
  • }
  • sub history {
  • # $locale->text('Customer History')
  • # $locale->text('Vendor History')
  • $history = 1;
  • $label = ucfirst $form->{db};
  • $label .= " History";
  • if ($form->{db} eq 'customer') {
  • $invlabel = $locale->text('Sales Invoices');
  • $ordlabel = $locale->text('Sales Orders');
  • $quolabel = $locale->text('Quotations');
  • } else {
  • $invlabel = $locale->text('Vendor Invoices');
  • $ordlabel = $locale->text('Purchase Orders');
  • $quolabel = $locale->text('Request for Quotations');
  • }
  • $form->{title} = $locale->text($label);
  • $form->{nextsub} = "list_history";
  • $transactions = qq|
  • <tr>
  • <td></td>
  • <td>
  • <table>
  • <tr>
  • <td>
  • <table>
  • <tr>
  • <td><input name=type type=radio class=radio value=invoice checked> $invlabel</td>
  • </tr>
  • <tr>
  • <td><input name=type type=radio class=radio value=order> $ordlabel</td>
  • </tr>
  • <tr>
  • <td><input name="type" type=radio class=radio value=quotation> $quolabel</td>
  • </tr>
  • </table>
  • </td>
  • <td>
  • <table>
  • <tr>
  • <th>|.$locale->text('From').qq|</th>
  • <td><input name=transdatefrom size=11 title="$myconfig{dateformat}"></td>
  • <th>|.$locale->text('To').qq|</th>
  • <td><input name=transdateto size=11 title="$myconfig{dateformat}"></td>
  • </tr>
  • <tr>
  • <td></td>
  • <td colspan=3>
  • <input name="open" type=checkbox class=checkbox value=Y checked>&nbsp;|.$locale->text('Open').qq|
  • <input name="closed" type=checkbox class=checkbox value=Y checked>&nbsp;|.$locale->text('Closed').qq|
  • </td>
  • </tr>
  • </table>
  • </td>
  • </tr>
  • </table>
  • </td>
  • </tr>
  • |;
  • $include = qq|
  • <tr>
  • <th align=right nowrap>|.$locale->text('Include in Report').qq|</th>
  • <td>
  • <table>
  • <tr>
  • <td><input name=history type=radio class=radio value=summary checked> |.$locale->text('Summary').qq|</td>
  • <td><input name=history type=radio class=radio value=detail> |.$locale->text('Detail').qq|
  • </td>
  • </tr>
  • <tr>
  • <td>
  • <input name="l_partnumber" type=checkbox class=checkbox value=Y checked>&nbsp;|.$locale->text('Part Number').qq|
  • </td>
  • <td>
  • <input name="l_description" type=checkbox class=checkbox value=Y checked>&nbsp;|.$locale->text('Description').qq|
  • </td>
  • <td>
  • <input name="l_sellprice" type=checkbox class=checkbox value=Y checked>&nbsp;|.$locale->text('Sell Price').qq|
  • </td>
  • <td>
  • <input name="l_curr" type=checkbox class=checkbox value=Y>&nbsp;|.$locale->text('Currency').qq|
  • </td>
  • </tr>
  • <tr>
  • <td>
  • <input name="l_qty" type=checkbox class=checkbox value=Y>&nbsp;|.$locale->text('Qty').qq|
  • </td>
  • <td>
  • <input name="l_unit" type=checkbox class=checkbox value=Y>&nbsp;|.$locale->text('Unit').qq|
  • </td>
  • <td>
  • <input name="l_discount" type=checkbox class=checkbox value=Y>&nbsp;|.$locale->text('Discount').qq|
  • </td>
  • <tr>
  • </tr>
  • <td>
  • <input name="l_deliverydate" type=checkbox class=checkbox value=Y>&nbsp;|.$locale->text('Delivery Date').qq|
  • </td>
  • <td>
  • <input name="l_projectnumber" type=checkbox class=checkbox value=Y>&nbsp;|.$locale->text('Project Number').qq|
  • </td>
  • <td>
  • <input name="l_serialnumber" type=checkbox class=checkbox value=Y>&nbsp;|.$locale->text('Serial Number').qq|
  • </td>
  • </tr>
  • </table>
  • </td>
  • </tr>
  • |;
  • &search_name;
  • if ($form->{lynx}) {
  • require "bin/menu.pl";
  • &menubar;
  • }
  • print qq|
  • </body>
  • </html>
  • |;
  • }
  • sub transactions {
  • if ($form->{db} eq 'customer') {
  • $translabel = $locale->text('AR Transactions');
  • $invlabel = $locale->text('Sales Invoices');
  • $ordlabel = $locale->text('Sales Orders');
  • $quolabel = $locale->text('Quotations');
  • } else {
  • $translabel = $locale->text('AP Transactions');
  • $invlabel = $locale->text('Vendor Invoices');
  • $ordlabel = $locale->text('Purchase Orders');
  • $quolabel = $locale->text('Request for Quotations');
  • }
  • $transactions = qq|
  • <tr>
  • <td></td>
  • <td>
  • <table>
  • <tr>
  • <td>
  • <table>
  • <tr>
  • <td><input name="l_transnumber" type=checkbox class=checkbox value=Y> $translabel</td>
  • </tr>
  • <tr>
  • <td><input name="l_invnumber" type=checkbox class=checkbox value=Y> $invlabel</td>
  • </tr>
  • <tr>
  • <td><input name="l_ordnumber" type=checkbox class=checkbox value=Y> $ordlabel</td>
  • </tr>
  • <tr>
  • <td><input name="l_quonumber" type=checkbox class=checkbox value=Y> $quolabel</td>
  • </tr>
  • </table>
  • </td>
  • <td>
  • <table>
  • <tr>
  • <th>|.$locale->text('From').qq|</th>
  • <td><input name=transdatefrom size=11 title="$myconfig{dateformat}"></td>
  • <th>|.$locale->text('To').qq|</th>
  • <td><input name=transdateto size=11 title="$myconfig{dateformat}"></td>
  • </tr>
  • <tr>
  • <td></td>
  • <td colspan=3>
  • <input name="open" type=checkbox class=checkbox value=Y checked>&nbsp;|.$locale->text('Open').qq|
  • <input name="closed" type=checkbox class=checkbox value=Y checked>&nbsp;|.$locale->text('Closed').qq|
  • </td>
  • </tr>
  • <tr>
  • <td></td>
  • <td colspan=3>
  • <input name="l_amount" type=checkbox class=checkbox value=Y checked>&nbsp;|.$locale->text('Amount').qq|
  • <input name="l_tax" type=checkbox class=checkbox value=Y checked>&nbsp;|.$locale->text('Tax').qq|
  • <input name="l_total" type=checkbox class=checkbox value=Y checked>&nbsp;|.$locale->text('Total').qq|
  • <input name="l_subtotal" type=checkbox class=checkbox value=Y>&nbsp;|.$locale->text('Subtotal').qq|
  • </td>
  • </tr>
  • </table>
  • </td>
  • </tr>
  • </table>
  • </td>
  • </tr>
  • |;
  • }
  • sub include_in_report {
  • $label = ucfirst $form->{db};
  • @a = ();
  • push @a, qq|<input name="l_ndx" type=checkbox class=checkbox value=Y> |.$locale->text('No.');
  • push @a, qq|<input name="l_id" type=checkbox class=checkbox value=Y> |.$locale->text('ID');
  • push @a, qq|<input name="l_$form->{db}number" type=checkbox class=checkbox value=Y> |.$locale->text($label . ' Number');
  • push @a, qq|<input name="l_name" type=checkbox class=checkbox value=Y $form->{l_name}> |.$locale->text('Company Name');
  • push @a, qq|<input name="l_contact" type=checkbox class=checkbox value=Y $form->{l_contact}> |.$locale->text('Contact');
  • push @a, qq|<input name="l_email" type=checkbox class=checkbox value=Y $form->{l_email}> |.$locale->text('E-mail');
  • push @a, qq|<input name="l_address" type=checkbox class=checkbox value=Y> |.$locale->text('Address');