@@ 1305-1319 (lines=15) @@ | ||
1302 | * @throws InvalidDataTypeException |
|
1303 | * @throws EE_Error |
|
1304 | */ |
|
1305 | public function update_sold() |
|
1306 | { |
|
1307 | $count_regs_for_this_datetime = EEM_Registration::instance()->count( |
|
1308 | array( |
|
1309 | array( |
|
1310 | 'STS_ID' => EEM_Registration::status_id_approved, |
|
1311 | 'REG_deleted' => 0, |
|
1312 | 'Ticket.Datetime.DTT_ID' => $this->ID(), |
|
1313 | ), |
|
1314 | ) |
|
1315 | ); |
|
1316 | $this->set_sold($count_regs_for_this_datetime); |
|
1317 | $this->save(); |
|
1318 | return $count_regs_for_this_datetime; |
|
1319 | } |
|
1320 | ||
1321 | ||
1322 | /******************************************************************* |
@@ 1462-1475 (lines=14) @@ | ||
1459 | * @return int |
|
1460 | * @throws EE_Error |
|
1461 | */ |
|
1462 | public function update_tickets_sold() |
|
1463 | { |
|
1464 | $count_regs_for_this_ticket = $this->count_registrations( |
|
1465 | array( |
|
1466 | array( |
|
1467 | 'STS_ID' => EEM_Registration::status_id_approved, |
|
1468 | 'REG_deleted' => 0, |
|
1469 | ), |
|
1470 | ) |
|
1471 | ); |
|
1472 | $this->set_sold($count_regs_for_this_ticket); |
|
1473 | $this->save(); |
|
1474 | return $count_regs_for_this_ticket; |
|
1475 | } |
|
1476 | ||
1477 | ||
1478 | /** |