示例#1
0
 /**
  * Determine if sale might be a wash sale
  *
  * @param obj Lot [instance of Lot]
  * @return bool [true if transaction is a "wash sale"]
  */
 public function washSale(Lot $lot)
 {
     if (!$lot->getWasClosed()) {
         return false;
     }
     if ($lot->interval() > 31) {
         return false;
     }
     if ($lot->isLoss()) {
         return false;
     }
     return true;
 }
示例#2
0
 public function testSetWasClosed()
 {
     $this->lot->setWasClosed(true);
     $this->assertTrue($this->lot->getWasClosed());
 }