Skip to content

Commit

Permalink
Merge branch 'master'
Browse files Browse the repository at this point in the history
  • Loading branch information
ubruhin committed Mar 23, 2014
2 parents 62ce8da + 5cc36b5 commit fd1a154
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/class.Orderdetails.php
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,12 @@ public function delete()
foreach ($all_pricedetails as $pricedetails)
$pricedetails->delete();

$this->get_part()->set_attributes(array()); // save part attributes to update its "last_modified"
// Check if this Orderdetails is the Part's selected Orderdetails for ordering and delete this reference if neccessary
$order_orderdetails = $this->get_part()->get_order_orderdetails();
if (is_object($order_orderdetails) && ($order_orderdetails->get_id() == $this->get_id()))
$this->get_part()->set_order_orderdetails_id(NULL);
else
$this->get_part()->set_attributes(array()); // save part attributes to update its "last_modified"

// now we can delete this orderdetails
parent::delete();
Expand Down
2 changes: 2 additions & 0 deletions readme/changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ Part-DB 0.3.1
zu einer leeren oder nicht richtig funktionierenden Seite führen
- Fehler beim Lesen von Dateirechten haben die Installation auf einigen PHP Installationen
verunmöglicht
- Darstellungsfehler im IE behoben
- Fehler beim Löschen von Einkaufsinformationen oder Bauteilen behoben

- Sonstiges:
- Umstellung von SVN auf Git (RSS-Feed auf Startseite angepasst, diverse Links angepasst)
Expand Down

0 comments on commit fd1a154

Please sign in to comment.