Browse Source

Improves Deposit presentation.

Also,
1. renumbered tabindex
2. added constant for default number of rows shown for transactions.
devel
Jonathan Rosenbaum 10 years ago
parent
commit
baebf5612b
  1. 3
      Connections/database_functions.php
  2. 8
      js/transaction.js
  3. 11
      sql/populate.sql
  4. 11
      transaction_log.php

3
Connections/database_functions.php

@ -32,6 +32,9 @@ define("TIMEZONE", "America/New_York");
If you do not want this functionality at all, choose 0.
*/
define("NONSHOP",0);
// How many transactions to you want shown
define("NUMBER_OF_TRANSACTIONS", 11);
//constants
define("PAGE_START_SHOP", "/start_shop.php");

8
js/transaction.js

@ -26,10 +26,10 @@ $(function() {
$("input[name='shop_id']").attr("tabindex",1);
$("select[name='transaction_type']").attr("tabindex",2);
$("input[name='date_startstorage']").attr("tabindex",3);
$("input[name='date']").attr("tabindex",4);
$("input[name='amount']").attr("tabindex",5);
$("input[name='quantity']").attr("tabindex",6);
$("textarea[name='description']").attr("tabindex",7);
$("input[name='date']").attr("tabindex",4);
$("input[name='quantity']").attr("tabindex",5);
$("textarea[name='description']").attr("tabindex",6);
$("input[name='amount']").attr("tabindex",7);
$("input[name='payment_type']").attr("tabindex",8);
$("select[name='sold_to']").attr("tabindex",9);
$("select[name='sold_by']").attr("tabindex",10);

11
sql/populate.sql

@ -112,9 +112,12 @@ INSERT INTO contacts (
-- a defined period before it is purchased. If this is set,
-- the behavior is to hide price (show_amount) and payment types (show_payment)
-- until a date (label defined by fieldname_date) is entered.
--
-- Storage period may be defined in Connections/database_functions.php - STORAGE_PERIOD
--
-- DEPOSITS
-- Deposit (transaction_type_id) is a special transaction type that behaves differently in the log
-- for a good reason.
ALTER TABLE transaction_types ADD show_payment tinyint(1) NOT NULL DEFAULT '1';
INSERT INTO transaction_types
@ -130,7 +133,7 @@ INSERT INTO transaction_types
("Non-inventory Parts", 3, 1, 1, 1, 1, 0, 1, 1, 1, 1, "Sale Date", "Sold By"," ", "Sold To", 1, "Description", "Sales", 1),
("Trade-ups/Ins", 4, 1, 1, 1, 1, 0, 1, 1, 1, 1, "Sale Date", "Sold By"," ", "Sold To", 1, "Description", "Sales", 1),
("Helmets", 5, 1, 1, 1, 1, 0, 1, 1, 1, 1, "Sale Date", "Sold By"," ", "Sold To", 1, "Description", "Sales", 1),
("Donations", 6, 1, 0, 1, 1, 0, 1, 1, 1, 1, "Sale Date", "Sold By"," ", "Sold To", 1, "Description", "Sales", 1),
("Donations", 6, 1, 0, 1, 1, 0, 1, 1, 1, 1, "Sale Date", "Sold By"," ", "Sold To", 1, "Description", "Sales", 1),
("Memberships", 7, 1, 1, 1, 1, 0, 1, 1, 1, 1, "Sale Date", "Sold By"," ", "Sold To", 1, "Description", "Sales", 1),
("Inventory Parts", 8, 1, 1, 1, 1, 0, 1, 1, 1, 1, "Sale Date", "Sold By"," ", "Sold To", 1, "Description", "Sales", 1),
("Cargo Related", 9, 1, 1, 1, 1, 0, 1, 1, 1, 1, "Sale Date", "Sold By"," ", "Sold To", 1, "Description", "Sales", 1),
@ -138,7 +141,7 @@ INSERT INTO transaction_types
("DIY Repairs", 11, 1, 1, 1, 1, 0, 1, 1, 1, 1, "Sale Date", "Sold By"," ", "Sold To", 1, "Description", "Sales", 1),
("Accounts Receivable Invoice", 12, 1, 1, 1, 1, 0, 1, 1, 1, 1, "Sale Date", "Sold By"," ", "Sold To", 1, "Description", "Sales", 0),
("Accounts Receivable Payment", 13, 1, 1, 1, 1, 0, 1, 1, 1, 1, "Sale Date", "Sold By"," ", "Sold To", 1, "Description", "Sales", 1),
("Deposit", 14, 1, 1, 1, 1, 0, 1, 1, 1, 1, "Sale Date", "Sold By"," ", "Sold To", 1, "Description", "Sales", 0),
("Deposit", 14, 1, 0, 1, 1, 0, 1, 1, 1, 1, "Deposit Date", "Deposited By"," ", "", 0, "Description", "Sales", 0),
("Metrics - Completed Mechanic Operation Bike", 15, 1, 0, 1, 1, 0, 1, 1, 1, 1, "Sale Date", "Sold By"," ", "Sold To", 1, "Description", "Sales", 1),
("Metrics - Completed Mechanic Operation Wheel", 16, 1, 1, 1, 1, 0, 1, 1, 1, 1, "Sale Date", "Sold By"," ", "Sold To", 1, "Description", "Sales", 1),
("Metrics - New Parts on a Completed Bike", 17, 1, 1, 1, 1, 0, 1, 1, 1, 1, "Sale Date", "Sold By"," ", "Sold To", 1, "Description", "Sales"),

11
transaction_log.php

@ -6,6 +6,7 @@ $page_edit_contact = PAGE_EDIT_CONTACT;
$page_individual_history_log = INDIVIDUAL_HISTORY_LOG;
$storage_period = STORAGE_PERIOD;
$default_transaction_type = DEFAULT_TRANSACTION_TYPE;
$number_of_transactions = NUMBER_OF_TRANSACTIONS;
//transaction ID
if($_GET['trans_id']>0){
@ -62,7 +63,7 @@ if($_GET['trans_type']=='all_types'){
if($_GET['record_count']>0){
$record_count = $_GET['record_count'];
} else {
$record_count = 30;}
$record_count = $number_of_transactions;}
// This is the recordset for the list of logged transactions
@ -329,7 +330,11 @@ if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "ChangeDate")) {
<?php if($row_Recordset3['show_amount']){ ?>
<tr id="price"><td>&nbsp;</td>
<td><label>Price:</label></td>
<?php if($row_Recordset3['transaction_type_id'] == "Deposit"){?>
<td><label>Deposited:</label></td>
<?php } else { ?>
<td><label>Paid:</label></td>
<?php } ?>
<td><input name="amount" type="text" id="amount" value="<?php echo $row_Recordset2['format_amount']; ?>" size="6" /></td>
</tr>
<?php } ?>
@ -449,7 +454,7 @@ if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "ChangeDate")) {
<td height="40" valign="bottom"><form id="form1" name="form1" method="post" action="">
<p><br />
Show
<input name="record_count" type="text" value="30" size="3" maxlength="3" />
<input name="record_count" type="text" value="<?php echo $number_of_transactions; ?>" size="3" maxlength="3" />
transactions on or before:
<input name="trans_date" type="text" id="trans_date" value="<?php echo current_date(); ?>" size="10" maxlength="10" />
(date format YYYY-MM-DD) Day of week:

Loading…
Cancel
Save