Ejemplo n.º 1
0
 /**
  * Public function that creates a single instance
  */
 public static function getInstance()
 {
     if (!isset(self::$_instance)) {
         self::$_instance = new self();
     }
     return self::$_instance;
 }
Ejemplo n.º 2
0
         $error = true;
         break;
     }
     $shipment = new fedex();
     if ($shipment->deleteLabel($ship_method, $shipment_id)) {
         $db->Execute("delete from " . TABLE_SHIPPING_LOG . " where shipment_id = " . $shipment_id);
         gen_add_audit_log(SHIPPING_FEDEX_LABEL_DELETED, $shipment_id);
         $messageStack->convert_add_to_session();
         // save any messages for reload
     } else {
         $error = true;
     }
     break;
 case 'close':
     $date = $_GET['date'] ? $_GET['date'] : date('Y-m-d', time());
     $shipment = new fedex();
     $shipment->close_date = $_POST['search_date'] ? gen_db_date_short($_POST['search_date']) : date('Y-m-d', time());
     $shipment->closeFedEx($date);
     gen_add_audit_log(SHIPPING_FEDEX_END_OF_DAY, $tracking_id);
     break;
 case 'report':
     $date = $_GET['date'] ? $_GET['date'] : date('Y-m-d');
     break;
 default:
     $oID = db_prepare_input($_GET['oID']);
     $sql = "select shipper_code, ship_primary_name, ship_contact, ship_address1, ship_address2, \r\n\t\tship_city_town, ship_state_province, ship_postal_code, ship_country_code, ship_telephone1, \r\n\t\tship_email, purchase_invoice_id, purch_order_id, total_amount  \r\n\t\tfrom " . TABLE_JOURNAL_MAIN . " where id = " . (int) $oID;
     $result = $db->Execute($sql);
     if (is_array($result->fields)) {
         while (list($key, $value) = each($result->fields)) {
             $sInfo->{$key} = $value;
         }