X-Git-Url: https://git.mxchange.org/?p=shipsimu.git;a=blobdiff_plain;f=application%2Fship-simu%2Fmain%2Fclass_WorksContract.php;h=7f61096fc5a532879b97652195be0a38d939b722;hp=b25c8ee4aa6e16abf4f301e16262b238c45003e2;hb=abb8bf6be9f5238f8a4552707bcb190f0dbf0b7a;hpb=dbcca4302701f2adb974660901d4b32c3f633eac diff --git a/application/ship-simu/main/class_WorksContract.php b/application/ship-simu/main/class_WorksContract.php index b25c8ee..7f61096 100644 --- a/application/ship-simu/main/class_WorksContract.php +++ b/application/ship-simu/main/class_WorksContract.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software + * @copyright Copyright (c) 2007, 2008 Roland Haeder, this is free software * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * @@ -45,14 +45,9 @@ class WorksContract extends BaseFrameworkSystem implements SignableContract { // Call parent constructor parent::__construct(__CLASS__); - // Set description - $this->setObjectDescription("Bauvertrag"); - - // Unique-ID generieren - $this->generateUniqueId(); - // Clean up a little $this->removeSystemArray(); + $this->removeNumberFormaters(); } // Neuen Bauvertrag generieren @@ -64,15 +59,6 @@ class WorksContract extends BaseFrameworkSystem implements SignableContract { // Get new instance $contractInstance = new WorksContract(); - // Debug-Meldung ausgeben - if ((defined('DEBUG_CONTRACT')) || (defined('DEBUG_ALL'))) $contractInstance->getDebugInstance()->output(sprintf("[%s:%d] Neuer Bauvertrag wird für das Schiff %s mit der %s %s erstellt.", - __CLASS__, - __LINE__, - $shipName, - $partnerInstance->getObjectDescription(), - $partnerInstance->getCompanyName() - )); - // Schiffsnamen setzen $contractInstance->setShipName($shipName); @@ -123,7 +109,7 @@ class WorksContract extends BaseFrameworkSystem implements SignableContract { $parentPart = (string) $parentPart; // Debug message - if ((defined('DEBUG_CONTRACT')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Das Schiffsteil %s wird zusammen mit dem Konstruktionsteil %s in den Bauvertrag aufgenommen.", + if ((defined('DEBUG_CONTRACT')) || (defined('DEBUG_ALL'))) $this->debugOutput(sprintf("[%s:%d] Das Schiffsteil %s wird zusammen mit dem Konstruktionsteil %s in den Bauvertrag aufgenommen.", __CLASS__, __LINE__, $shipPart, @@ -137,13 +123,13 @@ class WorksContract extends BaseFrameworkSystem implements SignableContract { try { $partInstance = ObjectFactory::createObjectByName($shipPart, $dataArray); } catch (DimNotFoundInArrayException $e) { - $this->getDebugInstance()->output(sprintf("[main:] Die %s konnte nicht vervollständigt werden. Grund: %s
", + $this->debugOutput(sprintf("[main:] Die %s konnte nicht vervollständigt werden. Grund: %s
", $this->getShipInstance()->getShipName(), $e->getMessage() )); // Debug message - if ((defined('DEBUG_CONTRACT')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Versuche ein Schiffsteil in den Bauvertrag aufzunehmen.", + if ((defined('DEBUG_CONTRACT')) || (defined('DEBUG_ALL'))) $this->debugOutput(sprintf("[%s:%d] Versuche ein Schiffsteil in den Bauvertrag aufzunehmen.", __CLASS__, __LINE__ )); @@ -166,23 +152,8 @@ class WorksContract extends BaseFrameworkSystem implements SignableContract { // Get price for this item $price = $this->getMerchantInstance()->getPriceFromList($partInstance); - // Final debug message - if ((defined('DEBUG_CONTRACT')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] %s kostet %s.", - __CLASS__, - __LINE__, - $partInstance->getObjectDescription(), - $this->getMerchantInstance()->formatCurrency($price) - )); - // Add price $partInstance->setPrice($price); - - // Final debug message - if ((defined('DEBUG_CONTRACT')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] %s wurde in den Bauvertrag aufgenommen.", - __CLASS__, - __LINE__, - $partInstance->getObjectDescription() - )); } // Setter for contract partner @@ -239,7 +210,7 @@ class WorksContract extends BaseFrameworkSystem implements SignableContract { if ((defined('DEBUG_CONTRACT')) || (defined('DEBUG_ALL'))) { if ($partnerInstance->equals($partyInstance)) { // With itself - $this->getDebugInstance()->output(sprintf("[%s:%d] Die %s %s stimmt einem Bauvertrag über das %s %s zu.", + $this->debugOutput(sprintf("[%s:%d] Die %s %s stimmt einem Bauvertrag über das %s %s zu.", __CLASS__, __LINE__, $partnerInstance->getObjectDescription(), @@ -249,7 +220,7 @@ class WorksContract extends BaseFrameworkSystem implements SignableContract { )); } else { // Other contract party - $this->getDebugInstance()->output(sprintf("[%s:%d] Die %s %s geht mit der %s %s einen Bauvertrag über das %s %s ein.", + $this->debugOutput(sprintf("[%s:%d] Die %s %s geht mit der %s %s einen Bauvertrag über das %s %s ein.", __CLASS__, __LINE__, $partnerInstance->getObjectDescription(),