Przeglądaj źródła

Update the references to the renamed invoice files.

Mark Crane 12 lat temu
rodzic
commit
2f8083af0d

+ 1 - 1
invoices/app_config.php

@@ -33,7 +33,7 @@
 		$apps[$x]['menu'][$y]['uuid'] = '6ebe753b-0f83-dc34-1c0b-51df2c6f0c3b';
 		$apps[$x]['menu'][$y]['parent_uuid'] = 'fd29e39c-c936-f5fc-8e2b-611681b266b5';
 		$apps[$x]['menu'][$y]['category'] = 'internal';
-		$apps[$x]['menu'][$y]['path'] = '/app/invoices/v_invoices.php';
+		$apps[$x]['menu'][$y]['path'] = '/app/invoices/invoices.php';
 		//$apps[$x]['menu'][$y]['groups'][] = 'user';
 		//$apps[$x]['menu'][$y]['groups'][] = 'admin';
 		$apps[$x]['menu'][$y]['groups'][] = 'superadmin';

+ 28 - 5
invoices/invoice_delete.php

@@ -1,4 +1,28 @@
 <?php
+/*
+	FusionPBX
+	Version: MPL 1.1
+
+	The contents of this file are subject to the Mozilla Public License Version
+	1.1 (the "License"); you may not use this file except in compliance with
+	the License. You may obtain a copy of the License at
+	http://www.mozilla.org/MPL/
+
+	Software distributed under the License is distributed on an "AS IS" basis,
+	WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+	for the specific language governing rights and limitations under the
+	License.
+
+	The Original Code is FusionPBX
+
+	The Initial Developer of the Original Code is
+	Mark J Crane <[email protected]>
+	Portions created by the Initial Developer are Copyright (C) 2008-2012
+	the Initial Developer. All Rights Reserved.
+
+	Contributor(s):
+	Mark J Crane <[email protected]>
+*/
 require_once "root.php";
 require_once "includes/require.php";
 require_once "includes/checkauth.php";
@@ -10,14 +34,13 @@ else {
 	exit;
 }
 
-if (count($_GET)>0) {
+if (count($_GET) > 0) {
 	$id = check_str($_GET["id"]);
 	$contact_uuid = check_str($_GET["contact_uuid"]);
 }
 
-if (strlen($id)>0) {
-	$sql = "";
-	$sql .= "delete from v_invoices ";
+if (strlen($id )> 0) {
+	$sql = "delete from v_invoices ";
 	$sql .= "where invoice_uuid = '$id' ";
 	$prep_statement = $db->prepare(check_sql($sql));
 	$prep_statement->execute();
@@ -25,7 +48,7 @@ if (strlen($id)>0) {
 }
 
 require_once "includes/header.php";
-echo "<meta http-equiv=\"refresh\" content=\"2;url=v_invoices.php?id=$contact_uuid\">\n";
+echo "<meta http-equiv=\"refresh\" content=\"2;url=invoices.php?id=$contact_uuid\">\n";
 echo "<div align='center'>\n";
 echo "Delete Complete\n";
 echo "</div>\n";

+ 5 - 5
invoices/invoice_edit.php

@@ -102,8 +102,8 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
 				unset($sql);
 
 				//require_once "includes/header.php";
-				echo "<meta http-equiv=\"refresh\" content=\"2;url=v_invoices.php\">\n";
-				//echo "<meta http-equiv=\"refresh\" content=\"2;url=v_invoices.php?id=$contact_uuid\">\n";
+				echo "<meta http-equiv=\"refresh\" content=\"2;url=invoices.php\">\n";
+				//echo "<meta http-equiv=\"refresh\" content=\"2;url=invoices.php?id=$contact_uuid\">\n";
 				echo "<div align='center'>\n";
 				echo "Add Complete\n";
 				echo "</div>\n";
@@ -123,7 +123,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
 				unset($sql);
 
 				require_once "includes/header.php";
-				echo "<meta http-equiv=\"refresh\" content=\"2;url=v_invoices.php\">\n";
+				echo "<meta http-equiv=\"refresh\" content=\"2;url=invoices.php\">\n";
 				echo "<div align='center'>\n";
 				echo "Update Complete\n";
 				echo "</div>\n";
@@ -190,7 +190,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
 		echo "<td align='left' width='30%' nowrap='nowrap'><b>Invoice Edit</b></td>\n";
 	}
 	echo "<td width='70%' align='right'>\n";
-	echo "	<input type='button' class='btn' name='' alt='back' onclick=\"window.location='v_invoice_pdf.php?id=".$_GET["id"]."'\" value='PDF'>\n";
+	echo "	<input type='button' class='btn' name='' alt='back' onclick=\"window.location='invoice_pdf.php?id=".$_GET["id"]."'\" value='PDF'>\n";
 	echo "	<input type='button' class='btn' name='' alt='back' onclick=\"history.go(-1);\" value='Back'>\n";
 	echo "</td>\n";
 	echo "</tr>\n";
@@ -329,7 +329,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
 	echo "</form>";
 
 	if ($action == "update") {
-		require "v_invoice_items.php";
+		require "invoice_items.php";
 	}
 
 	echo "	</td>";

+ 4 - 6
invoices/invoice_item_delete.php

@@ -1,7 +1,6 @@
 <?php
 /* $Id$ */
 /*
-	v_exec.php
 	Copyright (C) 2008 Mark J Crane
 	All rights reserved.
 
@@ -30,15 +29,14 @@ require_once "root.php";
 require_once "includes/require.php";
 require_once "includes/checkauth.php";
 
-if (count($_GET)>0) {
+if (count($_GET) > 0) {
 	$id = check_str($_GET["id"]);
 	$invoice_uuid = check_str($_GET["invoice_uuid"]);
 	$contact_uuid = check_str($_GET["contact_uuid"]);
 }
 
-if (strlen($id)>0) {
-	$sql = "";
-	$sql .= "delete from v_invoice_items ";
+if (strlen($id) > 0) {
+	$sql = "delete from v_invoice_items ";
 	$sql .= "where invoice_item_uuid = '$id' ";
 	$prep_statement = $db->prepare(check_sql($sql));
 	$prep_statement->execute();
@@ -46,7 +44,7 @@ if (strlen($id)>0) {
 }
 
 require_once "includes/header.php";
-echo "<meta http-equiv=\"refresh\" content=\"2;url=v_invoices_edit.php?id=$invoice_uuid&contact_uuid=$contact_uuid\">\n";
+echo "<meta http-equiv=\"refresh\" content=\"2;url=invoice_edit.php?id=$invoice_uuid&contact_uuid=$contact_uuid\">\n";
 echo "<div align='center'>\n";
 echo "Delete Complete\n";
 echo "</div>\n";

+ 3 - 5
invoices/invoice_item_edit.php

@@ -1,7 +1,6 @@
 <?php
 /* $Id$ */
 /*
-	v_exec.php
 	Copyright (C) 2008 Mark J Crane
 	All rights reserved.
 
@@ -102,7 +101,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
 			unset($sql);
 
 			require_once "includes/header.php";
-			echo "<meta http-equiv=\"refresh\" content=\"2;url=v_invoices_edit.php?id=$invoice_uuid&contact_uuid=$contact_uuid\">\n";
+			echo "<meta http-equiv=\"refresh\" content=\"2;url=invoice_edit.php?id=$invoice_uuid&contact_uuid=$contact_uuid\">\n";
 			echo "<div align='center'>\n";
 			echo "Add Complete $sql2\n";
 			echo "</div>\n";
@@ -122,7 +121,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
 			unset($sql);
 
 			require_once "includes/header.php";
-			echo "<meta http-equiv=\"refresh\" content=\"2;url=v_invoices_edit.php?id=$invoice_uuid&contact_uuid=$contact_uuid\">\n";
+			echo "<meta http-equiv=\"refresh\" content=\"2;url=invoice_edit.php?id=$invoice_uuid&contact_uuid=$contact_uuid\">\n";
 			echo "<div align='center'>\n";
 			echo "Update Complete\n";
 			echo "</div>\n";
@@ -135,8 +134,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
 //pre-populate the form
 	if (count($_GET)>0 && $_POST["persistformvar"] != "true") {
 		$invoice_item_uuid = $_GET["id"];
-		$sql = "";
-		$sql .= "select * from v_invoice_items ";
+		$sql = "select * from v_invoice_items ";
 		$sql .= "where invoice_item_uuid = '$invoice_item_uuid' ";
 		$prep_statement = $db->prepare(check_sql($sql));
 		$prep_statement->execute();

+ 4 - 5
invoices/invoice_items.php

@@ -1,7 +1,6 @@
 <?php
 /* $Id$ */
 /*
-	v_exec.php
 	Copyright (C) 2008 Mark J Crane
 	All rights reserved.
 
@@ -101,7 +100,7 @@ require_once "includes/paging.php";
 	echo th_order_by('item_desc', 'Description', $order_by, $order);
 	echo "<th nowrap='nowrap'>Amount</th>\n";
 	echo "<td align='right' width='42'>\n";
-	echo "	<a href='v_invoice_items_edit.php?invoice_uuid=".$_GET['id']."&contact_uuid=".$contact_uuid."' alt='add'>$v_link_label_add</a>\n";
+	echo "	<a href='invoice_item_edit.php?invoice_uuid=".$_GET['id']."&contact_uuid=".$contact_uuid."' alt='add'>$v_link_label_add</a>\n";
 	echo "</td>\n";
 	echo "<tr>\n";
 
@@ -115,8 +114,8 @@ require_once "includes/paging.php";
 			echo "	<td valign='top' class='".$row_style[$c]."'>".$item_desc."&nbsp;</td>\n";
 			echo "	<td valign='top' class='".$row_style[$c]."'>".number_format(($row['item_qty'] * $row['item_unit_price']), 2)."&nbsp;</td>\n";
 			echo "	<td valign='top' align='right'>\n";
-			echo "		<a href='v_invoice_items_edit.php?invoice_uuid=".$row['invoice_uuid']."&id=".$row['invoice_item_uuid']."&contact_uuid=".$contact_uuid."' alt='edit'>$v_link_label_edit</a>\n";
-			echo "		<a href='v_invoice_items_delete.php?invoice_uuid=".$row['invoice_uuid']."&id=".$row['invoice_item_uuid']."&contact_uuid=".$contact_uuid."' alt='delete' onclick=\"return confirm('Do you really want to delete this?')\">$v_link_label_delete</a>\n";
+			echo "		<a href='invoice_item_edit.php?invoice_uuid=".$row['invoice_uuid']."&id=".$row['invoice_item_uuid']."&contact_uuid=".$contact_uuid."' alt='edit'>$v_link_label_edit</a>\n";
+			echo "		<a href='invoice_item_delete.php?invoice_uuid=".$row['invoice_uuid']."&id=".$row['invoice_item_uuid']."&contact_uuid=".$contact_uuid."' alt='delete' onclick=\"return confirm('Do you really want to delete this?')\">$v_link_label_delete</a>\n";
 			echo "	</td>\n";
 			echo "</tr>\n";
 			if ($c==0) { $c=1; } else { $c=0; }
@@ -131,7 +130,7 @@ require_once "includes/paging.php";
 	echo "		<td width='33.3%' nowrap>&nbsp;</td>\n";
 	echo "		<td width='33.3%' align='center' nowrap>$paging_controls</td>\n";
 	echo "		<td width='33.3%' align='right'>\n";
-	echo "			<a href='v_invoice_items_edit.php?invoice_uuid=".$_GET['id']."&contact_uuid=".$contact_uuid."' alt='add'>$v_link_label_add</a>\n";
+	echo "			<a href='invoice_item_edit.php?invoice_uuid=".$_GET['id']."&contact_uuid=".$contact_uuid."' alt='add'>$v_link_label_add</a>\n";
 	echo "		</td>\n";
 	echo "	</tr>\n";
  	echo "	</table>\n";

+ 4 - 4
invoices/invoices.php

@@ -121,7 +121,7 @@ require_once "includes/paging.php";
 	echo th_order_by('contact_name_family', 'Family Name', $order_by, $order);
 	echo th_order_by('invoice_date', 'Date', $order_by, $order);
 	echo "<td align='right' width='42'>\n";
-	echo "	<a href='v_invoices_edit.php?contact_uuid=".$_GET['id']."' alt='add'>$v_link_label_add</a>\n";
+	echo "	<a href='invoice_edit.php?contact_uuid=".$_GET['id']."' alt='add'>$v_link_label_add</a>\n";
 	echo "</td>\n";
 	echo "<tr>\n";
 
@@ -134,8 +134,8 @@ require_once "includes/paging.php";
 			echo "	<td valign='top' class='".$row_style[$c]."'>".$row['contact_name_family']."&nbsp;</td>\n";
 			echo "	<td valign='top' class='".$row_style[$c]."'>".$row['invoice_date']."&nbsp;</td>\n";
 			echo "	<td valign='top' align='right'>\n";
-			echo "		<a href='v_invoices_edit.php?contact_uuid=".$row['contact_uuid']."&id=".$row['invoice_uuid']."' alt='edit'>$v_link_label_edit</a>\n";
-			echo "		<a href='v_invoices_delete.php?contact_uuid=".$row['contact_uuid']."&id=".$row['invoice_uuid']."' alt='delete' onclick=\"return confirm('Do you really want to delete this?')\">$v_link_label_delete</a>\n";
+			echo "		<a href='invoice_edit.php?contact_uuid=".$row['contact_uuid']."&id=".$row['invoice_uuid']."' alt='edit'>$v_link_label_edit</a>\n";
+			echo "		<a href='invoices_delete.php?contact_uuid=".$row['contact_uuid']."&id=".$row['invoice_uuid']."' alt='delete' onclick=\"return confirm('Do you really want to delete this?')\">$v_link_label_delete</a>\n";
 			echo "	</td>\n";
 			echo "</tr>\n";
 			if ($c==0) { $c=1; } else { $c=0; }
@@ -150,7 +150,7 @@ require_once "includes/paging.php";
 	echo "		<td width='33.3%' nowrap>&nbsp;</td>\n";
 	echo "		<td width='33.3%' align='center' nowrap>$paging_controls</td>\n";
 	echo "		<td width='33.3%' align='right'>\n";
-	echo "			<a href='v_invoices_edit.php?contact_uuid=".$_GET['id']."' alt='add'>$v_link_label_add</a>\n";
+	echo "			<a href='invoice_edit.php?contact_uuid=".$_GET['id']."' alt='add'>$v_link_label_add</a>\n";
 	echo "		</td>\n";
 	echo "	</tr>\n";
  	echo "	</table>\n";