Angus Wiki
  • Group 1
    • Angus Wiki
    • Control Types
      • Text
      • Textarea
      • Password
      • Spacer
      • Integer
      • Double
      • Double4
      • Double5
      • Date
      • Daterange
      • Time
      • Datetime
      • Select
      • Anglookup
      • Boolean
      • Button
      • Filter
      • Radio
      • Multiselect
      • Dbimage
      • Image
      • Html
      • Chart
      • Widget
      • Autocomplete
      • Chip
      • Phoneinput
    • General type
    • Toolbar
    • Menu
    • Grid
    • Grid Filter Panel
    • Page
    • Analysis
    • OptionRecord
    • Record
      • Recordlarda Fuzzy Search Kullanımı
      • Recordlara Panel Ekleme
      • Record Butonlarına da Rol Verilebilir
    • Record scripti
    • Butonda Script Kullanımı
    • Buton ve row actiondan gridfilter veri gönderme
    • Combine Latest
    • Sp ye istek atıp dönen id bir tane ise record fazla ise grid açan buton scripti
  • Group 3
    • Angus Lokal Kurulum Linux
    • İlk kurulum
    • Kubernetes Dashboard
  • Group 2
    • Angus Lokal Kurulum Windows
    • Gerekli Uygulamalar
      • Ubuntu Kurulumu
      • WSL Kurulumu
      • Docker Kurulumu
      • Kubernetes Kurulumu
      • Microsoft SQL Kurulumu
    • Kubernetes Ayarları
    • Sistemin Çalıştırılması
  • Group 4
    • Scriptler
      • Rezervasyon Kartı
      • Rezervasyon Kartı BeforeSave Script
      • Rezervasyon Kartı BeforeClone Script
      • Fatura
      • Fatura BeforeSave Script
      • Fatura Before Print Script Editor
      • Satış Projeleri
      • Satış Projeleri BeforeSave Script
      • Kapalı Oda İşlemleri
      • Kayıp Bulunan Listesi
      • İş Kaydı
      • İş Kaydı BeforeSave Script
      • Hesap Kartı
      • Stok Fiyat Anlaşması
      • Proforma Fatura Listesi
      • Fatura BeforeSave Script
      • Fiş
      • Fiş BeforeSave Script
      • Fiş AfterSave Script
      • Fiş Before Print Script
      • Fiş BeforeClone Script
      • Ödeme Emri
      • Ödeme Emri BeforeSave Script
      • Çek/Senet
      • Banka Ekstresi Oku BeforeSave Script
      • Hesap Mutabakatı
      • Babs Mutabakat
      • Kur Değerleme
      • Kur Değerleme(Toplu Döviz)
      • Yaşlandırma Analizi
      • Seyahat Acentası
      • Fiyat Kodu
      • Kontrat Detay
      • Entegrasyon Bağlantı Tanımları
      • Stok İrsaliye
      • Stok İrsaliye BeforeSave Script
      • Stok Fişi
      • Stok Fişi BeforeSave Script
      • Talep
      • Talep BeforeSave Script
      • Üretim Emri
      • Stok Sayım
      • Stok Sayım BeforeSave Script
      • Tüketim Fişleri
      • Adisyon Before Save Script
      • Stok Fiyat Anlaşması
      • Stok Fiyat Anlaşması BeforeSave Script
      • Misafir Kartı
      • Yeni Talep
      • Yeni Talep BeforeSave Script
      • Yeni Talep AfterSave Script
      • Çağrı Merkezi Kaydı
      • Çağrı Merkezi Kaydı AfterSave Script
      • Üyelik
      • Ödeme Linki
      • Doluluk Grafikleri
      • Dağılım Analizi
      • Park Giriş BeforeClone Script
      • Park Giriş
      • Park Rezervasyonu
      • Park Rezervasyonu BeforeSave Script
      • Park Rezervasyonu BeforeClone Script
      • Seyahat Acentası
      • Kullanıcı Bilgileri
      • Kullanıcı Bilgileri BeforeSave Script
      • Medikal Rezervasyon Kartı
      • Medikal BeforeSave Script
      • Medikal BeforeClone Script
      • Ödeme Linki
      • Ödeme Linki BeforeSave Script
  • Group 5
    • IP Santral Entegrasyonu
    • Ip Santral Sistemi
    • File Transfer Service
    • IP Santral Engtegrasyonu Angus Kullanımı
  • Response Header'larındaki Alanlar ve Anlamları
Powered by GitBook
On this page
  1. Group 4
  2. Scriptler

Stok Fişi

Stok Fişi Script

(async () => {
  console.log('angus.recordService.formGroup.value: ',this.recordService.formGroup.value);
  const awaitIf = async (fn, ms = 100) => {
    await new Promise(async (resolve, reject) => {
      let result = false;
      try {
        result = fn();
      } catch (e) {
        console.error(e);
      }
  
      if (result) {
        resolve(true);
      } else {
        await rxjs.timer(ms).toPromise();
        resolve(await awaitIf(fn));
      }
    });
  };
  let StockGrid = this.allGrids['stock-fiches-details'];
  await awaitIf(() => StockGrid.grid && StockGrid.grid.agGrid && StockGrid.grid.agGridReady, 0);
    
    
  
  document.querySelector('.ang-record-stock-fiches .ang-panel-stocks').style.display = 'none';
  document.querySelector('.ang-record-stock-fiches .ang-panel-stocks').parentElement.style.display = 'none';
  document.querySelector('.ang-record-stock-fiches .dynamic-container').style.gridTemplateAreas = 
  `"P1" "P2"`;
  document.querySelector('#openStocks .mat-icon').style.transform= 'rotate(180deg)'
  
  const storeSenderControl = this.recordService.elements.storeSenderLookup.api.innerComponent.innerComponent.formControl;
  const storeRecipientControl = this.recordService.elements.storeRecipientLookup.api.innerComponent.innerComponent.formControl;
  this.allFormControls['BRANCHID'].valueChanges.pipe(
    rxjs.filter((value ,index) => index > 1 || this.mode.value === 'insert'),
    rxjs.distinctUntilChanged()
  ).subscribe((branchID) => {
    this.recordService.formGroup.controls.SENDERSTOREID.setValue(null);
    this.recordService.formGroup.controls.RECIPIENTSTOREID.setValue(null);
    storeSenderControl.setValue('abc');
    storeSenderControl.setValue('');
    storeRecipientControl.setValue('abc');
    storeRecipientControl.setValue('');
  });
 
 this.TypeIdChange = async (val)=>{
   let x = this.recordService.formGroup.controls.TYPEID.value;
   if(val){
     x=val;
   }
   if (x != 12) {
        this.allFormControls['SENDERSTOREID_NAME'].enable();
        this.allFormControls['RECIPIENTSTOREID_NAME'].disable();
      }
      else{
        this.allFormControls['SENDERSTOREID_NAME'].enable();
        this.allFormControls['RECIPIENTSTOREID_NAME'].enable();
      }
 }
    let startValue = this.recordService.formGroup.controls.TYPEID.value;
    
    this.allFormControls["TYPEID"].valueChanges.pipe(rxjs.startWith(startValue)).subscribe(async (typeId) => {
      this.TypeIdChange(typeId);
    }); 
    
    this.allFormControls["ID"].valueChanges.pipe(rxjs.startWith(startValue)).subscribe(async (typeId) => {
       this.TypeIdChange();
    });
})();
PreviousStok İrsaliye BeforeSave ScriptNextStok Fişi BeforeSave Script

Last updated 3 years ago