หน้าเว็บ

วันศุกร์ที่ 3 มิถุนายน พ.ศ. 2559

Axapta : ปิด Invent ไม่ได้ Error InventTransExt

ปัญหาคือปิด Invent ไม่ได้เพราะ TransRecid ใน Table InventTransExt ไม่ตรงกับ RecId ของ Table InventTrans
เกิดจากการ
- ยกยอด PO มาผิดพลาด ลบ InventTrans แต่ไม่ได้ลงใน InventtransExt ด้วย
- หรือเกิดจากการ เปลี่ยน Invent Dim แก้ InventTrans เพื่อให้ Post เอกสารได้
Error ตามรูป



วิธีแก้
1. เปิด Table InventTrans และ InventTransExt หา Item เดียวกัน และเปรียบเที่ยบว่าที่ Table InventTransExt Line ไหนที่ InventTransRecId ไม่ตรงกัน โดยดูจาก ที่ปิด Invent Error ตามรูป Tab Session --> Next Number ไปดูใน Calculation List ว่าเป็น Item อะไร  ถ้าไม่มีให้สร้าง แต่ถ้ามีให้แก้ ดูข้อมูลให้ตรงกัน วันที่ InventtDimId และอื่น ๆ ถ้าสร้างต้องใส่ข้อมูลใน InventtransExt ให้ได้มากที่สุด
1.1. แล้ว Run Consistency Check Code นั้น ๆ
1.2. เข้า Run Calculation Help ในตรงที่ปิด Inventory แล้วดูลำดับต่อไป

2. เขียน code SQL หา InventransRecld ที่ไม่มีใน Inventtrans  ใน Query Analyzer
[code=text]SELECT     *
FROM         INVENTTRANS
WHERE     (RECID NOT IN
                          (SELECT     InventTransRecId
                            FROM          inventtransext))[/code]
2.1. นำ code มาสร้าง File ตามตัวอย่าง  [attachment=1]21.ods[/attachment]
2.2. Save File เป็น File CSV ใช้ , คัน ตามตัวอย่าง [attachment=0]ItemInventTransExt.zip[/attachment]
2.3. ใช้ Job เอาเข้าเพื่อ Create InvettranExt Code

[code=text]static void UpdateInventTransExt(Args _args)
{
        AsciiIO                 myFile;

        container               RecData;
        int                     i;

        InventTrans             myInventTrans;
        InventTransExt          inventTransExt;
        InventDim               TableInventDim;

        ItemId                  myItemId;
        RecId                   myRecId;
        inventDimId             myinventDimId;
        DateFinancial           myDateFinancial;
        DatePhysical            myDatePhysical;
        str                     DateStr;
        str                     DateStr2;

;

        myFile=new AsciiIO("D:\\Suwit\\ItemInventTransExt.csv", "r");
        myfile.inFieldDelimiter(",");
        WHILE(myFile.status() == IO_Status::Ok)
            RecData += myFile.read();
        myFile = null;

        myFile=new AsciiIO("D:\\Suwit\\ItemInventTransExt-import.txt", "w");

        ttsBegin;
        for(i=1; i <= conlen(RecData); i++){

            myItemId = conpeek(RecData, i);
            i++;
            myRecId = conpeek(RecData, i);
            i++;
            myinventDimId = conpeek(RecData, i);
            i++;
            DateStr = conpeek(RecData, i);
            myDateFinancial = str2date(DateStr, 321);
            i++;
            DateStr2 = conpeek(RecData, i);
            myDatePhysical = str2date(DateStr2, 321);


            inventTransExt.clear();

            inventTransExt.ItemId               = myItemId;
            inventTransExt.InventTransRecId     = myRecId;

            inventTransExt.InventDimId          = myinventDimId;
            TableInventDim  =  InventDim::find(myinventDimId);

            inventTransExt.InventBatchId        = TableInventDim.inventBatchId;
            inventTransExt.WMSLocationId        = TableInventDim.wMSLocationId;
            inventTransExt.InventLocationId     = TableInventDim.InventLocationId;
            inventTransExt.InventColorId        = TableInventDim.InventColorId;
            inventTransExt.InventSerialId       = TableInventDim.InventSerialId;
            inventTransExt.InventSizeId         = TableInventDim.InventSizeId;
            inventTransExt.ConfigId             = TableInventDim.ConfigId;

            inventTransExt.DateFinancial        = myDateFinancial;
            inventTransExt.DatePhysical         = myDatePhysical;

            inventTransExt.insert();

            myFile.write(strfmt("%1\t%2\t%3\t%4\t%5\t%6", inventTransExt.ItemId, inventTransExt.InventTransRecId, inventTransExt.InventDimId, inventTransExt.DateFinancial, inventTransExt.DatePhysical, inventTransExt.InventBatchId));

        }
        ttsCommit;

    myFile = null;
    info("complete");
}[/code]
2.3. Run Calculation Help อีกที และระบบจะทำการปิด Inventtory ต่อ


Ubununtu: /boot/grub/i386-pc/normal.mod not found linux mint

ใช้แผ่น ubuntu หรือ linux mint  boot เข้าใช้จากแผ่น

- ใช้ Terminal เข้าเป็น root
- sudo mount /dev/sda1(drive boot ที่มีปัญหา) /mnt
- แล้ว copy folder i386-pc จาก mnt   cp -r /mnt/usr/lib/grub/i386-pc /mnt/boot/grub
- reboot เครื่อง


http://unix.stackexchange.com/questions/70538/grub-error-file-grub-i386-pc-normal-mod-not-found

PhpBB3 Local : Web ที่เครื่อง Local ไม่แสดง รูป antispam Code

ต้องติดตั้ง GD เพิ่ม

- apt-get install php5-gd
- /etc/init.d/apache2 restart

เพิ่มขนาด ของ HDD ในเครื่อง VM

- ปิดเครื่อง VM ที่ต้องการ เพิ่มขนาด HDD
- เข้าไปที่ Edit เพิ่มขนาดได้เลขตามที่ต้องการ
- Mount แผ่น boot gpart ถ้าไม่ boot จากแผ่นเข้าไป Seting เลือก option แล้วตั้งเวลาให้นานขึ้น หรือ ติ๊กให้เข้า Bios
- เมื่อ Boot เข้า Gpart ได้แล้วใช้ gpartition resize ได้เลย
- ถ้า Resize ไม่ได้ติด Swop ต้องลบออกก่อน Resize เสร็จแล้วค่อยสร้าง Swap ใหม่
- แล้วแก้ /etc/fstab ใส่ UUID ที่ได้ใหม่ของ Swap เข้าไป ใช้คำสั่ง blkid เพื่อดู UUID http://porpramarn.blogspot.com/2016/06/linux-mount-new-ext4-hard-disk.html

Linux : Mount new ext4 Hard disk

1.ดู UUID ของ hard disk
[code=text]blkid[/code]

2.เพิ่มใน /etc/fstab
[code=text]# /DATA was on /dev/sdb1 during installation
UUID=5edd5dcb-5725-49d7-a399-0f2d0eaa730b /DATA           ext4    defaults        0       2[/code]

ไฟล์ตั้งเวลาลบ Database ใน phpmyadmin ของ Log

ไฟล์อยู่ที่

/var/www/logzilla/html/config/config.php

ตั้งเวลาไว้ 30 หรือ 90 วันค่อยลบใน Database

Ubutun : Terminal แตกไฟล์เอาเฉพาะไฟล์ที่ต้องการ

ในกรณีที่ไฟล์ Zip ใหญ่มาเปิดแล้วแตกไม่ได้ต้องใช้ Terminal และใช้คำสั่งแตกไฟล์เลือกเอาเฉพาะไฟล์ที่เราต้องการ
เปิดไฟล์จาก Box เลยก็ได้

[code=text]tar --verbose --extract --file file name.gz Parth and file name[/code]
เช่น
tar --verbose --extract --file DataCenter_20141003.inc.5.Department.tar.gz DATA/Department/08-งสป/3.\ การขอใช้รถยนต์ส่วนกลาง/ตารางการจองรถ/ปี\ 57/จองรถส่วนกลาง2557.xls

- cd เข้าไป Folder ที่ต้องการก่อน เพื่อ Copy เอาพาทที่อยู่ของไฟล์
- cd เข้า usb box
- ใช้คำสั่งแตก
- รอจนกว่าจะเสร็จ