Exemplo n.º 1
0
 * You must:
 * a) Document any modifications you make to this code including the nature of
 *    the change, the authors of the change, and the date of the change.
 * b) Make the source code for any extensions you deploy available via an
 *    Electronic Distribution Mechanism such as FTP or HTTP download.
 * c) Notify the licensor of the availability of source code to your extensions
 *    and include instructions on how to acquire the source code and updates.
 * d) Grant Licensor a world-wide, non-exclusive, royalty-free license to use,
 *    reproduce, perform, modify, sublicense, and distribute your extensions.
 *
 * The Original Code is: C3CRM Team
 *                       http://www.c3crm.com
 *                       2006-5-19 
 *
 * The Initial Developer of the Original Code is C3CRM Team.
 * Portions created by C3CRM are Copyright (C) 2005 C3CRM
 * All Rights Reserved.
 * Contributors: Goodwill Consulting http://www.goodwill.co.id
 ********************************************************************************/
require_once 'modules/Supplies/Supply.php';
require_once 'modules/SupplyLines/SupplyLine.php';
global $mod_strings;
require_once 'log4php/LoggerManager.php';
$focus = new Supply();
$focus_spp_line = new SupplyLine();
if (!isset($_REQUEST['record'])) {
    sugar_die($mod_strings['ERR_DELETE_RECORD']);
}
$focus_spp_line->mark_deletedBySupplyid($_REQUEST['record']);
$focus->mark_deleted($_REQUEST['record']);
header("Location: index.php?module=" . $_REQUEST['return_module'] . "&action=" . $_REQUEST['return_action'] . "&record=" . $_REQUEST['return_id']);
Exemplo n.º 2
0
 *
 * The Initial Developer of the Original Code is C3CRM Team.
 * Portions created by C3CRM are Copyright (C) 2005 C3CRM
 * All Rights Reserved.
 * Contributors: Goodwill Consulting http://www.goodwill.co.id
 ********************************************************************************/
require_once 'XTemplate/xtpl.php';
require_once 'data/Tracker.php';
require_once 'modules/Supplies/Supply.php';
require_once 'modules/Supplies/Forms.php';
require_once 'include/JSON.php';
global $app_strings;
global $app_list_strings;
global $mod_strings;
global $current_user;
$focus = new Supply();
if (isset($_REQUEST['record'])) {
    $focus->retrieve($_REQUEST['record']);
}
if (isset($_REQUEST['isDuplicate']) && $_REQUEST['isDuplicate'] == 'true') {
    $focus->id = "";
}
echo "\n<p>\n";
echo get_module_title($mod_strings['LBL_MODULE_NAME'], $mod_strings['LBL_MODULE_NAME'] . ": " . $focus->supplynum, true);
echo "\n</p>\n";
global $theme;
$theme_path = "themes/" . $theme . "/";
$image_path = $theme_path . "images/";
require_once $theme_path . 'layout_utils.php';
$log->info("Supply detail view");
$xtpl = new XTemplate('modules/Supplies/EditView.html');
Exemplo n.º 3
0
 function generate_number()
 {
     $return_value = '';
     $number_filed = array('num_suf');
     $rown = '';
     $n = $this->db->getRowCount($result);
     $query = 'SELECT num_suf';
     $query .= ' FROM supplies';
     $query .= " WHERE deleted=0";
     $query .= " AND num_suf IS NOT NULL";
     $query .= " ORDER by num_suf ASC";
     $result = $this->db->query($query, true, " Error filling in additional detail fields: ");
     $n = $this->db->getRowCount($result);
     if ($n > 0) {
         while ($row = $this->db->fetchByAssoc($result)) {
             foreach ($number_filed as $num_field) {
                 for ($i = 0; $i < $n; $i++) {
                     $rown[$i] = $row[$num_field];
                 }
             }
         }
     }
     if ($rown != null) {
         $return_value = $rown;
         $number = Supply::pnum_sort($return_value);
         $numb = $number[0] + 1;
     } else {
         $numb = 10000;
     }
     return $numb;
 }
Exemplo n.º 4
0
 *
 *   Additions/Changes
 *
 *   (c) 2005 OpenCRM
 *    - Total and Tax labels taken from language files
 *
 * Contributors: Goodwill Consulting http://www.goodwill.co.id
 */
require_once 'modules/Supplies/Supply.php';
require_once 'modules/Suppliers/Supplier.php';
require_once 'modules/PurchaseOrders/PurchaseOrder.php';
require_once 'include/database/PearDatabase.php';
//require_once('include/Localization/Localization.php');
global $app_list_strings;
global $mod_strings;
$focus = new Supply();
$supply_id = $_REQUEST['record'];
$focus->retrieve($supply_id);
$supply_title = $focus->name;
$supply_num = $focus->supplynum;
$supplier_id = $focus->supplier_id;
$supplier = new Supplier();
$supplier->retrieve($supplier_id);
$supplier_name = $supplier->name;
$phone = $supplier->phone_office . " / " . $supplier->phone_fax;
$purchaseorder_id = $focus->purchaseorder_id;
$purchaseorder = new PurchaseOrder();
$purchaseorder_num = $purchaseorder->num;
// Supply Information
//Company Information - edit what you want here
$org_name = "Alphaprint";