Fix Detsta Import -> Transfer type cash , when unsuccessful
This commit is contained in:
parent
179b47c454
commit
2828a6f236
@ -152,6 +152,9 @@ class InventoryItemForm extends Model{
|
|||||||
$query->andWhere([ '>', 'procurement.created_at' ,$this->last_inventory_item->created_at]);
|
$query->andWhere([ '>', 'procurement.created_at' ,$this->last_inventory_item->created_at]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//$query->andWhere([ '>', 'procurement.created_at' ,$this->inventory->created_at]);
|
||||||
|
|
||||||
|
|
||||||
if ( $this->type == 'product') {
|
if ( $this->type == 'product') {
|
||||||
$query->andWhere(['product.id_product' => $this->product->id_product]);
|
$query->andWhere(['product.id_product' => $this->product->id_product]);
|
||||||
}else{
|
}else{
|
||||||
|
|||||||
@ -39,6 +39,19 @@ $this->registerJs('inventoryItemIndex.init( ' . json_encode($options) . ' );');
|
|||||||
text-align: right;
|
text-align: right;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.col-b{
|
||||||
|
/*background-color: #00a157;*/
|
||||||
|
}
|
||||||
|
|
||||||
|
.table-striped > tbody > tr:nth-of-type(even) td.col-b {
|
||||||
|
background-color: #DFE3E8;
|
||||||
|
/*background-color: #D3D7DC;*/
|
||||||
|
}
|
||||||
|
.table-striped > tbody > tr:nth-of-type(odd) td.col-b {
|
||||||
|
/*background-color: #E0E0E0;*/
|
||||||
|
background-color: #ECECEC;
|
||||||
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
<div class="inventory-item-index">
|
<div class="inventory-item-index">
|
||||||
<h1><?= Html::encode($this->title) ?></h1>
|
<h1><?= Html::encode($this->title) ?></h1>
|
||||||
@ -101,7 +114,8 @@ $this->registerJs('inventoryItemIndex.init( ' . json_encode($options) . ' );');
|
|||||||
],
|
],
|
||||||
[
|
[
|
||||||
'attribute' => 'inventory_prev_name',
|
'attribute' => 'inventory_prev_name',
|
||||||
'label' => 'Utolsó leltár'
|
'label' => 'Utolsó leltár',
|
||||||
|
'contentOptions' => ['class' => 'col-b']
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'attribute' => 'item_count_system',
|
'attribute' => 'item_count_system',
|
||||||
@ -112,7 +126,7 @@ $this->registerJs('inventoryItemIndex.init( ' . json_encode($options) . ' );');
|
|||||||
[
|
[
|
||||||
'attribute' => 'item_count',
|
'attribute' => 'item_count',
|
||||||
'label' => 'Leltározott mennyiség (db)',
|
'label' => 'Leltározott mennyiség (db)',
|
||||||
'contentOptions' => ['class' => 'numeric']
|
'contentOptions' => ['class' => 'numeric col-b']
|
||||||
|
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
@ -124,7 +138,7 @@ $this->registerJs('inventoryItemIndex.init( ' . json_encode($options) . ' );');
|
|||||||
[
|
[
|
||||||
'attribute' => 'item_count_in',
|
'attribute' => 'item_count_in',
|
||||||
'label' => 'Beszerzett mennyiség (db)',
|
'label' => 'Beszerzett mennyiség (db)',
|
||||||
'contentOptions' => ['class' => 'numeric']
|
'contentOptions' => ['class' => 'numeric col-b' ]
|
||||||
|
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
@ -136,7 +150,7 @@ $this->registerJs('inventoryItemIndex.init( ' . json_encode($options) . ' );');
|
|||||||
[
|
[
|
||||||
'attribute' => 'item_difference',
|
'attribute' => 'item_difference',
|
||||||
'label' => 'Különbség (db)',
|
'label' => 'Különbség (db)',
|
||||||
'contentOptions' => ['class' => 'numeric']
|
'contentOptions' => ['class' => 'numeric col-b']
|
||||||
|
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
@ -147,7 +161,7 @@ $this->registerJs('inventoryItemIndex.init( ' . json_encode($options) . ' );');
|
|||||||
[
|
[
|
||||||
'attribute' => 'item_total_price_brutto',
|
'attribute' => 'item_total_price_brutto',
|
||||||
'label' => 'Összeg (Ft)',
|
'label' => 'Összeg (Ft)',
|
||||||
'contentOptions' => ['class' => 'numeric']
|
'contentOptions' => ['class' => 'numeric col-b']
|
||||||
],
|
],
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -149,7 +149,8 @@ class DetStatTetelProcessor extends Object {
|
|||||||
'discount'=> $discount,
|
'discount'=> $discount,
|
||||||
'contract'=> $this->contract,
|
'contract'=> $this->contract,
|
||||||
'ticketInstallmentRequest' => $megbizas,
|
'ticketInstallmentRequest' => $megbizas,
|
||||||
'transferStatus' => Transfer::STATUS_NOT_PAID
|
'transferStatus' => Transfer::STATUS_NOT_PAID,
|
||||||
|
'paymentMethod' => Transfer::PAYMENT_METHOD_CASH
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -219,7 +220,7 @@ class DetStatTetelProcessor extends Object {
|
|||||||
* Szerződés módosítása, ha a detsta üzenetben a megbízás el lett fogadva
|
* Szerződés módosítása, ha a detsta üzenetben a megbízás el lett fogadva
|
||||||
* */
|
* */
|
||||||
protected function updateContractOnSuccess(){
|
protected function updateContractOnSuccess(){
|
||||||
\Yii::info('Szerződés frissítése - megbizás elfogadva ' );
|
\Yii::info('Szerződés frissítése - megbízás elfogadva ' );
|
||||||
$this->incRequiredParts();
|
$this->incRequiredParts();
|
||||||
$this->contract->part_paid = $this->contract->part_paid +1;
|
$this->contract->part_paid = $this->contract->part_paid +1;
|
||||||
$this->updateContractPaidStatus();
|
$this->updateContractPaidStatus();
|
||||||
@ -232,7 +233,7 @@ class DetStatTetelProcessor extends Object {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected function updateContractOnFail(){
|
protected function updateContractOnFail(){
|
||||||
\Yii::info('Szerződés frissítése - megbizás visszautasítva ' );
|
\Yii::info('Szerződés frissítése - megbízás visszautasítva ' );
|
||||||
$this->incRequiredParts();
|
$this->incRequiredParts();
|
||||||
$this->updateContractPaidStatus();
|
$this->updateContractPaidStatus();
|
||||||
// $this->contract->status = Contract::$STATUS_NOT_PAID;
|
// $this->contract->status = Contract::$STATUS_NOT_PAID;
|
||||||
|
|||||||
@ -45,10 +45,11 @@ class InventoryConsoleController extends Controller{
|
|||||||
$query->innerJoin('product','sale.id_product = product.id_product');
|
$query->innerJoin('product','sale.id_product = product.id_product');
|
||||||
|
|
||||||
$query->andWhere(['transfer.type' => Transfer::TYPE_PRODUCT]);
|
$query->andWhere(['transfer.type' => Transfer::TYPE_PRODUCT]);
|
||||||
$query->andWhere(['in', 'transfer.type', [Transfer::STATUS_NOT_PAID, Transfer::STATUS_PAID]]);
|
$query->andWhere(['in', 'transfer.status', [Transfer::STATUS_NOT_PAID, Transfer::STATUS_PAID]]);
|
||||||
$query->andWhere(['product.id_product' => $prev->id_product]);
|
$query->andWhere(['product.id_product' => $prev->id_product]);
|
||||||
|
|
||||||
$query->andWhere([ '>','transfer.created_at',$start ]);
|
$query->andWhere([ '>','transfer.created_at',$start ]);
|
||||||
|
$query->andWhere([ '<','transfer.created_at',$end ]);
|
||||||
|
|
||||||
$products = $query->scalar();
|
$products = $query->scalar();
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user